/* --- RESET E BASE --- */
:root {
    --bg: #090a0a;
    --ui: #111;
    --accent: #fff;
    --text-gray: #888;
    --font-main: 'Inter', sans-serif;
    --font-tech: 'IBM Plex Mono', monospace;
    --nav-height: 50px;
    --anim-speed: 0.5s;
}

* { box-sizing: border-box; }

body, html { margin: 0; padding: 0; background-color: var(--bg); color: var(--accent); font-family: var(--font-main); height: 100%; overflow: hidden; }

/* --- ANIMAZIONI CSS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Classi di utilità per le animazioni */
.fade-in-up { opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fade-out-page { animation: fadeOut 0.3s ease forwards; }
.fade-in-page { animation: fadeIn 0.5s ease forwards; }

/* GLOBAL NAV */
#global-nav { position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height); background: rgba(0,0,0,0.9); border-bottom: 1px solid #222; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 2000; backdrop-filter: blur(5px); transition: transform 0.3s ease; }
.nav-left .nav-home-btn { background: none; border: none; color: #fff; font-family: var(--font-tech); font-size: 11px; font-weight: 700; letter-spacing: 1px; cursor: pointer; text-transform: uppercase; }
.nav-right { display: flex; align-items: center; gap: 15px; }
.nav-right button { background: none; border: none; color: #666; font-family: var(--font-tech); font-size: 10px; letter-spacing: 1px; cursor: pointer; transition: color 0.3s; }
.nav-right button:hover { color: #fff; }
.nav-right button.nav-active { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.nav-divider { color: #333; font-size: 10px; }

/* LANDING */
.content-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding: 40px 20px; text-align: center; }
header { margin-bottom: 5vh; }
.main-title { font-family: var(--font-main); font-size: clamp(1.5rem, 4vw, 3rem); letter-spacing: 0.2rem; font-weight: 700; margin: 0 0 1rem 0; color: var(--accent); }
.subtitle { font-family: var(--font-tech); font-size: 0.75rem; color: var(--text-gray); letter-spacing: 2px; text-transform: uppercase; }
.noise-container { position: relative; width: 280px; height: 280px; max-width: 60vw; max-height: 60vw; border: 1px solid #222; margin-bottom: 6vh; }
#threshold-noise { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; filter: contrast(1.2) grayscale(100%); animation: noisePulse 4s infinite alternate; }
.overlay-data { position: absolute; bottom: -20px; right: 0; font-family: var(--font-tech); font-size: 9px; color: #444; letter-spacing: 1px; }
.text-block { max-width: 600px; margin-bottom: 6vh; }
.tech-text { font-family: var(--font-tech); font-size: 0.8rem; color: #666; line-height: 1.8; max-width: 90%; margin: 0 auto; }
.cta { background: transparent; border: 1px solid #333; color: var(--accent); padding: 18px 60px; font-family: var(--font-tech); font-size: 0.75rem; letter-spacing: 3px; cursor: pointer; transition: all 0.5s ease; text-transform: uppercase; }
.cta:hover { background: #fff; color: #090a0a; letter-spacing: 5px; }

/* PAGINE TESTO */
.text-page { width: 100%; height: 100vh; overflow-y: auto; background-color: var(--bg); display: flex; justify-content: center; padding: 80px 20px; padding-top: calc(80px + var(--nav-height)); }
.obs-container { max-width: 650px; width: 100%; padding-bottom: 100px; }
.chapter-header { border-bottom: 1px solid #333; margin-bottom: 50px; padding-bottom: 20px; }
.chapter-num { font-family: var(--font-tech); color: var(--text-gray); font-size: 10px; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.obs-container h2 { font-family: var(--font-main); font-weight: 700; font-size: 1.8rem; margin: 0; letter-spacing: 4px; color: var(--accent); }
.dossier-entry { margin-bottom: 40px; }
.dossier-title { font-family: var(--font-tech); color: #555; font-size: 0.8rem; margin-bottom: 15px; text-transform: uppercase; }
.dossier-entry p { font-family: var(--font-main); font-size: 0.95rem; line-height: 1.7; color: #bbb; font-weight: 300; }
.separator { border: 0; border-top: 1px dashed #222; margin: 40px 0; }

/* FOOTER NAVIGAZIONE */
.page-footer, .lab-nav-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 60px; padding-top: 30px; border-top: 1px solid #1a1a1a; font-family: var(--font-tech); }

.page-number-label { color: #555; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.slider-page-footer { margin-top: 30px; padding-bottom: 30px; }

.nav-row { display: flex; justify-content: space-between; margin-top: 60px; gap: 20px; }
.nav-btn { background: #111; border: 1px solid #444; color: #fff; padding: 15px 30px; font-family: var(--font-tech); font-size: 0.8rem; cursor: pointer; transition: 0.3s; }
.nav-btn:hover { background: #fff; color: #090a0a; }
.nav-btn-small { background: transparent; border: none; color: #666; font-family: var(--font-tech); font-size: 0.8rem; cursor: pointer; transition: 0.3s; }
.nav-btn-small:hover { color: #fff; }

/* LABORATORIO */
#laboratory { display: flex; width: 100%; height: calc(100vh - var(--nav-height)); margin-top: var(--nav-height); background: #090a0a; overflow: hidden; position: relative; }
#sidebar { width: 220px; background: #090a0a; border-right: 1px solid #1a1a1a; display: flex; flex-direction: column; padding: 25px; overflow-y: auto; flex-shrink: 0; }
.brand { font-family: var(--font-main); font-weight: 700; color: #fff; margin-bottom: 30px; letter-spacing: 1px; font-size: 12px; }
.cat-header { font-family: var(--font-tech); font-size: 11px; color: #444; margin-top: 16px; margin-bottom: 4px; letter-spacing: 1px; }
.subj-btn { background: none; border: none; color: #777; text-align: left; font-family: var(--font-main); font-size: 11px; padding: 4px 0; cursor: pointer; transition: 0.2s; }
.subj-btn:hover { color: #fff; }
.subj-btn.active { color: #fff; font-weight: 600; padding-left: 5px; }
.mt-auto { margin-top: auto; }
#matrix-toggle { margin-top: 20px; background: #111; border: 1px solid #333; color: #ccc; padding: 10px; font-family: var(--font-tech); font-size: 9px; cursor: pointer; text-align: center; letter-spacing: 1px; width: 100%; }
#matrix-toggle:hover { background: #fff; color: 090a0a; }
#matrix-toggle.btn-exit-state { background: #fff !important; color: #090a0a !important; border-color: #fff !important; font-weight: 700; box-shadow: 0 0 15px rgba(255,255,255,0.2); }
#lab-content { flex-grow: 1; position: relative; background: #090a0a; display: flex; flex-direction: column; padding:20px 40px; overflow-y: auto;}

/* INSIGHT VIEW */
#insight-view { width: 100%; height: 100%; display: flex; flex-direction: column; max-width: 1400px; margin: 0 auto; }
.view-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 30px; }
.view-header h1 { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 48px; margin: 0; letter-spacing: -1px; }
.insight-split { display: flex; gap: 40px; margin-bottom: 40px; align-items: flex-start; }
.insight-visual-area { flex: 0.6; display: flex; gap: 15px; }
.mini-comp-box { flex: 1; display: flex; flex-direction: column; }
.mini-label { font-family: var(--font-tech); font-size: 9px; color: #555; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.mini-comp-box img { width: 100%; aspect-ratio: 1/1; border-radius: 0; object-fit: contain; background: #050505; border: 1px solid #222; }
.insight-text-area { flex: 1.4; padding-top: 0; }
.insight-main-text { font-family: var(--font-main); font-size: 15px; color: #999; line-height: 1.7; margin-bottom: 30px; }

/* --- CTA LINK: Glow + Linee Delicate --- */
.cta-link {  background: none; border: 1px solid #333; color: #fff;  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;  cursor: pointer; padding: 15px 30px; display: inline-flex; align-items: center;  gap: 10px; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px; position: relative; overflow: hidden; z-index: 1;}

/* Scanlines (Chiare e Sottili) */
.cta-link::before {content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; /* Nero leggerissimo (0.08) */ background: linear-gradient(to bottom, transparent, transparent 50%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.08)); background-size: 100% 3px; pointer-events: none; z-index: -1;  opacity: 0; transition: opacity 0.3s ease; }

/* Scia Glitch */
.cta-link::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); transform: skewX(-20deg); pointer-events: none; z-index: -1; transition: left 0.5s ease-in-out;}

/* Hover: Glow + Attivazione */
.cta-link:hover {  background: #fff; color: #090a0a; border-color: #fff; box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); /* GLOW */}
.cta-link:hover::before { opacity: 1; }
.cta-link:hover::after { left: 150%; }

.separator-light { border: 0; border-top: 1px solid #1a1a1a; margin: 0 0 40px 0; }
.insight-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 40px; }
.insight-col h3 { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 10px; }
.insight-col p { font-family: 'Inter', sans-serif; font-size: 13px; color: #777; line-height: 1.6; }

/* SINGLE VIEW */
#single-view { width: 100%; height: 100%; display: flex; flex-direction: column; max-width: 1400px; margin: 0 auto; }
.back-link { background: none; border: none; color: #666; font-family: 'IBM Plex Mono', monospace; font-size: 11px; cursor: pointer; margin-bottom: 10px; text-align: left; width: fit-content; }
.back-link:hover { color: #fff; }
.lab-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 40px; height: 100%; }
.info-block { margin-bottom: 30px; }
.info-block h3, .col-right h3 { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 10px; }
.info-block ul { list-style: none; padding: 0; margin: 0; }
.info-block li, .prompt-text, .sequence-list { font-family: var(--font-tech); font-size: 11px; color: #ccc; line-height: 1.5; }
.prompt-text { font-style: italic; color: #999; word-wrap: break-word; }
.sequence-list { color: #999; word-wrap: break-word; }
.col-center { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%; overflow: hidden; }
.image-frame { width: auto; max-height: 50vh; max-width: 50vh; aspect-ratio: 1 / 1; background: #111; border-radius: 0; overflow: hidden; margin-bottom: 30px; box-shadow: 0 0 20px rgba(0,0,0,0.5); border: 1px solid #222; flex-shrink: 0; position: relative; z-index: 1; }
#main-img { width: 100%; height: 100%; object-fit: contain; }
.slider-wrapper { width: 100%; position: relative; padding: 20px 0; z-index: 100; background: var(--bg); }
.slider-footer { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 8px; font-family: var(--font-main); }
.slider-label { font-style: italic; font-size: 14px; color: #888; font-weight: 300; }
.step-indicator { font-weight: 700; font-size: 16px; color: #fff; }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; height: 30px; cursor: pointer; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; cursor: pointer; background: #555; border-radius: 4px; border: 1px solid #090a0a; }
input[type=range]::-webkit-slider-thumb { height: 24px; width: 24px; border-radius: 50%; background: #ffffff; cursor: pointer; -webkit-appearance: none; margin-top: -9px; box-shadow: 0 2px 5px rgba(0,0,0,0.5); border: 2px solid #090a0a; }

/* STILE BOTTONI PLAY */
#single-play-btn, #matrix-play-btn { background: transparent; border: 1px solid #333; color: #888; font-family: var(--font-tech); font-size: 11px; padding: 5px 15px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
#single-play-btn:hover, #matrix-play-btn:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); }
.play-icon { font-size: 10px; }

/* MATRIX VIEW */
/* MATRIX VIEW */
#matrix-view-inner { width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; position: absolute; top: 0; left: 0; background: #090a0a; z-index: 1000; }
#grid-container { flex-grow: 1; display: grid; grid-template-columns: repeat(6, 160px); grid-auto-rows: auto; gap: 20px; padding: 40px; overflow-y: auto; min-height: 0; align-content: center; justify-content: center; }
.cell { position: relative; background: #050505; border: 1px solid #333; display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1 / 1; opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
/* Classe per animazione cascata */
.cell.appear { opacity: 1; transform: translateY(0); }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell-label { position: absolute; top: 0; left: 0; font-family: monospace; font-size: 8px; color: rgba(255,255,255,0.6); background: rgba(0,0,0,0.8); padding: 4px 6px; pointer-events: none; z-index: 2; }
.matrix-controls { height: 80px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; border-top: 1px solid #1a1a1a; background: #090a0a; z-index: 10; padding: 0 20px; }
.matrix-actions-row { display: flex; align-items: center; gap: 20px; width: 100%; max-width: 600px; }
#matrix-play-btn { flex-shrink: 0; }
#matrix-slider { flex-grow: 1; accent-color: #fff; }
.matrix-info { font-family: var(--font-tech); font-size: 9px; color: #444; text-align: center; margin-top: 5px; }

/* UTILITIES */
.hidden { display: none !important; }
.fade-out { opacity: 0; transition: opacity 1s ease; }
@keyframes noisePulse { 0% { opacity: 0.4; } 100% { opacity: 0.7; } }

/* MEDIA QUERIES AGGIORNATE */
@media (max-width: 1200px) {
    /* Su schermi medi scendiamo a 4 colonne */
    #grid-container { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1000px) { 
    #laboratory { flex-direction: column; overflow-y: auto; height: auto; } 
    #sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #222; } 
    .lab-grid { grid-template-columns: 1fr; gap: 30px; } 
    .insight-split { flex-direction: column; } 
    .insight-columns { grid-template-columns: 1fr; }
    #grid-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .image-frame { max-height: 60vh; max-width: 100%; }
}

@media (max-width: 800px) {
    /* ... resto delle regole mobile ... */
    #laboratory { flex-direction: column; overflow-y: auto; height: auto; } 
    #sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #222; } 
    .lab-grid { grid-template-columns: 1fr; gap: 30px; } 
    .insight-split { flex-direction: column; } 
    .insight-columns { grid-template-columns: 1fr; }
    
    #grid-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .image-frame { max-height: 60vh; max-width: 100%; }
}

/* --- NUOVE ANIMAZIONI PER LA SINGLE VIEW --- */

/* Entrata da Sinistra */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Entrata da Destra */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Zoom In Centrale */
@keyframes zoomInFade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Entrata dal Basso */
@keyframes slideInUpShort {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CLASSI DA APPLICARE AGLI ELEMENTI */
.anim-left { opacity: 0; animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anim-right { opacity: 0; animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anim-center { opacity: 0; animation: zoomInFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anim-bottom { opacity: 0; animation: slideInUpShort 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* --- LANDING PAGE STYLING 3.0 (Aggiornato) --- */

/* 1. Effetto Monitor CRT (Scanlines) */
.scanlines { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1)); background-size: 100% 4px; pointer-events: none; z-index: 5; opacity: 0.6;}

/* 3. Visual Scanner Container (MODIFICATO: Immagine Intera) */
.visual-scanner-container { position: relative; width: 280px; /* Dimensione fissa per il riquadro */ height: 280px; border: 1px solid rgba(255,255,255,0.2); margin-bottom: 5vh; overflow: hidden; background: #090a0a; /* Sfondo nero se l'img non riempie tutto */ box-shadow: 0 0 30px rgba(0,0,0,0.8);}
.visual-scanner-container img { width: 100%; height: 100%; object-fit: contain; /* FONDAMENTALE: Non taglia l'immagine */ opacity: 0.8; filter: grayscale(100%) contrast(1.2);}
.scanner-line { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px #00fff9; animation: scanMove 3s ease-in-out infinite; z-index: 10; opacity: 0.8; pointer-events: none;}

@keyframes scanMove {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

.corner-brackets::before, .corner-brackets::after { content: ''; position: absolute; width: 10px; height: 10px; border-color: #fff; border-style: solid; transition: all 0.3s;}
.corner-brackets::before { top: 5px; left: 5px; border-width: 1px 0 0 1px; }
.corner-brackets::after { bottom: 5px; right: 5px; border-width: 0 1px 1px 0; }
.visual-scanner-container:hover .corner-brackets::before { top: 0; left: 0; }
.visual-scanner-container:hover .corner-brackets::after { bottom: 0; right: 0; }
.overlay-data { position: absolute; bottom: 0; right: 0; background: #fff; /* Invertito per contrasto */ color: #090a0a; padding: 2px 6px; font-family: var(--font-tech); font-size: 9px; font-weight: 700; z-index: 20;}

/* 4. Testo Pulito (Niente Box) */
.text-block { max-width: 650px; margin-bottom: 6vh; padding: 0 20px;}
.tech-text {font-size: 0.95rem; color: #ccc; line-height: 1.8; margin: 0; text-align: center; text-shadow: 0 2px 4px rgba(0,0,0,0.8);}
.highlight { color: #fff; font-weight: 700; font-family: var(--font-tech); display: block; margin-bottom: 15px; font-size: 0.8rem; letter-spacing: 2px; color: #00fff9; /* Colore accento ciano per il titolo del paragrafo */}

/* 5. Bottone CTA (FIX CENTRATURA) */
.cta-glitch { position: relative; display: flex;               /* FONDAMENTALE: Attiva Flexbox */ justify-content: center;     /* Centra orizzontalmente */ align-items: center;         /* Centra verticalmente */ background: transparent; border: 1px solid rgba(255,255,255,0.5); color: #fff; padding: 20px 60px; font-family: var(--font-tech); font-size: 0.85rem; letter-spacing: 3px; cursor: pointer; overflow: hidden; transition: all 0.3s ease; text-transform: uppercase;}

/* Regola per il testo interno */
.cta-text { position: relative; z-index: 2; /* Assicura che il testo sia sopra l'effetto hover */}

/* Hover: Diventa bianco solido con testo nero */
.cta-glitch:hover { background: #ffffff; color: #090a0a; border-color: #ffffff; box-shadow: 0 0 30px rgba(255, 255, 255, 0.4); font-weight: 700;}
.cta-decor { position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); transform: skewX(-20deg); transition: left 0.5s; pointer-events: none; z-index: 1;}
.cta-glitch:hover .cta-decor { left: 150%; transition: left 0.5s ease-in-out;}

/* --- RESTYLING LABORATORIO (Tech Interface) --- */

/* 1. Schede Dati (Info Blocks) */
.info-block { background: transparent; border: none; border-left: none; padding: 0; margin-bottom: 30px; transition: all 0.3s ease;}
.info-block:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.4);}
.info-block h3 { font-family: 'IBM Plex Mono', monospace; /* Font tecnico */ font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #666; margin-bottom: 12px; border-bottom: 1px dashed #333; padding-bottom: 5px;}
.prompt-text, .sequence-list { font-family: 'Inter', sans-serif; font-size: 0.85rem; line-height: 1.6; color: #ccc; font-weight: 300;}

/* Evidenzia parole chiave nel prompt (opzionale, richiede JS ma sta bene anche così) */
.prompt-text strong { color: #fff; font-weight: 500; }

/* 2. Visualizzatore Immagine (Image Frame) */
.image-frame { border: 1px solid rgba(255, 255, 255, 0.2); position: relative; background: #090a0a;}

/* Aggiunge "mirini" agli angoli dell'immagine */
.image-frame::after { content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; pointer-events: none; z-index: 10;}

/* 3. Slider Personalizzato (Molto più bello) */
.slider-wrapper { background: transparent; padding: 20px 12px; position: relative;}

/* Traccia dello slider */
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 2px; cursor: pointer; background: #333; border: none; border-radius: 0;}

/* Pallino dello slider */
input[type=range]::-webkit-slider-thumb { height: 16px; width: 16px; border-radius: 0; /* Quadrato per look tech */ background: #090a0a; border: 2px solid #fff; cursor: pointer; -webkit-appearance: none; margin-top: -7px; /* Centratura */ transition: transform 0.1s;}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.3); background: #fff;}

/* 4. Footer dello Slider (Controlli) */
.slider-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #222; padding-top: 15px; margin-top: 10px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #888;}
.step-indicator { color: #fff; font-weight: 700; background: #222; padding: 2px 8px; border-radius: 2px; font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    white-space: nowrap;}

/* 5. Insight View (La scheda iniziale) */
.mini-comp-box { border: 1px solid #333; padding: 5px; background: #050505;}
.mini-label { display: block; text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: #555; margin-bottom: 5px; letter-spacing: 1px;}


/* --- TITOLO HERO: ENTRATA IMMEDIATA E VELOCE --- */
.hero-header {  margin-bottom: 4vh;  position: relative; }

/* 1. DEFINIZIONE ANIMAZIONE ENTRATA */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wrapper Titolo: Parte SUBITO (0s) e dura meno (0.6s) */
.glitch-wrapper {  position: relative; display: inline-block;  opacity: 0;  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;  animation-delay: 0s; /* ZERO RITARDO */}

/* Titolo: Stile */
.main-title { font-family: var(--font-main); font-size: clamp(2.5rem, 6vw, 5rem);  font-weight: 800; letter-spacing: -2px; line-height: 1; margin: 0; color: #fff; position: relative; text-transform: uppercase;}

/* Sottotitolo: Parte SUBITO INSIEME AL TITOLO (0s) */
.subtitle { font-family: var(--font-tech);  font-size: 0.9rem; color: #aaa; letter-spacing: 4px; margin-top: 15px; text-shadow: 0 0 10px rgba(255,255,255,0.3); opacity: 0; animation: fadeInUp 0.6s ease forwards; /* Stessa velocità del titolo */ animation-delay: 0s; /* ZERO RITARDO (era 0.15s) */}

/* --- EFFETTO GLITCH/GLOSS --- */

/* Keyframes Glitch */
@keyframes glitch-anim {
    0% { clip: rect(12px, 9999px, 5px, 0); }
    5% { clip: rect(85px, 9999px, 99px, 0); }
    10% { clip: rect(32px, 9999px, 12px, 0); }
    15% { clip: rect(0px, 0px, 0px, 0); } 
    80% { clip: rect(0px, 0px, 0px, 0); }
    85% { clip: rect(15px, 9999px, 80px, 0); }
    100% { clip: rect(0px, 0px, 0px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(12px, 9999px, 5px, 0); }
    10% { clip: rect(95px, 9999px, 25px, 0); }
    15% { clip: rect(0px, 0px, 0px, 0); }
    80% { clip: rect(0px, 0px, 0px, 0); }
    85% { clip: rect(90px, 9999px, 10px, 0); }
    100% { clip: rect(0px, 0px, 0px, 0); }
}

.glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg);}
.glitch::before {  left: 2px; text-shadow: -2px 0 #ff00c1; /* Magenta */ clip: rect(44px, 450px, 56px, 0); animation: glitch-anim 3s infinite linear normal;}
.glitch::after { left: -2px; text-shadow: -2px 0 #00fff9; /* Ciano */ clip: rect(44px, 450px, 56px, 0); animation: glitch-anim2 3s infinite linear normal;}

/* --- NAV BUTTONS: Glow + Linee Delicate --- */
.nav-arrow-btn {  background: transparent; border: 1px solid #333; color: #fff;  padding: 10px 20px; font-family: var(--font-tech); font-size: 11px;  cursor: pointer; transition: all 0.3s; text-transform: uppercase; position: relative; overflow: hidden; z-index: 1;}

/* Scanlines (Chiare e Sottili) */
.nav-arrow-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; /* Nero leggerissimo (0.08) */ background: linear-gradient(to bottom, transparent, transparent 50%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.08)); background-size: 100% 3px; pointer-events: none; z-index: -1;  opacity: 0; transition: opacity 0.3s ease; }

/* Scia Glitch */
.nav-arrow-btn::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); transform: skewX(-20deg); pointer-events: none; z-index: -1; transition: left 0.5s ease-in-out;}

/* Hover: Glow + Attivazione */
.nav-arrow-btn:hover {  background: #fff; color: #090a0a; border-color: #fff; box-shadow: 0 0 15px rgba(255, 255, 255, 0.6); /* GLOW */}
.nav-arrow-btn:hover::before { opacity: 1; }
.nav-arrow-btn:hover::after { left: 150%; }


/* --- FIX TESTO UNIFORME (Tutto Bianco/Chiaro) --- */

/* 1. Stile base per liste e testi tecnici */
.info-block li, 
.prompt-text, 
.sequence-list { 
    font-family: var(--font-tech); 
    font-size: 11px; 
    
    /* MODIFICA CHIAVE: Colore uniformato al bianco leggibile */
    color: #ccc; /* Era diverso tra destra e sinistra, ora è uguale */
    
    line-height: 1.5; 
}

/* 2. Stile specifico per i Prompt (Positivo e Negativo) */
.prompt-text { 
    font-style: italic; 
    
    /* MODIFICA CHIAVE: Forziamo un colore più chiaro anche qui */
    color: #ccc !important; /* Usa !important se qualche regola lo sovrascrive */
    
    word-wrap: break-word; 
}

/* 3. Stile specifico per la lista sequenza numerica */
.sequence-list { 
    /* MODIFICA CHIAVE: Anche la lista numeri diventa chiara */
    color: #ccc !important; 
    
    word-wrap: break-word; 
}

/* Opzionale: Se vuoi i titoli dei parametri (es. "SEED:") un po' più scuri per contrasto */
.info-block li strong,
.info-block li span:first-child {
    color: #888; /* Etichetta grigia */
}

/* Opzionale: I valori dei parametri (es. "00001") bianchi puri */
.info-block li span {
    color: #fff; /* Valore bianco */
}