html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: #141414; overflow-y: auto; font-family: 'Segoe UI', sans-serif; user-select: none; }

/* --- VARIABILI GLOBALI --- */
:root {
    --focus-color: #2196F3; /* Blu Theme */
}

/* --- FOCUS VISIBILE (Accessibilità & TV) --- */
:focus-visible, .focusable:focus {
    outline: 3px solid var(--focus-color) !important;
    outline-offset: 2px;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.6); /* Blu Theme */
}

/* --- MENU SUPERIORE --- */
#app-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: linear-gradient(to bottom, #000000 0%, transparent 100%);
    backdrop-filter: none;
    padding: 0 2vw; /* Scalabile (era 40px) */
    height: 3.7vw; /* Scalabile (era 70px) */
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: none;
}

.logo { font-size: 1.3vw; font-weight: bold; color: #E50914; text-transform: uppercase; letter-spacing: 2px; margin-right: 2vw; }

.nav-menu { display: flex; gap: 20px; flex-grow: 1; }
.nav-item {
    position: relative;
    background: none; border: 1px solid transparent; color: #e5e5e5; font-size: 0.9vw; cursor: pointer;
    padding: 10px 12px; transition: all 0.2s; font-weight: 500; border-radius: 6px;
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.08); }

.nav-item:focus { 
    outline: none !important;
    box-shadow: none !important;
    background-color: rgba(33, 150, 243, 0.5) !important;
    color: white;
    transform: none !important;
}

.nav-item.active { color: var(--focus-color) !important; font-weight: bold; }

/* Barra inferiore dritta (Indicatore) */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 6px; right: 6px;
    height: 3px;
    background-color: var(--focus-color);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.6);
}

.nav-right { display: flex; gap: 15px; }

/* --- HOME VIEW (Layout base) --- */
#home-view { padding: 1vw 2vw; animation: fadeIn 0.5s ease; }
.section-title { display: none; }
.empty-strip-message {
    color: #888;
    font-size: 18px;
    text-align: center;
    padding: 50px 0;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- BLOCCO ORIENTAMENTO --- */
#orientation-blocker {
    display: none; /* Nascosto di default */
}

@media (orientation: portrait) {
    /* Nascondi l'app e mostra il messaggio */
    body > *:not(#orientation-blocker) {
        display: none !important;
    }
    
    #orientation-blocker {
        display: flex;
        position: fixed;
        top: 0; left: 0;
        width: 100vw;
        height: 100vh;
        background: #141414;
        color: white;
        align-items: center;
        justify-content: center;
        text-align: center;
        z-index: 9999;
    }

    .orientation-message {
        font-size: 18px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    #app-header, #home-view {
        padding: 0 20px;
    }
}

/* --- PWA SPLASH SCREEN --- */
#pwa-splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #141414;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

#pwa-splash-screen.hidden {
    display: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.splash-content .logo {
    font-size: 3vw; /* Logo più grande per lo splash */
    margin-bottom: 30px;
}

.splash-message {
    color: #e5e5e5;
    font-size: 1.2vw;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.5;
}

.splash-buttons {
    display: flex;
    gap: 20px;
}

.splash-btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 15px 30px;
    font-size: 1vw;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.splash-btn:focus { border-color: var(--focus-color); background-color: #444; }
#pwa-install-btn { background-color: var(--focus-color); border-color: var(--focus-color); }
#pwa-install-btn:focus { background-color: #1976D2; } /* Un blu più scuro al focus */

/* --- STRIP ARROWS OVERRIDE --- */
#home-view .strip-arrow {
    font-size: 3vw !important; /* Molto più grandi */
    font-weight: 900 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 0 10px rgba(0,0,0,1) !important; /* Ombra per contrasto su sfondi chiari */
    opacity: 0.7;
    transition: all 0.2s ease;
}

#home-view .strip-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.2); /* Mantiene la centratura mentre zooma */
    color: var(--focus-color) !important;
}
