/* ==========================================================================
   STYLE_AUTH.CSS - FINAL FIX STELLE
   ========================================================================== */
:root {
    --bg-body: #050505;
    --bg-card: rgba(10, 10, 10, 0.6); 
    --border: rgba(255, 255, 255, 0.1);
    --accent: #fff;
    --text-main: #ececec;
    --text-muted: #888;
    --color-primary: #00ffcc;
    --font-ui: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-ui);
    
    /* Centratura */
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    
    /* SFONDO BASE (Livello -2) */
    background: radial-gradient(circle at top, #1a1a1a 0%, #000000 90%);
    position: relative; /* Necessario per i figli absolute */
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
.hidden { display: none !important; }

/* --- STELLE (Livello 0: Sopra lo sfondo, Sotto il form) --- */
.stars-container {
    position: absolute; /* Cambiato da fixed a absolute per sicurezza */
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; /* Livello base */
    overflow: hidden;
    pointer-events: none; /* Click passano attraverso */
}

#stars {
    width: 1px; height: 1px; background: transparent;
    box-shadow: 1744px 122px #FFF, 134px 1321px #FFF, 162px 324px #FFF, 876px 1265px #FFF, 1832px 1324px #FFF, 173px 1624px #FFF, 1345px 234px #FFF, 734px 1632px #FFF, 134px 362px #FFF, 632px 362px #FFF, 1356px 835px #FFF, 235px 1235px #FFF, 632px 152px #FFF, 1734px 632px #FFF, 835px 234px #FFF;
    animation: animStar 100s linear infinite;
}
#stars::after {
    content: " "; position: absolute; top: -2000px; width: 1px; height: 1px; background: transparent;
    box-shadow: 1744px 122px #FFF, 134px 1321px #FFF, 162px 324px #FFF, 876px 1265px #FFF, 1832px 1324px #FFF, 173px 1624px #FFF, 1345px 234px #FFF, 734px 1632px #FFF, 134px 362px #FFF, 632px 362px #FFF, 1356px 835px #FFF, 235px 1235px #FFF, 632px 152px #FFF, 1734px 632px #FFF, 835px 234px #FFF;
}

#stars2 {
    width: 2px; height: 2px; background: transparent;
    box-shadow: 1324px 632px #FFF, 234px 1734px #FFF, 1324px 362px #FFF, 152px 234px #FFF, 734px 1532px #FFF, 234px 632px #FFF, 1832px 152px #FFF, 734px 835px #FFF, 362px 1734px #FFF, 1356px 234px #FFF;
    animation: animStar 70s linear infinite;
}
#stars2::after {
    content: " "; position: absolute; top: -2000px; width: 2px; height: 2px; background: transparent;
    box-shadow: 1324px 632px #FFF, 234px 1734px #FFF, 1324px 362px #FFF, 152px 234px #FFF, 734px 1532px #FFF, 234px 632px #FFF, 1832px 152px #FFF, 734px 835px #FFF, 362px 1734px #FFF, 1356px 234px #FFF;
}

#stars3 {
    width: 3px; height: 3px; background: transparent;
    box-shadow: 734px 1324px #FFF, 152px 1356px #FFF, 362px 234px #FFF, 152px 734px #FFF;
    animation: animStar 40s linear infinite;
}
#stars3::after {
    content: " "; position: absolute; top: -2000px; width: 3px; height: 3px; background: transparent;
    box-shadow: 734px 1324px #FFF, 152px 1356px #FFF, 362px 234px #FFF, 152px 734px #FFF;
}

@keyframes animStar { from { transform: translateY(0px); } to { transform: translateY(2000px); } }


/* --- NAVBAR (Livello 10) --- */
.auth-nav {
    position: absolute; top: 0; left: 0; width: 100%; padding: 25px 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 10; background: transparent;
}
.nav-logo { font-family: var(--font-mono); font-weight: 800; color: #fff; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.nav-back { color: var(--text-muted); font-size: 0.85rem; border: 1px solid var(--border); padding: 8px 18px; border-radius: 6px; backdrop-filter: blur(5px); }
.nav-back:hover { color: #000; background: #fff; border-color: #fff; }

/* --- CARD (Livello 10) --- */
.auth-card {
    width: 100%; max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 45px; border-radius: 16px;
    text-align: center; position: relative; 
    z-index: 10; /* Sopra le stelle */
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    animation: fadeIn 0.6s ease-out;
    backdrop-filter: blur(8px); /* Effetto vetro fondamentale */
}

.auth-header h2 { margin-bottom: 10px; font-size: 1.8rem; color: #fff; font-weight: 700; }
.auth-header p { color: var(--text-muted); margin-bottom: 35px; font-size: 0.9rem; }

/* --- INPUTS --- */
.form-group { margin-bottom: 25px; text-align: left; }
.form-group label { display: block; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 10px; font-family: var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }

input[type="text"], input[type="password"], input[type="email"] {
    width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.6); border: 1px solid var(--border);
    color: #fff; border-radius: 8px; outline: none; font-size: 1rem; transition: all 0.2s ease;
}
input:focus { border-color: var(--accent); background: #000; }

input.otp-input {
    text-align: center; font-family: var(--font-mono); font-size: 2.2rem; letter-spacing: 12px;
    font-weight: bold; color: #fff; border: 1px solid #333; padding: 10px;
}
input.otp-input:focus { border-color: #fff; box-shadow: 0 0 20px rgba(255, 255, 255, 0.15); background: #000; }

.btn-submit {
    width: 100%; background: var(--accent); color: #000; padding: 14px; border-radius: 8px;
    font-weight: 800; border: none; cursor: pointer; font-size: 0.95rem; text-transform: uppercase;
    letter-spacing: 0.5px; transition: transform 0.2s; margin-top: 10px;
}
.btn-submit:hover { transform: translateY(-2px); background-color: #e0e0e0; }

.auth-footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.auth-footer a { color: #fff; font-weight: 600; margin-left: 5px; }
.auth-footer a:hover { text-decoration: underline; color: var(--accent); }

.error-text { color: #ff4d4d; margin-top: 20px; font-size: 0.85rem; }
.success-text { color: #fff; margin-top: 20px; font-size: 0.85rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }