* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: #000; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Material Icons'; font-style: normal; font-weight: 400; src: url('/material-icons.woff2') format('woff2'); font-display: block; }
.material-icons { font-family: 'Material Icons'; font-weight: normal; font-style: normal; font-size: 24px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'liga'; overflow: hidden; width: 1em; height: 1em; vertical-align: middle; }
body { font-family: 'Inter', -apple-system, sans-serif; background: #0d0d0d; color: #fff; overflow-x: hidden; touch-action: pan-x pan-y; }
html.player-active, html.player-active body { overflow: hidden; height: 100%; overscroll-behavior: none; position: fixed; inset: 0; }
a { color: inherit; text-decoration: none; }
@keyframes swipeSlide {
    0% { transform: translateX(var(--from-x)) scale(0.8); opacity: 0; }
    15% { transform: translateX(0) scale(1); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

#navbar {
    position: fixed; top: 0; left: 0; right: 0; height: calc(56px + env(safe-area-inset-top, 0px));
    background: rgba(13,13,13,0.95); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: space-between;
    padding: env(safe-area-inset-top, 0px) calc(24px + env(safe-area-inset-right, 0px)) 0 calc(24px + env(safe-area-inset-left, 0px)); z-index: 100; box-sizing: border-box;
}
.nav-left { display: flex; align-items: center; gap: 24px; }
.logo { font-size: 20px; font-weight: 700; color: #00b4d8; letter-spacing: -0.5px; }
.nav-link { font-size: 14px; font-weight: 500; color: #8e8e93; transition: color 0.2s; padding: 4px 0; }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-icon-link { align-items: center; background: none; border: none; color: #8e8e93; cursor: pointer; display: flex; justify-content: center; opacity: 0.7; }
.nav-icon-link[hidden] { display: none; }
.nav-icon-link .material-icons { font-size: 20px; }
.nav-right { font-size: 13px; color: #8e8e93; display: flex; align-items: center; gap: 16px; }
#auth-status { display: flex; align-items: center; gap: 6px; }
#auth-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
#auth-status .dot.ok { background: #30d158; }
#auth-status .dot.err { background: #ff453a; }

.view { padding-top: calc(56px + env(safe-area-inset-top, 0px)); min-height: 100vh; }

.vod-page { padding: 20px 24px; max-width: 1200px; margin: 0 auto; }
.vod-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.vod-header h2 { margin: 0; font-size: 22px; font-weight: 700; color: #fff; }
.vod-search-wrapper { position: relative; flex: 1; min-width: 200px; }
.vod-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 20px; color: #6e6e73; pointer-events: none; transition: color 0.3s ease; }
.vod-search-wrapper:focus-within .vod-search-icon { color: #00b4d8; }
.vod-search { width: 100%; height: 44px; padding: 0 16px 0 40px; border-radius: 12px; background: #1a1a1e; border: 1.5px solid #2a2a2e; color: #fff; font-size: 14px; outline: none; transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; box-sizing: border-box; }
.vod-search:hover { border-color: #3a3a40; background: #1e1e22; }
.vod-search:focus { border-color: #00b4d8; box-shadow: 0 0 0 3px rgba(0,180,216,0.15); background: #1c1c20; }
.vod-search::placeholder { color: #6e6e73; transition: color 0.3s ease; }
.vod-search:focus::placeholder { color: #8e8e93; }
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.vod-section-title { color: #fff; margin: 0px 0 18px; font-size: 1.2em; }
.vod-card { cursor: pointer; background: linear-gradient(145deg, #1e1e22, #161618); border: 1px solid #2a2a2e; border-radius: 10px; overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.vod-card:hover { transform: translateY(-3px); border-color: #3a3a3e; }
.vod-card-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #0d0d0d; }
.vod-card-info { padding: 10px; }
.vod-card-title { font-size: 13px; font-weight: 600; color: #fff; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-card-year { font-size: 12px; color: #8e8e93; margin: 0; }
.vod-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: #8e8e93; min-height: 200px; }
.vod-loader p { margin: 12px 0 0; font-size: 14px; }
.vod-back-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid #2a2a2e; border-radius: 8px; color: #8e8e93; padding: 8px 14px; font-size: 14px; cursor: pointer; margin-bottom: 16px; transition: color 0.2s, border-color 0.2s; }
.vod-back-btn:hover { color: #fff; border-color: #3a3a3e; }
.vod-detail-info { margin-bottom: 20px; }
.vod-info-row { display: flex; gap: 20px; }
.vod-info-poster { width: 160px; height: 240px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.vod-info-text { flex: 1; min-width: 0; }
.vod-info-title { margin: 0 0 8px; font-size: 22px; color: #fff; }
.vod-info-year { color: #8e8e93; font-weight: 400; }
.vod-info-tags { color: #8e8e93; font-size: 14px; margin-bottom: 10px; }
.vod-info-desc { color: #b0b0b0; font-size: 14px; line-height: 1.5; margin: 0 0 10px; }
.vod-info-cast { color: #8e8e93; font-size: 13px; margin-bottom: 4px; }
.vod-streams-title { font-size: 18px; color: #fff; margin: 16px 0 10px; }
.vod-episode-info { display: flex; gap: 16px; margin-bottom: 16px; }
.vod-episode-thumb { width: 240px; height: 135px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.vod-episode-info-text { flex: 1; min-width: 0; }
@media (max-width: 600px) {
    .vod-info-poster { width: 100px; height: 150px; }
    .vod-info-title { font-size: 18px; }
    .vod-episode-thumb { width: 160px; height: 90px; }
}
.vod-stream-entry { display: block; background: #1a1a1e; border: 1px solid #2a2a2e; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #ccc; margin-bottom: 8px; cursor: pointer; word-break: break-word; transition: background 0.2s, border-color 0.2s; text-decoration: none; }
.vod-stream-entry:hover { background: #222226; border-color: #3a3a3e; color: #fff; }
.vod-season-title { color: #00b4d8; font-size: 15px; font-weight: 600; margin: 16px 0 8px; }
.vod-seasons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vod-season-btn { background: #1a1a1e; border: 1px solid #2a2a2e; border-radius: 8px; color: #8e8e93; padding: 8px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.vod-season-btn:hover { background: #222226; border-color: #3a3a3e; color: #fff; }
.vod-season-btn.active { background: #00b4d8; border-color: #00b4d8; color: #fff; }
.vod-episode-entry { display: block; background: #1a1a1e; border: 1px solid #2a2a2e; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #ccc; margin-bottom: 6px; cursor: pointer; transition: background 0.2s, border-color 0.2s; text-decoration: none; }
.vod-episode-entry:hover { background: #222226; border-color: #3a3a3e; color: #fff; }
#movie-detail h3, #series-detail h3 { color: #fff; margin: 0 0 16px; font-size: 18px; }
.vod-no-results { color: #8e8e93; font-size: 14px; padding: 20px 0; }

#vod-player-overlay { position: fixed; inset: 0; z-index: 9999; background: #000; animation: vodFadeIn 0.25s ease; overflow: hidden; }
@keyframes vodFadeIn { from { opacity: 0; } to { opacity: 1; } }
.vod-player-page { display: flex; flex-direction: column; height: 100vh; width: 100vw; background: #000; overflow: hidden; }
.vod-player-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(0,0,0,0.7); position: absolute; top: 0; left: 0; right: 0; z-index: 10; transition: opacity 0.3s; }
.vod-player-back { background: none; border: none; color: #fff; cursor: pointer; padding: 4px; display: flex; align-items: center; }
.vod-player-back .material-icons { font-size: 28px; }
.vod-player-topbar span { color: #fff; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.vod-player-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; min-height: 0; }
#vod-video { width: 100%; height: 100%; background: #000; outline: none; }
.vod-player-wrapper #vod-loading-overlay {
    position: absolute; inset: 0; z-index: 4;
    display: flex; align-items: flex-end;
    padding: 0 20px 28px;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.58) 72%, rgba(0,0,0,0.94) 100%);
    opacity: 1; pointer-events: none;
    transition: opacity 0.4s ease, background 0.4s ease;
}
.vod-player-wrapper #vod-loading-overlay.hidden { opacity: 0; }
#vod-loading-spinner {
    position: absolute; top: 64px; right: 16px;
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff;
    animation: chSpinner 0.75s linear infinite;
}
#vod-loading-content {
    display: flex; align-items: center; gap: 14px; width: 100%;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 240ms ease-out, transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
#vod-loading-overlay.hidden #vod-loading-content {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition-timing-function: ease-in;
}
#vod-loading-artwork {
    width: 82px; height: 56px; border-radius: 8px; object-fit: contain;
    background: rgba(255,255,255,0.07); flex-shrink: 0;
}
#vod-loading-text { flex: 1; min-width: 0; }
#vod-loading-title {
    font-size: 15px; line-height: 1.2; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#vod-loading-status { font-size: 13px; color: #ccc; margin-top: 2px; }
.vod-player-wrapper .plyr { width: 100%; height: 100%; max-height: 100%; }
.vod-player-wrapper .plyr--video { height: 100%; max-height: 100%; }
.vod-player-wrapper .plyr__video-wrapper { height: 100%; max-height: 100%; }
.plyr--full-ui input[type=range] { color: #00bcd4; }
.plyr__control--overlaid { background: rgba(0,188,212,0.8); }
.subtitle-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s ease; }
.subtitle-modal-content { background: #18181b; border-radius: 14px; min-width: 260px; max-width: 340px; width: 88%; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.6); animation: modalSlideUp 0.2s ease; border: 1px solid #2a2a2e; }
.subtitle-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #27272a; }
.subtitle-modal-header h3 { margin: 0; color: #e4e4e7; font-size: 14px; font-weight: 600; }
.subtitle-modal-close { background: none; border: none; color: #71717a; cursor: pointer; padding: 2px; border-radius: 6px; transition: color 0.15s, background 0.15s; line-height: 0; }
.subtitle-modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.subtitle-modal-close .material-icons { font-size: 18px; }
.subtitle-modal-list { padding: 4px 0; max-height: 60vh; overflow-y: auto; }
.subtitle-modal-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; color: #a1a1aa; cursor: pointer; transition: background 0.12s, color 0.12s; font-size: 13px; }
.subtitle-modal-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.subtitle-modal-item.active { color: #00bcd4; }
.subtitle-modal-item .material-icons { font-size: 16px; opacity: 0; flex-shrink: 0; }
.subtitle-modal-item.active .material-icons { opacity: 1; }

#epg-search-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,0.6); display: flex; align-items: flex-start; justify-content: center; padding-top: 80px; animation: fadeIn 0.15s ease; }
.epg-search-modal { background: #18181b; border-radius: 14px; width: 92%; max-width: 520px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.6); animation: modalSlideUp 0.2s ease; border: 1px solid #2a2a2e; display: flex; flex-direction: column; max-height: 70vh; }
.epg-search-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #27272a; }
.epg-search-header .material-icons { color: #71717a; font-size: 20px; flex-shrink: 0; }
.epg-search-header input { flex: 1; background: none; border: none; color: #fff; font-size: 15px; outline: none; font-family: inherit; }
.epg-search-header input::placeholder { color: #555; }
.epg-search-close { background: none; border: none; color: #71717a; cursor: pointer; padding: 2px; border-radius: 6px; line-height: 0; transition: color 0.15s; }
.epg-search-close:hover { color: #fff; }
.epg-search-close .material-icons { font-size: 18px; }
.epg-search-results { overflow-y: auto; flex: 1; min-height: 0; }
.epg-search-empty { padding: 24px 16px; text-align: center; color: #555; font-size: 13px; }
.epg-search-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; transition: background 0.12s; }
.epg-search-item:hover { background: rgba(255,255,255,0.06); }
.epg-search-item img { width: 40px; height: 28px; object-fit: contain; flex-shrink: 0; border-radius: 4px; }
.epg-search-item-info { flex: 1; min-width: 0; }
.epg-search-item-title { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-search-item-meta { font-size: 11px; color: #888; margin-top: 2px; }
.epg-search-item-badge { display: inline-block; background: #e53e3e; color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
.epg-search-item.past { opacity: 0.5; }
.epg-search-item.past:hover { opacity: 0.8; }
.epg-search-item-score { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: #00b4d8; font-size: 12px; margin-left: 6px; vertical-align: middle; }
.epg-search-team-logo { width: 14px; height: 14px; object-fit: contain; vertical-align: middle; }
.subtitle-section-divider { border-top: 1px solid #27272a; margin: 4px 0; }
.subtitle-section-title { font-size: 11px; color: #71717a; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 16px 4px; font-weight: 600; }
.subtitle-offset-section { padding: 8px 16px 12px; }
.subtitle-offset-controls { display: flex; align-items: center; justify-content: center; gap: 4px; }
.subtitle-offset-btn { background: #27272a; border: none; color: #d4d4d8; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 500; transition: background 0.12s, color 0.12s; }
.subtitle-offset-btn:hover { background: #3f3f46; color: #fff; }
.subtitle-offset-value { color: #00bcd4; font-size: 13px; font-weight: 600; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.subtitle-offset-reset { display: block; margin: 6px auto 0; background: none; border: none; color: #52525b; font-size: 11px; cursor: pointer; transition: color 0.12s; }
.subtitle-offset-reset:hover { color: #fff; }
.subtitle-font-section { padding: 8px 16px 12px; }
.subtitle-font-controls { display: flex; align-items: center; justify-content: center; gap: 6px; }
.subtitle-font-btn { background: #27272a; border: none; color: #d4d4d8; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background 0.12s, color 0.12s; display: flex; align-items: center; justify-content: center; }
.subtitle-font-btn:hover { background: #3f3f46; color: #fff; }
.subtitle-font-btn .material-icons { font-size: 16px; }
.subtitle-font-value { color: #e4e4e7; font-size: 13px; font-weight: 500; min-width: 36px; text-align: center; }
.subtitle-style-row { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; }
.subtitle-style-btn { background: #27272a; border: none; color: #a1a1aa; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; transition: background 0.12s, color 0.12s; }
.subtitle-style-btn:hover { background: #3f3f46; color: #fff; }
.subtitle-style-btn.active { background: #00bcd4; color: #000; }
@keyframes modalSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.plyr__control--overlaid:hover { background: #00bcd4; }
#loading { display: flex; align-items: center; justify-content: center; }
.spinner {
    width: 40px; height: 40px; border: 3px solid #333;
    border-top-color: #00b4d8; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#provider-view {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 24px 24px;
}

.provider-shell {
    width: min(512px, 100%);
}

.provider-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.provider-option {
    align-items: center;
    background: #1a1a1e;
    border: 1px solid #2a2a2e;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    gap: 12px;
    height: 124px;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.provider-option:hover {
    background: #222226;
    border-color: #3a3a3e;
    transform: translateY(-2px);
}

.provider-logo-frame {
    align-items: center;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.provider-logo-frame-meo {
    height: 94px;
    max-width: 218px;
    width: 98%;
}

.provider-logo-frame-nos {
    background: #fff;
    border-radius: 999px;
    height: 72px;
    max-width: 158px;
    padding: 0;
    width: 74%;
}

.provider-logo {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.provider-logo-meo {
    height: 94px;
}

.provider-logo-nos {
    height: 72px;
    max-width: 158px;
}

@media (max-width: 600px) {
    .provider-shell {
        width: min(300px, 100%);
    }

    .provider-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .provider-option {
        height: 116px;
        padding: 12px;
    }

    .provider-logo-frame-meo {
        height: 90px;
        max-width: 202px;
        width: 74%;
    }

    .provider-logo-frame-nos {
        height: 70px;
        max-width: 158px;
        width: 58%;
    }

    .provider-logo-meo {
        height: 90px;
    }

    .provider-logo-nos {
        height: 70px;
        max-width: 158px;
    }

}

@media (max-width: 430px) {
    .nav-left { gap: 12px; }
    .nav-link { font-size: 13px; }
    .nav-right { gap: 8px; }
}

#homepage-view { padding: calc(60px + env(safe-area-inset-top, 0px)) 24px 24px; }
.section-title { font-size: 22px; font-weight: 600; margin-bottom: 20px; }
#channels-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.channel-search-wrapper {
    position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 11;
    background: #0d0d0d; padding: 0 0 18px; display: flex; align-items: center; gap: 8px;
}
.channel-search-input-wrap {
    align-items: center;
    display: flex;
    flex: 1;
    position: relative;
}

.channel-search-icon {
    color: #636366;
    font-size: 20px;
    left: 12px;
    pointer-events: none;
    position: absolute;
}

.channel-search-clear {
    color: #636366;
    cursor: pointer;
    font-size: 20px;
    left: 12px;
    position: absolute;
    transition: color 0.2s;
}

.channel-search-clear:hover {
    color: #fff;
}

#channel-search {
    background: #1a1a1e;
    border: 1px solid #2c2c2e;
    border-radius: 10px;
    box-sizing: border-box;
    color: #e5e5ea;
    font-size: 14px;
    outline: none;
    padding: 9px 14px 9px 38px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    width: 100%;
}

.channel-search-input-wrap:hover #channel-search {
    background: #1d1d22;
    border-color: #4a4a52;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.channel-search-input-wrap:focus-within #channel-search {
    background: #1b1b20;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}
.channel-filter-btn {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
    background: #1a1a1e; border: 1px solid #2c2c2e; border-radius: 10px;
    color: #e5e5ea; font-size: 12px; padding: 0 12px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    height: 36px; box-sizing: border-box;
}
.channel-filter-btn:hover { background: #2c2c2e; border-color: #3a3a3c; }
.channel-filter-icon { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; }
.match-modal-overlay {
    position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); animation: fadeIn 0.15s ease;
}
.match-modal-overlay.closing { animation: fadeOut 0.2s ease forwards; }
.match-modal {
    background: #1c1c1e; border-radius: 16px; overflow: hidden; max-width: 380px; width: 90%;
    position: relative; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: modalSlideUp 0.25s ease;
}
.match-modal-overlay.closing .match-modal { animation: modalSlideDown 0.2s ease forwards; }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalSlideDown { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(40px); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.match-modal-thumb { width: 100%; aspect-ratio: 16/9; background: #111; }
.match-modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.match-modal-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; padding: 16px 24px 0; }
.match-modal-meta { font-size: 13px; color: #8e8e93; margin-bottom: 20px; padding: 0 24px; }
.match-modal-actions { display: flex; flex-direction: column; gap: 10px; padding: 0 24px 24px; }
.match-modal-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.match-modal-btn.primary { background: #00b4d8; color: #fff; }
.match-modal-btn.primary:hover { background: #0096b7; }
.match-modal-btn.secondary { background: #2c2c2e; color: #e5e5ea; }
.match-modal-btn.secondary:hover { background: #3a3a3c; }
.match-modal-btn.secondary.notified { background: #1a3a1a; color: #30d158; }
.match-modal-close {
    position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.5); border: none;
    color: #fff; cursor: pointer; padding: 4px; border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
}
.match-modal-close:hover { color: #fff; }
.catchup-end-overlay {
    position: absolute; inset: 0; z-index: 2000; background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease;
}
.catchup-end-overlay.visible { opacity: 1; }
.catchup-end-modal {
    background: #1c1c1e; border-radius: 18px; padding: 32px 28px 28px;
    max-width: 460px; width: 90%; text-align: center;
    transform: translateY(20px); transition: transform 0.25s ease;
}
.catchup-end-overlay.visible .catchup-end-modal { transform: translateY(0); }
.catchup-end-icon { color: #30d158; margin-bottom: 12px; }
.catchup-end-icon .material-icons { font-size: 48px; }
.catchup-end-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 24px; }
.catchup-end-actions { display: flex; flex-direction: column; gap: 10px; }
.catchup-end-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 12px; padding: 13px 16px; font-size: 14px;
    font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.catchup-end-btn.primary { background: #00b4d8; color: #fff; }
.catchup-end-btn.primary:hover { background: #0096b7; }
.catchup-end-btn.secondary { background: #2c2c2e; color: #e5e5ea; }
.catchup-end-btn.secondary:hover { background: #3a3a3c; }
.catchup-end-btn:disabled { cursor: default; opacity: 0.48; }
.catchup-end-btn:disabled:hover { background: #2c2c2e; }
.catchup-end-next-card {
    display: grid; grid-template-columns: 96px minmax(0, 1fr) 24px; align-items: center;
    gap: 14px; min-height: 84px; padding: 10px 14px; text-align: left;
}
.catchup-end-next-image {
    display: block; width: 96px; aspect-ratio: 16 / 9; object-fit: cover;
    border-radius: 8px; background: #151517;
}
.catchup-end-next-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.catchup-end-next-label { color: #8e8e93; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.catchup-end-next-title { overflow: hidden; color: #fff; font-size: 14px; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.catchup-end-next-time { color: #aeaeb2; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.catchup-end-next-icon { color: #d1d1d6; font-size: 24px; }
#channel-search::placeholder { color: #636366; }
#channel-search::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.ch-group-header {
    grid-column: 1 / -1; font-size: 11px; font-weight: 600; color: #8e8e93;
    text-transform: uppercase; letter-spacing: 0.7px; padding: 8px 0 4px;
    position: sticky; top: calc(56px + env(safe-area-inset-top, 0px) + 48px); z-index: 10;
    background: #0d0d0d;
}
.football-header {
    display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600;
    color: #fff; margin: 28px 0 14px; padding: 0;
}
.football-toggle {
    font-size: 13px; font-weight: 400; color: #aaa; cursor: pointer;
    user-select: none; -webkit-user-select: none;
}
.football-toggle:hover { color: #fff; }
#live-sports-list {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    margin-bottom: 20px;
}

#football-list {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.football-skeleton {
    display: grid;
    gap: 16px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.skeleton-card {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    aspect-ratio: 16 / 9;
    background: #1a1a1e;
    border: 1px solid #2a2a2e;
    border-radius: 12px;
    overflow: hidden;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.15; }
}

.program-search-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    margin-bottom: 20px;
}

#program-search-results {
    margin-top: 20px;
}

.football-card {
    background: #1a1a1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, box-shadow 0.24s ease, border-color 0.2s ease;
    will-change: transform;
}

.football-card[data-deferred-sport] {
    will-change: auto;
}

.football-card-thumb {
    background: #111;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.football-card-thumb.football-thumb-loading {
    animation: channelCardThumbShimmer 1.15s ease-in-out infinite;
    background-image: linear-gradient(110deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.08) 42%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0.02) 100%);
    background-size: 240% 100%;
}

.football-card-thumb::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, transparent 38%, rgba(0, 0, 0, 0.28) 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    transform: scale(1);
    transition: background 0.42s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.football-card-thumb > img:first-child,
.football-card-thumb > img.football-card-program-thumb {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.football-card-thumb > img.football-card-program-thumb {
    filter: saturate(1);
    inset: 0;
    opacity: 0;
    position: absolute;
    transform: scale(1);
    transition: opacity 0.6s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.42s ease;
    z-index: 0;
}

.football-card-thumb.football-thumb-loaded > img.football-card-program-thumb {
    opacity: 0.7;
}

@media (hover: hover) and (pointer: fine) {
    .football-card:hover {
        background-color: #252529;
        border-color: rgba(255, 255, 255, 0.16);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(0, 180, 216, 0.28);
        transform: translateY(-6px) scale(1.012);
    }

    .football-card:hover .football-card-thumb::after {
        transform: scale(1.06);
    }

    .football-card:hover .football-card-thumb.football-thumb-loaded > img.football-card-program-thumb {
        filter: saturate(1.05) brightness(1.05);
        opacity: 1;
        transform: scale(1.06);
    }
}

.football-card-thumb .football-item-badge {
    left: 6px;
    position: absolute;
    top: 6px;
    z-index: 2;
}

.football-card-notif-badge {
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    height: 28px;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 28px;
    z-index: 2;
}

.football-card-notif-badge .material-icons {
    color: #ffd60a;
    font-size: 16px;
}

.football-card-scoreboard {
    align-items: center;
    bottom: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    gap: 2px;
    justify-content: center;
    left: 0;
    padding: 18px 10px 6px;
    position: absolute;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.82) 100%);
    z-index: 2;
}

.football-card-scoreboard-row {
    align-items: center;
    display: flex;
    gap: 6px;
}

.football-card-team-logo {
    height: 24px;
    object-fit: contain;
    width: 18px;
}

.football-card-scoreboard-teams {
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.football-card-scoreboard-teams b {
    font-size: 14px;
}

/* Match score badge (player overlay) */
.match-score-badge {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    margin-left: 8px;
    padding: 4px 12px;
    border: 0;
    border-radius: 8px;
    background: rgba(20, 25, 31, 0.84);
    color: #fff;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.match-score-badge:hover {
    background: rgba(20, 25, 31, 0.94);
}

.match-score-badge:focus-visible {
    outline: 2px solid #56d9ef;
    outline-offset: 3px;
}

.match-badge-group {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    min-height: 36px;
    padding: 0;
    border: 0;
}

.match-badge-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.match-badge-score {
    flex: 0 0 auto;
    min-width: 3.5ch;
    text-align: center;
    font-size: 20px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.match-badge-minute {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    color: #56d9ef;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

@container player-surface (max-width: 700px) {
    .match-score-badge {
        gap: 6px;
        margin-left: 0;
        padding: 4px 10px;
    }

    .match-badge-group {
        gap: 4px;
        min-height: 32px;
    }

    .match-badge-logo {
        width: 18px;
        height: 18px;
    }

    .match-badge-score {
        font-size: 14px;
    }

    .match-badge-minute {
        font-size: 11px;
    }
}

@container player-surface (max-width: 420px) {
    #player-overlay .overlay-top {
        gap: 8px;
    }

    .match-score-badge {
        gap: 4px;
        padding: 3px 10px;
    }

    .match-badge-group {
        gap: 3px;
        min-height: 30px;
    }

    .match-badge-logo {
        width: 16px;
        height: 16px;
    }

    .match-badge-score {
        font-size: 12px;
    }

    .match-badge-minute {
        font-size: 10px;
    }
}

/* Match events panel */
.match-events-panel {
    position: absolute; top: 50px; right: 10px; bottom: 50px; width: 420px;
    background: linear-gradient(180deg, rgba(18, 18, 24, 0.85), rgba(10, 10, 16, 0.85));
    border-radius: 14px; overflow-y: auto; z-index: 20;
    padding: 0; font-size: 11px; color: #e0e0e0;
    transform: translateX(calc(100% + 10px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    visibility: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent;
}
@media (max-width: 768px) {
    .match-events-panel { top: 10px; bottom: 10px; right: 5px; width: calc(100% - 10px); max-width: 420px; border-radius: 10px; }
}
@media (max-height: 500px) {
    .match-events-panel { top: 5px; bottom: 5px; }
}
.match-events-panel.open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}
.match-events-panel::-webkit-scrollbar { width: 4px; }
.match-events-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.match-events-header {
    position: sticky; top: 0; z-index: 1;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
    font-weight: 700; font-size: 13px; text-align: center;
    padding: 14px 16px 10px; margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mev-header-logo { width: 20px; height: 20px; object-fit: contain; }
.mev-header-score { font-size: 15px; font-weight: 700; margin: 0 4px; }
.match-events-list { padding: 6px 12px 12px; }
.mev-period {
    text-align: center; color: #8e8e93; font-size: 11px;
    padding: 8px 0 4px; margin: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.mev-row {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 4px; border-radius: 8px;
    transition: background 0.15s;
}
.mev-row:hover { background: rgba(255,255,255,0.04); }
button.mev-row {
    width: 100%; border: 0; background: transparent; color: inherit;
    font: inherit; text-align: left; cursor: pointer;
}
button.mev-row:hover { background: rgba(255,255,255,0.08); }
button.mev-row:focus-visible { outline: 2px solid #30d158; outline-offset: -2px; }

.mev-row.mev-right { flex-direction: row-reverse; text-align: right; }
.mev-minute { color: #8e8e93; min-width: 28px; font-size: 10px; font-weight: 600; }
.mev-row.mev-right .mev-minute { text-align: right; }
.mev-icon { font-size: 13px; flex-shrink: 0; }
.mev-detail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mev-player { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mev-goal-scorer { color: #30d158; }
.mev-card-yellow { color: #ffd60a; }
.mev-card-red { color: #ff453a; }
.mev-sub-in { color: #ffffff; }
.mev-sub-out { color: #8d8d8d; font-size: 10px; }
.mev-assist { color: #7fda8f; font-size: 10px; }
.mev-score-change { color: #8e8e93; font-size: 11px; font-weight: 600; }
.mev-loading, .mev-empty, .mev-error {
    text-align: center; padding: 20px; color: #636366; font-size: 12px;
}
.mev-error { color: #ff6b6b; }
.football-card-scoreboard-time {
    background: rgba(0,0,0,0.6);
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 11px;
    opacity: 0.85;
    padding: 2px 6px;
}

.football-card-channel-logo {
    background: rgba(0, 0, 0, 0.58);
    border-radius: 4px;
    bottom: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
    display: block;
    height: 24px;
    object-fit: contain;
    padding: 2px 4px;
    position: absolute;
    right: 8px;
    width: 48px;
    z-index: 3;
}

.football-card-info {
    padding: 10px 12px 12px;
}

.football-card-title {
    color: #fff;
    display: -webkit-box;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.football-card-meta {
    color: #c9c9cf;
    font-size: 11px;
    line-height: 1.2;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.program-search-heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.program-search-heading h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.program-search-heading > span {
    color: #b4b4c1;
    font-size: 13px;
}

.program-search-timeline {
    display: block;
    list-style: none;
    margin: 0;
    overflow-y: auto;
    padding: 0 6px 6px;
    position: relative;
    scrollbar-color: #474750 transparent;
    scrollbar-width: thin;
}

#homepage-canais.is-searching #live-sports-top,
#homepage-canais.is-searching #football-schedule,
#homepage-canais.is-searching #channels-grid {
    display: none !important;
}

.program-search-day {
    list-style: none;
    margin: 0;
    padding: 0 0 12px;
}

.program-search-day-heading {
    background: #0d0d0d;
    border-bottom: 1px solid #303036;
    color: #e5e5ea;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 12px;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.program-search-day-heading::first-letter {
    text-transform: uppercase;
}

.program-search-day-entries {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.program-search-entry {
    --program-status-color: #c2bed3;
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 88px 18px minmax(0, 1fr);
}

.program-search-entry.live {
    --program-status-color: #ff969f;
}

.program-search-entry.upcoming {
    --program-status-color: #8ecbff;
}

.program-search-time {
    display: grid;
    gap: 5px;
    text-align: right;
}

.program-search-time strong {
    color: #f5f5f7;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.program-search-rail {
    align-self: stretch;
    display: grid;
    place-items: center;
    position: relative;
}

.program-search-rail::before {
    background: #3a3a45;
    bottom: -6px;
    content: '';
    position: absolute;
    top: -6px;
    width: 1px;
}

.program-search-rail::after {
    background: var(--program-status-color);
    border: 3px solid #0d0d0d;
    border-radius: 50%;
    box-sizing: content-box;
    content: '';
    height: 9px;
    position: relative;
    width: 9px;
}

.program-search-entry.live .program-search-rail::after {
    box-shadow: 0 0 0 3px rgba(255, 150, 159, 0.15);
}

.program-search-entry:first-child .program-search-rail::before {
    top: 50%;
}

.program-search-entry:last-child .program-search-rail::before {
    bottom: 50%;
}

.football-card.program-search-card {
    align-items: center;
    color: #f5f5f7;
    display: grid;
    font: inherit;
    gap: 20px;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    min-width: 0;
    padding: 12px;
    text-align: left;
    transform: none;
    width: 100%;
    will-change: auto;
}

.program-search-card:focus-visible {
    outline: 2px solid #8ecbff;
    outline-offset: 2px;
}

.program-search-card:disabled {
    cursor: default;
}

.program-search-card .football-card-thumb {
    aspect-ratio: auto;
    border-radius: 7px;
    display: block;
    height: 88px;
}

.program-search-info {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.program-search-details {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 4px;
}

.program-search-channel {
    color: #b9b9c6;
    flex-shrink: 0;
    font-size: 13px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.program-search-channel-logo {
    display: block;
    height: 48px;
    object-fit: contain;
    width: 112px;
}

.program-search-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.program-search-meta {
    color: #b9b9c6;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.program-search-action {
    align-items: center;
    background: #292931;
    border: 1px solid #42424c;
    border-radius: 8px;
    color: #f3f3f6;
    display: flex;
    font-size: 13px;
    gap: 6px;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    white-space: nowrap;
}

.program-search-action .material-icons {
    font-size: 20px;
}

.program-search-entry.live .program-search-action {
    background: #f2f2f7;
    border-color: #f2f2f7;
    color: #19191d;
}

@media (max-width: 760px) {
    .program-search-entry {
        gap: 8px;
        grid-template-columns: 60px 14px minmax(0, 1fr);
    }

    .football-card.program-search-card {
        gap: 12px;
        grid-template-columns: minmax(0, 1fr);
    }

    .program-search-card .football-card-thumb {
        display: none;
    }

    .program-search-title {
        font-size: 14px;
    }

    .program-search-action {
        justify-self: start;
        padding: 10px;
    }
}

.football-day-header {
    grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: #636366;
    text-transform: uppercase; letter-spacing: 0.5px; margin: 8px 0 0;
}
.football-item-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.football-item-badge.live { background: #ff453a; color: #fff; }
.football-item-badge.upcoming { background: rgba(0,0,0,0.6); color: #ccc; backdrop-filter: blur(4px); }
.channel-card {
    aspect-ratio: 16 / 9;
    background-color: #1a1a1e;
    background-position: center;
    background-size: cover;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
    cursor: pointer;
    isolation: isolate;
    overflow: hidden;
    position: relative;
    transition: opacity 0.3s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, box-shadow 0.24s ease;
    will-change: transform;
}

.channel-card[data-deferred-channel] {
    will-change: auto;
}

.channel-card::before {
    background-image: var(--channel-card-bg-image);
    background-position: center;
    background-size: cover;
    content: "";
    filter: saturate(1);
    inset: 0;
    opacity: 0;
    position: absolute;
    transform: scale(1);
    transition: opacity 0.6s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.42s ease;
    z-index: 0;
}

.channel-card::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.95) 100%);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.55s ease, background 0.24s ease;
    z-index: 0;
}

.channel-card.has-program-bg {
    background-image: none;
}

.channel-card.program-bg-loading {
    animation: channelCardThumbShimmer 1.15s ease-in-out infinite;
    background-image: linear-gradient(110deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.08) 42%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0.02) 100%);
    background-size: 240% 100%;
}

.channel-card.has-program-bg.program-bg-loaded::before {
    opacity: 1;
}

.channel-card.has-program-bg.program-bg-loaded::after {
    opacity: 1;
}

@keyframes channelCardThumbShimmer {
    from {
        background-position: 130% 0;
    }

    to {
        background-position: -130% 0;
    }
}

@media (hover: hover) and (pointer: fine) {
    .channel-card.has-program-bg:hover::before {
        filter: saturate(1.25) brightness(1.3);
        transform: scale(1.06);
    }

    .channel-card.has-program-bg:hover::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.16) 38%, rgba(0, 0, 0, 0.98) 100%);
    }

    .channel-card:hover {
        background-color: #252529;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(0, 180, 216, 0.28);
        transform: translateY(-6px) scale(1.012);
    }

    .channel-card:hover .channel-card-logo-wrap {
        background: rgba(0, 0, 0, 0.62);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
        opacity: 0;
        transform: translateY(-2px) scale(1.02);
    }

    .channel-card:hover .channel-card-cal-btn {
        opacity: 1;
    }

    .channel-card:hover .channel-card-program-title {
        color: #fff;
    }

    .channel-card:hover .channel-card-program-time {
        color: #d4d4da;
    }

    .channel-card:hover .channel-card-progress {
        background: rgba(255, 255, 255, 0.16);
    }

    .channel-card:hover .channel-card-progress-bar {
        background: #26d9ff;
        box-shadow: 0 0 14px rgba(0, 180, 216, 0.58);
    }
}

.channel-card.active {
    border-color: rgba(0, 180, 216, 0.52);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(0, 180, 216, 0.62);
}

.channel-card.return-highlight {
    animation: channelReturnPulse 1.05s ease-out both;
    z-index: 2;
}

@keyframes channelReturnPulse {
    0% {
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 0 0 rgba(38, 217, 255, 0), 0 0 0 1px rgba(38, 217, 255, 0.1);
        filter: brightness(1);
    }

    24% {
        box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(38, 217, 255, 0.28), 0 0 28px rgba(38, 217, 255, 0.32);
        filter: brightness(1.16);
    }

    100% {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
        filter: brightness(1);
    }
}

.channel-card-header {
    align-items: center;
    display: flex;
    gap: 12px;
    left: 8px;
    padding: 0;
    position: absolute;
    right: 16px;
    top: 8px;
    z-index: 1;
}

.channel-card-logo-wrap {
    aspect-ratio: 2 / 1;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    flex-shrink: 0;
    height: auto;
    opacity: 1;
    overflow: hidden;
    transform: translateZ(0);
    transition: opacity 0.22s ease, background 0.2s ease, transform 0.24s ease, box-shadow 0.24s ease;
    width: min(42%, 150px);
}

.channel-card-logo {
    border-radius: 8px;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.22s ease;
    width: 100%;
}

.channel-card-logo.loaded {
    opacity: 1;
}

.channel-card-nos .channel-card-logo-wrap {
    box-sizing: border-box;
    padding: 8px;
}

.channel-card-nos .channel-card-logo {
    border-radius: 4px;
    padding: 0;
}

.channel-card-number {
    color: #8e8e93;
    font-size: 12px;
}

.channel-card-cal-btn {
    background: rgba(0,0,0,0.55);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    opacity: 0;
    padding: 4px 6px;
    position: absolute;
    right: 8px;
    top: 8px;
    transition: opacity 0.18s;
    z-index: 2;
}

.channel-card-program {
    bottom: -2px;
    left: 8px;
    margin-top: 0;
    padding: 0;
    position: absolute;
    right: 8px;
    z-index: 1;
}

.channel-card-program-title {
    color: #ccc;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.channel-card-program-time {
    color: #8e8e93;
    display: flex;
    font-size: 11px;
    justify-content: space-between;
    line-height: 1.2;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.channel-card-progress {
    background: #2c2c2e;
    border-radius: 2px;
    height: 3px;
    margin-top: 6px;
    overflow: hidden;
    transition: background 0.2s ease;
}

.channel-card-progress-bar {
    background: #00b4d8;
    border-radius: 2px;
    height: 100%;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.live-badge {
    position: absolute; top: 12px; right: 12px;
    background: #ff453a; color: #fff; font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px;
}

#player-view {
    padding-top: env(safe-area-inset-top, 0px);
    position: relative;
    transform-origin: center center;
}

#player-view.player-view-transition-enter {
    opacity: 0;
    transform: translateY(42px) scale(0.94);
}

#player-view.player-view-transition-enter.player-view-transition-enter-active {
    animation: playerViewEnter 0.56s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#player-view.player-view-transition-exit {
    background: transparent;
    inset: 0;
    min-height: 100dvh;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    z-index: 300;
}

#player-view.player-view-transition-enter .video-container {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
}

#player-view.player-view-transition-enter.player-view-transition-enter-active .video-container {
    animation: playerVideoEnter 0.58s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

#player-view.player-view-transition-exit .video-container {
    animation: playerVideoExit 0.34s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#player-view.player-view-transition-enter .channel-sidebar {
    opacity: 0;
    transform: translateX(58px);
}

#player-view.player-view-transition-enter.player-view-transition-enter-active .channel-sidebar {
    animation: playerSideEnter 0.52s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
}

#player-view.player-view-transition-exit .channel-sidebar {
    animation: playerSideExit 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#player-view.player-view-transition-enter #epg-bar {
    opacity: 0;
    transform: translateY(42px);
}

#player-view.player-view-transition-enter.player-view-transition-enter-active #epg-bar {
    animation: playerEpgEnter 0.54s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

#player-view.player-view-transition-exit #epg-bar {
    animation: playerEpgExit 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes playerViewEnter {
    from {
        opacity: 0;
        transform: translateY(42px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes playerVideoEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes playerVideoExit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
}

@keyframes playerSideEnter {
    from {
        opacity: 0;
        transform: translateX(58px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes playerSideExit {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(58px);
    }
}

@keyframes playerEpgEnter {
    from {
        opacity: 0;
        transform: translateY(42px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes playerEpgExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(42px);
    }
}

@keyframes playerReducedViewEnter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes playerReducedViewExit {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .channel-card.program-bg-loading {
        animation: none;
        background-position: center;
    }

    .football-card-thumb.football-thumb-loading {
        animation: none;
        background-position: center;
    }

    .epg-item-thumb.epg-thumb-loading {
        animation: none;
        background-position: center;
    }

    .football-card-thumb > img.football-card-program-thumb {
        transition: none;
    }

    .epg-item-thumb-img {
        transition: none;
    }

    #player-view.player-view-transition-enter {
        opacity: 0;
        transform: none;
    }

    #player-view.player-view-transition-enter.player-view-transition-enter-active {
        animation: playerReducedViewEnter 0.24s ease both;
        transform: none;
    }

    #player-view.player-view-transition-exit {
        animation: playerReducedViewExit 0.2s ease both;
        transform: none;
    }

    #player-view.player-view-transition-enter .video-container,
    #player-view.player-view-transition-enter.player-view-transition-enter-active .video-container,
    #player-view.player-view-transition-exit .video-container,
    #player-view.player-view-transition-enter .channel-sidebar,
    #player-view.player-view-transition-enter.player-view-transition-enter-active .channel-sidebar,
    #player-view.player-view-transition-exit .channel-sidebar,
    #player-view.player-view-transition-enter #epg-bar,
    #player-view.player-view-transition-enter.player-view-transition-enter-active #epg-bar,
    #player-view.player-view-transition-exit #epg-bar {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.player-layout { display: flex; height: calc(100vh - env(safe-area-inset-top, 0px)); height: calc(100dvh - env(safe-area-inset-top, 0px)); }
.player-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.video-container {
    position: relative; width: 100%; background: #000; flex: 1; min-height: 0; touch-action: manipulation; overflow: hidden;
}
body.player-size-transition .player-main {
    overflow: visible;
}

body.player-size-transition .video-container {
    z-index: 1000;
    overflow: visible;
}

.player-surface {
    container-type: size;
    container-name: player-surface;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.video-container.expanded,
.video-container.native-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

body.player-active .video-container.expanded,
body.player-active .video-container.native-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
}

.video-container.expanded #player-overlay {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
}
.video-container video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-touch-callout: none; will-change: transform; }
#video-player { transition: opacity 0.45s ease; }
#channel-loading-overlay {
    position: absolute; inset: 0; z-index: 40;
    display: flex; align-items: flex-end;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.58) 72%, rgba(0,0,0,0.94) 100%);
    transition: opacity 0.4s ease, background 0.4s ease;
    padding: 0 20px 28px;
}
#channel-loading-overlay.live { background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.58) 72%, rgba(0,0,0,0.94) 100%); }
#channel-loading-overlay.hidden { opacity: 0; pointer-events: none; }
#channel-loading-overlay.with-program-thumb {
    background-color: #000;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.46) 42%, rgba(0, 0, 0, 0.7) 72%, rgba(0, 0, 0, 0.96) 100%), var(--channel-loading-bg-image);
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 100%, contain;
}

#channel-loading-overlay.with-program-thumb #channel-loading-spinner {
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
}

#channel-loading-spinner {
    position: absolute; top: 16px; right: 16px;
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff;
    animation: chSpinner 0.75s linear infinite;
    transition: opacity 0.4s ease;
}
#channel-loading-overlay.network-wait { align-items: center; justify-content: center; background: rgba(0,0,0,0.42); }
#channel-loading-overlay.network-wait #channel-loading-spinner {
    top: calc(50% - 18px); right: auto; left: calc(50% - 18px);
    width: 36px; height: 36px; border-width: 3px;
}
#channel-loading-overlay.network-wait #channel-loading-content {
    position: absolute; left: 20px; right: 20px; bottom: 28px; width: auto;
}
@keyframes chSpinner { to { transform: rotate(360deg); } }
#channel-loading-content {
    display: flex; align-items: center; gap: 14px; width: 100%;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 240ms ease-out, transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
#channel-loading-overlay.hidden #channel-loading-content {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition-timing-function: ease-in;
}
#channel-loading-logo {
    width: 82px; height: 56px; border-radius: 8px; object-fit: contain;
    background: rgba(255,255,255,0.07); flex-shrink: 0; padding: 8px;
}
#channel-loading-text {
    flex: 1; min-width: 0;
}
#channel-loading-name {
    font-size: 15px; font-weight: 600; color: #fff;
}
#channel-loading-program {
    font-size: 13px; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
#channel-loading-times {
    font-size: 11px; color: #888; margin-top: 2px;
}
#channel-loading-progress-wrap {
    width: 140px; height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; margin-top: 5px;
}
#channel-loading-progress-bar {
    height: 100%; background: #00b4d8; border-radius: 2px;
}
@media (min-width: 1025px) and (pointer: fine) {
    #channel-loading-overlay {
        padding: 0 clamp(36px, 2.25vw, 52px) clamp(44px, 3vw, 68px);
    }
    #vod-loading-overlay {
        padding: 0 clamp(36px, 2.25vw, 52px) clamp(44px, 3vw, 68px);
    }
    #channel-loading-spinner {
        top: clamp(26px, 1.75vw, 40px);
        right: clamp(26px, 1.75vw, 40px);
        width: clamp(30px, 2vw, 44px);
        height: clamp(30px, 2vw, 44px);
        border-width: clamp(3px, 0.2vw, 4px);
    }
    #vod-loading-spinner {
        top: clamp(76px, 5vw, 104px);
        right: clamp(26px, 1.75vw, 40px);
        width: clamp(30px, 2vw, 44px);
        height: clamp(30px, 2vw, 44px);
        border-width: clamp(3px, 0.2vw, 4px);
    }
    #channel-loading-overlay.network-wait #channel-loading-spinner {
        top: calc(50% - clamp(25px, 1.625vw, 36px));
        left: calc(50% - clamp(25px, 1.625vw, 36px));
        width: clamp(50px, 3.25vw, 72px);
        height: clamp(50px, 3.25vw, 72px);
        border-width: clamp(4px, 0.25vw, 5px);
    }
    #channel-loading-overlay.network-wait #channel-loading-content {
        left: clamp(36px, 2.25vw, 52px);
        right: clamp(36px, 2.25vw, 52px);
        bottom: clamp(44px, 3vw, 68px);
    }
    #channel-loading-content {
        gap: clamp(22px, 1.35vw, 30px);
    }
    #vod-loading-content {
        gap: clamp(22px, 1.35vw, 30px);
    }
    #channel-loading-logo {
        width: clamp(132px, 8vw, 176px);
        height: clamp(88px, 5.35vw, 118px);
        border-radius: clamp(12px, 0.75vw, 16px);
        padding: clamp(12px, 0.75vw, 16px);
    }
    #vod-loading-artwork {
        width: clamp(132px, 8vw, 176px);
        height: clamp(88px, 5.35vw, 118px);
        border-radius: clamp(12px, 0.75vw, 16px);
    }
    #channel-loading-name {
        font-size: clamp(24px, 1.5vw, 32px);
        line-height: 1.2;
    }
    #vod-loading-title {
        font-size: clamp(24px, 1.5vw, 32px);
        line-height: 1.2;
    }
    #channel-loading-program {
        font-size: clamp(19px, 1.15vw, 25px);
        margin-top: clamp(4px, 0.3vw, 7px);
    }
    #vod-loading-status {
        font-size: clamp(19px, 1.15vw, 25px);
        margin-top: clamp(4px, 0.3vw, 7px);
    }
    #channel-loading-times {
        font-size: clamp(15px, 0.9vw, 20px);
        margin-top: clamp(4px, 0.3vw, 7px);
    }
    #channel-loading-progress-wrap {
        width: clamp(220px, 14vw, 320px);
        height: clamp(5px, 0.35vw, 7px);
        border-radius: clamp(3px, 0.2vw, 4px);
        margin-top: clamp(8px, 0.55vw, 12px);
    }
}
@media (prefers-reduced-motion: reduce) {
    #channel-loading-content {
        transition: none;
    }
    #vod-loading-content {
        transition: none;
    }
    #channel-loading-overlay.hidden #channel-loading-content {
        transform: none;
    }
    #vod-loading-overlay.hidden #vod-loading-content {
        transform: none;
    }
}
#unmute-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 50; width: 72px; height: 72px; border-radius: 50%;
    background: rgba(0,0,0,0.65); border: 2px solid rgba(255,255,255,0.3);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#unmute-btn .material-icons { font-size: 36px; }
#unmute-btn:hover { background: rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.5); }
#player-overlay {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.6) 25%, rgba(0, 0, 0, 0.22) 65%, transparent) top / 100% min(240px, 45cqh) no-repeat;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    cursor: initial;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
#player-overlay.show { opacity: 1; }
#player-overlay.seeking .overlay-top { opacity: 0 !important; pointer-events: none; transition: none; }
#player-overlay.seeking .overlay-bottom { opacity: 0 !important; pointer-events: none; transition: none; }
#player-overlay.seeking .overlay-center {
    visibility: hidden;
    pointer-events: none;
}

#player-overlay.seeking .overlay-center > * {
    pointer-events: none;
}
#player-overlay.seeking { background: transparent; }
#player-overlay.scrubbing .overlay-top,
#player-overlay.scrubbing .overlay-center { opacity: 0 !important; pointer-events: none; transition: none; }
#player-overlay.scrubbing {
    background: transparent;
}
#player-overlay:not(.show) { cursor: none; }
#player-overlay:not(.show) .overlay-top,
#player-overlay:not(.show) .overlay-bottom,
#player-overlay:not(.show) .overlay-center,
#player-overlay:not(.show) .overlay-center > * { pointer-events: none; }
.overlay-top { display: flex; align-items: center; gap: 16px; }
.back-btn {
    background: none; border: none; color: #fff; cursor: pointer;
    padding: 8px; border-radius: 50%; transition: background 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.1); }
.channel-info-overlay { display: flex; align-items: center; gap: 12px; overflow: hidden; min-width: 0; }
.channel-info-overlay > div { overflow: hidden; min-width: 0; }
#overlay-logo {
    width: 60px; height: 40px; border-radius: 8px; padding: 4px;
    object-fit: contain; background: rgba(0,0,0,0.25);
}
#overlay-channel-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#overlay-program-name { font-size: 13px; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overlay-center { display: flex; align-items: center; justify-content: center; gap: 24px; pointer-events: none; }
.overlay-center > * { pointer-events: auto; }

#player-overlay > .overlay-center {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: 100%;
}

#seek-info-display {
    display: none;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 10px;
    width: 232px;
    max-width: calc(100% - 84px);
    min-width: 0;
    padding: 13px 14px;
    background: rgba(7, 18, 26, 0.92);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    position: absolute;
    z-index: 2;
    left: calc(50% + 26px);
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    transform-origin: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.14s ease-in, transform 0.14s ease-in;
}

#seek-info-display.seek-forward {
    left: calc(50% - 26px);
}

#seek-info-display.visible {
    transition-duration: 0.18s;
    transition-timing-function: ease-out;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#seek-info-display .seek-info-row {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    font-size: 21px;
    white-space: nowrap;
}

#player-overlay.seeking .overlay-center .seek-info-action {
    visibility: visible;
    pointer-events: auto;
    color: #28c7df;
}

#player-overlay.seeking:not(.show) .overlay-center .seek-info-action {
    pointer-events: none;
}

#player-overlay.seeking .overlay-center .seek-info-action .material-icons {
    animation: seek-action-pulse 0.7s ease-in-out infinite;
}

@keyframes seek-action-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    #seek-info-display,
    #seek-info-display.visible {
        transition: opacity 0.1s ease;
        transform: translate(-50%, -50%);
    }

    #player-overlay.seeking .overlay-center .seek-info-action .material-icons {
        animation: none;
    }
}

@media (max-width: 400px) {
    #seek-info-display {
        column-gap: 8px;
        padding: 12px;
    }

    #seek-info-display .seek-info-row {
        font-size: 17px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

#seek-info-display .seek-info-target {
    display: contents;
}

#seek-info-display .seek-info-position {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

#seek-info-display .seek-info-clock,
#seek-info-display .seek-info-duration {
    grid-row: 3;
    font-size: 12px;
    font-weight: 400;
    color: #f1f4ed;
    white-space: nowrap;
}

#seek-info-display .seek-info-clock {
    grid-column: 1;
}

#seek-info-display .seek-info-duration {
    grid-column: 2;
    justify-self: end;
}

#seek-info-display .seek-info-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
}

#seek-info-display .seek-info-bar-fill {
    position: relative;
    height: 100%;
    border-radius: inherit;
    background: #00b4d8;
    transition: width 0.15s;
}

#seek-info-display .seek-info-bar-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
}

@keyframes dtapRipple {
    0%   { transform: scale(0.5); opacity: 0.5; }
    60%  { transform: scale(1);   opacity: 0.3; }
    100% { transform: scale(1.1); opacity: 0; }
}
@keyframes dtapArrow { 0% { opacity:0; transform:translateX(0); } 20% { opacity:1; } 80% { opacity:1; } 100% { opacity:0; transform:translateX(var(--ax)); } }
.dtap-ripple-overlay { position:absolute; top:0; bottom:0; width:42%; pointer-events:none; display:flex; align-items:center; justify-content:center; overflow:hidden; z-index:5; contain:layout style paint; }
.dtap-ripple-overlay.left  { left:0; border-radius: 0 50% 50% 0; }
.dtap-ripple-overlay.right { right:0; border-radius: 50% 0 0 50%; }
.dtap-ripple-overlay .dtap-circle { position:absolute; width:100%; aspect-ratio:1; border-radius:50%; background:rgba(255,255,255,0.15); will-change:transform,opacity; animation: dtapRipple 0.4s ease-out forwards; }
.dtap-ripple-overlay .dtap-arrows { display:flex; gap:2px; }
.dtap-ripple-overlay .dtap-arrow { font-size:22px; color:#fff; opacity:0; will-change:transform,opacity; animation: dtapArrow 0.4s ease-out forwards; }
.dtap-ripple-overlay .dtap-arrow:nth-child(2) { animation-delay: 0.06s; }
.dtap-ripple-overlay .dtap-arrow:nth-child(3) { animation-delay: 0.12s; }
.dtap-ripple-overlay .dtap-secs { font-size:13px; color:#fff; font-weight:600; margin-top:4px; opacity:0; animation: dtapArrow 0.4s ease-out 0.08s forwards; }
.control-btn {
    background: rgba(0,0,0,0.35); border: none; color: #fff;
    cursor: pointer; border-radius: 50%; transition: background 0.2s, transform 0.1s;
    display: flex; align-items: center; justify-content: center; outline: none;
}
.control-btn:hover { background: rgba(255,255,255,0.25); }
.control-btn:active { transform: scale(0.85); }
.control-btn.big { width: 64px; height: 64px; }
.control-btn.big .material-icons { font-size: 36px; }

#player-overlay .overlay-center .control-btn {
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    background: transparent;
}

#player-overlay .overlay-center .control-btn:hover {
    transform: scale(1.06);
}

#player-overlay .overlay-center .control-btn:active {
    transform: scale(0.94);
}

#player-overlay .overlay-center .material-icons,
#player-overlay #play-pause-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
}

#player-overlay .seek-step-icon {
    position: relative;
}

#player-overlay .seek-step-icon::after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.35em;
    font-family: Inter, sans-serif;
    font-size: 0.25em;
    font-weight: 700;
    line-height: 1;
    content: attr(data-seek-seconds);
}

#btn-forward .seek-step-icon,
#btn-forward .seek-step-icon::after {
    transform: scaleX(-1);
}

#player-overlay #btn-play-pause {
    width: 80px;
    height: 80px;
}

#player-overlay #play-pause-icon {
    width: 64px;
    height: 64px;
}

#play-pause-icon path { transition: d 0.25s ease; }
.control-btn.pop { animation: btnPop 0.2s ease; }
@keyframes btnPop { 0% { transform: scale(1); } 40% { transform: scale(0.82); } 100% { transform: scale(1); } }
.overlay-bottom { display: flex; flex-direction: column; gap: 8px; }
.timeshift-container { display: flex; align-items: center; gap: 18px; }
.timeshift-label { width: max-content; min-width: 72px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.timeshift-label > span { font-size: 12px; color: #ccc; text-align: center; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; line-height: 1.3; }
.timeshift-label .tl-position { font-size: 12px; color: #fff; display: block; }
.timeshift-label .tl-duration { font-size: 11px; color: #888; display: block; }
.timeshift-label .tl-clock { font-size: 11px; color: #ccc; display: block; }
.go-live-mini-btn { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; }
.catchup-adjacent-controls {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 12;
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px;
}
.catchup-adjacent-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-height: 28px; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px;
    padding: 5px 9px; background: rgba(18,18,20,0.84); color: #f2f2f7;
    font-size: 12px; font-weight: 650; line-height: 1; white-space: nowrap;
    cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}
#btn-catchup-previous { justify-self: start; }
#btn-catchup-next { justify-self: end; }
.catchup-adjacent-btn .material-icons { font-size: 17px; }
.catchup-adjacent-btn:hover:not(:disabled) { background: rgba(54,54,58,0.94); border-color: rgba(255,255,255,0.32); transform: translateY(-1px); }
.catchup-live-btn { justify-self: end; color: #ffc4c0; background: rgba(190, 0, 0, 0.78); border-color: rgba(255, 120, 120, 0.3); }
.catchup-live-btn:hover:not(:disabled) { background: rgba(150, 0, 0, 0.94); border-color: rgba(255, 150, 150, 0.48); }
.catchup-adjacent-btn:disabled { cursor: default; opacity: 0.4; }
@media (pointer: coarse) {
    .go-live-mini-btn { bottom: calc(100% + 6px); }
    .catchup-adjacent-controls { bottom: calc(100% + 6px); gap: 6px; }
    .catchup-adjacent-btn { min-height: 32px; padding: 6px 9px; font-size: 11px; }
    .seek-preview { display: none !important; }
}
.seek-bar-container {
    flex: 1; min-width: 0; position: relative; height: 20px; display: flex; align-items: center;
    cursor: pointer; overflow: visible;
}
.seek-preview {
    position: absolute; bottom: calc(100% + 10px + var(--seek-preview-controls-clearance, 0px));
    transform: translateX(-50%);
    background: #111; border: 1px solid #333;
    border-radius: 6px; overflow: hidden;
    pointer-events: none; z-index: 13;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.7);
    min-width: 160px;
}
.seek-preview-content { display: flex; align-items: stretch; }
.seek-preview-media {
    position: relative;
    width: 160px;
    min-height: 90px;
    flex-shrink: 0;
    background: #000;
}
.seek-preview-media > video,
.seek-preview-media > canvas,
.seek-preview-media > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.seek-preview-media > canvas {
    display: block;
    object-fit: cover;
}
.seek-preview-media > canvas[data-blank="1"] { display: none; }
.seek-preview-img { display: none; object-fit: cover; background: #1a1a1e; }
#seek-preview-video {
    display: none;
    background: #000;
    object-fit: cover;
}
.seek-preview-spinner {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.35); z-index: 2;
}
.seek-preview-spinner::after {
    content: ''; width: 22px; height: 22px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #fff; border-radius: 50%;
    animation: sp-spin 0.65s linear infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }
.seek-preview-program {
    width: 164px; min-width: 0; padding: 12px;
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    background: rgba(25,25,29,0.98); border-left: 1px solid rgba(255,255,255,0.1);
    text-align: left;
}
.seek-preview-program[hidden] { display: none; }
.seek-preview-team { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 12px; font-weight: 650; }
.seek-preview-team[hidden], .seek-preview-team-logo[hidden] { display: none; }
.seek-preview-team-logo { width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; }

.seek-preview-program-start { color: #5ac8e8; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.seek-preview-program-title {
    color: #fff; font-size: 13px; font-weight: 650; line-height: 1.3;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; overflow-wrap: anywhere;
}
.seek-preview-time { font-size: 11px; color: #fff; font-variant-numeric: tabular-nums; padding: 3px 8px; background: rgba(0,0,0,0.5); width: 100%; text-align: center; white-space: nowrap; }
.seek-goal-markers {
    position: absolute; inset: 0; z-index: 5; pointer-events: none;
}
.seek-goal-marker {
    position: absolute; top: 50%; transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 32px; padding: 0; border: 0; border-radius: 5px;
    color: #fff; background: transparent; cursor: pointer; pointer-events: auto;
    touch-action: manipulation;
}
.seek-goal-marker .material-icons {
    font-size: 18px; text-shadow: 0 1px 3px #000, 0 0 3px #000;
}
.seek-red-card-icon {
    width: 11px; height: 16px; border-radius: 2px; background: #ef4444;
    border: 1px solid #fff; box-shadow: 0 1px 3px #000; transform: rotate(-12deg);
}
.seek-goal-marker:hover { background: rgba(0, 0, 0, .6); }
.seek-goal-marker:focus-visible { outline: 2px solid #fff; outline-offset: 1px; background: #222; }
.seek-match-marker-live { pointer-events: none; }
@media (pointer: coarse) {
    .seek-goal-marker { width: 32px; height: 44px; }
}
.seek-bar {
    -webkit-appearance: none; appearance: none; width: 100%; height: 100%;
    background: transparent; outline: none;
    position: absolute; top: 0; left: 0; z-index: 4; cursor: pointer;
    margin: 0; padding: 0;
}
.seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none; width: 0; height: 0; opacity: 0;
}
.seek-bar::-moz-range-thumb {
    width: 0; height: 0; border: none; opacity: 0;
}
.seek-bar::-webkit-slider-runnable-track {
    background: transparent; border: none; height: 100%;
}
.seek-bar::-moz-range-track {
    background: transparent; border: none; height: 100%;
}
.seek-bar-track {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    height: 3px; background: rgba(255,255,255,0.2); border-radius: 2px;
    pointer-events: none; z-index: 1;
    transition: height 0.15s ease;
}
.seek-bar-container:hover .seek-bar-track { height: 8px; }
.seek-bar-progress {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    height: 3px; background: #00b4d8; border-radius: 2px;
    pointer-events: none; z-index: 2;
    transition: height 0.15s ease;
}
.seek-bar-container:hover .seek-bar-progress { height: 8px; }
.seek-bar-progress::after {
    content: ''; position: absolute; right: -8px; top: 50%;
    transform: translateY(-50%) scale(0);
    width: 16px; height: 16px;
    background: #00b4d8; border-radius: 50%;
    transition: transform 0.1s ease;
}
.seek-bar-container:hover .seek-bar-progress::after {
    transform: translateY(-50%) scale(1);
}
.live-program-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

.live-program-marker {
    position: absolute;
    left: var(--marker-position);
    top: 50%;
    width: 2px;
    height: 11px;
    border-radius: 1px;
    background: #eaf3f5;
    box-shadow: 0 0 0 1px rgba(11, 27, 37, 0.67);
    opacity: 0.85;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.14s ease, height 0.14s ease, opacity 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.seek-bar-container:hover .live-program-marker {
    height: 14px;
    opacity: 1;
}

.seek-bar-container .live-program-marker.is-near {
    width: 3px;
    height: 17px;
    opacity: 1;
    background: #67ecf5;
    box-shadow: 0 0 0 2px rgba(7, 18, 25, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .live-program-marker {
        transition: none;
    }
}

@media (pointer: coarse) {
    .timeshift-container { gap: 10px; min-width: 0; width: 100%; }
    .timeshift-label { width: max-content; min-width: 72px; }
    .seek-bar-container { height: 32px; min-width: 72px; }
    .seek-bar-track { height: 4px; }
    .seek-bar-progress { height: 4px; }
    .seek-bar-progress::after {
        width: 20px; height: 20px; right: -10px;
        transform: translateY(-50%) scale(1);
    }
    .live-program-marker {
        height: 13px;
        opacity: 0.95;
    }

    .quality-menu-btn { padding: 6px; }
    #audio-label, #quality-label { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .seek-bar-container:hover .seek-bar-track { height: 10px; }
    .seek-bar-container:hover .seek-bar-progress { height: 10px; }
}
@media (pointer: coarse) and (orientation: landscape), (pointer: coarse) and (max-height: 500px) {
    #player-overlay {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        padding: clamp(8px, 3svh, 12px);
    }
    #player-overlay * {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    #player-overlay .overlay-top { gap: clamp(8px, 2.5svh, 12px); }
    #player-overlay .channel-info-overlay { gap: 8px; }
    #player-overlay #overlay-logo {
        width: clamp(42px, 13svh, 52px);
        height: clamp(28px, 8svh, 34px);
        border-radius: 6px;
        padding: 3px;
    }
    #player-overlay #overlay-channel-name { font-size: clamp(12px, 3.5svh, 14px); }
    #player-overlay #overlay-program-name { font-size: clamp(10px, 3svh, 12px); }
    #player-corner-btns { gap: 4px !important; }
    #player-corner-btns .fullscreen-btn { padding: 4px; }
    #player-overlay .fullscreen-btn .material-icons,
    #player-overlay .back-btn .material-icons { font-size: clamp(20px, 5.5svh, 24px); }
    #player-overlay .overlay-center { gap: clamp(12px, 4svh, 18px); }
    #player-overlay .control-btn.big {
        width: clamp(48px, 13svh, 52px);
        height: clamp(48px, 13svh, 52px);
    }

    #player-overlay #btn-play-pause {
        width: 64px;
        height: 64px;
    }

    #player-overlay .control-btn.big .material-icons { font-size: clamp(24px, 7svh, 30px); }
    #player-overlay #play-pause-icon {
        width: clamp(40px, 12svh, 48px);
        height: clamp(40px, 12svh, 48px);
    }
    #player-overlay .overlay-bottom { gap: 4px; }
    #player-overlay .timeshift-container { gap: 8px; }
    #player-overlay .timeshift-label { width: max-content; min-width: 72px; }
    #player-overlay .timeshift-label > span { font-size: 10px; }
    #player-overlay .seek-bar-container {
        height: 24px;
        min-width: 64px;
    }
    #player-overlay .seek-bar-progress::after {
        width: 16px;
        height: 16px;
        right: -8px;
    }
    #player-overlay .seek-bar-container:hover .seek-bar-track,
    #player-overlay .seek-bar-container:hover .seek-bar-progress { height: 6px; }
    #player-overlay .volume-btn .material-icons { font-size: 18px; }
    #player-overlay .quality-menu-btn {
        min-height: 28px;
        padding: 4px 5px;
        font-size: 11px;
    }
    #player-overlay .quality-menu-btn .material-icons { font-size: 16px; }
    #player-overlay #audio-label,
    #player-overlay #quality-label {
        max-width: 56px;
        font-size: 11px;
    }
}
.go-live-btn {
    background: rgba(255,69,58,0.2); border: 1px solid #ff453a;
    color: #ff453a; font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 4px; cursor: pointer;
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.go-live-btn:hover { background: rgba(255,69,58,0.3); }
.volume-control {
    display: flex; align-items: center; gap: 4px; position: relative;
}
.volume-btn {
    background: none; border: none; color: #fff; cursor: pointer;
    padding: 2px; display: flex; align-items: center; opacity: 0.8;
}
.volume-btn:hover { opacity: 1; }
.volume-btn .material-icons { font-size: 20px; }
.volume-slider {
    -webkit-appearance: none; appearance: none; width: 80px; height: 3px;
    background: linear-gradient(to right, #00b4d8 0%, rgba(255,255,255,0.2) 0%);
    border-radius: 2px; outline: none; cursor: pointer;
    transition: height 0.15s ease;
}
.volume-control:hover .volume-slider { height: 8px; }
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    background: #00b4d8; border-radius: 50%; cursor: pointer;
    transform: scale(0); transition: transform 0.1s ease;
}
.volume-control:hover .volume-slider::-webkit-slider-thumb { transform: scale(1); }
.volume-slider::-moz-range-track {
    height: 3px; border-radius: 2px; border: none;
    background: linear-gradient(to right, #00b4d8 0%, rgba(255,255,255,0.2) 0%);
    transition: height 0.15s ease;
}
.volume-slider::-moz-range-thumb {
    width: 14px; height: 14px;
    background: #00b4d8; border: none; border-radius: 50%; cursor: pointer;
    transform: scale(0); transition: transform 0.1s ease;
}
.volume-control:hover .volume-slider::-moz-range-thumb { transform: scale(1); }
.fullscreen-btn {
    background: none; border: none; color: #fff;
    cursor: pointer; padding: 2px; display: flex; align-items: center;
    opacity: 0.8;
}
.fullscreen-btn:hover { opacity: 1; }

#btn-cast[hidden] {
    display: none;
}

#btn-cast[aria-pressed="true"] {
    color: #00b4d8;
    opacity: 1;
}

#btn-cast:disabled {
    cursor: wait;
    opacity: 0.5;
}

#btn-cast:focus-visible {
    outline: 2px solid #00b4d8;
    outline-offset: 4px;
}

#player-cast-panel {
    position: absolute;
    z-index: 16;
    top: 72px;
    right: 16px;
    max-width: min(360px, calc(100% - 32px));
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(14, 18, 22, 0.94);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: none;
}

#player-cast-panel:has(#player-cast-status:empty) {
    display: none;
}

#player-cast-indicator {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 24px 220px;
    background: #0d141c;
    color: #cbd5df;
    text-align: center;
    pointer-events: none;
}

#player-cast-indicator > .material-icons {
    font-size: clamp(36px, 6vw, 64px);
    color: #00b4d8;
}

#player-cast-device {
    font-size: clamp(13px, 1.5vw, 18px);
    overflow-wrap: anywhere;
}

.video-container.casting #player-cast-indicator {
    display: flex;
}

.video-container.casting #video-player,
.video-container.casting #channel-freeze-canvas,
.video-container.casting #channel-loading-overlay {
    visibility: hidden;
}

.video-container.casting #player-overlay {
    z-index: 3;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.6) 25%, rgba(0, 0, 0, 0.22) 65%, transparent) top / 100% min(240px, 45cqh) no-repeat;
}

.video-container.casting #audio-menu,
.video-container.casting #seek-preview,
.video-container.casting #seek-goal-markers,
.video-container.casting #live-program-markers {
    display: none !important;
}

.video-container.casting button:disabled,
.video-container.casting input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    #player-cast-indicator {
        justify-content: flex-start;
        padding: 52px 16px 0;
    }

    #player-cast-indicator > .material-icons {
        display: none;
    }

    #player-cast-device {
        font-size: 12px;
    }
}

#player-error {
    z-index: 42;
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex; align-items: center; justify-content: center;
    gap: 8px; color: #ff453a; font-size: 16px;
}

#fullscreen-guide-grabber {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 71;
    width: 28px;
    height: 72px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(25, 25, 28, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 0;
    border-radius: 11px 0 0 11px;
    box-shadow: -8px 0 22px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: pointer;
    transform: translate(100%, -50%);
    transition: right 0.22s ease, width 0.16s ease, opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s, background 0.16s ease;
    will-change: opacity, transform;
}
#player-overlay.show ~ #fullscreen-guide-grabber:hover,
#player-overlay.show ~ #fullscreen-guide-grabber:focus-visible {
    width: 34px;
    color: #fff;
    background: rgba(42, 42, 46, 0.96);
    opacity: 1;
    outline: 0;
}
#fullscreen-guide-grabber .material-icons { font-size: 20px; }
.video-container.fullscreen-guide-open #fullscreen-guide-grabber {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(100%, -50%);
    transition-delay: 0s;
}
#fullscreen-guide-panel {
    position: absolute;
    top: clamp(64px, 9vh, 82px);
    right: 0;
    bottom: clamp(74px, 12vh, 96px);
    z-index: 70;
    width: clamp(320px, 28vw, 390px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f7f7f8;
    background: rgba(18, 18, 20, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.22s ease, opacity 0.18s ease, visibility 0.22s;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
#fullscreen-guide-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}
.fullscreen-guide-header {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fullscreen-guide-segments {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}
.fullscreen-guide-segments::before {
    content: '';
    position: absolute;
    z-index: 2;
    right: auto;
    bottom: -1px;
    left: 0;
    width: 25%;
    height: 3px;
    background: linear-gradient(90deg, transparent 17%, #5ac8fa 17%, #5ac8fa 83%, transparent 83%);
    filter: drop-shadow(0 0 4px rgba(90, 200, 250, 0.34));
    pointer-events: none;
    transform: translateX(0);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.fullscreen-guide-segments[data-active-tab="programs"]::before {
    transform: translateX(100%);
}
.fullscreen-guide-segments[data-active-tab="sports"]::before {
    transform: translateX(200%);
}
.fullscreen-guide-segments[data-active-tab="search"]::before {
    transform: translateX(300%);
}
.fullscreen-guide-segments button {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 55px;
    padding: 0 1px;
    color: #92939a;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: clamp(10.5px, 0.88vw, 12px);
    font-weight: 700;
    transition: color 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.fullscreen-guide-segments button:hover {
    color: #d4d4d8;
}
.fullscreen-guide-segments button:focus-visible {
    outline: 2px solid rgba(90, 200, 250, 0.9);
    outline-offset: -5px;
}
.fullscreen-guide-segments button .material-icons {
    flex: 0 0 auto;
    color: #73747b;
    font-size: clamp(15px, 1.25vw, 17px);
    transition: color 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.fullscreen-guide-tab-label {
    flex: 0 0 auto;
    white-space: nowrap;
}
.fullscreen-guide-segments button[aria-selected="true"] {
    color: #fff;
    background: transparent;
}
.fullscreen-guide-segments button[aria-selected="true"] .material-icons {
    color: #5ac8fa;
}
.fullscreen-guide-scroll {
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.fullscreen-guide-scroll::-webkit-scrollbar { width: 5px; }
.fullscreen-guide-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 5px; }
#fullscreen-guide-channels { position: relative; }
.fullscreen-guide-channel-focus-ring {
    position: absolute;
    top: 0;
    right: 5px;
    left: 2px;
    z-index: 3;
    box-sizing: border-box;
    border: 2px solid #5ac8fa;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    will-change: transform, height;
}
.fullscreen-guide-channel-focus-ring.positioned {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), height 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.12s ease;
}
#fullscreen-guide-channels.keyboard-selection-active > .fullscreen-guide-channel-focus-ring { opacity: 1; }
.fullscreen-guide-channel {
    position: relative;
    width: 100%;
    min-height: 74px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    color: #f2f2f3;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    cursor: pointer;
    font: inherit;
}
.fullscreen-guide-channel:hover { background: rgba(255, 255, 255, 0.07); }
.fullscreen-guide-channel.active { background: rgba(0, 180, 216, 0.12); }
.fullscreen-guide-channel.active::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    content: '';
    background: #00b4d8;
    border-radius: 0 3px 3px 0;
}
.fullscreen-guide-channel.switch-target {
    z-index: 1;
    background: rgba(0, 180, 216, 0.24);
    box-shadow: inset 3px 0 #5ac8fa, inset 0 0 0 1px rgba(90, 200, 250, 0.18);
    will-change: opacity, transform;
}
#fullscreen-guide-channels.keyboard-selection-active .fullscreen-guide-channel.active::before {
    display: none;
}
#fullscreen-guide-channels.keyboard-selection-active .fullscreen-guide-channel.switch-target {
    background: transparent;
    box-shadow: none;
}
.fullscreen-guide-channel.switch-target.switch-up {
    animation: fullscreen-guide-channel-switch-up 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fullscreen-guide-channel.switch-target.switch-down {
    animation: fullscreen-guide-channel-switch-down 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes fullscreen-guide-channel-switch-up {
    from { opacity: 0.42; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fullscreen-guide-channel-switch-down {
    from { opacity: 0.42; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fullscreen-guide-channel-logo {
    width: 54px;
    height: 42px;
    padding: 4px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 8px;
}
.fullscreen-guide-channel-info { min-width: 0; }
.fullscreen-guide-channel-heading {
    display: flex;
    align-items: baseline;
    min-width: 0;
}
.fullscreen-guide-channel-name {
    min-width: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fullscreen-guide-channel-program {
    margin-top: 3px;
    color: #b1b1b6;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fullscreen-guide-channel-meta {
    display: grid;
    grid-template-columns: auto minmax(36px, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
    color: #717177;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}
.fullscreen-guide-channel-end { text-align: right; }
.fullscreen-guide-channel-progress {
    height: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}
.fullscreen-guide-channel-progress span {
    display: block;
    height: 100%;
    background: #00b4d8;
    border-radius: inherit;
}
.fullscreen-guide-program-context {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 8px 16px;
    background: rgba(18, 18, 20, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
#fullscreen-guide-programs { position: relative; }
#fullscreen-guide-programs.showing-details .fullscreen-guide-program-context,
#fullscreen-guide-programs.showing-details #fullscreen-guide-program-list { display: none; }
.fullscreen-guide-program-details {
    min-height: 100%;
    box-sizing: border-box;
    padding: 14px 16px 24px;
    animation: fullscreen-guide-program-details-enter 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fullscreen-guide-program-details[hidden] { display: none; }
#fullscreen-guide-program-details-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    margin: 0 0 14px;
    padding: 0 10px 0 7px;
    color: #d1d1d6;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}
#fullscreen-guide-program-details-back:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}
#fullscreen-guide-program-details-back .material-icons { font-size: 17px; }
.fullscreen-guide-program-details-image-frame {
    aspect-ratio: 16 / 9;
    margin-bottom: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 10px;
}
.fullscreen-guide-program-details-image-frame[hidden] { display: none; }
#fullscreen-guide-program-details-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.fullscreen-guide-program-details-status {
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 7px;
    color: #d7d7db;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 5px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.fullscreen-guide-program-details-status[data-state="current"] {
    color: #b7f3ff;
    background: rgba(0, 180, 216, 0.16);
}
#fullscreen-guide-program-details-title {
    margin: 0;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}
.fullscreen-guide-program-details-schedule {
    margin-top: 7px;
    color: #a8a8ad;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
}
#fullscreen-guide-program-details-synopsis {
    margin: 18px 0 0;
    color: #b1b1b6;
    font-size: 12px;
    line-height: 1.55;
}
@keyframes fullscreen-guide-program-details-enter {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}
#fullscreen-guide-program-logo {
    flex: 0 0 auto;
    width: 48px;
    height: 36px;
    padding: 3px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 7px;
}
#fullscreen-guide-program-day {
    flex: 1;
    min-width: 0;
}
#fullscreen-guide-program-day .epg-day-navigator {
    display: flex;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
}
#fullscreen-guide-program-day .epg-day-btn {
    flex: 1;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 36px;
    padding: 4px 8px;
    color: #d5d5d8;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
}
#fullscreen-guide-program-day .epg-day-btn-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
#fullscreen-guide-program-day .epg-day-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
#fullscreen-guide-program-day .epg-day-btn:focus-visible { color: #fff; outline: 1px solid #00b4d8; outline-offset: 2px; }
#fullscreen-guide-program-day .epg-day-btn .material-icons { font-size: 16px !important; }
#fullscreen-guide-program-day .epg-day-btn-sub { color: #8e8e93; font-size: 10px; }
#fullscreen-guide-program-day .epg-day-nav {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #d5d5d8;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    cursor: pointer;
}
#fullscreen-guide-program-day .epg-day-nav:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
#fullscreen-guide-program-day .epg-day-nav:focus-visible { color: #fff; outline: 1px solid #00b4d8; outline-offset: 2px; }
#fullscreen-guide-program-day .epg-day-nav:disabled {
    opacity: 0.28;
    cursor: default;
    color: #8e8e93;
    background: rgba(255, 255, 255, 0.035);
}
#fullscreen-guide-program-day .epg-day-nav .material-icons { font-size: 20px; }
.fullscreen-guide-program-info {
    display: block;
    min-width: 0;
    overflow: hidden;
}
.fullscreen-guide-program-row {
    position: relative;
    width: 100%;
    min-height: 66px;
    display: grid;
    grid-template-columns: 36px 72px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    color: #f2f2f3;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    cursor: pointer;
    font: inherit;
}
.fullscreen-guide-program-row > .epg-item-thumb {
    width: 72px;
    height: 42px;
    border-radius: 5px;
}
.fullscreen-guide-program-row:hover:not([aria-disabled="true"]) { background: rgba(255, 255, 255, 0.07); }
.fullscreen-guide-program-row.current { background: rgba(0, 180, 216, 0.12); }
.fullscreen-guide-program-row.playing {
    background: rgba(0, 180, 216, 0.2);
    box-shadow: inset 3px 0 0 #5ac8fa;
}
.fullscreen-guide-program-row.playing:hover { background: rgba(0, 180, 216, 0.24); }
.fullscreen-guide-program-row[aria-disabled="true"] { cursor: default; opacity: 0.56; }
.fullscreen-guide-program-time {
    color: #8e8e93;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
}
.fullscreen-guide-program-title {
    display: block;
    min-width: 0;
    color: #f7f7f8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fullscreen-guide-program-synopsis {
    display: block;
    margin-top: 3px;
    color: #77777d;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fullscreen-guide-program-badge {
    padding: 3px 6px;
    color: #b7f3ff;
    background: rgba(0, 180, 216, 0.16);
    border-radius: 5px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.fullscreen-guide-program-row.past .fullscreen-guide-program-badge {
    color: #d6d6d9;
    background: rgba(255, 255, 255, 0.09);
}
.fullscreen-guide-program-row.playing .fullscreen-guide-program-badge {
    color: #b7f3ff;
    background: rgba(0, 180, 216, 0.22);
}
.fullscreen-guide-status {
    display: flex;
    min-height: 140px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #8e8e93;
    font-size: 12px;
    text-align: center;
}
.fullscreen-guide-status.error {
    flex-direction: column;
    gap: 12px;
    color: #ff8b82;
}
.fullscreen-guide-status button {
    min-height: 34px;
    padding: 0 14px;
    color: #f2f2f3;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.fullscreen-guide-status button:hover,
.fullscreen-guide-status button:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(90, 200, 250, 0.65);
    outline: none;
}
.fullscreen-guide-search-controls {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 10px 12px;
    background: rgba(18, 18, 20, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.fullscreen-guide-search-field {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    color: #8e8e93;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    transition: color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.fullscreen-guide-search-field:focus-within {
    color: #d9f7ff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(90, 200, 250, 0.72);
    box-shadow: 0 0 0 2px rgba(90, 200, 250, 0.14);
}
.fullscreen-guide-search-field > .material-icons { font-size: 18px; }
.fullscreen-guide-search-field input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 13px;
}
.fullscreen-guide-search-field input::placeholder { color: #77777d; }
.fullscreen-guide-search-field input::-webkit-search-cancel-button { filter: invert(1); opacity: 0.55; }
#fullscreen-guide-search-results { min-height: 140px; }
.fullscreen-guide-search-day-group { display: block; }
.fullscreen-guide-search-day-heading {
    position: sticky;
    top: 61px;
    z-index: 3;
    margin: 0;
    padding: 10px 14px 7px;
    color: #8e8e93;
    background: rgba(18, 18, 20, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.075em;
    line-height: 1.2;
}
.fullscreen-guide-search-day-group + .fullscreen-guide-search-day-group .fullscreen-guide-search-day-heading {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.fullscreen-guide-search-result {
    width: 100%;
    min-height: 86px;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: #f2f2f3;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    cursor: pointer;
    font: inherit;
}
.fullscreen-guide-search-result:hover { background: rgba(255, 255, 255, 0.07); }
.fullscreen-guide-search-result.current { background: rgba(0, 180, 216, 0.12); }
.fullscreen-guide-search-result.playing {
    background: rgba(0, 180, 216, 0.2);
    box-shadow: inset 3px 0 0 #5ac8fa;
}
.fullscreen-guide-search-result.playing:hover { background: rgba(0, 180, 216, 0.24); }
#fullscreen-guide-sports-list {
    align-content: start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 140px;
    padding: 12px;
}
#fullscreen-guide-sports-list > .fullscreen-guide-status { grid-column: 1 / -1; }
.fullscreen-guide-sport-card {
    min-width: 0;
    width: 100%;
}
.fullscreen-guide-sport-card.playing {
    background: rgba(0, 180, 216, 0.2);
    border-color: rgba(90, 200, 250, 0.45);
    box-shadow: inset 3px 0 0 #5ac8fa;
}
.fullscreen-guide-sport-card.selected {
    background: #252529;
    border-color: #5ac8fa;
    box-shadow: 0 0 0 2px #5ac8fa;
}
.fullscreen-guide-sport-card.playing.selected {
    background: rgba(0, 180, 216, 0.2);
    border-color: #5ac8fa;
    box-shadow: inset 3px 0 0 #5ac8fa, 0 0 0 2px #5ac8fa;
}
.fullscreen-guide-sport-card:focus {
    outline: 2px solid #5ac8fa;
    outline-offset: 2px;
}
.fullscreen-guide-search-thumbnail,
.fullscreen-guide-search-thumbnail > .epg-item-thumb {
    display: block;
    width: 96px;
    height: 54px;
}
.fullscreen-guide-search-thumbnail > .epg-item-thumb {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 6px;
}
.fullscreen-guide-search-thumbnail .epg-item-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fullscreen-guide-search-thumbnail-placeholder {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #66666c;
}
.fullscreen-guide-search-thumbnail-placeholder .material-icons { font-size: 20px; }
.fullscreen-guide-search-content {
    display: block;
    min-width: 0;
}
.fullscreen-guide-search-channel {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.fullscreen-guide-search-channel-logo {
    flex: 0 0 auto;
    width: 28px;
    height: 20px;
    padding: 1px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.055);
    border-radius: 4px;
}
.fullscreen-guide-search-channel-name {
    min-width: 0;
    color: #a8a8ad;
    font-size: 9px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fullscreen-guide-search-channel .fullscreen-guide-program-badge { margin-left: auto; }
.fullscreen-guide-search-title {
    display: block;
    color: #f7f7f8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fullscreen-guide-search-description {
    display: -webkit-box;
    margin-top: 3px;
    color: #77777d;
    font-size: 10px;
    line-height: 1.3;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.fullscreen-guide-search-schedule {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    color: #8e8e93;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.fullscreen-guide-search-schedule .material-icons { font-size: 13px; }
#fullscreen-guide-panel button:focus-visible {
    outline: 2px solid #5ac8fa;
    outline-offset: -2px;
}
#fullscreen-guide-panel .fullscreen-guide-channel:focus-visible { outline: none; }
#fullscreen-guide-panel .fullscreen-guide-program-row:focus-visible { outline: none; }
.fullscreen-guide-tab-enter-forward {
    animation: fullscreen-guide-tab-enter-forward 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fullscreen-guide-tab-enter-backward {
    animation: fullscreen-guide-tab-enter-backward 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#fullscreen-guide-program-list {
    position: relative;
    transition: opacity 0.08s ease-in;
}
.fullscreen-guide-program-focus-ring {
    position: absolute;
    top: 0;
    right: 5px;
    left: 2px;
    z-index: 3;
    box-sizing: border-box;
    border: 2px solid #5ac8fa;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    will-change: transform, height;
}
.fullscreen-guide-program-focus-ring.positioned {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), height 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.12s ease;
}
#fullscreen-guide-program-list.keyboard-selection-active > .fullscreen-guide-program-focus-ring.positioned { opacity: 1; }
#fullscreen-guide-program-list.fullscreen-guide-programs-refreshing {
    opacity: 0.7;
}
#fullscreen-guide-program-list.fullscreen-guide-programs-crossfade {
    animation: fullscreen-guide-programs-crossfade 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes fullscreen-guide-tab-enter-forward {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fullscreen-guide-tab-enter-backward {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fullscreen-guide-programs-crossfade {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

@media (min-width: 1025px) and (pointer: fine) {
    .video-container.expanded #fullscreen-guide-grabber,
    .video-container:fullscreen #fullscreen-guide-grabber,
    .video-container:-webkit-full-screen #fullscreen-guide-grabber { display: flex; }

    .video-container.expanded:not(.fullscreen-guide-open) #player-overlay.show ~ #fullscreen-guide-grabber,
    .video-container:fullscreen:not(.fullscreen-guide-open) #player-overlay.show ~ #fullscreen-guide-grabber,
    .video-container:-webkit-full-screen:not(.fullscreen-guide-open) #player-overlay.show ~ #fullscreen-guide-grabber {
        opacity: 0.72;
        visibility: visible;
        pointer-events: auto;
        transform: translate(0, -50%);
        transition-delay: 0s;
    }
}

@media (prefers-reduced-motion: reduce) {
    #fullscreen-guide-grabber,
    #fullscreen-guide-panel,
    .fullscreen-guide-segments button { transition: none; }
    .fullscreen-guide-channel.switch-target { animation: none; }
    .fullscreen-guide-channel-focus-ring,
    .fullscreen-guide-channel-focus-ring.positioned,
    .fullscreen-guide-program-focus-ring,
    .fullscreen-guide-program-focus-ring.positioned { transition: none; }
    .fullscreen-guide-tab-enter-forward,
    .fullscreen-guide-tab-enter-backward { animation: none; }
    .fullscreen-guide-segments::before { transition: none; }
    #fullscreen-guide-program-list { transition: none; }
    #fullscreen-guide-program-list.fullscreen-guide-programs-refreshing { opacity: 1; }
    #fullscreen-guide-program-list.fullscreen-guide-programs-crossfade { animation: none; }
    .fullscreen-guide-program-details { animation: none; }
}

#mobile-channel-strip { display: none; }

#epg-bar {
    background: #1a1a1e; border-top: 1px solid #2c2c2e;
    padding: 12px 0 3px 0; flex-shrink: 0;
}
#epg-programs-scroll {
    overflow-x: auto;
    transition: opacity 0.2s ease;
}
#epg-programs-scroll::-webkit-scrollbar { height: 4px; }
#epg-programs-scroll::-webkit-scrollbar-track { background: transparent; }
#epg-programs-scroll::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.epg-day-btn {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.08); border: 1px solid #3a3a3e; border-radius: 8px;
    color: #ccc; padding: 6px 12px; font-size: 13px; cursor: pointer;
    white-space: nowrap; transition: background 0.2s;
}
.epg-day-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.epg-day-btn-sub { font-size: 10px; opacity: 0.75; }
#epg-bar::-webkit-scrollbar { height: 0; }
#epg-bar::-webkit-scrollbar-track { background: transparent; }
#epg-bar::-webkit-scrollbar-thumb { background: transparent; }
.epg-day-selector {
    display: flex; gap: 4px; padding: 0px 0px 16px 0px;
}
#epg-programs {
    display: flex; gap: 2px; padding: 0 16px 4px; min-width: max-content;
}
.epg-item {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 180ms ease-out, border-color 180ms ease-out, opacity 180ms ease-out;
}
.epg-item-thumb {
    background: #111;
    border-radius: 4px;
    display: block;
    flex-shrink: 0;
    height: 40px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 180ms ease-out;
    width: 60px;
}
.epg-item-thumb.epg-thumb-loading {
    animation: channelCardThumbShimmer 1.15s ease-in-out infinite;
    background-image: linear-gradient(110deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.08) 42%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0.02) 100%);
    background-size: 240% 100%;
}
.epg-item-thumb-img {
    display: block;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    width: 100%;
}
.epg-item-thumb.epg-thumb-loaded .epg-item-thumb-img {
    opacity: 1;
}
.epg-item.playing .epg-item-thumb { box-shadow: 0 0 0 2px #00b4d8; }
.epg-item.current .epg-item-thumb { box-shadow: 0 0 0 2px rgba(0,180,216,0.5); }
.epg-item-content { min-width: 0; }
.epg-item:hover { background: #252529; }
.epg-item.current { background: rgba(0,180,216,0.15); border: 1px solid rgba(0,180,216,0.3); }
.epg-item.current.dimmed { background: transparent; border: 1px solid transparent; }
.epg-item.current.dimmed .epg-item-thumb { box-shadow: none; }
.epg-item.playing { background: rgba(0,180,216,0.25); border: 1px solid rgba(0,180,216,0.5); opacity: 1; }
.epg-item.viewing { background: rgba(0,180,216,0.15); border: 1px solid rgba(0,180,216,0.3); }
.epg-item.viewing .epg-item-thumb { box-shadow: 0 0 0 2px rgba(0,180,216,0.5); }
.epg-item.past { opacity: 0.75; }
.epg-item.viewing.past { opacity: 1; }
.epg-item-time { font-size: 11px; color: #b3b3b9; }
.epg-item-title {
    font-size: 13px; font-weight: 500; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.epg-item-badge {
    display: inline-block; font-size: 9px; font-weight: 700;
    padding: 1px 4px; border-radius: 3px; margin-left: 6px;
}
.epg-item-badge.catchup { background: rgba(0,180,216,0.2); color: #00b4d8; }
.epg-item-badge.live { background: rgba(255,69,58,0.2); color: #ff453a; }

@media (prefers-reduced-motion: reduce) {
    .epg-item,
    .epg-item-thumb {
        transition: none;
    }
}

.channel-sidebar {
    width: 280px; background: #141416; border-left: 1px solid #2c2c2e;
    display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-search { padding: 12px; position: relative; display: flex; align-items: center; }
.sidebar-search-icon { position: absolute; left: 22px; font-size: 18px; color: #8e8e93; pointer-events: none; }
.sidebar-search-clear { position: absolute; left: 22px; font-size: 18px; color: #8e8e93; cursor: pointer; transition: color 0.2s; }
.sidebar-search-clear:hover { color: #fff; }
.sidebar-search input {
    width: 100%; background: #2c2c2e; border: none; border-radius: 8px;
    padding: 8px 36px 8px 36px; color: #fff; font-size: 13px; outline: none;
}
.sidebar-search input::placeholder { color: #8e8e93; }
#sidebar-channels { flex: 1; overflow-y: auto; }
#sidebar-channels::-webkit-scrollbar { width: 4px; }
#sidebar-channels::-webkit-scrollbar-track { background: transparent; }
#sidebar-channels::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }
.sidebar-group-header {
    font-size: 10px; font-weight: 600; color: #636366; text-transform: uppercase;
    letter-spacing: 0.7px; padding: 10px 12px 4px;
    position: sticky; top: 0; z-index: 5; background: #141416;
}
.sidebar-channel .sidebar-channel-logo-wrap {
    transition: 0.3s all;
}
.sidebar-channel:hover .sidebar-channel-logo-wrap {
    transform: scale(1.15);
}
.sidebar-channel {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; cursor: pointer; transition: background 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-channel:hover { background: #222529; }
.sidebar-channel.active { background: rgba(0,180,216,0.15); border-left-color: #00b4d8; }
.sidebar-channel-logo-wrap {
    width: 52px; height: 36px; border-radius: 6px;
    background: #7e7ea61c; flex-shrink: 0; overflow: hidden;
}
.sidebar-channel-logo {
    width: 100%; height: 100%; border-radius: 6px;
    object-fit: contain; padding: 6px; transition: opacity 50ms;
}
.sidebar-channel-info { flex: 1; min-width: 0; }
.sidebar-channel-name { font-size: 13px; font-weight: 500; }
.sidebar-channel-program {
    font-size: 11px; color: rgb(169 169 169);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-channel-time { font-size: 10px; color: rgb(115 115 115); display: flex; justify-content: space-between; }
.sidebar-channel-progress { height: 2px; background: #2c2c2e; border-radius: 1px; margin-top: 3px; }
.sidebar-channel-progress-bar { height: 100%; background: #00b4d8; border-radius: 1px; }
.sidebar-channel-number { font-size: 11px; color: #8e8e93; }

#guide-view { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
#guide-container { display: flex; flex: 1; overflow: hidden; }
#guide-left {
    max-width: 160px;
    flex-shrink: 0; overflow: hidden; background: #141416;
    border-right: 1px solid #2c2c2e; z-index: 10;
}
#guide-left-channels { overflow: hidden; }
.guide-timeline-spacer-cell {
    height: 33px; background: #141416; border-bottom: 1px solid #2c2c2e;
}
#guide-right { flex: 1; overflow: auto; min-width: 0; }
#guide-timeline {
    display: flex; align-items: center;
    border-bottom: 1px solid #2c2c2e;
    background: #0d0d0d; z-index: 10;
    position: sticky; top: 0;
}
.guide-timeline-spacer {
    display: none;
}
.guide-timeline-slots { display: flex; flex: 1; background: #0d0d0d; }
.guide-time-slot { min-width: 200px; font-size: 12px; color: #8e8e93; padding: 8px 8px; flex-shrink: 0; }
.guide-row { display: flex; align-items: stretch; border-bottom: 1px solid #1a1a1e; }
.guide-channel-info {
    width: 200px; min-width: 200px; flex-shrink: 0; display: flex; align-items: center;
    gap: 8px; padding: 8px 12px; background: #141416;
    border-bottom: 1px solid #1a1a1e; cursor: pointer; height: 68px; box-sizing: border-box;
}
.guide-channel-logo {
    width: 32px; height: 32px; border-radius: 6px;
    object-fit: contain; background: #2c2c2e;
}
.guide-channel-logo-fallback {
    width: 32px; height: 32px; border-radius: 6px; background: #2c2c2e;
    align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; color: #8e8e93;
    flex-shrink: 0;
}
.guide-channel-name { font-size: 12px; font-weight: 500; }
.guide-programs { position: relative; overflow: hidden; background: #0d0d0f; }
.guide-now-line {
    position: absolute; top: 0; bottom: 0; width: 2px;
    background: #00b4d8; z-index: 3; pointer-events: none;
}
.guide-program {
    position: absolute; top: 4px; bottom: 4px;
    padding: 4px 6px; border-right: 1px solid #1c1c1e;
    background: #1c1c1e; border-radius: 4px;
    display: flex; align-items: flex-start; gap: 8px;
    cursor: pointer; transition: background 0.2s; overflow: visible; z-index: 1;
    clip-path: inset(0);
}
.guide-program-inner {
    position: sticky; left: 6px;
    display: flex; align-items: flex-start; gap: 8px;
    min-width: 0; max-width: 100%;
}
.guide-program:hover { background: #2c2c2e; }
.guide-program.on-now { background: rgba(0,180,216,0.15); border-left: 2px solid #00b4d8; }
.guide-program.past { opacity: 0.65; }
.guide-prog-thumb {
    width: 42px; height: 24px; object-fit: cover;
    border-radius: 3px; display: block; flex-shrink: 0; margin-top: 1px;
}
.guide-program-main {
    min-width: 0; flex: 1; display: flex; flex-direction: column;
}
.guide-program-title {
    font-size: 11px; font-weight: 500;
    white-space: normal; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.guide-program-time { font-size: 10px; color: #8e8e93; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-badge {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.4px;
    padding: 1px 4px; border-radius: 3px; vertical-align: middle; margin-left: 4px;
}
.epg-badge.live { background: #ff3b30; color: #fff; }
.epg-badge.catchup { background: #30d158; color: #000; }

#quality-select {
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2); color: #fff;
    border-radius: 6px; padding: 6px 10px; font-size: 12px; white-space: nowrap;
    cursor: pointer; outline: none; transition: background 0.2s;
}
#quality-select:hover {
    background-color: rgba(0,0,0,0.7);
}
#quality-select option { background: #1a1a1e; color: #fff; }
.quality-menu { position: relative; display: flex; align-items: center; }
.quality-menu-btn {
    background: none; border: none; color: #fff;
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    padding: 4px 8px; border-radius: 6px; opacity: 0.8;
    font-family: inherit;
}
.quality-menu-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.quality-menu-btn .material-icons { font-size: 18px; }
#quality-menu > .quality-menu-btn {
    gap: 6px;
    opacity: 1;
}

#quality-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 23px;
    height: 18px;
    border: 1px solid #f2f5f6;
    border-radius: 3px;
    color: #f2f5f6;
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

#quality-label {
    color: #56d9ef;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px), (pointer: coarse) {
    #quality-menu > .quality-menu-btn {
        gap: 4px;
    }

    #quality-icon {
        width: 20px;
        height: 16px;
    }
}

.quality-dropdown {
    position: absolute; bottom: 140%; right: 0;
    background: rgba(20,20,22,0.95); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 2px;
    min-width: 90px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); z-index: 100;
}
.quality-option {
    background: none; border: none; color: #fff;
    font-size: 13px; font-family: inherit;
    padding: 7px 14px; text-align: left; cursor: pointer;
    border-radius: 5px; white-space: nowrap;
}
.quality-option:hover { background: rgba(255,255,255,0.12); }
.quality-option.active { color: #00b4d8; font-weight: 600; }

#playback-speed-menu {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

#playback-speed-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 66px;
    min-height: 32px;
    padding: 4px 6px;
    border: 0;
    border-radius: 6px;
    color: #f2f5f6;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#playback-speed-button .material-icons {
    font-size: 21px;
}

#playback-speed-label {
    min-width: 32px;
    color: #56d9ef;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#playback-speed-button:hover,
#playback-speed-button[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
}

#playback-speed-button:focus-visible,
.playback-speed-step:focus-visible,
.playback-speed-option:focus-visible {
    outline: 2px solid #56d9ef;
    outline-offset: 2px;
}

#playback-speed-dropdown {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 100;
    display: block;
    width: 248px;
    max-width: calc(100cqw - 32px);
    max-height: calc(100cqh - 90px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: rgba(24, 29, 35, 0.97);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
}

#playback-speed-dropdown[hidden] {
    display: none;
}

#playback-speed-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.playback-speed-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#playback-speed-current {
    color: #61e0f3;
    font-size: 23px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.playback-speed-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #f2f5f6;
    background: transparent;
    cursor: pointer;
}

.playback-speed-step .material-icons {
    font-size: 22px;
}

.playback-speed-step:hover:not([aria-disabled="true"]) {
    background: rgba(255, 255, 255, 0.1);
}

.playback-speed-step[aria-disabled="true"] {
    opacity: 0.35;
    cursor: default;
}

.playback-speed-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #f2f5f6;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.playback-speed-option .material-icons {
    visibility: hidden;
    font-size: 18px;
}

.playback-speed-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playback-speed-option[aria-checked="true"] {
    color: #61e0f3;
    background: #12414b;
}

.playback-speed-option[aria-checked="true"] .material-icons {
    visibility: visible;
}

.video-container.casting #playback-speed-menu {
    display: none;
}

@media (max-width: 700px), (pointer: coarse) {
    #playback-speed-menu {
        position: static;
    }

    #playback-speed-button {
        min-height: 44px;
    }

    #playback-speed-dropdown {
        bottom: 52px;
        width: 100%;
        max-width: 100%;
        padding: 8px;
    }

    #playback-speed-presets {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .playback-speed-stepper {
        display: none;
    }

    .playback-speed-option {
        justify-content: center;
        min-height: 44px;
        padding: 8px 4px;
        font-size: 12px;
    }

    .playback-speed-option .material-icons {
        display: none;
    }
}

@media (pointer: coarse) and (min-width: 1025px) {
    body.player-active { overflow: hidden; }
    body.player-active #player-view {
        position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; bottom: 0;
        padding-top: 0;
    }
    body.player-active .player-layout { height: 100%; overflow: hidden; }
    body.player-active .video-container { flex: none; height: auto; height: calc(100% - 180px) }
    body.player-active #epg-bar { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: visible; }
    body.player-active #epg-programs-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-x; min-height: 0; }
    #multi-tv-overlay { top: 0; }
}

@media (min-width: 769px) and (max-width: 856px) {
    #live-sports-list, #football-list, .program-search-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 621px) and (max-width: 768px) {
    #live-sports-list, #football-list, .program-search-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
    body.player-active { overflow: hidden; }
    body.player-active #player-view {
        position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; bottom: 0;
        padding-top: 0; overflow: hidden;
    }
    body.player-active .player-layout { height: 100%; overflow: hidden; }
    #multi-tv-overlay { top: 0 !important; }
    .back-btn { display: flex; }
    .channel-sidebar { display: none; }
    #channels-grid {
        gap: 10px;
        grid-template-columns: repeat(2, 1fr);
    }

    #live-sports-list, #football-list, .program-search-grid { grid-template-columns: repeat(2, 1fr); }
    .channel-card-header {
        gap: 0;
        justify-content: flex-start;
        left: 8px;
        padding: 0;
        right: 10px;
        top: 6px;
    }

    .channel-card-logo-wrap {
        border-radius: 6px;
        height: auto;
        width: 92px;
    }

    .channel-card-logo {
        object-fit: contain;
        padding: 1px;
    }

    .channel-card-nos .channel-card-logo-wrap {
        align-items: center;
        display: flex;
        justify-content: center;
        padding: 6px 10px;
    }

    .channel-card-nos .channel-card-logo {
        height: auto;
        max-height: 30px;
        max-width: min(78%, 84px);
        padding: 0;
        width: auto;
    }

    .channel-card-number {
        display: none;
    }

    .channel-card-program {
        bottom: -1px;
        left: 8px;
        padding: 0;
        right: 8px;
    }

    .channel-card-program-title {
        font-size: 11px;
    }

    .channel-card-program-time {
        font-size: 10px;
        margin-top: 2px;
    }

    .channel-card-progress {
        margin-top: 4px;
    }

    .football-card-info {
        padding: 8px 10px 10px;
    }

    .football-card-title {
        font-size: 11px;
    }

    .football-card-meta {
        font-size: 10px;
        margin-top: 3px;
    }

    .football-card-scoreboard {
        font-size: 11px;
    }

    .football-card-scoreboard-teams b {
        font-size: 13px;
    }

    #navbar { padding: env(safe-area-inset-top, 0px) calc(16px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px)); }
    .nav-left { gap: 16px; }
    #channel-panel { width: 100vw; }
    #player-corner-btns .fullscreen-btn { padding: 6px; }
    #btn-expand { display: none; }
    .volume-slider {
        display: none !important;
    }
    .player-layout { flex-direction: column; overflow: hidden; }
    .player-main { overflow: hidden; min-height: 0; flex: 1; }
    .video-container { height: 40vh; flex: none; }
    #epg-bar { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
    #epg-programs-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
    #epg-programs { flex-direction: column; min-width: unset; padding: 0 8px; }
    .epg-item { min-width: unset; flex-shrink: 1; width: 100%; }
    .epg-item-thumb { width: 80px; height: 54px; }
    .epg-item-title { white-space: normal; }
    #mobile-channel-strip {
        display: flex; overflow-x: auto; gap: 6px;
        padding: 4px 12px; background: #111;
        scrollbar-width: none; flex-shrink: 0;
        border-bottom: 1px solid #1a1a1e;
    }
    #mobile-channel-strip::-webkit-scrollbar { display: none; }
    .mobile-strip-item {
        display: flex; flex-direction: column; align-items: center;
        cursor: pointer; flex-shrink: 0; padding: 4px 6px;
        border-radius: 8px; transition: background 0.15s;
        border-bottom: 2px solid transparent;
    }
    .mobile-strip-item.active { background: rgba(0,180,216,0.1); }
    .mobile-strip-logo-wrap {
        width: 42px; height: 36px; border-radius: 6px;
        flex-shrink: 0; overflow: hidden;
    }
    .mobile-strip-logo {
        width: 100%; height: 100%; border-radius: 6px;
        object-fit: contain; transition: opacity 50ms;
    }
    .mobile-strip-name {
        font-size: 9px; color: #afafb6; text-align: center;
        max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .mobile-strip-prog {
        font-size: 8px; color: #838388; text-align: center;
        max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .mobile-strip-item.active .mobile-strip-name { color: #00b4d8; }
    .guide-channel-info {
        width: 56px; min-width: 56px;
        padding: 8px; justify-content: center;
        gap: 0;
    }
    .guide-channel-name { display: none; }
}

@media (min-width: 640px) and (max-width: 768px) {
    #channels-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #live-sports-list, #football-list, .program-search-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Channel schedule panel */
#channel-panel-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100;
    animation: fadeIn 0.2s;
}
#channel-panel {
    position: fixed; top: 0; right: 0; width: 380px; height: 100%;
    background: #1a1a1e; z-index: 101; display: flex; flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.5);
    animation: slideInRight 0.25s cubic-bezier(.4,0,.2,1);
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
#channel-panel-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px; border-bottom: 1px solid #2c2c2e;
    flex-shrink: 0;
}
#channel-panel-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #2c2c2e; }
#channel-panel-name { font-size: 16px; font-weight: 600; flex: 1; }
#channel-panel-programs { flex: 1; overflow-y: auto; padding: 8px 0; }
.channel-panel-program {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 16px; cursor: pointer; transition: background 0.15s;
    border-bottom: 1px solid #2c2c2e;
}
.channel-panel-program:hover { background: #2c2c2e; }
.channel-panel-program.current { background: rgba(0,180,216,0.1); border-left: 3px solid #00b4d8; }
.channel-panel-program.past { opacity: 0.7; }
.channel-panel-program.playing { opacity: 1; background: rgba(0,180,216,0.2); border-left: 3px solid #5ac8fa; }
.channel-panel-thumb {
    width: 90px; height: 54px; object-fit: cover;
    border-radius: 4px; flex-shrink: 0; background: #2c2c2e;
}
.channel-panel-info { flex: 1; min-width: 0; }
.channel-panel-title {
    font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px;
}
.channel-panel-time { font-size: 11px; color: #8e8e93; }
.channel-panel-badge {
    display: inline-block; font-size: 9px; font-weight: 700;
    padding: 2px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle;
}
.channel-panel-badge.live { background: #ff3b30; color: #fff; }
.channel-panel-badge.catchup { background: #30d158; color: #000; }

#pip-player {
    position: fixed; bottom: 24px; right: 24px; width: 320px;
    background: #1a1a1e; border-radius: 12px; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6); z-index: 200;
    cursor: pointer; display: flex; flex-direction: column;
    animation: fadeIn 0.2s ease;
}
#pip-player video { width: 100%; height: 180px; object-fit: cover; border-radius: 12px 12px 0 0; }
.pip-close {
    position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.6);
    border: none; color: #fff; width: 32px; height: 32px; border-radius: 10px;
    font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 1;
}
.pip-close:hover { background: rgba(255,69,58,0.8); }
.pip-bottom { display: flex; flex-direction: row; align-items: center; padding: 6px 10px; gap: 8px; width: 100%; box-sizing: border-box; }
.pip-playpause {
    background: none; border: none; color: #fff; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    flex-shrink: 0; padding: 0; border-radius: 50%;
    transition: opacity 0.15s ease;
}
.pip-playpause .material-icons { font-size: 20px; }
.pip-playpause:hover { opacity: 0.7; }
.pip-info {
    display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0;
}
#pip-channel-name { font-size: 13px; font-weight: 600; }
#pip-program-name { font-size: 11px; color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


#day-picker-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    z-index: 500; display: flex; align-items: center; justify-content: center;
    animation: dpFadeIn 0.18s ease;
}
@keyframes dpFadeIn { from { opacity: 0; } to { opacity: 1; } }
.day-picker-modal {
    background: #1c1c1f; border-radius: 16px; padding: 22px 20px;
    min-width: 230px; max-width: 92vw;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    animation: dpSlideIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes dpSlideIn { from { opacity: 0; transform: scale(0.9) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.day-picker-modal-title {
    font-size: 13px; font-weight: 600; color: #8e8e93;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px;
}
.day-picker-list { display: flex; flex-direction: column; gap: 4px; }
.epg-day-pick-btn {
    background: transparent; color: #ccc; border: none; border-radius: 10px;
    padding: 10px 14px; font-size: 14px; font-family: inherit;
    cursor: pointer; text-align: left; transition: background 0.15s, color 0.15s;
    width: 100%;
}
.epg-day-pick-btn:hover, .epg-day-pick-btn:active { background: #424244 !important; color: #fff; }
.epg-day-pick-btn.active { background: #00b4d8; color: #fff; font-weight: 500; }

@media (max-width: 768px) {
}

@media (pointer: coarse) {
    #btn-go-live { display: none !important; }
    #navbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(13,13,13,0.97); }
    .football-item-badge.upcoming { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .channel-search-wrapper { position: static; }
    .ch-group-header { position: static; }
}

@media (pointer: coarse) and (orientation: landscape) {
    #navbar { position: static; height: auto; padding: 8px calc(16px + env(safe-area-inset-right, 0px)) 8px calc(16px + env(safe-area-inset-left, 0px)); }
    .view { padding-top: 0; }
    #homepage-view { padding-top: 12px; }
    #channels-grid {
        gap: 8px;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    #live-sports-list, #football-list {
        gap: 8px;
        grid-template-columns: repeat(4, 1fr);
    }

    .channel-card-header {
        gap: 10px;
        left: 12px;
        padding: 0;
        right: 12px;
        top: 12px;
    }

    .channel-card-logo-wrap {
        border-radius: 6px;
        height: auto;
        width: 80px;
    }

    .channel-card-program {
        bottom: 10px;
        left: 10px;
        padding: 0;
        right: 10px;
    }

    .channel-card-program-title {
        font-size: 12px;
    }

    .football-card-info {
        padding: 8px 9px 10px;
    }

    .football-card-title {
        font-size: 12px;
    }

    .football-card-meta {
        font-size: 10px;
    }

}

@media (pointer: coarse) and (min-width: 769px) {
    #channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

.multi-tv-btn {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.08); border: 1px solid #3a3a3e; border-radius: 8px;
    color: #ccc; padding: 6px 12px; font-size: 13px; cursor: pointer;
    white-space: nowrap; transition: background 0.2s;
}
.multi-tv-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.multi-tv-btn .material-icons { font-size: 18px; }

#multi-tv-overlay {
    position: absolute; inset: 0; z-index: 60; background: #000;
    display: flex; flex-direction: column;
}
.multi-tv-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: #141416; border-bottom: 1px solid #2c2c2e;
    flex-shrink: 0;
}
.multi-tv-topbar > span { font-size: 16px; font-weight: 600; flex: 1; }
.multi-tv-close {
    background: none; border: none; color: #fff; cursor: pointer; padding: 4px;
    display: flex; align-items: center;
}
.multi-tv-audio-btn {
    display: flex; align-items: center; gap: 4px;
    border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer;
    white-space: nowrap; min-height: 34px;
}
.multi-tv-audio-btn { background: rgba(0,180,216,0.15); border: 1px solid #00b4d8; color: #00b4d8; }
.multi-tv-audio-btn:hover { background: rgba(0,180,216,0.24); }
.multi-tv-audio-btn:disabled { opacity: 0.72; cursor: default; }
.multi-tv-audio-btn:disabled:hover { background: rgba(0,180,216,0.15); }
.multi-tv-audio-btn:focus-visible,
.multi-tv-mode-option:focus-visible { outline: 2px solid #6ee7ff; outline-offset: 2px; }
.multi-tv-audio-btn .material-icons { font-size: 18px; }
.multi-tv-mode-segmented {
    display: flex; align-items: center; flex-shrink: 0; gap: 2px;
    padding: 2px; border: 1px solid #3a3a3e; border-radius: 9px;
    background: rgba(255,255,255,0.06);
}
.multi-tv-mode-option {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 30px; padding: 0; border: 0; border-radius: 6px;
    background: transparent; color: #8e8e93; cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.multi-tv-mode-option:hover { background: rgba(255,255,255,0.1); color: #f2f2f7; }
.multi-tv-mode-option.active {
    background: #2c2c2e; color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.multi-tv-mode-option .material-icons { font-size: 19px; }
.multi-tv-grid {
    flex: 1; display: flex; min-height: 0; position: relative;
}
.multi-tv-grid.pip-mode {
    overflow: hidden;
}
.multi-tv-cell {
    flex: 1; position: relative; background: #111; display: flex;
    align-items: center; justify-content: center; min-width: 0; overflow: hidden;
}
.multi-tv-cell.multi-tv-pip-main {
    position: absolute; inset: 0; z-index: 1; flex: none !important;
    width: 100% !important; height: 100% !important;
}
.multi-tv-cell.multi-tv-pip-small {
    position: absolute; right: 18px; bottom: 18px; z-index: 3; flex: none !important;
    width: min(32vw, 420px); height: auto; aspect-ratio: 16 / 9;
    max-width: min(70vw, 720px); max-height: min(70vh, 480px);
    border: 1px solid rgba(255,255,255,0.28); border-radius: 8px; box-shadow: 0 10px 36px rgba(0,0,0,0.65);
    background: #000; cursor: grab; touch-action: none;
    transition: left 0.24s cubic-bezier(0.22, 1, 0.36, 1), top 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}
.multi-tv-cell.multi-tv-pip-small:hover { border-color: rgba(255,255,255,0.5); box-shadow: 0 12px 42px rgba(0,0,0,0.75); }
.multi-tv-cell.multi-tv-pip-small.dragging,
.multi-tv-cell.multi-tv-pip-small.resizing { transition: none; }
.multi-tv-cell.multi-tv-pip-small.dragging { cursor: grabbing; }
.multi-tv-pip-grabber {
    display: none; position: absolute; top: 50%; z-index: 6; width: 34px; height: 72px; max-height: calc(100% - 16px);
    align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(255,255,255,0.2); color: #fff;
    background: rgba(28,28,30,0.94); box-shadow: 0 6px 22px rgba(0,0,0,0.55); cursor: pointer;
    transform: translateY(-50%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.multi-tv-pip-grabber .material-icons { font-size: 24px; }
.multi-tv-pip-grabber:focus-visible { outline: 2px solid #00b4d8; outline-offset: -3px; }
.multi-tv-cell.multi-tv-pip-small.multi-tv-pip-docked,
.multi-tv-cell.multi-tv-pip-small.multi-tv-pip-docked:hover {
    border-color: transparent; box-shadow: none; background: transparent; cursor: pointer;
}
.multi-tv-cell.multi-tv-pip-docked video,
.multi-tv-cell.multi-tv-pip-docked .mtv-overlay { opacity: 0; pointer-events: none; }
.multi-tv-cell.multi-tv-pip-docked .multi-tv-pip-grabber { display: flex; }
.multi-tv-cell.multi-tv-pip-docked-left .multi-tv-pip-grabber { right: 0; border-radius: 0 12px 12px 0; }
.multi-tv-cell.multi-tv-pip-docked-right .multi-tv-pip-grabber { left: 0; border-radius: 12px 0 0 12px; }
.multi-tv-cell.multi-tv-pip-docked-right .multi-tv-pip-grabber .material-icons { transform: rotate(180deg); }
.multi-tv-pip-swap { display: none !important; }
.multi-tv-grid.pip-mode:not(.pip-floating-closed) .multi-tv-cell.multi-tv-pip-main .multi-tv-pip-swap { display: flex !important; }
.multi-tv-channel-picker .material-icons { font-size: 25px; }
.multi-tv-pip-close { display: none !important; }
.multi-tv-cell.multi-tv-pip-small .multi-tv-pip-close { display: flex !important; }
.multi-tv-native-pip { display: none !important; }
.multi-tv-cell.multi-tv-pip-small .multi-tv-native-pip.available { display: flex !important; }
.multi-tv-grid.pip-native-active .multi-tv-cell.multi-tv-pip-small { opacity: 0; pointer-events: none; }
.multi-tv-grid.pip-native-handoff .multi-tv-cell { pointer-events: none; }
.multi-tv-grid.pip-native-handoff .multi-tv-cell.multi-tv-pip-small { opacity: 0; }
.multi-tv-grid.pip-floating-closed .multi-tv-cell.multi-tv-pip-small { display: none; }
@media (prefers-reduced-motion: reduce) {
    .multi-tv-cell.multi-tv-pip-small { transition: none; }
}
.multi-tv-grid.pip-swapping .multi-tv-cell { pointer-events: none; }
.multi-tv-cell.multi-tv-pip-small .mtv-overlay { padding: 8px; cursor: inherit; }
.multi-tv-cell.multi-tv-pip-small .overlay-center,
.multi-tv-cell.multi-tv-pip-small .overlay-bottom { display: none; }
.multi-tv-cell.multi-tv-pip-small .channel-info-overlay img { width: 38px; height: 22px; }
.multi-tv-cell.multi-tv-pip-small #mtv-prog-name-left,
.multi-tv-cell.multi-tv-pip-small #mtv-prog-name-right { display: none; }
.multi-tv-grid.pip-mode .multi-tv-divider { display: none; }
.multi-tv-divider {
    width: 6px; background: #2c2c2e; cursor: col-resize; flex-shrink: 0;
    position: relative; z-index: 2; touch-action: none;
}
.multi-tv-divider:hover, .multi-tv-divider.dragging { background: #00b4d8; }
.multi-tv-divider::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 2px; height: 32px;
    background: rgba(255,255,255,0.4); border-radius: 1px;
}
.multi-tv-cell video { width: 100%; height: 100%; object-fit: contain; }
.mtv-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    justify-content: space-between; opacity: 0; transition: opacity 0.3s;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
    pointer-events: none; padding: 12px; cursor: pointer;
    -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.mtv-overlay.show { opacity: 1; pointer-events: auto; }
.multi-tv-cell.no-channel .mtv-overlay { opacity: 0; pointer-events: none; }
.mtv-overlay .overlay-top { gap: 8px; }
.mtv-overlay .channel-info-overlay { gap: 8px; }
.mtv-overlay .channel-info-overlay img { width: 50px; height: 28px; border-radius: 6px; padding: 2px; object-fit: cover; background: rgba(0,0,0,0.25); }
.mtv-overlay .overlay-center { gap: 16px; }
.mtv-overlay .control-btn.big { width: 48px; height: 48px; }
.mtv-overlay .control-btn.big .material-icons { font-size: 28px; }
.mtv-overlay .overlay-bottom { gap: 4px; }
.mtv-overlay .timeshift-container { gap: 8px; }
.mtv-overlay .timeshift-label { width: auto; }
.mtv-overlay .volume-slider { width: 60px; }
.mtv-overlay .quality-menu-btn { font-size: 11px; padding: 2px 6px; }
.mtv-overlay .quality-dropdown { bottom: 100%; position: absolute; right: 0; }
.multi-tv-cell.active-audio { outline: 0px solid #00b4d8; outline-offset: -2px; }
.multi-tv-picker {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 360px; max-height: 70vh; background: #1a1a1e; border-radius: 14px;
    border: 1px solid #3a3a3e; display: flex; flex-direction: column;
    z-index: 70; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.multi-tv-picker-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #2c2c2e;
}
.multi-tv-picker-header span { font-size: 15px; font-weight: 600; }
.multi-tv-picker-header button { background: none; border: none; color: #fff; cursor: pointer; padding: 4px; display: flex; }
.multi-tv-picker-search {
    margin: 8px 12px; padding: 8px 12px; background: #2c2c2e; border: none;
    border-radius: 8px; color: #fff; font-size: 13px; outline: none;
}
.multi-tv-picker-search::placeholder { color: #8e8e93; }
.multi-tv-picker-list {
    flex: 1; overflow-y: auto; padding: 4px 0;
}
.multi-tv-picker-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; cursor: pointer; transition: background 0.15s;
}
.multi-tv-picker-item:hover { background: rgba(255,255,255,0.08); }
.multi-tv-picker-item img { width: 48px; height: 32px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.mtv-picker-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mtv-picker-info > span { font-size: 14px; color: #fff; }
.mtv-picker-epg { display: flex; flex-direction: column; gap: 2px; }
.mtv-picker-prog-title { font-size: 12px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtv-picker-prog-time { font-size: 11px; color: #777; }
.mtv-picker-prog-bar { height: 2px; background: rgba(255,255,255,0.1); border-radius: 1px; overflow: hidden; }
.mtv-picker-prog-bar > div { height: 100%; background: #00b4d8; border-radius: 1px; }
@media (max-width: 768px) {
    #multi-tv-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: auto; height: 100dvh; padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box; }
    .multi-tv-topbar { gap: 8px; padding: 8px 10px; }
    .multi-tv-topbar > span { min-width: 0; }
    .multi-tv-audio-btn { padding: 6px 8px; }
    .multi-tv-mode-option { width: 36px; height: 32px; }
    .multi-tv-cell.multi-tv-pip-small {
        width: min(48vw, 260px);
        max-width: 78vw; max-height: 48vh;
    }
}
@media (orientation: portrait) {
    .multi-tv-grid:not(.pip-mode) { flex-direction: column; }
    .multi-tv-divider { width: 100%; height: 6px; cursor: row-resize; }
    .multi-tv-divider::after { width: 32px; height: 2px; }
}

.settings-page { padding: calc(72px + env(safe-area-inset-top, 0px)) 24px 24px; max-width: 600px; }
.settings-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.settings-section { background: #1c1c1e; border-radius: 12px; overflow: hidden; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #2c2c2e; }
.settings-row:last-child { border-bottom: none; }
.settings-label { display: flex; align-items: center; gap: 12px; }
.settings-label .material-icons { font-size: 22px; color: #8e8e93; }
.settings-label > div > div:first-child { font-size: 15px; font-weight: 500; }
.settings-desc { font-size: 12px; color: #8e8e93; margin-top: 2px; }
.settings-provider-segmented {
    align-items: center;
    background: #2c2c2e;
    border: 1px solid #3a3a3c;
    border-radius: 10px;
    display: flex;
    flex-shrink: 0;
    gap: 3px;
    padding: 3px;
}

.settings-provider-option {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    min-width: 58px;
    padding: 7px 12px;
    transition: background 0.2s, color 0.2s;
}

.settings-provider-option.active {
    background: #3a3a3c;
    color: #fff;
}

.settings-provider-option:hover:not(.active) {
    color: #fff;
}

.settings-provider-option:focus-visible {
    outline: 2px solid #5ac8fa;
    outline-offset: 2px;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.settings-save-btn {
    align-items: center;
    background: #5ac8fa;
    border: 1px solid rgba(90, 200, 250, 0.35);
    border-radius: 10px;
    color: #06131a;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    min-width: 118px;
    padding: 0 22px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.settings-save-btn:hover {
    background: #7fd6ff;
    border-color: rgba(127, 214, 255, 0.55);
    transform: translateY(-1px);
}

.settings-save-btn:focus-visible {
    outline: 2px solid #9ee0ff;
    outline-offset: 2px;
}

.toggle-switch { position: relative; width: 50px; height: 28px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #39393d; border-radius: 14px; cursor: pointer; transition: background 0.2s; }
.toggle-slider::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle-switch input:checked + .toggle-slider { background: #30d158; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

#admin-frame { display: block; width: 100%; height: calc(100dvh - 56px - env(safe-area-inset-top, 0px)); border: 0; background: #0d0d0d; }
@media (pointer: coarse) and (orientation: landscape) {
    #admin-view { min-height: 0; }
    #admin-frame { height: calc(100dvh - 44px - env(safe-area-inset-top, 0px)); }
}

#player-overlay .channel-info-overlay[hidden] {
    display: none;
}

#player-overlay .overlay-bottom {
    --player-bottom-inset: clamp(24px, 3cqw, 60px);
    position: relative;
    align-self: center;
    width: calc(100cqw - var(--player-bottom-inset) * 2);
    max-width: 100%;
}

#player-overlay .overlay-bottom::before {
    content: '';
    position: absolute;
    top: -120px;
    right: calc((100% - 100cqw) / 2 - env(safe-area-inset-right, 0px));
    bottom: -24px;
    left: calc((100% - 100cqw) / 2 - env(safe-area-inset-left, 0px));
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.06) 12%,
        rgba(0, 0, 0, 0.24) 28%,
        rgba(0, 0, 0, 0.49) 43%,
        rgba(0, 0, 0, 0.73) 60%,
        rgba(0, 0, 0, 0.87) 78%,
        rgba(0, 0, 0, 0.96) 100%
    );
}

#player-overlay .timeshift-container {
    position: relative;
    flex-wrap: wrap;
    gap: 0 18px;
    min-width: 0;
}

#player-overlay .player-program-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
    min-height: 32px;
}

#player-overlay .player-program-info {
    max-width: calc(100% - 36px);
    display: flex;
    align-items: baseline;
    gap: 14px;
    min-width: 0;
    margin-right: auto;
}

#player-overlay .player-program-info[hidden],
#player-overlay .player-program-info [hidden] {
    display: none;
}

#player-overlay .player-program-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f5f5f7;
    font-size: 15px;
    font-weight: 600;
}

#player-overlay .player-program-schedule {
    flex-shrink: 0;
    color: #c4c8ce;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#player-overlay .player-program-row .go-live-mini-btn,
#player-overlay .player-program-row #catchup-adjacent-controls {
    position: static;
    flex-shrink: 0;
    margin-left: auto;
}

#player-overlay .player-program-row #catchup-adjacent-controls {
    grid-template-columns: auto auto auto;
}

#player-overlay .player-program-row .catchup-adjacent-btn {
    background: transparent;
    border-color: transparent;
    color: #f2f5f6;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#player-overlay .player-program-row .catchup-adjacent-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: transparent;
    transform: none;
}

#player-overlay .player-program-row .catchup-adjacent-btn:focus-visible {
    outline: 2px solid #56d9ef;
    outline-offset: 3px;
}

#player-overlay .player-program-row .catchup-live-btn {
    color: #56d9ef;
}

#player-overlay .player-program-row .catchup-live-btn:hover:not(:disabled) {
    background: rgba(86, 217, 239, 0.1);
}

#player-overlay .timeshift-container > .seek-bar-container {
    flex: 0 0 100%;
    width: 100%;
    height: 28px;
    min-width: 0;
}

#player-overlay .timeshift-container > .timeshift-label {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

#player-overlay .timeshift-label > span {
    text-align: left;
}

#player-overlay .timeshift-label > #timeshift-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #56d9ef;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#player-overlay #timeshift-label .tl-position {
    color: inherit;
    font-size: inherit;
}

#player-overlay #timeshift-label .tl-duration {
    display: inline-flex;
    align-items: center;
    height: 1em;
    padding-left: 10px;
    border-left: 1px solid #50575f;
    color: #a7afb8;
    font-size: inherit;
    font-weight: 450;
    line-height: 1;
}

#player-overlay .timeshift-label > .timeshift-mode-icon {
    flex-shrink: 0;
    color: #56d9ef;
    font-size: 18px;
    line-height: 1;
}

.timeshift-mode-icon::before {
    content: 'sensors';
}

.timeshift-label:has(#timeshift-label[data-delayed="true"]) .timeshift-mode-icon::before {
    content: 'history';
}

.timeshift-label:has(.tl-duration) .timeshift-mode-icon {
    display: none;
}

@container player-surface (max-width: 420px) {
    #player-overlay .timeshift-container > .timeshift-label {
        gap: 4px;
    }

    #player-overlay .timeshift-label > #timeshift-label {
        gap: 4px;
        font-size: 11px;
    }

    #player-overlay #timeshift-label .tl-duration {
        padding-left: 4px;
    }

    #player-overlay .overlay-bottom .timeshift-container {
        column-gap: 4px;
    }

    #player-overlay #quality-label {
        font-size: 11px;
    }

    #player-overlay #playback-speed-button {
        gap: 4px;
        min-width: 54px;
        padding: 4px 2px;
        font-size: 12px;
    }

    #player-overlay #playback-speed-button .material-icons {
        font-size: 18px;
    }

    #player-overlay #playback-speed-label {
        min-width: 26px;
    }

    #player-overlay .quality-menu-btn {
        padding-right: 4px;
        padding-left: 4px;
    }

    #player-overlay #audio-label {
        display: none;
    }

    #player-overlay .timeshift-label > .timeshift-mode-icon {
        font-size: 16px;
    }
}

@media (max-width: 700px) {
    #player-overlay .timeshift-container {
        column-gap: 6px;
    }

    #player-overlay .player-program-row {
        gap: 8px;
    }

    #player-overlay .player-program-info {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    #player-overlay .player-program-title {
        font-size: 13px;
    }

    #player-overlay .player-program-schedule {
        font-size: 11px;
    }

    #player-overlay #btn-catchup-previous > span:not(.material-icons),
    #player-overlay #btn-catchup-next > span:not(.material-icons) {
        display: none;
    }

    #player-overlay .player-program-row #catchup-adjacent-controls {
        gap: 4px;
    }

    #player-overlay .player-program-row .catchup-adjacent-btn {
        padding: 5px 6px;
        font-size: 11px;
    }

    #player-overlay #audio-label {
        max-width: 48px;
    }
}

@media (pointer: coarse) {
    #player-overlay .player-program-row .catchup-adjacent-btn {
        min-height: 36px;
        min-width: 36px;
    }
}

@media (max-width: 360px) {
    #player-overlay #audio-label {
        max-width: 32px;
    }
}

#player-overlay .player-channel-signature {
    display: flex;
    flex: 0 0 100%;
    min-width: 0;
}

#player-overlay .player-channel-signature #overlay-logo {
    display: block;
    width: 88px;
    height: 50px;
    margin-bottom: 10px;
    padding: 0;
    border-radius: 0;
    object-fit: contain;
    object-position: left center;
    background: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

#player-overlay .player-channel-signature #overlay-logo[hidden] {
    display: none;
}

@media (max-width: 700px) {
    #player-overlay .player-channel-signature {
        position: relative;
        height: 0;
    }

    #player-overlay .player-channel-signature #overlay-logo {
        position: absolute;
        bottom: 8px;
        width: 52px;
        height: 30px;
        margin-bottom: 0;
    }
}

@media (max-width: 360px) {
    #player-overlay .player-channel-signature #overlay-logo {
        width: 32px;
        height: 20px;
    }

    #player-overlay .overlay-center {
        gap: 8px;
    }
}

@container player-surface (max-height: 280px) {
    .player-surface #player-overlay {
        padding-top: calc(8px + env(safe-area-inset-top, 0px));
        padding-right: calc(8px + env(safe-area-inset-right, 0px));
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
        padding-left: calc(8px + env(safe-area-inset-left, 0px));
    }

    #player-overlay .overlay-center .control-btn.big,
    #player-overlay .overlay-center #btn-play-pause {
        width: 48px;
        height: 48px;
    }

    #player-overlay .overlay-center .control-btn.big .material-icons {
        font-size: 28px;
    }

    #player-overlay #play-pause-icon {
        width: 40px;
        height: 40px;
    }

    #player-overlay .player-program-row {
        min-height: 28px;
    }

    #player-overlay .player-program-row .catchup-adjacent-btn {
        min-height: 28px;
    }

    #player-overlay .timeshift-container > .seek-bar-container {
        height: 24px;
    }
}


@container player-surface (max-width: 700px) {
    #player-overlay .overlay-bottom {
        --player-bottom-inset: 16px;
    }
}

@container player-surface (max-width: 700px) and (max-height: 280px) {
    #player-overlay .overlay-bottom {
        --player-bottom-inset: 8px;
    }
}

#channel-loading-overlay,
#channel-loading-overlay.live,
#channel-loading-overlay.network-wait {
    z-index: 2;
    pointer-events: none;
    background: transparent;
}

#channel-loading-overlay.with-program-thumb {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)), var(--channel-loading-bg-image);
    background-color: #000;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 100%, contain;
    transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    #channel-loading-overlay.with-program-thumb {
        transition: none;
    }
}

#channel-loading-content,
#channel-loading-spinner {
    display: none;
}

#player-overlay.loading {
    z-index: 41;
    opacity: 1;
    pointer-events: auto;
}

#player-overlay.post-loading .overlay-center {
    visibility: hidden;
    pointer-events: none;
}

#player-overlay.loading .overlay-center,
#player-overlay.loading #seek-info-display,
#player-overlay.loading #catchup-adjacent-controls,
#player-overlay.loading .go-live-mini-btn,
#player-overlay.loading .go-live-btn,
#player-overlay.loading #quality-menu,
#player-overlay.loading #audio-menu,
#player-overlay.loading #playback-speed-menu,
#player-overlay.loading #match-score-badge,
#player-overlay.loading #btn-cast,
#player-overlay.loading .volume-control {
    visibility: hidden;
    pointer-events: none;
}

#player-overlay.loading #seek-bar,
#player-overlay.loading #seek-bar-progress,
#player-overlay.loading #live-program-markers,
#player-overlay.loading #seek-goal-markers,
#player-overlay.loading #seek-preview,
#player-overlay.loading .timeshift-label {
    visibility: hidden;
}

#player-overlay:not(.loading) .overlay-center,
#player-overlay:not(.loading) #catchup-adjacent-controls,
#player-overlay:not(.loading) .go-live-mini-btn,
#player-overlay:not(.loading) .go-live-btn,
#player-overlay:not(.loading) #quality-menu,
#player-overlay:not(.loading) #audio-menu,
#player-overlay:not(.loading) #playback-speed-menu,
#player-overlay:not(.loading) #match-score-badge,
#player-overlay:not(.loading) #btn-cast,
#player-overlay:not(.loading) #seek-bar-progress,
#player-overlay:not(.loading) #live-program-markers,
#player-overlay:not(.loading) #seek-goal-markers,
#player-overlay:not(.loading) .timeshift-label,
#player-overlay:not(.loading) .volume-control {
    animation: playerControlsFadeIn 180ms ease-out;
}

@keyframes playerControlsFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    #player-overlay:not(.loading) :is(.overlay-center, #catchup-adjacent-controls, .go-live-mini-btn, .go-live-btn, #quality-menu, #audio-menu, #playback-speed-menu, #match-score-badge, #btn-cast, #seek-bar-progress, #live-program-markers, #seek-goal-markers, .timeshift-label, .volume-control) {
        animation: none;
    }
}

#player-overlay .volume-control {
    min-height: 26px;
}

@media (pointer: coarse) {
    #player-overlay .volume-control {
        min-height: 30px;
    }
}

@media (pointer: coarse) and (orientation: landscape), (pointer: coarse) and (max-height: 500px) {
    #player-overlay .volume-control {
        min-height: 28px;
    }
}

#player-overlay.loading .seek-bar-container {
    pointer-events: none;
}

.player-loading-status {
    position: absolute;
    top: 50%;
    right: 0;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    pointer-events: none;
}

.player-loading-status::after {
    content: '';
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(86, 217, 239, 0.22);
    border-top-color: #56d9ef;
    border-right-color: #56d9ef;
    border-radius: 50%;
    animation: playerLoadingSpin 800ms linear infinite;
}

.player-loading-message {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#player-loading-rail {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

#player-loading-rail::after {
    content: '';
    position: absolute;
    top: calc(50% - 2px);
    left: 0;
    width: 30%;
    height: 4px;
    transform: translateX(-100%);
    border-radius: 2px;
    background: linear-gradient(to right, transparent, #56d9ef, transparent);
    animation: playerLoadingRail 1.6s ease-in-out infinite;
}

@keyframes playerLoadingRail {
    to {
        transform: translateX(340%);
    }
}

#player-loading-rail[hidden],
.player-loading-status[hidden] {
    display: none;
}

@keyframes playerLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    #player-loading-rail::after {
        left: 35%;
        transform: none;
        animation: none;
    }

    .player-loading-status::after {
        animation: none;
    }
}

#quality-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d4d4d8' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

@media (forced-colors: active) {
    #quality-select {
        -webkit-appearance: auto;
        appearance: auto;
        background-image: none;
        padding-right: 12px;
    }
}
