/* Auth Pages CSS - Stili comuni per pagine di login e registrazione */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body { 
    font-family: 'Inter', sans-serif;
    background: #f0f8ff;
    color: #333;
    overflow: hidden;
}

:root {
    --background-color: rgba(240, 248, 255, 0.8);
    --text-color: rgba(51, 51, 51, 0.95);
    --title-background-color: rgba(210, 230, 250, 0.6);
    --title-text-color: rgba(32, 128, 192, 0.95);
    --widget-color: rgba(200, 220, 240, 0.5);
    --hover-color: rgba(180, 210, 240, 0.6);
    --focus-color: rgba(160, 200, 240, 0.7);
    --number-color: #2080c0;
    --string-color: #3090d0;
}

.auth-container {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}

.form-column {
    position: relative;
    z-index: 10;
    padding: 0;
    width: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    border-right: 1px solid rgba(200, 220, 240, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.animation-column {
    position: relative;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    background-color: rgba(240, 240, 240, 0.7);
    transition: background-color 0.3s ease;
}

.app-title {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 0 15px rgba(32, 128, 192, 0.3);
    z-index: 2000;
    animation: glow 3s infinite alternate;
    pointer-events: none;
    text-align: right;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 10px rgba(32, 128, 192, 0.3);
    }
    100% {
        text-shadow: 0 0 20px rgba(32, 128, 192, 0.5), 0 0 30px rgba(32, 128, 192, 0.2);
    }
}

#scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 45px;
    background: transparent;
    transition: all 0.3s ease;
    z-index: 20;
}

.auth-form-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2080c0;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.auth-form-header p {
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(32, 128, 192, 0.3);
    border-radius: 8px;
    color: #333;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: rgba(32, 128, 192, 0.7);
    box-shadow: 0 0 0 3px rgba(32, 128, 192, 0.15);
    outline: none;
    background: #fff;
}

.form-control.is-invalid {
    border-color: rgba(255, 75, 75, 0.8);
    background-color: rgba(255, 75, 75, 0.1);
}

.invalid-feedback {
    display: block;
    color: rgba(255, 95, 95, 0.9);
    margin-top: 5px;
    font-size: 13px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: rgba(32, 128, 192, 1);
}

.form-check-label {
    font-size: 14px;
    color: rgba(68, 68, 68, 0.9);
}

.energy-button {
    border-radius: 8px;
    background: linear-gradient(to right, rgba(32, 128, 192, 0.9), rgba(40, 160, 220, 0.9));
    color: white;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(32, 128, 192, 0.3);
    transition: all 0.3s;
    width: 100%;
    height: 46px;
    margin: 10px 0;
    cursor: pointer;
    border: 1px solid rgba(32, 128, 192, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.energy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s;
}

.energy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(32, 128, 192, 0.4);
}

.energy-button:hover::before {
    left: 100%;
}

.energy-button:active {
    transform: translateY(1px);
}

.link-group {
    margin-top: 15px;
    text-align: center;
    display: flex;
    justify-content: space-around;
}

.link-btn {
    color: rgba(32, 128, 192, 0.9);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    margin: 5px 10px;
    position: relative;
    padding: 2px 0;
}

.link-btn:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: linear-gradient(to right, rgba(32, 128, 192, 0), rgba(32, 128, 192, 1), rgba(32, 128, 192, 0));
    transition: width 0.3s ease;
}

.link-btn:hover {
    color: rgba(40, 160, 220, 1);
    text-shadow: 0 0 5px rgba(40, 160, 220, 0.4);
}

.link-btn:hover:after {
    width: 100%;
}

.divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
    height: 1px;
    background: rgba(32, 128, 192, 0.2);
}

.divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(240, 248, 255, 0.9);
    padding: 0 15px;
    font-size: 13px;
    color: rgba(80, 80, 80, 0.7);
}

/* Animation overlay to prevent clicks on control panel */
.animation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

/* Fallback per browser che non supportano backdrop-filter */
@supports not (backdrop-filter: blur(5px)) {
    .form-column {
        background-color: rgba(255, 255, 255, 0.95);
    }
    .animation-column {
        background-color: rgba(240, 240, 240, 0.9);
    }
}
@supports not (-webkit-backdrop-filter: blur(5px)) {
    .form-column {
        background-color: rgba(255, 255, 255, 0.95);
    }
    .animation-column {
        background-color: rgba(240, 240, 240, 0.9);
    }
}

/* For smaller screens */
@media (max-width: 1200px) {
    .form-column { flex: 1; }
    .animation-column { flex: 1; }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        overflow: auto;
        height: 100%;
        min-height: 100vh;
    }
    
    .form-column {
        flex: none;
        width: 100%;
        min-height: auto;
        order: 2;
        height: auto;
        padding: 20px;
        border-right: none;
        border-top: 1px solid rgba(200, 220, 240, 0.3);
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .animation-column {
        flex: none;
        position: relative;
        width: 100%;
        height: 35vh;
        min-height: 250px;
        order: 1;
        background-color: rgba(240, 240, 240, 0.7);
        backdrop-filter: blur(5px);
        transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    }
    
    .auth-form-wrapper {
        margin: 20px auto;
        padding: 25px;
        background: transparent;
    }
    
    .app-title {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
    
    #scene-container {
        height: 100%;
    }
}
