:root {
    --bg: #070b14;
    --bg-soft: #10182b;
    --panel: rgba(16, 24, 43, 0.82);
    --panel-border: rgba(255, 255, 255, 0.09);
    --text: #f4f7ff;
    --muted: #94a3c3;
    --accent: #006a4e;
    --accent-light: #00c97a;
    --accent-glow: rgba(0, 201, 122, 0.28);
    --fifa-gold: #ffd166;
    --fifa-green: #1a5f3f;
    --danger: #ff6b6b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius: 20px;
    --sidebar-width: 360px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 0%, rgba(0, 201, 122, 0.16), transparent 32%),
        radial-gradient(circle at 85% 5%, rgba(255, 209, 102, 0.1), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(244, 42, 67, 0.08), transparent 40%),
        linear-gradient(180deg, #060910 0%, #0b1020 100%);
    color: var(--text);
    font-family: "Hind Siliguri", "Inter", sans-serif;
    scroll-behavior: smooth;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.app {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

.sidebar-backdrop {
    display: none;
}

body.sidebar-open {
    overflow: hidden;
    touch-action: none;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--panel-border);
    background: rgba(8, 12, 24, 0.92);
    backdrop-filter: blur(18px);
    z-index: 20;
}

.sidebar-header,
.sidebar-tools,
.sidebar-footer {
    padding: 18px;
}

.sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--panel-border);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    flex-shrink: 0;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-dev {
    margin: 3px 0 0;
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 500;
}

.brand-flag {
    font-size: 2rem;
    line-height: 1;
}

.brand h1,
.topbar-title h2,
.now-playing h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.brand p,
.topbar-title p,
.now-playing p,
.info-card p,
.sidebar-footer p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.sidebar-tools {
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--panel-border);
}

.search-box {
    position: relative;
}

.search-box svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: var(--muted);
}

.search-box input,
.filter-row select {
    width: 100%;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 12px 14px 12px 42px;
    outline: none;
}

.search-box input:focus,
.filter-row select:focus {
    border-color: rgba(0, 168, 107, 0.55);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.filter-row select {
    padding-left: 14px;
}

.chip-btn,
.icon-btn,
.favorite-btn {
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.chip-btn,
.icon-btn {
    border-radius: 14px;
    padding: 10px 14px;
}

.chip-btn:hover,
.icon-btn:hover,
.favorite-btn:hover,
.channel-item:hover {
    border-color: rgba(0, 201, 122, 0.45);
    background: rgba(0, 201, 122, 0.1);
    transform: translateY(-1px);
}

.chip-btn.active {
    background: rgba(0, 168, 107, 0.18);
    border-color: rgba(0, 168, 107, 0.55);
}

.channel-list {
    flex: 1;
    overflow: auto;
    padding: 10px;
    scroll-behavior: smooth;
}

.channel-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: transparent;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.channel-item.active {
    border-color: rgba(0, 201, 122, 0.55);
    background: linear-gradient(90deg, rgba(0, 201, 122, 0.2), rgba(0, 201, 122, 0.04));
    box-shadow: 0 8px 24px rgba(0, 201, 122, 0.12);
}

.channel-item.hidden-item {
    display: none !important;
}

.channel-logo,
.now-playing-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    place-items: center;
}

.channel-logo img,
.now-playing-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    color: var(--accent-light);
    background: rgba(0, 168, 107, 0.12);
}

.channel-meta {
    min-width: 0;
    overflow: hidden;
}

.channel-meta strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    min-width: 0;
    overflow: hidden;
}

.channel-meta strong > :not(.live-dot):not(.offline-dot) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.8);
    flex-shrink: 0;
}

.offline-dot {
    color: #666;
    font-size: 0.65rem;
    margin-right: 2px;
    flex-shrink: 0;
}

.channel-meta span {
    color: var(--muted);
    font-size: 0.82rem;
}

.favorite-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
}

.favorite-btn.active {
    color: #ffd166;
    border-color: rgba(255, 209, 102, 0.45);
    background: rgba(255, 209, 102, 0.12);
}

.sidebar-footer {
    border-top: 1px solid var(--panel-border);
}

.sidebar-footer a {
    color: var(--accent-light);
}

.main {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(8, 12, 24, 0.55);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    flex: 1;
    min-width: 0;
}

.topbar-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-brand {
    display: none;
}

.mobile-only {
    display: none;
}

.topbar-title h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-title p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-btn,
.sidebar-close,
.random-btn {
    display: none;
}

.player-section {
    padding: 0 24px 24px;
}

.fifa-hero {
    position: relative;
    margin: 20px 24px 0;
    padding: 22px 24px;
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    border: 1px solid rgba(255, 209, 102, 0.22);
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.55), rgba(8, 18, 36, 0.92));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.fifa-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 20%, rgba(255, 209, 102, 0.18), transparent 40%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 40px);
    animation: fifaShimmer 8s linear infinite;
    pointer-events: none;
}

@keyframes fifaShimmer {
    from { transform: translateX(0); }
    to { transform: translateX(40px); }
}

.fifa-hero-content {
    position: relative;
    z-index: 1;
}

.fifa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.16);
    border: 1px solid rgba(255, 209, 102, 0.35);
    color: var(--fifa-gold);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    animation: pulseBadge 2.5s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.25); }
    50% { box-shadow: 0 0 0 8px rgba(255, 209, 102, 0); }
}

.fifa-title {
    margin: 12px 0 6px;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.fifa-sub {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
}

.fifa-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fifa-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
    backdrop-filter: blur(8px);
}

.fifa-chip:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(0, 201, 122, 0.16);
    border-color: rgba(0, 201, 122, 0.45);
    box-shadow: 0 10px 28px rgba(0, 201, 122, 0.18);
}

.fifa-chip img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
}

.fifa-chip-icon {
    font-size: 1.1rem;
}

.fifa-chip-label {
    font-weight: 600;
    font-size: 0.92rem;
}

.fifa-chip-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.18);
    color: var(--fifa-gold);
}

.player-wrap {
    position: relative;
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow), 0 0 0 1px rgba(0, 201, 122, 0.08);
    border: 1px solid var(--panel-border);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.player-wrap.is-switching {
    opacity: 1;
    transition: none;
}

.player-wrap.is-switching #livePlayer {
    filter: brightness(0.92);
    transition: filter 0.25s var(--ease);
}

.switch-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    pointer-events: none;
}

.switch-progress::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 35%;
    background: linear-gradient(90deg, var(--accent-light), var(--fifa-gold));
    animation: switchSlide 0.85s var(--ease) infinite;
}

@keyframes switchSlide {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(320%); }
}

.switch-progress.hidden {
    display: none;
}

.player-loading.is-switch {
    inset: auto 12px 12px auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.player-loading.is-switch .loader-ring {
    width: 18px;
    height: 18px;
    margin: 0;
    border-width: 2px;
}

.player-loading.is-switch .loader-bar {
    display: none;
}

.player-loading.is-switch p {
    margin: 0;
    font-size: 0.78rem;
    white-space: nowrap;
}

#livePlayer {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    transform: translateZ(0);
    will-change: auto;
}

.player-loading.is-quick {
    background: rgba(8, 12, 24, 0.35);
    backdrop-filter: blur(2px);
}

.player-loading.is-quick .loader-ring,
.player-loading.is-quick .loader-bar {
    transform: scale(0.85);
}

.player-loading.is-quick p {
    font-size: 0.85rem;
}

.player-loading,
.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.player-loading.hidden,
.player-overlay.hidden,
.unmute-btn.hidden,
.play-btn.hidden {
    display: none;
}

.spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-light);
    animation: spin 0.9s linear infinite;
    margin-bottom: 12px;
}

.loader-ring {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent-light);
    border-right-color: var(--fifa-gold);
    animation: spin 0.75s linear infinite;
    margin-bottom: 14px;
}

.loader-bar {
    width: min(220px, 70vw);
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 12px;
}

.loader-bar span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-light), var(--fifa-gold));
    animation: loadSlide 1.1s var(--ease) infinite;
}

@keyframes loadSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}

.player-loading p {
    margin: 0;
    color: var(--muted);
}

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

.retry-btn,
.unmute-btn,
.play-btn {
    margin-top: 14px;
    border: 1px solid rgba(0, 168, 107, 0.55);
    background: rgba(0, 168, 107, 0.18);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
}

.unmute-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
}

.play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-top: 0;
    z-index: 3;
    font-size: 1.1rem;
    padding: 14px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.retry-btn:hover,
.unmute-btn:hover,
.play-btn:hover {
    background: rgba(0, 168, 107, 0.28);
}

.player-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-player {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.overlay-card,
.empty-card {
    max-width: 420px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    text-align: center;
}

.empty-player {
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.info-card.fifa-card {
    background: linear-gradient(145deg, rgba(26, 95, 63, 0.35), rgba(16, 24, 43, 0.88));
    border-color: rgba(255, 209, 102, 0.2);
}

.info-card.fifa-card h4 {
    color: var(--fifa-gold);
}

.info-card h4 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.hidden {
    display: none !important;
}

.fifa-chip-icon.hidden {
    display: none;
}

.fifa-chip img[style*="display: none"] + .fifa-chip-icon {
    display: inline !important;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 0 24px 18px;
}

.fifa-matches-section {
    margin: 0 24px 24px;
    padding: 20px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(26, 95, 63, 0.28), rgba(16, 24, 43, 0.92));
    border: 1px solid rgba(255, 209, 102, 0.18);
}

.fifa-matches-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fifa-matches-head h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: var(--fifa-gold);
}

.fifa-matches-sub {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.fifa-matches-tz {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.12);
    border: 1px solid rgba(255, 209, 102, 0.22);
    color: var(--fifa-gold);
    font-size: 0.75rem;
    font-weight: 600;
}

.fifa-matches-list {
    display: grid;
    gap: 12px;
}

.fifa-match-card {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(8, 12, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.fifa-match-card.is-live {
    border-color: rgba(255, 77, 77, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 77, 77, 0.12);
}

.fifa-match-empty {
    text-align: center;
    color: var(--muted);
}

.fifa-match-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.fifa-match-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fifa-match-team.away {
    flex-direction: row-reverse;
    text-align: right;
}

.fifa-match-team img,
.fifa-match-flag {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    object-fit: contain;
}

.fifa-match-flag {
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.fifa-match-name {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fifa-match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fifa-gold);
    letter-spacing: 0.02em;
}

.fifa-match-score .score-sep {
    opacity: 0.65;
    font-weight: 500;
}

.fifa-match-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
    color: var(--muted);
}

.fifa-match-live {
    color: #ff6b6b;
    font-weight: 700;
    animation: fifaLivePulse 1.4s ease-in-out infinite;
}

@keyframes fifaLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.fifa-match-status,
.fifa-match-group {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.fifa-match-time {
    margin-left: auto;
    color: #dbe4ff;
    font-weight: 500;
}

.info-card {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.info-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 201, 122, 0.25);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    animation: fadeUp 0.4s var(--ease);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav {
    display: none;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.mobile-nav-btn.active {
    color: var(--accent-light);
    background: rgba(0, 201, 122, 0.12);
}

.mobile-nav-icon {
    font-size: 1.15rem;
    line-height: 1;
}

@media (max-width: 1080px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 100vw;
    }

    .app {
        grid-template-columns: 1fr;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 15;
        background: rgba(0, 0, 0, 0.58);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.32s var(--ease);
    }

    .sidebar-backdrop.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(100vw, 380px);
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.32s var(--ease);
        box-shadow: var(--shadow);
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        padding: 8px 16px max(10px, env(safe-area-inset-bottom));
        background: rgba(8, 12, 24, 0.96);
        border-top: 1px solid var(--panel-border);
        backdrop-filter: blur(14px);
    }

    body.mobile-view-channels .sidebar {
        transform: translateX(0);
        width: 100%;
        max-width: 100%;
        z-index: 25;
        box-shadow: none;
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    body.mobile-view-channels .sidebar-backdrop {
        opacity: 0;
        pointer-events: none;
    }

    body.mobile-view-channels .sidebar-close {
        display: inline-flex;
    }

    body.mobile-view-watch .sidebar:not(.open) {
        transform: translateX(-105%);
    }

    body.mobile-view-watch .main {
        display: block;
    }

    body.mobile-view-channels .main {
        visibility: hidden;
        height: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .menu-btn,
    .sidebar-close,
    .random-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }

    .topbar {
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        gap: 10px;
    }

    .mobile-only,
    .topbar-brand.mobile-only {
        display: flex;
    }

    .topbar-brand {
        flex-direction: column;
        gap: 1px;
        line-height: 1.2;
    }

    .topbar-site {
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        background: linear-gradient(90deg, var(--accent-light), var(--fifa-gold));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-dev {
        font-size: 0.68rem;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-center {
        gap: 4px;
    }

    .topbar-title h2 {
        font-size: 0.92rem;
        font-weight: 600;
    }

    .topbar-title p {
        font-size: 0.75rem;
    }

    body.mobile-view-channels .topbar-title {
        display: none;
    }

    body.mobile-view-channels .topbar-brand {
        justify-content: center;
    }

    .player-section,
    .info-grid,
    .fifa-matches-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fifa-matches-section {
        margin-left: 16px;
        margin-right: 16px;
        margin-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .fifa-match-name {
        font-size: 0.82rem;
    }

    .fifa-match-score {
        min-width: 62px;
        padding: 6px 8px;
        font-size: 1.05rem;
    }

    .fifa-match-time {
        margin-left: 0;
        width: 100%;
    }

    .player-section {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .info-grid {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .fifa-hero {
        margin: 14px 16px 0;
        padding: 16px;
    }

    .fifa-quick {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .fifa-quick::-webkit-scrollbar {
        display: none;
    }

    .fifa-chip {
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .search-box input,
    .filter-row select {
        font-size: 16px;
        min-height: 44px;
    }

    .chip-btn {
        min-height: 44px;
        white-space: nowrap;
    }

    .channel-item {
        min-height: 64px;
        padding: 10px;
    }

    .favorite-btn {
        width: 40px;
        height: 40px;
    }

    .now-playing {
        flex-direction: row;
        gap: 12px;
        padding: 14px;
    }

    .unmute-btn {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        font-size: 0.88rem;
        padding: 10px 14px;
    }

    .overlay-card,
    .empty-card {
        margin: 0 12px;
        max-width: calc(100vw - 48px);
        padding: 18px;
    }

    #livePlayer {
        max-height: 56vh;
        max-height: 56dvh;
    }
}

@media (max-width: 600px) {
    .brand h1 {
        font-size: 1.08rem;
    }

    .brand p,
    .brand-dev {
        font-size: 0.78rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 0.78rem;
    }

    .sidebar-header,
    .sidebar-tools,
    .sidebar-footer {
        padding: 14px;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .chip-btn {
        width: 100%;
        justify-content: center;
    }

    .fifa-title {
        font-size: 1.15rem;
    }

    .fifa-sub {
        font-size: 0.88rem;
    }

    .info-grid {
        gap: 12px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .info-card {
        padding: 16px;
    }

    .channel-meta strong {
        font-size: 0.92rem;
    }

    .channel-logo,
    .now-playing-logo {
        width: 46px;
        height: 46px;
    }

    .channel-item {
        grid-template-columns: 46px 1fr auto;
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .sidebar {
        width: 100vw;
    }

    .fifa-hero {
        margin: 10px 10px 0;
        padding: 14px 12px;
    }

    .player-section,
    .info-grid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .topbar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .play-btn {
        font-size: 1rem;
        padding: 12px 20px;
        width: calc(100% - 32px);
        max-width: 260px;
        text-align: center;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .sidebar {
        width: min(320px, 85vw);
    }

    #livePlayer {
        max-height: 72vh;
        max-height: 72dvh;
    }

    .fifa-hero {
        margin-top: 8px;
        padding: 12px 16px;
    }

    .fifa-sub {
        margin-bottom: 10px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .channel-item:hover,
    .chip-btn:hover,
    .icon-btn:hover,
    .fifa-chip:hover,
    .info-card:hover,
    .favorite-btn:hover {
        transform: none;
    }

    .channel-item:active {
        background: rgba(0, 201, 122, 0.12);
    }

    .fifa-chip:active {
        transform: scale(0.98);
    }
}
