/* BASE */
body {
    background-color: #000;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 255, .05) 25%, rgba(0, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, .05) 75%, rgba(0, 255, 255, .05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 255, .05) 25%, rgba(0, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, .05) 75%, rgba(0, 255, 255, .05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    /* L'effetto "Vetro" che distorce lo sfondo */
    backdrop-filter: blur(2px);
    color: #9AA3AE;
    box-shadow:
    0 0 20px rgba(0, 255, 255, 0.1), /* Glow esterno */
    inset 0 0 15px rgba(0, 255, 255, 0.05); /* Glow interno */
border: 1px solid rgba(0, 255, 255, 0.3) !important;
backdrop-filter: blur(10px); /* Effetto vetro smerigliato */
}

.mainframe { width: 960px; margin: 0 auto; }

/* HEADER - Finalmente un titolo degno */
#header {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
    background: #000;
}

/* L'immagine di sfondo dell'header */
.header-bg-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url("img/violet.png") no-repeat center center; /* Carica un'immagine figa qui */
    background-size: cover;
    filter: grayscale(100%) brightness(70%) contrast(120%);
    opacity: 0.6;
    transform: scale(1.1);
    transition: transform 10s ease-in-out;
}

#header:hover .header-bg-image {
    transform: scale(1.0); /* L'immagine si muove lentamente quando passi il mouse nell'area */
}

/* L'effetto HUD (linee e cerchi tecnologici) */
.header-hud-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.8) 100%),
                      repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 255, 0.05) 3px);
    pointer-events: none;
}

/* Il Titolo */
.main-title {
    font-size: 80px;
    font-weight: 900;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    color: #e1e1e1;
    text-transform: uppercase;
    letter-spacing: -5px;
    margin: 0;
    padding-top: 100px;
    position: relative;
    z-index: 5;
    text-shadow: 5px 5px 0px #FF00A6, -2px -2px 0px #0ff; /* Effetto sdoppiamento colore */
}

/* Barra di stato sotto il titolo */
.header-status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #0ff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: -10px;
}

.status-line {
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0ff, transparent);
}

/* Contenitore per allineare icona e testo */
.main-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Spazio tra icona e testo */
    padding-top: 100px; /* Sposta qui il padding che avevi su .main-title */
    position: relative;
    z-index: 10; /* Sopra ogni altro elemento dell'header */
}

.title-icon {
    width: 100px;
    height: auto;
    filter: none !important; /* Rimuove qualsiasi filtro ereditato */
    opacity: 1 !important;    /* Forza l'opacità massima */
    drop-shadow: 0 0 10px rgba(0, 255, 255, 0.5); /* Opzionale: un leggero bagliore coerente */
}

/* Modifica la classe esistente per rimuovere il padding-top ora gestito dal wrapper */
.main-title {
    font-size: 80px;
    font-weight: 900;
    font-family: 'Rajdhani', sans-serif;
    color: #e1e1e1;
    text-transform: uppercase;
    letter-spacing: -5px;
    margin: 0;
    padding-top: 0; /* Azzerato perché gestito dal wrapper */
    position: relative;
    z-index: 5;
    text-shadow: 5px 5px 0px #FF00A6, -2px -2px 0px #0ff;
}

/* Contenitore Navigazione */
.nav-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Contenitore per distanziare i link */
.nav-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* La Scheda Link - Qui forziamo il bordo */
.cyber-nav-item {
    display: flex !important;
    align-items: center;
    background: rgba(0, 255, 255, 0.05) !important;
    /* Bordo ciano chiaro, solido e visibile */
    border: 1px solid rgba(0, 255, 255, 0.4) !important; 
    padding: 15px;
    text-decoration: none !important;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 0 100%);
}

/* Prefisso DOC */
.nav-id {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: #0ff;
    border: 1px solid #0ff;
    padding: 4px 6px;
    margin-right: 15px;
    background: rgba(0, 255, 255, 0.1);
}

/* Titolo del Link */
.nav-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #fff !important; /* Forza il bianco per la leggibilità */
    letter-spacing: 1px;
    text-shadow: none !important; /* Togliamo il bagliore eccessivo qui */
}

.nav-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.nav-status {
    font-size: 9px;
    color: #555;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* --- ANIMAZIONE HOVER --- */
.cyber-nav-item:hover {
    background: rgba(0, 255, 255, 0.15) !important;
    border-color: #0ff !important; /* Il bordo si illumina al massimo */
    padding-left: 25px; /* Slittamento dinamico */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.cyber-nav-item:hover .nav-title {
    color: #0ff !important;
    text-shadow: 0 0 10px #0ff !important;
}

/* Bracket Magenta (quello che compare a destra) */
.nav-bracket {
    position: absolute;
    top: 0;
    right: -5px;
    width: 5px;
    height: 100%;
    background: #ff00ff;
    transition: 0.3s;
    opacity: 0;
}

.cyber-nav-item:hover .nav-bracket {
    right: 0;
    opacity: 1;
}

@keyframes scanLine {
    0% { top: 0%; }
    100% { top: 100%; }
}
/* LAYOUT COLONNE */
#content { display: flex; gap: 20px; justify-content: center; cursor: crosshair; }

.sidecontent, .testo {
    background: rgba(0, 0, 0, 0.9); /* Sfondo quasi nero per leggibilità */
    border: 1px solid #0ff;
    padding: 25px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.sidecontent { width: 300px; }
.content_body { width: 600px; text-align: left; }

/* Contenitore principale del Login */
.login-container {
    position: relative;
    padding: 40px 20px;
    background: rgba(0, 20, 30, 0.8); /* Blu profondissimo semitrasparente */
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    /* Angolo tagliato stile sci-fi */
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
}

/* Etichette (Label) */
.login-field label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: #0ff;
    display: block;
    margin-bottom: 5px;
    text-align: left;
}

/* Campi di Input */
.input-wrapper input {
    width: 90%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-bottom: 2px solid #0ff;
    color: #fff;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    background: rgba(0, 255, 255, 0.1);
    outline: none;
    border-bottom: 2px solid #ff00ff; /* Cambia colore al focus */
}

/* Bottone di Invio */
.login-submit {
    width: 100%;
    background: transparent;
    border: 1px solid #0ff;
    color: #0ff;
    padding: 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
}

.login-submit:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 20px #0ff;
}

/* Decorazione: Linea scanner animata */
.scanner-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: #0ff;
    box-shadow: 0 0 10px #0ff;
    animation: scan 4s infinite linear;
    opacity: 0.5;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Link sotto il form */
.login-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
}

.login-footer a {
    color: rgba(0, 255, 255, 0.5);
    text-decoration: none;
}

.login-footer a:hover {
    color: #ff00ff;
}

/** * Logout */
.logout-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}
.logout-container {
    width: 340px; /* Dimensione vicina alla sidecontent del login */
    text-align: center;
}
.logout-status-notice {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: #FF00A6; /* Variante magenta per disconnessione / allarme */
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(255, 0, 166, 0.4);
}
.logout-user-badge {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.logout-main-text {
    font-size: 13px;
    color: #9AA3AE;
    line-height: 1.5;
    margin-bottom: 25px;
    font-family: 'Rajdhani', sans-serif;
}
/* Pulsante speculare a .login-submit ma con redirect */
.logout-redirect-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid #0ff;
    color: #0ff;
    padding: 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.4s;
    text-decoration: none !important;
    box-sizing: border-box;
}
.logout-redirect-btn:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 20px #0ff;
}
/* DISCLAIMER E TESTI */
.section_title { color: #0ff; border-bottom: 1px solid #0ff; padding-bottom: 5px; }
.disclaimer_box {
    margin-top: 25px;
    padding: 15px;
    border: 1px dashed #FF00A6;
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
    text-align: justify;
}

/* FOOTER E PEGI */
#footer { margin-top: 20px; padding: 20px; text-align: center; }
.credits { font-size: 11px; color: #444; margin-top: 10px; }

/* LINK */
a { color: #FF00A6; text-decoration: none; }
a:hover { color: #0ff; }

/* Per schermi piccoli (tablet/mobile), meglio nasconderlo per non coprire tutto */
@media screen and (max-width: 1200px) {
    .character-left { display: none; }
}

/* Personaggio a SINISTRA (già impostato o per riferimento) */
.character-left {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 80vh;
    background: url("img/personaggio_sx.png") no-repeat bottom left;
    background-size: contain;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.2));
}

/* Personaggio a DESTRA */
.character-right {
    position: fixed;
    bottom: 0;
    right: 0; /* Ancorato a destra */
    width: 400px;
    height: 80vh;
    background: url("img/personaggio_dx.png") no-repeat bottom right;
    background-size: contain;
    z-index: 1; /* Stesso livello dell'altro */
    pointer-events: none; /* Fondamentale per non bloccare il login! */
    opacity: 0.6;
    /* Specchiamo l'ombra o cambiamo colore se vuoi un effetto diverso */
    filter: drop-shadow(0 0 10px rgba(255, 0, 166, 0.2)); 
}

/* Nascondiamo entrambi su schermi piccoli per non soffocare il testo */
@media screen and (max-width: 1400px) {
    .character-left, .character-right {
        display: none;
    }
}

/* --- BANNER COOKIE PROTOCOLLO (ALLINEATO ALLA HOME) --- */
.cookie-container {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 420px;
    background: rgba(0, 20, 30, 0.95); /* Stessa opacità blu profonda del login */
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    padding: 25px; /* Spaziatura uniforme come sidecontent */
    z-index: 99999;
    font-family: 'Rajdhani', sans-serif;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%); /* Taglio identico al login-container */
    animation: slideInUp 0.5s ease-out;
    overflow: hidden;
}

.cookie-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #0ff; /* Ciano coerente con le label */
    letter-spacing: 2px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 6px;
    text-align: left;
}

.cookie-alert-blink {
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
    font-weight: bold;
    animation: cookieBlink 2s infinite;
}

.cookie-text {
    font-size: 12px;
    color: #9AA3AE;
    line-height: 1.4;
    margin: 0 0 20px 0;
    text-align: justify;
}

.cookie-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.cookie-link {
    color: rgba(0, 255, 255, 0.5) !important;
    font-size: 10px;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.cookie-link:hover {
    color: #ff00ff !important;
}

/* Gruppo pulsanti */
.cookie-btn-group {
    display: flex;
    gap: 10px;
}

/* Base comune per i bottoni stile login-submit */
.cookie-btn {
    background: transparent;
    padding: 10px 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.4s;
    text-transform: uppercase;
}

/* Bottone Rifiuta (Variante Magenta/Allarme) */
.btn-reject {
    border: 1px solid #FF00A6;
    color: #FF00A6;
}

.btn-reject:hover {
    background: #FF00A6;
    color: #000;
    box-shadow: 0 0 15px #FF00A6;
}

/* Bottone Accetta (Variante Ciano standard, speculare a login) */
.btn-accept {
    border: 1px solid #0ff;
    color: #0ff;
}

.btn-accept:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 15px #0ff;
}

/* Sfarfallio dell'avviso */
@keyframes cookieBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Ottimizzazione per layout mobile */
@media screen and (max-width: 480px) {
    .cookie-container {
        width: calc(100% - 40px);
        left: 20px;
        bottom: 10px;
    }
    .cookie-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .cookie-btn-group {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Recupero pass*/
/* --- POP-UP MODALE RECUPERO PASSWORD --- */
.modal-overlay {
    display: none; /* Nascosto di base, attivato via JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 10, 0.75); /* Sfondo oscurato cyberpunk */
    backdrop-filter: blur(4px); /* Sfocatura sullo sfondo della home */
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    width: 360px !important;
    position: relative;
    padding: 30px 25px 25px 25px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    animation: slideInUp 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Pulsante di chiusura [X] in alto a destra */
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(0, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close-btn:hover {
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
}

.reset-password-wrapper .login-input {
    background: rgba(0, 40, 60, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 12px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
}

.reset-password-wrapper .login-input:focus {
    border-color: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}