:root {
    --bg-main: #050505;
    --bg-accent: #0a0a0a;
    --primary: #ffffff;
    --secondary: #555;
    --highlight: #3d5afe;
    --glass-rgb: 61, 90, 254;
    --sidebar-w: 80px;
}

/* --- RESET TOTAL --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--primary);
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#loading-screen {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--glass-rgb), 0.20), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.06), transparent 28%),
        linear-gradient(180deg, #060607 0%, #040404 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 34px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(6,6,6,0.58);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}

.loader-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
}

.loader-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.loader-subtitle {
    max-width: 240px;
    font-size: 12px;
    line-height: 1.5;
    color: #9a9a9a;
}

.loader-bar {
    width: 170px;
    height: 4px;
    background: rgba(255,255,255,0.05);
    margin-top: 10px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.loader-progress {
    position: absolute;
    width: 38%;
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--glass-rgb), 0.2), rgba(var(--glass-rgb), 1), rgba(255,255,255,0.85));
    border-radius: 999px;
    animation: loading-anim 1.5s infinite ease-in-out;
}

@keyframes loading-anim {
    0% { left: -40%; }
    100% { left: 140%; }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-footnote {
    font-size: 10px;
    color: #666;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

/* --- SCROLLBAR ELITE --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--highlight); }

/* --- BARRA LATERAL (GLOW UP V2) --- */
nav { 
    width: var(--sidebar-w); 
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.8) 0%, rgba(8, 8, 8, 0.6) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 30px 0; 
    border-right: 1px solid rgba(66, 165, 245, 0.1); 
    z-index: 100; 
    flex-shrink: 0;
    box-shadow: inset -1px 0 0 rgba(66, 165, 245, 0.05);
}

.logo-v2 { 
    font-weight: 800; 
    font-size: 26px; 
    color: var(--highlight); 
    margin-bottom: 60px; 
    cursor: pointer; 
    text-shadow: 0 0 20px rgba(66, 165, 245, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 1px;
}
.logo-v2:hover { 
    transform: scale(1.15);
    text-shadow: 0 0 30px rgba(66, 165, 245, 0.6);
}

/* Container dos Links */
.nav-links-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

/* PILL INDICADOR (O fundo azul que desliza) */
.nav-indicator-pill {
    position: absolute;
    left: 12px;
    width: 56px;
    height: 50px;
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.15), rgba(66, 165, 245, 0.08));
    border: 1px solid rgba(66, 165, 245, 0.3);
    border-radius: 16px;
    box-shadow: 0 0 24px rgba(66, 165, 245, 0.2), inset 0 0 12px rgba(66, 165, 245, 0.05);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

/* ITENS DO MENU */
.nav-item { 
    position: relative;
    width: 50px; 
    height: 50px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer; 
    color: var(--secondary);
    transition: all 0.3s ease; 
    z-index: 2;
    border-radius: 12px;
}

.nav-item:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}

.nav-item-guide {
    gap: 3px;
    flex-direction: column;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.nav-item-guide span {
    line-height: 1;
}

/* ESTADO ATIVO (GLOW NO ÍCONE) */
.nav-item.active { 
    color: var(--highlight); 
}

.nav-item.active svg {
    transform: scale(1.12);
    filter: drop-shadow(0 0 10px var(--highlight));
}

/* --- CONTENTOR PRINCIPAL --- */
main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    overflow-y: auto; 
    overflow-x: hidden; 
    position: relative; 
    scroll-behavior: smooth;
}

main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(var(--glass-rgb), 0.24), transparent 48%),
        radial-gradient(circle at 78% 22%, rgba(var(--glass-rgb), 0.16), transparent 52%);
    transition: opacity 0.35s ease;
}

main > * {
    position: relative;
    z-index: 1;
}

body.player-focus main::before {
    opacity: 1;
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

body.player-focus .content-area {
    filter: saturate(0.9);
}

/* HERO SECTION (PLAYER) */
.hero-section { 
    width: 100%; 
    height: 0; 
    flex-shrink: 0; 
    background: #000; 
    position: relative; 
    z-index: 5; 
    overflow: hidden;
    transition: height 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.hero-section.active { 
    height: 70vh; 
    border-bottom: 1px solid #1a1a1a;
    background:
        radial-gradient(circle at top left, rgba(var(--glass-rgb), 0.18), transparent 40%),
        linear-gradient(180deg, rgba(6,6,6,0.98), rgba(0,0,0,1));
    box-shadow: 0 20px 45px rgba(0,0,0,0.32);
}

.hero-section.sticky-mini {
    position: fixed;
    right: 18px;
    bottom: 58px;
    width: min(360px, calc(100vw - 24px));
    height: calc(min(360px, calc(100vw - 24px)) * 9 / 16);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    overflow: hidden;
    z-index: 5190;
    box-shadow: 0 20px 45px rgba(0,0,0,0.45);
    transition: right 0.18s ease, bottom 0.18s ease, width 0.18s ease, height 0.18s ease, box-shadow 0.18s ease, border-radius 0.18s ease;
}

.hero-section.sticky-mini-entering {
    opacity: 1;
}

.hero-section.sticky-mini .player-grid {
    padding: 0;
}

.hero-section.sticky-mini .player-top-controls {
    display: none;
}

.hero-section.sticky-mini .player-slot {
    border: none;
    border-radius: 0;
}

body.player-focus .hero-section.active {
    box-shadow:
        0 22px 55px rgba(0,0,0,0.42),
        0 0 30px rgba(var(--glass-rgb), 0.14);
}

.hero-section iframe { 
    width: 100%; 
    height: 100%; 
    border: none; 
    display: block; 
}

.player-shell {
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    animation: player-shell-in 0.45s ease forwards;
}

.player-top-controls {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 20;
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(8, 8, 8, 0.42);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 10px 28px rgba(0,0,0,0.22);
}

.mv-btn {
    min-width: 48px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #cfcfcf;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 0 12px;
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mv-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.26);
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.mv-btn.active {
    background: linear-gradient(180deg, rgba(var(--glass-rgb), 0.28), rgba(var(--glass-rgb), 0.18));
    border-color: rgba(var(--glass-rgb), 0.7);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(var(--glass-rgb), 0.16);
}

.mv-btn.clear {
    min-width: 74px;
    color: #ffb3b3;
    border-color: rgba(255, 110, 110, 0.28);
    background: rgba(255, 110, 110, 0.06);
}

.mv-btn.clear:hover {
    border-color: rgba(255, 110, 110, 0.45);
    background: rgba(255, 110, 110, 0.12);
}

.player-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    gap: 10px;
    padding: 10px;
    background:
        radial-gradient(circle at 12% 0%, rgba(var(--glass-rgb), 0.10), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.06));
}

.player-grid.mode-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.player-grid.mode-2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
}

.player-grid.mode-4 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.player-slot {
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 10px 24px rgba(0,0,0,0.22);
}

.player-slot iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-grid.mode-2 .player-slot,
.player-grid.mode-4 .player-slot {
    border-radius: 14px;
}

.mini-player-sticky {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100vw - 24px));
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(8, 8, 8, 0.9);
    box-shadow: 0 20px 45px rgba(0,0,0,0.45);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5200;
}

.mini-player-sticky.controls-only {
    width: auto;
    border-radius: 12px;
    overflow: visible;
    bottom: 18px;
    right: 18px;
    border: none;
    box-shadow: none;
    background: transparent;
}

.mini-player-sticky.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mini-player-sticky.rise-in {
    animation: mini-rise-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mini-rise-in {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mini-player-sticky.controls-only .mini-player-head {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(8, 8, 8, 0.9);
    backdrop-filter: blur(10px);
}

.mini-player-sticky.controls-only .mini-player-body {
    display: none;
}

.mini-player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, rgba(var(--glass-rgb), 0.18), rgba(0,0,0,0.18));
}

.mini-player-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #ececec;
}

.mini-player-status {
    margin-left: auto;
    margin-right: 10px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    color: #d8d8d8;
    background: rgba(255,255,255,0.04);
}

.mini-player-status.loading { border-color: rgba(255,255,255,0.14); color: #e9e9e9; }
.mini-player-status.stable { border-color: rgba(88, 230, 140, 0.32); color: #8cffb9; }
.mini-player-status.unstable { border-color: rgba(255, 187, 72, 0.36); color: #ffd38a; }
.mini-player-status.offline { border-color: rgba(255, 96, 96, 0.36); color: #ff9b9b; }

.mini-player-actions {
    display: flex;
    gap: 6px;
}

.mini-player-btn {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: #efefef;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
}

.mini-player-btn.close {
    width: 28px;
    padding: 4px 0;
}

.mini-player-body {
    aspect-ratio: 16 / 9;
    background: #000;
}

.mini-player-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@keyframes player-shell-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ÁREA DE CONTEÚDO */
.content-area { 
    padding: 30px 0; 
    display: flex; 
    flex-direction: column; 
    gap: 40px; 
    flex-grow: 1; 
}

.row-container { 
    position: relative; 
    width: 100%; 
    padding: 0 45px; 
    box-sizing: border-box;
    margin-bottom: 4px;
}

#favoritos-wrap {
    margin: -8px 0 4px 0;
}

.favoritos-row {
    padding: 0 45px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.favoritos-row::-webkit-scrollbar { display: none; }

.row-title-favoritos {
    margin-bottom: 12px;
}

.favoritos-row .stream-card.favorito-card {
    min-width: 262px;
    height: 154px;
    border-color: rgba(var(--glass-rgb), 0.28);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.03),
        0 10px 24px rgba(0,0,0,0.22);
    transform: translateZ(0);
}

.favoritos-row .stream-card.favorito-card:hover {
    border-color: rgba(var(--glass-rgb), 0.82);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.06),
        0 12px 28px rgba(0,0,0,0.28),
        0 0 28px rgba(var(--glass-rgb), 0.10);
}

.favoritos-row .stream-card.favorito-card::after {
    background:
        radial-gradient(circle at top right, rgba(var(--glass-rgb), 0.16), transparent 35%),
        linear-gradient(to top, rgba(0,0,0,0.97) 0%, rgba(0,0,0,0.30) 100%);
}

.favoritos-row .stream-card.favorito-card .card-label {
    left: 12px;
    top: 12px;
    right: 118px;
    width: auto;
    justify-content: space-between;
    background: rgba(6, 6, 6, 0.44);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 5px 8px 5px 10px;
}

.favorite-label {
    font-size: 10px;
}

.favorite-pin {
    color: #fff3a6;
    font-size: 11px;
    text-shadow: 0 0 10px rgba(255, 238, 160, 0.45);
}

.badge-favorito {
    position: static;
    z-index: 3;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #fff5c3;
    background: rgba(255, 207, 87, 0.13);
    border: 1px solid rgba(255, 207, 87, 0.28);
    border-radius: 999px;
    padding: 4px 8px;
    backdrop-filter: blur(8px);
}

.badge-recent {
    position: static;
    z-index: 3;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #c8f2ff;
    background: rgba(120, 210, 255, 0.12);
    border: 1px solid rgba(120, 210, 255, 0.25);
    border-radius: 999px;
    padding: 4px 8px;
    backdrop-filter: blur(8px);
}

.card-preview {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50px;
    z-index: 3;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.25s ease;
    pointer-events: none;
}

.stream-card:hover .card-preview,
.stream-card.big-match .card-preview {
    opacity: 0;
    transform: translateY(8px);
}

.card-preview-main {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 3px;
}

.card-preview-sub {
    font-size: 9px;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stream-card.big-match {
    border-color: rgba(255, 193, 7, 0.72);
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.12);
}

.stream-card.big-match .program-title {
    font-size: 13px;
    line-height: 1.22;
}

.stream-card.big-match .badge-live {
    background: linear-gradient(180deg, #ff5400, #ff1e00);
    box-shadow: 0 0 16px rgba(255, 61, 0, 0.35);
}

.stream-card.big-match .progress-bar {
    background: linear-gradient(90deg, #ffb703, var(--highlight));
}

.favoritos-row .stream-card.favorito-card .program-info {
    bottom: 16px;
}

.favoritos-row .stream-card.favorito-card .program-title {
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.favorite-subtitle {
    margin-top: 5px;
    font-size: 9px;
    color: rgba(255,255,255,0.58);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-card {
    border-color: rgba(120, 210, 255, 0.2);
}

.recent-pin {
    color: #9fe7ff;
    text-shadow: 0 0 10px rgba(159, 231, 255, 0.35);
}

.row-title { 
    font-size: 12px; 
    font-weight: 800; 
    color: #444; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 0; 
    border-left: 3px solid var(--highlight); 
    padding-left: 10px; 
}

.recentes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.recentes-clear-btn {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: #c7c7c7;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s ease;
}

.recentes-clear-btn:hover {
    color: #fff;
    border-color: rgba(var(--glass-rgb), 0.45);
    background: rgba(var(--glass-rgb), 0.14);
}

.slider { 
    display: flex; 
    gap: 20px; 
    overflow-x: auto; 
    padding: 0 0 25px 0;
    scrollbar-width: none; 
    width: 100%;
    scroll-snap-type: x mandatory;
}
.slider::-webkit-scrollbar { display: none; }

/* NAV BTNS (SETAS) */
.nav-btn {
    position: absolute; 
    top: 55%; 
    transform: translateY(-50%);
    width: 48px; 
    height: 48px; 
    background: rgba(20, 20, 20, 0.7); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    color: white;
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 30;
    display: none; 
    align-items: center; 
    justify-content: center;
    transition: 0.4s ease; 
    backdrop-filter: blur(12px);
}
.nav-btn.active { display: flex; }
.btn-prev { left: 15px; }
.btn-next { right: 15px; }
.nav-btn:hover { 
    background: var(--highlight); 
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 0 20px rgba(61, 90, 254, 0.4);
}

/* CARDS */
.stream-card { 
    min-width: 280px; 
    height: 158px; 
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1629 100%);
    background-size: cover; 
    background-position: center;
    border-radius: 12px; 
    cursor: pointer; 
    border: 1px solid rgba(66, 165, 245, 0.2);
    position: relative; 
    overflow: hidden; 
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stream-card::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0) 100%); 
    z-index: 1; 
}

.card-live-preview {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.34s ease;
    pointer-events: none;
}

.card-live-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    transform: scale(1.08);
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stream-card.preview-loading .card-live-preview {
    opacity: 0.35;
}

.stream-card.previewing .card-live-preview {
    opacity: 1;
}

.stream-card.previewing .card-live-preview iframe {
    opacity: 1;
}

.program-info {
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.stream-card.previewing .program-info,
.stream-card.previewing .card-preview {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
}

.stream-card.previewing .card-label,
.stream-card.previewing .badge-live,
.stream-card.previewing .badge-recent,
.stream-card.previewing .badge-favorito,
.stream-card.previewing .progress-container {
    opacity: 0;
    visibility: hidden;
}

.stream-card.previewing::after {
    background: linear-gradient(to top, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.16) 100%);
}

.stream-card:hover { 
    transform: translateY(-6px);
    border-color: rgba(66, 165, 245, 0.5);
    box-shadow: 0 12px 28px rgba(66, 165, 245, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stream-card.active { 
    border-color: var(--highlight); 
    box-shadow: 0 0 20px rgba(61, 90, 254, 0.2); 
}

.card-label { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    max-width: calc(100% - 100px);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px; 
    font-weight: 600; 
    color: #fff; 
    text-transform: uppercase; 
    letter-spacing: 0px;
    z-index: 2; 
    background: rgba(0,0,0,0.7); 
    padding: 3px 7px; 
    border-radius: 4px; 
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.fav-btn {
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.03);
    color: #aaa;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 8px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.fav-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
}

.fav-btn.active {
    color: #ffd700;
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

.badge-live { 
    position: static; 
    background: linear-gradient(135deg, #ff3d00 0%, #ff6d00 100%);
    color: white; 
    font-size: 9px; 
    font-weight: 900; 
    padding: 4px 8px; 
    border-radius: 4px; 
    display: none; 
    z-index: 10;
}

.card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.program-info { 
    position: absolute; 
    bottom: 10px; 
    left: 10px; 
    right: 10px; 
    z-index: 2;
}

.program-title { 
    font-size: 11px; 
    font-weight: 500; 
    color: #fff; 
    text-shadow: 0 2px 6px rgba(0,0,0,0.5); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    letter-spacing: 0px;
    line-height: 1.3;
    opacity: 1;
}

.progress-container { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 4px; 
    background: rgba(255,255,255,0.05); 
    z-index: 3; 
}
.progress-bar { 
    height: 100%; 
    background: var(--highlight); 
    width: 0%; 
    transition: width 0.5s ease; 
}

/* --- PAINEL LATERAL (LIQUID GLASS) --- */
#info-panel { 
    position: fixed; 
    right: -400px; /* Igual à largura, mas negativo */
    top: 0; 
    bottom: 0; 
    width: 400px; /* Nova largura alargada */
    background: rgba(8, 8, 8, 0.75); 
    backdrop-filter: blur(25px) saturate(180%); 
    border-left: 1px solid rgba(255, 255, 255, 0.05); 
    z-index: 1000; 
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
}

#info-panel.open { right: 0; }

.tab-box { 
    display: flex; 
    gap: 5px; 
    margin-bottom: 20px; 
    background: rgba(255,255,255,0.05); 
    padding: 4px; 
    border-radius: 10px; 
}

.panel-tab-btn { 
    flex: 1; 
    border: none; 
    background: none; 
    color: #777; 
    font-weight: 700; 
    font-size: 10px; 
    cursor: pointer; 
    padding: 10px; 
    border-radius: 8px; 
    transition: 0.2s; 
}
.panel-tab-btn.active { color: #fff; background: var(--highlight); }

.match-card { 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 14px; 
    padding: 16px; 
    margin-bottom: 12px; 
    transition: 0.3s;
}

.match-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--highlight);
}

/* --- GUIA TV (SIMPLIFICADO) --- */
.guide-shell {
    padding: 0;
}

.guide-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 5000;
}

.guide-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.guide-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.guide-modal-card {
    position: relative;
    width: min(1360px, calc(100vw - 28px));
    height: calc(100vh - 28px);
    background: linear-gradient(180deg, rgba(11,11,11,0.995), rgba(5,5,5,0.995));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.guide-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.guide-modal-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.guide-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.guide-modal-body {
    flex: 1;
    overflow: auto;
    padding: 16px 24px;
}

.guide-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.guide-header-simple h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ddd;
}

.guide-filter-btn-simple {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #ccc;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.guide-filter-btn-simple:hover {
    background: rgba(255,255,255,0.08);
}

.guide-filter-btn-simple.active {
    border-color: rgba(var(--glass-rgb), 0.6);
    background: rgba(var(--glass-rgb), 0.18);
    color: #fff;
}

.guide-day-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.guide-day-tabs::-webkit-scrollbar {
    display: none;
}

.guide-day-btn {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: #bbb;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s ease;
}

.guide-day-btn:hover {
    background: rgba(255,255,255,0.08);
}

.guide-day-btn.active {
    border-color: rgba(var(--glass-rgb), 0.6);
    background: rgba(var(--glass-rgb), 0.18);
    color: #fff;
}

.guide-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-channel-row {
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
}

.guide-channel-head {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.02);
}

.guide-channel-name {
    font-size: 11px;
    font-weight: 700;
    color: #e0e0e0;
}

.guide-program-row {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}

.guide-nav-btn {
    flex-shrink: 0;
    width: 36px;
    min-height: 200px;
    border: none;
    background: rgba(255,255,255,0.01);
    color: #777;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.guide-nav-btn:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
}

.guide-program-cards {
    flex: 1;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 8px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.guide-program-cards::-webkit-scrollbar {
    display: none;
}

.guide-program-card {
    flex-shrink: 0;
    width: 165px;
    min-height: 210px;
    padding: 0;
    background: linear-gradient(135deg, rgba(40,40,60,0.9), rgba(15,15,35,0.95));
    border: 1.5px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
}

.guide-program-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 130px;
    background: linear-gradient(
        180deg, 
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.15) 50%,
        rgba(0,0,0,0.95) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.guide-program-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 
        0 16px 40px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.12);
    background: linear-gradient(135deg, rgba(70,70,100,0.95), rgba(35,35,55,0.98));
}

.guide-program-card.current {
    border: 2px solid rgba(var(--glass-rgb), 0.85);
    background: linear-gradient(
        135deg, 
        rgba(var(--glass-rgb), 0.35), 
        rgba(var(--glass-rgb), 0.12),
        rgba(15,15,35,0.95)
    );
    box-shadow: 
        0 0 28px rgba(var(--glass-rgb), 0.5),
        0 8px 32px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.guide-program-card.current .guide-program-overlay {
    background: linear-gradient(
        180deg, 
        rgba(var(--glass-rgb), 0.12) 0%,
        rgba(var(--glass-rgb), 0.06) 40%,
        rgba(0,0,0,0.75) 100%
    );
}

.guide-program-card.current:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 
        0 0 32px rgba(var(--glass-rgb), 0.6),
        0 16px 40px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.12);
}

.guide-live-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 8px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff5566, #ff2244);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(255,34,68,0.5);
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.guide-program-time {
    font-size: 9px;
    color: #c0d0ff;
    font-weight: 700;
    position: relative;
    z-index: 2;
    letter-spacing: 0.4px;
    padding: 6px 12px 12px 12px;
    flex-shrink: 0;
}

.guide-program-title {
    font-size: 11px;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    padding: 10px 12px;
    flex: 1;
}

.guide-program-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.4;
    z-index: 1;
}

.guide-empty {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

.guide-channel-row {
    padding: 12px;
    border-radius: 14px;
}

.guide-channel-head {
    margin-bottom: 8px;
}

.guide-programs {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.guide-section-label {
    font-size: 11px;
    font-weight: 800;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.guide-fav-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-fav-pill {
    text-align: left;
    border: 1px solid rgba(var(--glass-rgb), 0.22);
    background: rgba(255,255,255,0.03);
    color: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 200px;
    cursor: pointer;
    transition: 0.2s ease;
}

.guide-fav-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--glass-rgb), 0.5);
    background: rgba(var(--glass-rgb), 0.11);
}

.guide-fav-pill span {
    display: block;
    font-size: 11px;
    font-weight: 800;
}

.guide-fav-pill small {
    display: block;
    margin-top: 4px;
    color: #b9b9b9;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guide-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-channel-row {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    padding: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-channel-row:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.035);
}

.guide-channel-row.is-favorite {
    border-color: rgba(var(--glass-rgb), 0.22);
    box-shadow: 0 0 20px rgba(var(--glass-rgb), 0.05);
}

.guide-channel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.guide-channel-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.guide-channel-meta {
    margin-top: 4px;
    font-size: 9px;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.guide-star {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.35);
    color: #bbb;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

.guide-star:hover {
    border-color: rgba(255,255,255,0.26);
    color: #fff;
}

.guide-star.active {
    color: #ffe7a3;
    border-color: rgba(255, 231, 163, 0.35);
    background: rgba(255, 231, 163, 0.1);
}


.guide-program-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.guide-program-cards::-webkit-scrollbar {
    display: none;
}

.guide-program-row {
    position: relative;
    padding: 0 28px;
}

.guide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(8,8,8,0.68);
    color: #fff;
    font-size: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.guide-nav-btn.active {
    display: inline-flex;
}

.guide-btn-prev {
    left: 0;
}

.guide-btn-next {
    right: 0;
}

.guide-program {
    position: relative;
    border: 1px solid rgba(255,255,255,0.12);
    background: #0f0f0f;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    color: #fff;
    cursor: pointer;
    min-height: 112px;
    min-width: 240px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.guide-program::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.22) 100%);
    z-index: 0;
    border-radius: inherit;
}

.guide-program-card {
    isolation: isolate;
    background-clip: padding-box;
}

.guide-program:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--glass-rgb), 0.6);
}

.guide-program.current {
    border-color: rgba(var(--glass-rgb), 0.55);
    box-shadow: 0 0 18px rgba(var(--glass-rgb), 0.07);
}

.guide-program.active {
    border-color: rgba(255, 231, 163, 0.45);
}

.guide-program-time {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: 9px;
    color: #d7d7d7;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 3px 7px;
    margin-top: 28px;
}

.guide-live-pill {
    position: absolute;
    left: 12px;
    top: 10px;
    z-index: 2;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #ffd9d9;
    border: 1px solid rgba(255, 121, 121, 0.55);
    background: rgba(175, 19, 19, 0.4);
    border-radius: 999px;
    padding: 3px 7px;
}

.guide-program-title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 1;
    margin-top: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    color: #f4f4f4;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-program-actions {
    position: absolute;
    right: 10px;
    top: 9px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.guide-program-reminder,
.guide-program-star {
    font-size: 13px;
    color: #f0f0f0;
    border: none;
    background: rgba(0,0,0,0.45);
    cursor: pointer;
    line-height: 1;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.guide-program-star {
    font-size: 14px;
}

.guide-program-reminder:hover,
.guide-program-star:hover {
    transform: scale(1.12);
    color: #fff;
}

.guide-program-reminder.active {
    color: #bce6ff;
    background: rgba(96, 181, 255, 0.22);
}

.guide-program.active .guide-program-star {
    color: #ffe7a3;
}

.guide-next {
    margin-top: 8px;
    font-size: 9px;
    color: #767676;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.program-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 6000;
}

.program-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.program-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.program-modal-card {
    position: relative;
    width: min(920px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    background: linear-gradient(180deg, rgba(14,14,14,0.98), rgba(7,7,7,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 26px;
    box-shadow: 0 30px 85px rgba(0,0,0,0.58);
    overflow: hidden;
}

.program-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.program-modal-media {
    min-height: 100%;
    background: #0d0d0d;
}

.program-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.program-modal-content {
    padding: 28px 26px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: auto;
}

.program-modal-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8e8e8e;
}

.program-modal-content h2 {
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.program-modal-time {
    font-size: 12px;
    font-weight: 700;
    color: #d7d7d7;
}

.program-modal-content p {
    color: #b8b8b8;
    line-height: 1.55;
    font-size: 13px;
}

.program-modal-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.program-modal-fav-btn,
.program-modal-secondary {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 11px 14px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

.program-modal-fav-btn {
    background: rgba(var(--glass-rgb), 0.16);
    color: #fff;
    border-color: rgba(var(--glass-rgb), 0.25);
}

.program-modal-live-btn {
    border-radius: 14px;
    border: 1px solid rgba(78, 255, 167, 0.4);
    background: rgba(78, 255, 167, 0.14);
    color: #dbffe9;
    padding: 11px 14px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    display: none;
}

.program-modal-live-btn:hover {
    border-color: rgba(78, 255, 167, 0.65);
    background: rgba(78, 255, 167, 0.22);
}

.program-modal-secondary {
    background: rgba(255,255,255,0.05);
    color: #efefef;
}

.settings-modal-card {
    width: min(900px, calc(100vw - 28px));
    height: min(700px, calc(100vh - 28px));
}

.settings-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-group {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255,255,255,0.02);
}

.settings-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #d6d6d6;
    margin-bottom: 10px;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.settings-toggle:first-of-type {
    border-top: none;
    padding-top: 0;
}

.settings-label {
    font-size: 13px;
    font-weight: 700;
    color: #f2f2f2;
}

.settings-help {
    margin-top: 4px;
    font-size: 11px;
    color: #9d9d9d;
}

.settings-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--highlight);
    cursor: pointer;
}

.settings-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-btn {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: #e8e8e8;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
}

.settings-btn:hover {
    border-color: rgba(var(--glass-rgb), 0.42);
    background: rgba(var(--glass-rgb), 0.14);
}

.settings-inline {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.settings-text-input {
    min-width: 240px;
    flex: 1;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.35);
    color: #f2f2f2;
    padding: 0 12px;
    font-size: 12px;
    outline: none;
}

.settings-chip-row {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.settings-chip {
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.03);
    color: #ddd;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 8px;
    cursor: pointer;
}

.settings-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.settings-health-card {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #dedede;
    display: flex;
    justify-content: space-between;
}

.settings-health-card.stable { border-color: rgba(90, 238, 153, 0.42); }
.settings-health-card.unstable { border-color: rgba(255, 184, 71, 0.45); }
.settings-health-card.offline { border-color: rgba(255, 92, 92, 0.45); }

/* --- IMAGE ERROR PLACEHOLDER --- */
.image-error {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    position: relative;
    overflow: hidden;
}

.image-error::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(100, 200, 255, 0.08) 0px,
            rgba(100, 200, 255, 0.08) 2px,
            transparent 2px,
            transparent 6px
        );
    animation: shimmer 1.5s infinite ease-in-out;
}

.image-error::after {
    content: '📺';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    opacity: 0.4;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.previewing .image-error::after,
.stream-card.previewing .image-error::after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    content: '' !important;
    pointer-events: none !important;
}

.image-error.previewing::after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}


body.modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .guide-modal-card {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        border-radius: 20px;
    }

    .guide-modal-header,
    .guide-modal-body,
    .program-modal-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .program-modal-card {
        width: calc(100vw - 20px);
        grid-template-columns: 1fr;
        max-height: calc(100vh - 20px);
    }

    .program-modal-media {
        min-height: 220px;
        max-height: 280px;
    }

    .settings-modal-card {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        border-radius: 20px;
    }

    .guide-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-search-wrap {
        max-width: none;
        width: 100%;
    }

    .guide-filters {
        width: 100%;
    }

    .guide-program-row {
        padding: 0 22px;
    }

    .guide-nav-btn {
        width: 24px;
        height: 24px;
    }

    .mini-player-sticky {
        right: 8px;
        bottom: 8px;
        width: calc(100vw - 16px);
    }

    .hero-section.sticky-mini {
        right: 8px;
        bottom: 50px;
        width: calc(100vw - 16px);
        height: calc((100vw - 16px) * 9 / 16);
    }
}

.guide-empty {
    font-size: 12px;
    color: #d0d0d0;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    line-height: 1.5;
}

.team-line { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: 13px; /* Um pouco maior para ler melhor */
    font-weight: 600; 
    margin: 6px 0; 
    color: #eee; /* Quase branco */
}

.team-crest { 
    width: 20px; 
    height: 20px; 
    object-fit: contain; 
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

.match-score {
    font-size: 20px; 
    font-weight: 800; 
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.status-badge {
    font-size: 9px;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-live {
    background: rgba(255, 61, 0, 0.2);
    color: #ff3d00;
    border: 1px solid rgba(255, 61, 0, 0.4);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.status-scheduled {
    background: rgba(61, 90, 254, 0.15);
    color: var(--highlight);
    border: 1px solid rgba(61, 90, 254, 0.3);
}

.close-btn { 
    margin-top: auto; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); 
    color: #fff; 
    padding: 12px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: 700; 
}

#toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    min-width: 260px;
    max-width: 360px;
    border-radius: 11px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(8, 8, 8, 0.84);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    padding: 12px 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.42);
    transform: translateX(18px);
    opacity: 0;
    animation: toast-in 0.32s ease forwards;
}

.toast-item.goal {
    border-color: rgba(61, 90, 254, 0.55);
    background:
        linear-gradient(120deg, rgba(var(--glass-rgb), 0.25), rgba(10,10,10,0.9));
}

.toast-item.var {
    border-color: rgba(255, 186, 73, 0.55);
    background:
        linear-gradient(120deg, rgba(255, 186, 73, 0.22), rgba(10,10,10,0.9));
}

.toast-item.info {
    border-color: rgba(150, 210, 255, 0.45);
    background:
        linear-gradient(120deg, rgba(150, 210, 255, 0.18), rgba(10,10,10,0.9));
}

.toast-item.end {
    border-color: rgba(173, 255, 173, 0.45);
    background:
        linear-gradient(120deg, rgba(173, 255, 173, 0.16), rgba(10,10,10,0.9));
}

.toast-item.out {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    to {
        transform: translateX(20px);
        opacity: 0;
    }
}

/* --- PLAYER TRANSITION OVERLAY --- */
.player-transition-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--glass-rgb), 0.20), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.06), transparent 28%),
        linear-gradient(180deg, rgba(5,5,7,0.99) 0%, rgba(4,4,4,0.99) 100%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-transition-overlay.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-transition-overlay.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(61, 90, 254, 0.8);
    border-radius: 50%;
    animation: transition-spin 1s linear infinite;
}

@keyframes transition-spin {
    to { transform: rotate(360deg); }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    nav { 
        width: 100%; 
        height: 60px; 
        flex-direction: row; 
        position: fixed; 
        bottom: 0; 
        border-right: none; 
        border-top: 1px solid #1a1a1a; 
        justify-content: space-around; 
        padding: 0; 
    }
    .logo-v2, .nav-indicator-pill { display: none; }
    .nav-links-container { flex-direction: row; justify-content: space-around; }
    .hero-section.active { height: 50vh; }
    #info-panel { width: 100%; right: -100%; }
    main { height: calc(100vh - 60px); }
    #main-scroll-container { padding-bottom: 20px; }
    
    #toast-container {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    .toast-item {
        min-width: auto;
        max-width: 100%;
    }
    
    /* Esconder controles de multiview em mobile */
    .player-top-controls {
        display: none !important;
    }
    
    .player-grid.mode-1 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
    
    .favoritos-row {
        padding: 0 12px;
        margin-bottom: 16px;
    }
    .favoritos-row .stream-card.favorito-card {
        min-width: 180px;
        height: 110px;
        border-radius: 10px;
    }
    
    .favoritos-row .stream-card.favorito-card .card-label {
        font-size: 6px;
        padding: 2px 4px;
    }
    
    .guide-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .guide-programs {
        grid-template-columns: 1fr;
    }
    .guide-fav-pill {
        min-width: 100%;
    }
    
    /* Cards de canais em mobile */
    .canais-grid {
        padding: 0 12px;
        gap: 12px;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stream-card {
        height: 180px;
        border-radius: 12px;
    }
    
    .card-label {
        font-size: 7px;
        padding: 2px 4px;
    }
}