 :root { --accent: #00f2ff; --red: #e50914; --bg: #000; --btn-gray: rgba(45, 45, 45, 0.9); }
        body { display: none; }
        body, html { 
            margin: 0; padding: 0; background: var(--bg); color: white; 
            font-family: -apple-system, BlinkMacSystemFont, sans-serif; 
            min-height: 100%; width: 100%; 
            /* Rimosso position: fixed e overflow: hidden per permettere lo scroll */
            overflow-x: hidden;
            overflow-y: auto;
        }
        
        /* POSTER BLOCCATO SULLO SFONDO */
        #poster-bg { 
            position: fixed; inset: 0; width: 100%; height: 100%;
            object-fit: cover; 
            object-position: center;
            z-index: 0; filter: brightness(0.4); 
            transition: filter 0.6s ease; 
            pointer-events: none;
        }

        #trama-modal {
            position: fixed; inset: 0; background: rgba(0,0,0,0.98);
            z-index: 99999; display: none; flex-direction: column;
            padding: 50px 25px; box-sizing: border-box; overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        #trama-modal h2 { color: var(--accent); text-transform: uppercase; margin-bottom: 20px; }
        #trama-modal p { font-size: 18px; line-height: 1.6; color: #eee; }

       /* --- OVERLAY OTTIMIZZATO (MOBILE & DESKTOP) --- */
.overlay { 
    position: relative; 
    width: 100%; 
    min-height: 100vh; 
    padding: 33vh 25px 30px; /* Ridotto il padding bottom perché ora c'è il div content */
    
        background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0,0,0,0) 20%, 
        rgba(0,0,0,0.8) 45%, 
        rgba(0,0,0,1) 70%, 
        #000 100%); 
        
    z-index: 10; 
    box-sizing: border-box; 
    pointer-events: all; 
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* --- FIX DESKTOP: PULIZIA TOTALE --- */
@media (min-width: 1024px) {
    .overlay {
        padding-top: 21vh;
        padding-left: 8%;
        padding-right: 8%;
        
        /* Corretto il gradiente per finire in nero totale in basso */
        background: linear-gradient(to bottom, 
            transparent 0%, 
            rgba(0,0,0,0) 10%, 
            rgba(0,0,0,0.7) 40%, 
            rgba(0,0,0,1) 80%, 
            #000 100%);
    }
}

.overlay::-webkit-scrollbar { display: none; }

        .hide-ui { opacity: 0 !important; transform: translateY(20px); pointer-events: none !important; }

        h1 { font-size: clamp(32px, 8vw, 60px); margin: 0; text-transform: uppercase; font-weight: 900; line-height: 0.9; }

        .rating-box { display: none; flex-wrap: nowrap; gap: 3px; margin: 12px 0; min-height: 30px; }
        .unit { font-size: 22px; flex-shrink: 0; width: 24px; text-align: center; }
        .on-diamond { color: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
        .on-slag { color: #8b4513; }
        .off { opacity: 0.15; }

        .meta-row { display: flex; gap: 15px; margin: 10px 0; font-size: 13px; font-weight: bold; align-items: center; color: #aaa; }
        .age-badge { border: 1px solid #666; padding: 1px 8px; border-radius: 4px; color: #fff; }
        
        #trama-display { font-size: 15px; color: #ccc; margin: 12px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        #commento-display { font-size: 19px; border-left: 3px solid var(--red); padding-left: 15px; margin: 20px 0; font-style: italic; display: none; }

        .action-btns { 
            display: flex !important; 
            gap: 12px; 
            margin-top: 25px; 
            pointer-events: all !important; 
            position: relative; 
            z-index: 999 !important; 
        }
        .btn-main { 
            padding: 0 !important; /* Forza a zero per centrare l'SVG */
    background: var(--btn-gray); 
    color: white; 
    border: 1px solid rgba(255,255,255,0.2); 
    /* Dimensioni fisse per cerchio perfetto */
    width: 52px; 
    height: 52px; 
    border-radius: 50%; 
    padding: 0; 
    /* Centratura perfetta del carattere */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    /* ------------------------------ */
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    cursor: pointer; 
    position: relative; 
    z-index: 1000;
}
/* Nascondi la barra dello scroll */

<\!-- @ADMIN-START -->
        .controls-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; }
        .clickable { pointer-events: all !important; }
        
        #admin-trigger { 
    position: fixed; 
    bottom: 0; 
    right: 0; 
    width: 100px; 
    height: 100px; 
    z-index: 1000000; 
    background: rgba(255,0,0,0.0); /* Invisibile ma presente */
    pointer-events: all !important; 
}

        #edit-panel { 
            position: fixed; top: 90px; right: 20px; z-index: 2000; 
            background: #0a0a0a; padding: 20px; border-radius: 15px; 
            border: 1px solid var(--red); width: 280px; display: none; 
            box-shadow: 0 10px 40px rgba(0,0,0,1);max-height: 80vh;
            overflow-y: auto;z-index: 9999999 !important; pointer-events: all !important;
        }

        #edit-panel select, #edit-panel input, #edit-panel textarea {
            width: 100%; background: #1a1a1a; border: 1px solid #333;
            color: white; padding: 10px; margin-bottom: 10px; border-radius: 8px;
            box-sizing: border-box; font-family: inherit;
        }
        .btn-save {
            background: var(--red); color: white; border: none; width: 100%;
            padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer;
            margin-bottom: 10px;
        }
        .btn-delete {
            background: transparent; color: #ff4444; border: 1px solid #ff4444; width: 100%;
            padding: 8px; border-radius: 8px; font-size: 11px; font-weight: bold; cursor: pointer;
        }

<\!-- @ADMIN-END -->

    #save-badge {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #2ecc71 !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    z-index: 1000000 !important;
    display: none; /* Il JS lo cambierà in 'block' e funzionerà */
}
       

/* Per Chrome, Safari e Opera */
.suggested-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
/* --- SUGGERITI: DEFINIZIONE UNICA E PULITA --- */
/* --- SUGGERITI: ALLINEAMENTO GAP COSTANTE --- */

/* --- GRIGLIA STABILE: GAP FISSO SEMPRE --- */

.suggested-grid {
    display: flex;
    flex-wrap: nowrap; /* Forza le card in riga su mobile */
    gap: 15px !important;
    overflow-x: auto !important;
    padding: 20px 25px !important;
    scrollbar-width: none;
    background: #000000 !important;
    /* Rimuove il problema della trasparenza */
    isolation: isolate; 
    /* Per Firefox */
    scrollbar-width: none; 
    
    /* Per IE e Edge */
    -ms-overflow-style: none;
}

@media (min-width: 1024px) {
    .suggested-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, 180px); /* 180px fissi, niente 1fr */
        justify-content: start; /* Mantiene il gap costante a sinistra */
        gap: 15px !important;
        overflow-x: visible !important;
        justify-content: center !important; /* CENTRA LE CARD */
    }
}

.s-card {
    width: 180px !important; /* Larghezza fissa chirurgica */
    flex: 0 0 180px !important;
    text-decoration: none;
    color: white;
    position: relative !important;
    margin: 0 !important; /* Rimosso ogni margine che crea disturbo */
    display: block !important;
}

.s-card .s-badge {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    z-index: 100 !important;
    margin: 0 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    background: #000 !important;
    font-weight: 900;
    border: 1px solid white;
    display: flex !important;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.s-title {
    font-size: 13px !important;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
    line-height: 1.2;
    font-weight: 600;
    width: 180px;
    text-transform: uppercase;
}

.s-card img {
    width: 180px;
    height: 270px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    display: block;
}
        /* BACK TO TOP STYLE */
#back-to-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: none; /* Appare solo quando scendi */
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9999;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
#back-to-top:hover { background: var(--red); transform: scale(1.1); }
        
        /* POPUP TRAILER VIDEO */
#trailer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9);
    display: none; align-items: center; justify-content: center;
    z-index: 9999; backdrop-filter: blur(10px);
}
#trailer-container {
    position: relative; width: 90%; max-width: 800px;
    aspect-ratio: 16/9; background: #000; border: 1px solid var(--accent);
}
#close-trailer {
    position: absolute; top: -40px; right: 0;
    color: white; font-size: 30px; cursor: pointer;
}
iframe#yt-player { width: 100%; height: 100%; border: none; }

 .content { 
    background-color: #000; /* Forza il nero sotto il footer */
    position: relative;
    z-index: 10;
    padding: 20px 15px 50px; 
    margin-top: -1px; /* Evita micro-fessure tra i div */
}
 





/* --- UNIFORMITÀ VISIVA: REGISTA, CAST E SUBGENERE --- */
#director-display, 
#cast-display, 
#subgenere-display {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    font-size: 0 !important; /* Nasconde il testo residuo e i pallini */
    margin-top: 1.5px;
    padding-bottom: 1.5px;
}

/* --- STILE BASE UNIFICATO (Identico per tutti) --- */
#director-display a, 
#cast-display a, 
#subgenere-display a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: rgba(30, 30, 30, 0.95) !important;
    /* Rimosso il color: #ffffff da qui per differenziarlo sotto */
    border: 0.5px solid rgba(255,255,255,0.08) !important;
    padding: 5px 8px !important; 
    margin: 3px 2px !important;
    border-radius: 33px !important;
    text-decoration: none !important;
    font-size: 11px !important; 
    font-weight: 300 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap;
}

/* --- DIFFERENZIAZIONE COLORE FONT --- */

/* REGISTI E ATTORI: Colore Accent (Cyan) */
#director-display a, 
#cast-display a {
    color: var(--accent) !important;
}

/* SUBGENDER: Colore Bianco */
#subgenere-display a {
    color: #ffffff !important;
}

/* --- HOVER DESKTOP --- */
@media (min-width: 1024px) {
    /* Cast e Subgender: Sfondo Cyan, Testo Nero */
    #cast-display a:hover,
    #subgenere-display a:hover {
        background-color: var(--accent) !important;
        color: #000000 !important;
    }
    
    /* Registi: Sfondo Rosso, Testo Bianco */
    #director-display a:hover {
        background-color: var(--red) !important;
        color: #ffffff !important;
    }
}


#ui-back {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 45px !important;
    height: 45px !important;
    padding: 0 !important;
}

#ui-back svg {
    display: block;
    /* Se vuoi cambiare lo spessore velocemente, agisci qui sotto */
    stroke-width: 2.5; 
}

/* CONTAINER: In alto a destra, colonna che va verso il basso */
/* CONTAINER: Sotto l'occhio, colonna verticale */
.share-container {
    position: fixed !important;
    top: 30px !important; /* Spostato in basso per non coprire l'occhio */
    right: 25px !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; 
    gap: 12px !important;
    width: 50px !important;
    pointer-events: none;
}

/* TASTO BIANCO: Primo in alto */
.share-btn-circle {
    width: 45px !important;
    height: 45px !important;
    background: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    flex-shrink: 0;
}

/* MENU: Si sviluppa verso il basso */
.share-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.share-menu.active {
    display: flex !important;
}
@media (max-width: 768px) {
    .share-menu.active {
        display: none !important; /* IL MOBILE IGNORA IL JS E RESTA CHIUSO */
    }
}
/* CERCHI NERI: Perfetti e senza padding */
.share-child {
    width: 45px !important; 
    height: 45px !important;
    min-width: 45px !important;
    min-height: 45px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    text-transform: uppercase;
}

@media (min-width: 769px) {
    button.share-nat-btn {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

#suggested-section { position: relative; }

/* 1. Stile base: Pulsante Piatto, Interattivo e non selezionabile */
.scroll-btn {
    position: absolute;
    top: 135px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none; /* Rimosso il bordo per renderlo piatto */
    border-radius: 50%;
    cursor: pointer;
    display: none !important; /* Gestito dalla media query sotto */
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Proprietà anti-selezione e transizioni */
    user-select: none; 
    -webkit-user-select: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

/* 2. Effetto Rollover: quando ci passi sopra */
.scroll-btn:hover {
    background: rgba(255,255,255,0.15); 
    transform: scale(1.1); 
}

/* 3. Effetto Click */
.scroll-btn:active {
    transform: scale(0.95);
}

/* 4. Attivazione chirurgica: Solo su schermi piccoli E solo con Mouse */
@media (max-width: 1023px) and (pointer: fine) {
    .scroll-btn { 
        display: flex !important; 
    }
}
.arr-left { left: 25px; }
.arr-right { right: 25px; }