/* --- CONFIGURAZIONE E COLORI --- */
:root {
    --bg-main: #05070a;       /* Nero bluastro */
    --bg-darker: #020202;     /* Nero profondo */
    --text-main: #e8e6d9;     /* Avorio */
    --text-muted: #888;       /* Grigio */
    --accent-gold: #e3c66c;   /* Oro Pallido */
    --accent-red: #8b2323;    /* Rosso Ruggine */
    --grid-color: rgba(255, 255, 255, 0.03);
}

html { scroll-behavior: smooth; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sfondo Griglia */
.background-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle, black 40%, transparent 100%);
}

/* --- NAVIGAZIONE --- */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; width: 100%; position: absolute; top: 0; z-index: 10;
}
.logo-text { font-weight: 900; letter-spacing: 2px; color: var(--text-main); }
.logo-text a { text-decoration: none; color: inherit; }

.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 30px; 
    align-items: center; /* Allineamento verticale perfetto */
}

.nav-links a { 
    text-decoration: none; 
    color: var(--text-main); 
    font-weight: 600; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    transition: 0.3s; 
}
.nav-links a:hover, .nav-links a.active { 
    color: var(--accent-gold) !important; /* Forza il colore */
}

/* Bottone Login nella Navbar */
.btn-login-nav {
    color: var(--text-main); text-decoration: none; font-weight: 600;
    font-size: 0.9rem; text-transform: uppercase; transition: 0.3s;
    border: none; background: none; padding: 0;
}
.btn-login-nav:hover { color: var(--accent-gold); }

/* Avatar Tondo Utente */
.nav-user-container { display: flex; align-items: center; position: relative; height: 100%; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background-color: #333; color: white; font-weight: bold; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; user-select: none;
}
.user-avatar:hover { box-shadow: 0 0 0 2px var(--accent-gold); }

/* Menu a Tendina Utente */
.user-dropdown {
    display: none; position: absolute; top: 150%; right: -10px;
    background-color: var(--bg-darker); border: 1px solid #333; width: 200px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8); border-top: 2px solid var(--accent-gold);
    flex-direction: column; z-index: 1000;
}
.user-dropdown.show { display: flex; }
.user-header { background-color: rgba(227, 198, 108, 0.05); padding: 15px; border-bottom: 1px solid #333; }
.user-name { display: block; color: var(--accent-gold); font-weight: 800; font-size: 0.9rem; }
.user-role { font-family: 'Courier Prime', monospace; font-size: 0.7rem; color: #666; text-transform: uppercase; }
.user-dropdown a { padding: 12px 15px; text-decoration: none; color: #ccc; border-bottom: 1px solid #1a1a1a; font-size: 0.85rem; transition: 0.2s; }
.user-dropdown a:hover { background-color: rgba(255,255,255,0.05); color: white; border-left: 3px solid var(--accent-gold); }
.user-dropdown a#action-logout { color: #ff5555; border-bottom: none; }
.user-dropdown a#action-logout:hover { background: rgba(255, 85, 85, 0.1); border-left-color: #ff5555; }

/* --- HERO SECTION --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }

.hero-content { position: relative; padding: 60px; display: inline-block; }

.brand-title { font-size: 5rem; font-weight: 900; letter-spacing: 10px; line-height: 1; margin: 0; }
.brand-subtitle { font-size: 1.5rem; font-weight: 300; color: var(--accent-red); letter-spacing: 8px; margin-bottom: 20px; margin-top: -10px; }

/* FIX TYPEWRITER (Macchina da scrivere) */
.tagline { margin-bottom: 40px; color: var(--text-muted); }
.typewriter {
    font-family: 'Courier Prime', monospace;
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid var(--accent-gold);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 2px;
    width: 34ch;
    max-width: 100%; /* FIX MOBILE: Impedisce al testo di uscire dallo schermo */
    animation: typing 3.5s steps(34, end), blink-caret 0.75s step-end infinite;
}
@keyframes typing { from { width: 0 } to { width: 34ch } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--accent-gold) } }
/* --- PENNELLATE STATICHE (Logo Originale) --- */
.live-brush {
    position: absolute;
    background-color: var(--accent-gold);
    height: 12px; width: 250px;
    box-shadow: 0 0 15px rgba(227, 198, 108, 0.4);
    z-index: 10; pointer-events: none;
    clip-path: polygon(0 40%, 10% 0, 100% 20%, 90% 100%, 0 80%);
    transition: opacity 0.1s ease;
}

.brush-top-left { top: -20px; left: -40px; transform: rotate(-25deg); }
.brush-bottom-right { bottom: 40px; right: -40px; transform: rotate(-25deg); }

/* Quando parte l'azione, le linee statiche spariscono */
body.snaking .live-brush { opacity: 0; }

/* --- I PROIETTILI FANTASMA (Generati da JS) --- */
.brush-bullet {
    position: absolute; background-color: var(--accent-gold);
    width: 80px; height: 6px; border-radius: 3px;
    box-shadow: 0 0 20px rgba(227, 198, 108, 1);
    z-index: 100; pointer-events: none; transform-origin: center;
}

/* --- BOTTONI (Fixati con Flexbox) --- */
/* --- BOTTONI (CORRETTO) --- */
.btn-container { display: flex; gap: 20px; justify-content: center; }

/* Bottone Principale (Oro) */
.btn-gold {
    display: inline-block; padding: 15px 35px;
    border: 1px solid var(--accent-gold); color: var(--accent-gold);
    text-decoration: none; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    transition: 0.3s; background: transparent; cursor: pointer;
    position: relative; overflow: hidden;
    font-family: 'Montserrat', sans-serif; /* Forza il font sui <button> */
    font-size: 1rem;
}
.btn-gold:hover { background: var(--accent-gold); color: var(--bg-main); box-shadow: 0 0 15px rgba(227, 198, 108, 0.3); }

/* Bottone Steam (Blu Scuro) */
.btn-steam {
    display: inline-block; padding: 15px 30px; background-color: #171a21; color: white;
    text-decoration: none; font-weight: bold; border-radius: 2px; transition: 0.3s; width: 100%; text-align: center;
    font-family: 'Montserrat', sans-serif; border: none; cursor: pointer;
}
.btn-steam:hover { background-color: #2a475e; transform: translateY(-2px); }

/* Bottone Secondario (Trasparente/Ghost) - FIXATO */
.btn-outline {
    display: inline-block; 
    padding: 15px 30px; 
    border: 1px solid #666; /* Colore bordo grigio scuro */
    color: #888;            /* Testo grigio */
    text-decoration: none; 
    font-weight: 700;       
    transition: 0.3s;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif; /* Importante per i <button> */
    font-size: 0.9rem;
    
    /* Resetta lo sfondo per essere trasparente */
    background: transparent; 
    cursor: pointer;
    line-height: normal;
}

/* Effetto Hover: Diventa bianco e luminoso */
.btn-outline:hover { 
    border-color: var(--text-main); /* Diventa avorio */
    color: var(--text-main);        /* Testo avorio */
    background: rgba(255,255,255,0.05); /* Leggerissimo sfondo bianco */
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Versione piccola del bottone outline (usata in impostazioni) */
.btn-outline.small {
    padding: 8px 15px; 
    font-size: 0.8rem; 
    margin-left: auto;
}
.btn-outline:hover { border-color: var(--text-main); color: var(--text-main); background: rgba(255,255,255,0.05); }

/* Bottone Launcher nella Navbar */
.btn-launcher {
    border: 1px solid var(--text-muted); padding: 8px 15px; border-radius: 4px;
    font-size: 0.8rem; transition: 0.3s;
}
.btn-launcher:hover { border-color: var(--accent-gold); color: var(--accent-gold) !important; box-shadow: 0 0 10px rgba(227, 198, 108, 0.2); }

/* --- STILI PAGINE INTERNE --- */
.page-header {
    padding: 150px 5% 50px;
    background: linear-gradient(to bottom, #0a0a0a, transparent); text-align: center;
}
.page-header h1 { font-size: 3rem; letter-spacing: 5px; color: var(--accent-gold); text-transform: uppercase; }

.section-padding { padding: 100px 5%; }
.bg-darker { background-color: var(--bg-darker); border-top: 1px solid #111; border-bottom: 1px solid #111; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { font-size: 2.5rem; text-transform: uppercase; margin-bottom: 50px; border-left: 4px solid var(--accent-red); padding-left: 20px; }

/* PROGETTI */
.project-card { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; margin-bottom: 100px; }
.poster-placeholder {
    width: 100%; aspect-ratio: 2/3; background: #0a0a0a; border: 1px solid #333;
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: #333; font-weight: bold; font-size: 1.5rem;
}
.project-title { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.project-meta { color: var(--accent-gold); font-family: 'Courier Prime'; margin-bottom: 20px; font-size: 0.9rem; }
.project-desc { opacity: 0.8; margin-bottom: 30px; font-size: 1.1rem; }
/* --- OPZIONI DI ACQUISTO (Pagina Progetti) --- */
.purchase-options { 
    display: grid; grid-template-columns: 1fr 1.2fr; 
    gap: 20px; margin-top: 30px; align-items: end; 
}

.purchase-card { 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid #333; 
    padding: 20px; border-radius: 4px; 
    position: relative; transition: 0.3s; 
}

/* Opzione Steam */
.steam-option:hover { 
    border-color: #2a475e; background: rgba(42, 71, 94, 0.2); 
}

/* Opzione Kripix (Evidenziata) */
.kripix-option { 
    background: rgba(227, 198, 108, 0.05); 
    border: 1px solid var(--accent-gold); 
    box-shadow: 0 0 20px rgba(0,0,0,0.5); 
}
.kripix-option:hover { 
    box-shadow: 0 0 30px rgba(227, 198, 108, 0.15); 
    transform: translateY(-5px); 
}

.best-value-tag { 
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%); 
    background: var(--accent-gold); color: var(--bg-darker); 
    font-size: 0.7rem; font-weight: 900; padding: 4px 10px; 
    border-radius: 2px; text-transform: uppercase; 
}

.option-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 10px; font-family: 'Courier Prime'; 
}
.platform-icon { font-weight: bold; font-size: 0.9rem; opacity: 0.7; }
.price { font-size: 1.4rem; font-weight: bold; color: var(--text-main); }
.option-desc { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.4; opacity: 0.8; }
.full-width { width: 100%; }
.drm-note { font-size: 0.7rem; color: #666; text-align: center; margin-top: 10px; }


/* --- STUDIO (I Pilastri) --- */
.studio-intro { font-size: 1.2rem; max-width: 800px; margin-bottom: 50px; opacity: 0.9; }

.pillars-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
}

.pillar-card { 
    background: rgba(255,255,255,0.02); padding: 30px; 
    border: 1px solid #222; transition: 0.3s; 
}
.pillar-card:hover { border-color: var(--accent-red); transform: translateY(-5px); }
.pillar-card h4 { color: var(--accent-gold); margin-bottom: 15px; font-size: 1.2rem; }
.pillar-card p { font-size: 0.9rem; opacity: 0.7; }


/* --- CONTATTI --- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }

.contact-links { list-style: none; margin-top: 30px; }
.contact-links li { margin-bottom: 15px; }
.contact-links a { 
    color: var(--text-main); text-decoration: none; font-size: 1.1rem; 
    border-bottom: 1px solid #333; padding-bottom: 5px; transition: 0.3s; 
}
.contact-links a:hover { color: var(--accent-gold); border-color: var(--accent-gold); }

/* Form */
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { 
    display: block; margin-bottom: 5px; font-size: 0.9rem; 
    color: var(--accent-gold); font-family: 'Courier Prime'; 
}
.contact-form input, .contact-form textarea { 
    width: 100%; padding: 15px; background: #0a0a0a; border: 1px solid #333; 
    color: white; font-family: 'Montserrat'; font-size: 1rem; 
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent-gold); }


/* --- FOOTER --- */
footer { 
    text-align: center; padding: 40px; 
    font-size: 0.8rem; opacity: 0.5; margin-top: 50px; 
}
/* --- MENU HAMBURGER (Icona) --- */
.hamburger {
    display: none; cursor: pointer;
    flex-direction: column; gap: 5px;
}
.hamburger span {
    display: block; width: 25px; height: 3px;
    background-color: var(--text-main); transition: 0.3s;
}

/* Animazione Hamburger -> X */
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* --- PAGINA DOWNLOAD --- */
.download-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; margin-bottom: 80px; 
}

.os-card { 
    background: rgba(255, 255, 255, 0.02); border: 1px solid #333; 
    padding: 40px 20px; text-align: center; border-radius: 4px; 
    position: relative; transition: 0.3s; 
}
.os-card:hover { border-color: var(--text-muted); background: rgba(255,255,255,0.05); }

.os-icon svg { width: 60px; height: 60px; margin-bottom: 20px; fill: var(--text-muted); transition: 0.3s; }

.os-card h3 { font-size: 1.5rem; margin-bottom: 5px; color: var(--text-main); }
.os-specs { font-size: 0.9rem; color: var(--text-muted); font-family: 'Courier Prime'; margin-bottom: 30px; }

/* OS Rilevato (Evidenziato) */
.os-card.highlighted { 
    border: 2px solid var(--accent-gold); background: rgba(227, 198, 108, 0.05); 
    transform: scale(1.05); box-shadow: 0 0 30px rgba(0,0,0,0.8); z-index: 10; 
}
.os-card.highlighted .os-icon svg { fill: var(--accent-gold); }

.os-tag { 
    display: none; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); 
    background: var(--accent-gold); color: var(--bg-darker); font-size: 0.7rem; font-weight: 900; 
    padding: 4px 15px; border-radius: 2px; text-transform: uppercase; 
}
.os-card.highlighted .os-tag { display: block; }

.launcher-features { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; 
    border-top: 1px solid #222; padding-top: 50px; 
}
.feature-item { text-align: center; }
.f-icon { font-size: 2.5rem; display: block; margin-bottom: 15px; }
.feature-item h4 { color: var(--accent-gold); margin-bottom: 10px; }
.feature-item p { font-size: 0.9rem; opacity: 0.7; }


/* --- LOGIN & REGISTRAZIONE --- */
.login-container { height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.back-link { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; font-weight: bold; font-family: 'Courier Prime'; transition: 0.3s; }
.back-link:hover { color: var(--accent-gold); }

.login-box { 
    width: 100%; max-width: 450px; background: rgba(10, 10, 10, 0.95); 
    border: 1px solid #333; padding: 40px; position: relative; box-shadow: 0 0 50px rgba(0,0,0,0.8); 
}
.login-box::before { 
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; 
    background: var(--accent-gold); box-shadow: 0 0 15px var(--accent-gold); 
}

.login-header { text-align: center; margin-bottom: 40px; }
.login-header h2 { font-size: 2rem; letter-spacing: 3px; margin-bottom: 5px; }

.input-group { margin-bottom: 25px; position: relative; }
.input-group label { display: block; font-family: 'Courier Prime'; font-size: 0.75rem; color: var(--accent-gold); margin-bottom: 8px; }
.input-group input { 
    width: 100%; padding: 12px 15px; background: rgba(255,255,255,0.03); 
    border: 1px solid #333; color: white; font-family: 'Montserrat'; font-size: 1rem; transition: 0.3s; 
}
/* Bagliore sugli input attivi */
.input-group input:focus, .add-friend-box input:focus { 
    outline: none; 
    border-color: var(--accent-gold); 
    background: rgba(227, 198, 108, 0.05);
    box-shadow: 0 0 15px rgba(227, 198, 108, 0.2); /* Questo crea l'alone luminoso */
    transition: all 0.3s ease;
}

/* Errori Validazione */
.input-error { border-color: #ff5555 !important; animation: shake 0.3s ease-in-out; }
.validation-msg { display: none; color: #ff5555; font-family: 'Courier Prime'; font-size: 0.7rem; margin-top: 5px; font-weight: bold; }
@keyframes shake { 0%, 100% {transform: translateX(0);} 25% {transform: translateX(-5px);} 75% {transform: translateX(5px);} }

.form-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; font-size: 0.85rem; color: var(--text-muted); }
.login-footer { margin-top: 30px; text-align: center; border-top: 1px solid #222; padding-top: 20px; font-size: 0.9rem; color: var(--text-muted); }
.register-link { display: block; margin-top: 10px; color: var(--accent-gold); font-weight: bold; text-decoration: none; }


/* --- MODALI & GALLERIA --- */
.modal-overlay, .lightbox-overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.9); z-index: 10000; 
    align-items: center; justify-content: center; backdrop-filter: blur(5px); 
}
.modal-box { 
    background: #0a0a0a; 
    border: 1px solid #333; 
    border-top: 3px solid var(--accent-gold); 
    padding: 30px; 
    max-width: 500px; 
    width: 90%; 
    max-height: 90vh; /* FIX MOBILE: Evita che il modale esca dallo schermo in altezza */
    overflow-y: auto; /* FIX MOBILE: Rende il modale scorrevole se i contenuti sono troppi */
    text-align: center; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.8); 
    animation: slideUp 0.3s ease-out; 
}
.modal-title { font-size: 1.5rem; color: var(--accent-gold); margin-bottom: 15px; font-weight: 800; }
.modal-actions { display: flex; gap: 15px; justify-content: center; margin-top: 20px; }

/* Galleria */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; }
.gallery-thumb { 
    width: 100%; aspect-ratio: 16/9; background: #1a1a1a; border: 1px solid #333; 
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; 
    font-family: 'Courier Prime'; color: #666; font-size: 0.7rem; 
}
.gallery-thumb:hover { border-color: var(--accent-gold); transform: translateY(-3px); color: var(--accent-gold); }

/* Lightbox */
.lightbox-overlay { z-index: 11000; flex-direction: column; }
.lightbox-caption { margin-top: 15px; color: var(--accent-gold); font-family: 'Courier Prime'; letter-spacing: 2px; }
.close-lightbox { position: absolute; top: 30px; right: 40px; font-size: 3rem; color: #666; cursor: pointer; transition: 0.3s; }
.close-lightbox:hover { color: white; transform: rotate(90deg); }
@keyframes slideUp { from {transform: translateY(20px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }


/* --- MEDIA QUERY (Mobile Responsive) --- */
@media (max-width: 768px) {
    /* Menu */
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed; left: -100%; top: 70px; flex-direction: column;
        background-color: rgba(5, 7, 10, 0.98); width: 100%; text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding: 40px 0;
        border-bottom: 1px solid var(--accent-gold); gap: 30px; z-index: 99;
    }
    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 15px 0; }
    
    /* Layout */
    .brand-title { font-size: 3rem; }
    .project-card, .contact-layout, .purchase-options { grid-template-columns: 1fr; }
    .launcher-features { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .os-card.highlighted { transform: scale(1); }
    .live-brush { display: none; }
}
/* --- STILI PER IL MODALE DI DOWNLOAD (Mini Card) --- */

/* Griglia per affiancare Win e Mac */
.mini-dl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

/* Stile della Mini Card */
.mini-os-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 20px;
    border-radius: 4px;
    transition: 0.3s;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mini-os-card:hover {
    border-color: var(--accent-gold);
    background: rgba(227, 198, 108, 0.05);
    transform: translateY(-3px);
}

/* Icone SVG dentro la mini card */
.mini-os-icon svg {
    width: 40px; 
    height: 40px; 
    fill: #888; /* Grigio di base */
    margin-bottom: 10px; 
    transition: 0.3s;
}

.mini-os-card:hover .mini-os-icon svg { 
    fill: var(--accent-gold); /* Diventa oro al passaggio */
}

/* Testi dentro la card */
.mini-os-title { 
    font-weight: bold; 
    color: #fff; 
    margin-bottom: 5px; 
    font-size: 1rem;
}

.mini-os-spec { 
    font-family: 'Courier Prime', monospace; 
    font-size: 0.7rem; 
    color: #666; 
    margin-bottom: 15px; 
}

/* Mobile: Card una sotto l'altra */
@media (max-width: 600px) {
    .mini-dl-grid { grid-template-columns: 1fr; }
}
/* --- TOOLTIP TASTO COPIA --- */
.btn-container-relative {
    position: relative; /* Serve per posizionare il tooltip */
}

.copy-tooltip {
    position: absolute;
    top: -40px; /* Appare sopra i bottoni */
    right: 0;   /* Allineato a destra (sopra la chiave) */
    background-color: var(--accent-gold);
    color: var(--bg-darker);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    pointer-events: none; /* Non cliccabile */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Classe per l'animazione */
.copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Triangolino sotto il tooltip (freccetta) */
.copy-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 20px; /* Centrato rispetto al tasto chiave */
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent-gold) transparent transparent transparent;
}
/* --- SCHEDA PROMO DEVELOPER (PROFILO) --- */
.dev-access-card {
    background: linear-gradient(45deg, rgba(227, 198, 108, 0.05), transparent);
    border: 1px dashed var(--accent-gold);
    padding: 25px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.3s;
}

.dev-access-card:hover {
    background: rgba(227, 198, 108, 0.1);
    box-shadow: 0 0 20px rgba(227, 198, 108, 0.1);
    border-style: solid; /* Il bordo diventa solido all'hover */
}

.dev-text h4 {
    color: var(--accent-gold);
    margin-bottom: 5px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.dev-text p {
    color: #888;
    font-size: 0.85rem;
    font-family: 'Courier Prime', monospace;
}

.btn-dev-action {
    background: var(--bg-darker);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 10px 20px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
}

/* --- BOTTONE DISCORD --- */
.btn-discord {
    background: var(--bg-darker);
    border: 1px solid #5865F2; /* Blu Discord */
    color: #5865F2;
    padding: 10px 20px;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif; /* FIX FONT: Forza il font corretto! */
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
    cursor: pointer; /* FIX: Mostra la manina quando ci passi sopra */
    text-transform: uppercase;
}

.btn-discord:hover {
    background: #5865F2;
    color: #fff;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}

.btn-dev-action:hover {
    background: var(--accent-gold);
    color: #000;
}

/* Adattamento mobile */
@media(max-width: 600px) {
    .dev-access-card { flex-direction: column; text-align: center; gap: 20px; }
}
/* =========================================
   FIX MOBILE PER ENGINE.HTML
   ========================================= */

@media (max-width: 768px) {

    /* 1. FIX MENU HAMBURGER TRASPARENTE */
    nav {
        background-color: var(--bg-main); /* Sfondo nero alla barra in alto */
        z-index: 9999; /* Assicura che stia sopra a tutto, anche alla griglia animata */
        position: relative;
    }

    .nav-menu {
        background-color: #05070a !important; /* Sfondo solido quando apri il menu */
        z-index: 10000;
        width: 100%;
    }

    /* 2. FIX CASELLA ROSSA (WARNING BOX) */
    .warning-box {
        flex-direction: column; /* Icona sopra, testo sotto */
        align-items: center;
        text-align: center;
        width: 100%; /* Occupa tutto lo spazio */
        box-sizing: border-box; /* Evita che il padding rompa la larghezza */
    }

    /* 3. FIX GRIGLIA FEATURES (VRAM, NANO-VOXEL...) */
    .download-grid {
        grid-template-columns: 1fr !important; /* Una colonna sola */
        gap: 20px;
    }

    /* 4. FIX TITOLO GIGANTE */
    .engine-hero h1 {
        font-size: 3rem !important; /* Riduce il titolo da 5rem a 3rem */
        word-wrap: break-word; /* Evita che esca dallo schermo */
    }

    .engine-hero {
        height: auto; /* Altezza adattabile */
        padding: 150px 20px 80px; /* Più spazio in alto per non finire sotto il menu */
    }

    /* 5. FIX EULA (Testo legale) */
    .eula-container {
        height: 400px; /* Più alto su mobile per leggere meglio */
        font-size: 0.7rem; /* Testo leggermente più piccolo */
    }
}
/* --- SCROLLBAR CUSTOM KRIPX --- */
::-webkit-scrollbar {
    width: 8px; /* Più sottile ed elegante */
}
::-webkit-scrollbar-track {
    background: var(--bg-main); 
    border-left: 1px solid #222;
}
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold); /* Diventa oro quando ci passi sopra */
}
/* --- ANIMAZIONE ENTRATA UNIVERSALE --- */
@keyframes bootSequence {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Applichiamo l'animazione ai blocchi principali di testo/contenuto */
.page-header, .section-padding .container, .login-box, .project-card {
    animation: bootSequence 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
/* ==========================================
   SISTEMA NOTIFICHE GLOBALI (TOAST UI)
   ========================================== */
#kripix-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999999;
    pointer-events: none;
}

.kripix-toast {
    background: rgba(5, 7, 10, 0.95);
    border: 1px solid #333;
    border-left: 4px solid var(--accent-gold);
    color: var(--text-main);
    padding: 15px 20px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.9);
    width: 320px;
    pointer-events: auto;
    
    /* Animazione di base fuori dallo schermo */
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kripix-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.kripix-toast-title {
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 5px;
    font-size: 0.75rem;
    letter-spacing: 1px;
}
/* ==========================================
   COOKIE CONSENT TERMINAL
   ========================================== */
#kripix-cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    background: rgba(5, 7, 10, 0.95);
    border: 1px solid #333;
    border-left: 4px solid var(--accent-gold);
    padding: 25px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
    
    /* Animazione di entrata dal basso */
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#kripix-cookie-banner.show {
    transform: translateY(0);
}

.cookie-title {
    color: var(--accent-gold);
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.cookie-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid #666;
    transition: 0.3s;
}
.cookie-text a:hover { color: var(--accent-gold); border-color: var(--accent-gold); }

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-cookie {
    flex: 1;
    padding: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: 0.3s;
}

.btn-cookie-accept {
    background: var(--accent-gold);
    color: #000;
}
.btn-cookie-accept:hover { background: #fff; }

.btn-cookie-reject {
    background: transparent;
    border-color: #444;
    color: #888;
}
.btn-cookie-reject:hover { border-color: #888; color: #fff; }

@media (max-width: 600px) {
    #kripix-cookie-banner { bottom: 0; left: 0; max-width: 100%; border-left: none; border-top: 4px solid var(--accent-gold); }
}
/* --- CLASSE PER I BOTTONI DI SUCCESSO (VERDI) --- */
.btn-success {
    background-color: #4caf50 !important;
    color: #000 !important;
    border-color: #4caf50 !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4) !important;
}
/* --- SELETTORE LINGUA --- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lang-switcher span:not(.lang-separator) {
    cursor: pointer;
    transition: 0.3s;
}

/* Effetto quando passi sopra col mouse (diventa Oro) */
.lang-switcher span:not(.lang-separator):hover {
    color: var(--accent-gold);
}

/* Stile per la stanghetta divisoria */
.lang-separator {
    color: #333;
    user-select: none;
}
/* ==========================================
   FAT FOOTER (Per tutte le pagine tranne Index)
   ========================================== */
.kripix-footer {
    background: #020202;
    border-top: 1px solid #111;
    padding: 60px 5% 20px;
    margin-top: 100px;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px dashed #222;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: var(--accent-gold);
    font-family: 'Courier Prime', monospace;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }

/* Sostituisci la vecchia riga .footer-col ul a con questa: */
.footer-col p { color: #aaa !important; }

.footer-col ul a {
    color: #aaa; /* Prima era #666, ora è molto più leggibile */
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    display: inline-block;
}

.footer-col ul a:hover {
    color: var(--text-main); /* Diventa bianco avorio al passaggio del mouse */
    transform: translateX(5px); 
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: #888; /* Schiarito anche questo */
}
/* CLASSE PER BLOCCARE LO SCROLL QUANDO IL MENU MOBILE È APERTO */
body.no-scroll {
    overflow: hidden;
}
/* CLASSE PER FORZARE IL CURSORE LAMPEGGIANTE (per l'Easter Egg JS) */
.cursor-blink {
    border-right: 3px solid var(--accent-gold);
    animation: blink-caret 0.75s step-end infinite;
}
/* 1. AGGIUNGI overflow: hidden ALLA CHAT WINDOW */
        .chat-window {
            background: #05070a;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden; /* FIX: Impedisce ai messaggi di spingere la barra fuori */
        }
        
        /* 2. AGGIUNGI flex-shrink: 0 ALLA BARRA INPUT E OVERSEER */
        .chat-input-area {
            padding: 20px 30px;
            background: #020202;
            border-top: 1px solid #333;
            display: flex; gap: 15px;
            flex-shrink: 0; /* FIX: La barra non si schiaccerà mai */
        }
        .overseer-block {
            display: none; width: 100%; text-align: center;
            padding: 20px; font-family: 'Courier Prime'; color: #ff5555;
            background: #0a0a0a; border-top: 1px solid #333;
            flex-shrink: 0; /* FIX: Nemmeno questa si schiaccia */
        }

        /* STILE PER LO STATO DEL MESSAGGIO (Consegnato/Letto) */
        .msg-receipt {
            font-family: 'Courier Prime', monospace;
            font-size: 0.65rem;
            align-self: flex-end;
            margin-top: -10px;
            margin-bottom: 15px;
            margin-right: 5px;
            transition: color 0.3s ease;
            letter-spacing: 1px;
        }
        .receipt-sent { color: #666; } /* Grigio scuro, non dà nell'occhio */
        .receipt-read { color: var(--accent-gold); } /* Oro Kripix quando viene letto */


/* ============================================================
   PAGE LOADER — Schermata di caricamento tra le pagine
   Stile terminale / noir coerente con l'estetica Kripix.
   ============================================================ */

#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-darker, #020202);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity .4s ease;
}

#page-loader.loader-fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.loader-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 10px;
    color: var(--text-main, #e8e6d9);
    text-shadow: 0 0 30px rgba(227, 198, 108, .15);
}

/* Barra di progresso animata */
.loader-bar {
    width: 180px;
    height: 3px;
    background: #222;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gold, #e3c66c);
    animation: loaderFill 1.2s ease-in-out forwards;
}

@keyframes loaderFill {
    0%   { width: 0%; }
    60%  { width: 70%; }
    100% { width: 100%; }
}

.loader-text {
    font-family: 'Courier Prime', monospace;
    font-size: .75rem;
    color: #555;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: loaderBlink 1s step-end infinite;
}

@keyframes loaderBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .3; }
}