/* ==========================================================================
   TVUZ.ONLINE — Professional TV Platform Design System v4.0
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --uz-blue: #1f5fa8;
    --uz-green: #1eb53a;
    --uz-red: #ce1126;
    --uz-white: #ffffff;
    --brand-primary: #1eb53a;
    --brand-secondary: #1f5fa8;
    --brand-accent: #3ddc84;
    --brand-glow: rgba(30, 181, 58, 0.35);
    --bg-black: #06080d;
    --bg-dark: #0c1018;
    --bg-card: #121824;
    --bg-elevated: #181f2e;
    --text-main: #f4f7fb;
    --text-muted: #8b95a8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --focus-ring: 0 0 0 3px rgba(30, 181, 58, 0.55), 0 0 24px rgba(30, 181, 58, 0.25);
    --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    --sidebar-w: 300px;
    --remote-h: 0px;
}

* { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-black);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }

/* --- LAYOUT --- */
.app-wrapper { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0a0f18 0%, var(--bg-dark) 100%);
    border-right: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.app-main { flex: 1; min-width: 0; position: relative; }

.content-wrapper {
    padding: clamp(20px, 4vw, 48px);
    max-width: 1680px;
    margin: 0 auto;
}

/* --- BRAND LOGO: tvuz.[o]nline --- */
.brand-logo {
    display: inline-flex;
    align-items: center;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.brand-logo__wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-logo__wordmark .wm-name,
.brand-logo__wordmark .wm-tld {
    display: inline-block;
    line-height: 1;
    font-weight: 900;
}

.brand-logo__wordmark .wm-name {
    color: var(--text-main);
}

.brand-logo__letter-o {
    width: 0.88em;
    height: 0.88em;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    margin: 0;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
}

.brand-logo__wordmark .wm-tld {
    color: var(--text-muted);
}

.brand-logo--sm .brand-logo__wordmark { font-size: 1.15rem; }
.brand-logo--sm .brand-logo__letter-o { width: 0.88em; height: 0.88em; }

.brand-logo--hero .brand-logo__wordmark { font-size: 2rem; }
.brand-logo--hero .brand-logo__letter-o { width: 0.88em; height: 0.88em; }

/* Skip link + mobile UI */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 10px 16px;
    background: var(--brand-primary);
    color: #041208;
    font-weight: 800;
}
.skip-link:focus { left: 12px; top: 12px; }

.mobile-cats {
    display: none;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 0 16px;
    padding: 2px 2px 8px;
}
.mobile-cats::-webkit-scrollbar { display: none; }

.mobile-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.mobile-cat-chip i { color: var(--brand-primary); font-size: 12px; }
.mobile-cat-chip:active,
.mobile-cat-chip:hover { background: rgba(30,181,58,0.18); border-color: rgba(30,181,58,0.4); }

.mobile-search-panel {
    display: none;
    padding: 10px 14px 12px;
    background: rgba(6,8,13,0.96);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: calc(56px + env(safe-area-inset-top));
    z-index: 1190;
}
.mobile-search-panel[hidden] { display: none !important; }
.mobile-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mobile-search-form input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: #fff;
    padding: 0 14px;
    font: inherit;
}
.mobile-search-form button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--brand-primary);
    color: #041208;
    font-size: 16px;
    cursor: pointer;
}

.mobile-bottom-nav {
    display: none;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
}

.sidebar-logo { padding: 24px 20px 16px; }

/* --- SEARCH --- */
.sidebar-search { padding: 0 18px 20px; }
.search-wrap {
    position: relative;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}
.search-wrap input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    padding: 14px 46px 14px 16px;
    font-family: inherit;
    font-size: 14px;
}
.search-wrap button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
}

/* --- NAV --- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
    scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-muted);
    border-radius: 12px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
}

.nav-item i {
    width: 22px;
    text-align: center;
    color: var(--brand-secondary);
    font-size: 16px;
}

.nav-item:hover,
.nav-item:focus {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(30,181,58,0.2), rgba(31,95,168,0.15));
    border-color: rgba(30,181,58,0.35);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(30,181,58,0.1);
}

.nav-item.active i { color: var(--brand-primary); }

.nav-section-label {
    padding: 16px 14px 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.7;
}

/* --- PWA SIDEBAR --- */
.sidebar-footer { padding: 16px 12px 20px; border-top: 1px solid var(--glass-border); }
.sidebar-pwa {
    position: relative;
    background: linear-gradient(135deg, rgba(31,95,168,0.15), rgba(30,181,58,0.1));
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(30,181,58,0.2);
}

.sidebar-pwa[hidden] { display: none; }

.pwa-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pwa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(30, 181, 58, 0.14);
    color: var(--brand-primary);
    font-size: 16px;
}

.pwa-copy { min-width: 0; }

.pwa-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.pwa-sub {
    margin: 2px 0 0;
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-muted);
}

.pwa-dismiss {
    margin-left: auto;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}

.pwa-dismiss:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.pwa-ios {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-muted);
}

.pwa-ios[hidden] { display: none; }

.pwa-ios i { color: var(--brand-primary); }
.install-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--uz-green), #2ed06a);
    color: #041208;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: var(--transition);
}
.install-btn:hover, .install-btn:focus { transform: translateY(-2px); box-shadow: var(--focus-ring); }

/* --- HERO / SEO --- */
.site-hero {
    margin-bottom: 32px;
    padding: 28px 32px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(31,95,168,0.18), rgba(30,181,58,0.08));
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.site-hero__brand {
    margin-bottom: 16px;
}

.site-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30,181,58,0.12), transparent 70%);
    pointer-events: none;
}

.site-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 900;
    line-height: 1.25;
    background: linear-gradient(90deg, #fff 60%, var(--brand-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-hero p,
.site-hero__lead {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 52ch;
    font-size: clamp(0.92rem, 2.2vw, 1.05rem);
}

/* --- SORT BAR --- */
.channels-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.channels-toolbar h1,
.channels-toolbar h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.channels-toolbar h1 i,
.channels-toolbar h2 i { color: var(--brand-primary); }

.sort-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(30,181,58,0.12);
    border: 1px solid rgba(30,181,58,0.25);
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 700;
}

/* --- CHANNEL GRID --- */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.tv-channel-card {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid transparent;
    background: var(--bg-elevated);
    cursor: pointer;
    transition: var(--transition);
    display: block;
}

.tv-channel-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}

.tv-channel-card:focus,
.tv-channel-card.tv-focused {
    border-color: var(--brand-primary);
    box-shadow: var(--focus-ring);
    transform: scale(1.03);
    z-index: 5;
}

.tv-channel-card.active {
    border-color: var(--brand-primary);
    box-shadow: 0 0 30px var(--brand-glow);
}

.channel-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

.channel-rank.top-3 {
    background: linear-gradient(135deg, var(--uz-blue), var(--uz-green));
    border: none;
}

.channel-logo-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18% 14% 28%;
    background:
        radial-gradient(circle at 50% 40%, rgba(30,181,58,0.08), transparent 60%),
        var(--bg-elevated);
}

.channel-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: none;
    transition: transform 0.28s ease;
}

.tv-channel-card:hover .channel-logo-wrap img,
.tv-channel-card:focus .channel-logo-wrap img {
    filter: none;
    transform: scale(1.04);
}

.channel-logo-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(to top, rgba(6,8,13,0.96) 10%, rgba(6,8,13,0.55) 55%, transparent 100%);
    pointer-events: none;
}

.live-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--uz-red);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    z-index: 4;
    letter-spacing: 0.05em;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--brand-accent);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    z-index: 4;
}

.live-badge + .quality-badge {
    top: auto;
    bottom: 52px;
    right: 8px;
}

.channel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 12px;
    z-index: 3;
}

.channel-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.channel-meta i { color: var(--brand-primary); font-size: 10px; }

/* --- SEARCH PAGE --- */
.search-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.search-layout .tv-search {
    width: 100%;
    flex: none;
}

.search-results-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin: 2px 0 0;
}

.search-results-label i { color: var(--brand-primary); }

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
}

.tv-search {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
}

.tv-search-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-search-title i { color: var(--brand-primary); }

.tv-search-form form,
.tv-search-form #fullsearch {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    margin: 0 !important;
    width: 100% !important;
}

.tv-search-form #searchinput,
.tv-search-form input[type="text"],
.tv-search-form input[name="story"] {
    flex: 1 1 160px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 46px !important;
    border-radius: 12px !important;
    border: 1px solid var(--glass-border) !important;
    background: var(--bg-elevated) !important;
    color: #fff !important;
    padding: 0 14px !important;
    font: inherit !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.tv-search-form #dosearch,
.tv-search-form input[type="button"],
.tv-search-form input[type="submit"] {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 110px !important;
    height: 46px !important;
    border: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--uz-green), #2ed06a) !important;
    color: #041208 !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 18px !important;
}

.tv-search-form #dofullsearch,
.tv-search-form .options,
.tv-search-form fieldset,
.tv-search-form table,
.tv-search-form br {
    display: none !important;
}

.tv-search-msg,
.tv-alert,
.berrors {
    margin: 10px 0 0 !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    background: rgba(30,181,58,0.12) !important;
    border: 1px solid rgba(30,181,58,0.3) !important;
    color: #d7ffe3 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.tv-search-msg.is-empty {
    background: rgba(206,17,38,0.12) !important;
    border-color: rgba(206,17,38,0.35) !important;
    color: #ffd0d5 !important;
}

.tv-search-msg i { color: var(--brand-primary); margin-right: 6px; }
.tv-search-msg.is-empty i { color: #ff6b7a; }

.tv-alert strong,
.berrors b,
.berrors strong {
    display: inline;
    margin: 0 6px 0 0;
    color: #fff;
}

/* --- PLAYER PAGE --- */
.tv-player-page {
    padding-bottom: calc(var(--remote-h) + 24px);
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.player-main-col {
    min-width: 0;
}

.main-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(72vh, calc(100vh - 260px));
    margin: 0;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    contain: layout style paint;
}

body.page-player .main-player-wrapper {
    width: 100%;
    max-width: 100%;
    max-height: min(72vh, calc(100vh - 260px));
    margin: 0;
}

.main-player-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

.player-now-playing {
    margin-top: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.player-now-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.player-now-playing .main-title {
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    font-weight: 900;
    margin: 0;
    padding: 0;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.player-now-playing .view-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1;
}

.player-now-playing .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.player-now-playing .stat-item i {
    color: var(--brand-primary);
    font-size: 12px;
    width: 1em;
    text-align: center;
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.player-actions .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: auto;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 11px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    transform: none;
}

.player-actions .action-btn i {
    font-size: 11px;
    line-height: 1;
    margin: 0;
}

.player-actions .action-btn span {
    line-height: 1;
}

.player-actions .action-btn:hover,
.player-actions .action-btn:focus {
    background: var(--brand-primary);
    color: #041208;
    border-color: transparent;
    box-shadow: var(--focus-ring);
    transform: none;
}

/* --- CHANNEL STRIP (TV remote friendly) --- */
.channel-strip-panel {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
    min-height: 320px;
    position: sticky;
    top: 12px;
}

.channel-strip-header {
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
}

.channel-strip-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-strip-header h3 i { color: var(--brand-primary); }

.strip-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.strip-filters::-webkit-scrollbar { display: none; }

.strip-filter {
    flex: 1 1 0;
    min-width: 64px;
    min-height: 40px;
    padding: 8px 8px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    white-space: nowrap;
}

.strip-filter:hover,
.strip-filter:focus,
.strip-filter.tv-focused {
    outline: none;
    color: #fff;
    border-color: rgba(30,181,58,0.55);
    box-shadow: var(--focus-ring);
}

.strip-filter.active {
    color: #041208;
    background: linear-gradient(135deg, var(--uz-green), #2ed06a);
    border-color: transparent;
}

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

.channel-strip-list {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-primary) transparent;
}

.channel-strip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.channel-strip-item:hover,
.channel-strip-item:focus,
.channel-strip-item.tv-focused {
    background: rgba(30,181,58,0.08);
    border-left-color: var(--brand-primary);
    outline: none;
}

.channel-strip-item.active {
    background: rgba(30,181,58,0.15);
    border-left-color: var(--brand-primary);
}

.channel-strip-item .strip-num {
    width: 24px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}

.channel-strip-item.active .strip-num { color: var(--brand-primary); }

.channel-strip-item .strip-logo {
    width: 48px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    background: #0a0e16;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
    color: transparent;
}

.channel-strip-item .strip-logo img,
.channel-strip-item .strip-logo .xfieldimage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 2px;
    border-radius: 4px;
}

.channel-strip-item .strip-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.channel-strip-item .strip-views {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Pastki TV remote HUD — kerak emas (Oldingi/Keyingi + kanal ro'yxati bor) */
.tv-remote-hud {
    display: none !important;
}

.player-now-logo { display: none !important; }

/* --- EPG --- */
.epg-horizontal-container {
    margin-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.epg-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--uz-red);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.08em;
}

.epg-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--uz-red);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

.epg-filmstrip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}
.epg-filmstrip::-webkit-scrollbar { display: none; }

.epg-card {
    flex: 0 0 auto;
    width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    transition: var(--transition);
}

.epg-card .prog-time { font-size: 11px; font-weight: 800; color: var(--brand-primary); }
.epg-card .prog-title { font-size: 12px; font-weight: 600; color: #fff; margin-top: 4px; line-height: 1.3; }

.epg-card.active {
    background: linear-gradient(135deg, var(--uz-green), var(--uz-blue));
    border-color: transparent;
}
.epg-card.active .prog-time,
.epg-card.active .prog-title { color: #fff; }

/* --- PLAYER INFO / ABOUT --- */
.player-info-bar {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn i {
    font-size: 12px;
    line-height: 1;
}

.action-btn:hover, .action-btn:focus {
    background: var(--brand-primary);
    color: #041208;
    box-shadow: var(--focus-ring);
}

.channel-about-section {
    margin: 20px 0;
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.toggle-about-btn {
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.channel-info-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 18px;
    color: var(--text-muted);
    line-height: 1.6;
}

.channel-info-content.open { padding: 18px; }

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 32px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i { color: var(--brand-primary); }

/* --- FORMS --- */
.form-wrap {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.form-item input, .form-item textarea {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px;
    color: #fff;
    width: 100%;
    font-family: inherit;
}

/* --- FOOTER --- */
.site-footer {
    margin-top: 48px;
    padding: 36px 0 24px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 13px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 28px 32px;
    padding-bottom: 28px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.footer-col-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-main);
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--brand-accent);
}

.footer-col a:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 6px;
}

.footer-about {
    margin: 4px 0 0;
    max-width: 42ch;
    line-height: 1.6;
}

.footer-mail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(30, 181, 58, 0.3);
    background: rgba(30, 181, 58, 0.08);
    color: var(--brand-accent) !important;
    font-weight: 700;
}

.footer-mail:hover {
    background: rgba(30, 181, 58, 0.16);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 22px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-disclaimer {
    margin: 0;
    max-width: 78ch;
    font-size: 12px;
    line-height: 1.6;
    color: #6f7889;
}

.footer-copy {
    margin: 0;
    font-size: 12.5px;
}

/* Hisoblagichlar — sanaladi, lekin dizaynni buzmaydi */
.site-counters {
    position: absolute;
    width: 88px;
    height: 31px;
    left: -9999px;
    top: 0;
    overflow: hidden;
}

/* --- MOBILE --- */
.mobile-header { display: none; }
.menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Mobil sarlavhadagi ixcham "Ilova o'rnatish" tugmasi */
.header-install {
    display: none;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(30, 181, 58, 0.35);
    border-radius: 999px;
    background: rgba(30, 181, 58, 0.12);
    color: var(--brand-accent);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.header-install[hidden] { display: none; }
.header-install:not([hidden]) { display: inline-flex; }
.header-install:active { transform: scale(0.96); }

.sidebar-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
}
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.app-sidebar.active ~ .sidebar-overlay { opacity: 1; pointer-events: auto; }

@media (max-width: 1100px) {
    .app-sidebar {
        position: fixed;
        left: calc(-1 * var(--sidebar-w));
        transition: var(--transition);
        z-index: 1500;
        box-shadow: 20px 0 60px rgba(0,0,0,0.5);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .app-sidebar.active { left: 0; }
    body.sidebar-open { overflow: hidden; }
    .sidebar-close { display: flex; }
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(56px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 12px 0;
        background: rgba(6,8,13,0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        z-index: 1200;
        border-bottom: 1px solid var(--glass-border);
    }
    .app-main { padding-top: calc(56px + env(safe-area-inset-top)); }
    .content-wrapper {
        padding: 16px 14px calc(88px + env(safe-area-inset-bottom));
    }
    .mobile-cats { display: flex; }
    .mobile-search-panel { display: block; }
    .mobile-search-panel[hidden] { display: none !important; }
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1300;
        height: calc(60px + env(safe-area-inset-bottom));
        padding: 0 6px env(safe-area-inset-bottom);
        background: rgba(8,11,18,0.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid var(--glass-border);
        align-items: stretch;
        justify-content: space-around;
    }
    .mbn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 700;
        background: transparent;
        border: none;
        font-family: inherit;
        cursor: pointer;
        min-height: 48px;
        text-decoration: none;
    }
    .mbn-item i { font-size: 18px; }
    .mbn-item.active,
    .mbn-item:active { color: var(--brand-primary); }

    body.page-player .content-wrapper {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .player-layout { grid-template-columns: 1fr; gap: 12px; }
    .main-player-wrapper,
    body.page-player .main-player-wrapper {
        width: 100%;
        max-width: 100%;
        max-height: none;
        border-radius: 12px;
        aspect-ratio: 16 / 9;
        margin: 0;
    }
    .channel-strip-panel {
        max-height: 260px;
        min-height: auto;
        position: static;
    }
    .site-hero { padding: 18px 0 8px; }
    .site-hero .brand-logo--hero .brand-logo__wordmark { font-size: 1.55rem; }
}

@media (min-width: 1101px) {
    body.page-player .content-wrapper {
        padding: 16px 20px 24px;
    }
    .mobile-cats { display: none !important; }
}

/* Player sahifa — kamroq padding */
body.page-player .content-wrapper {
    padding: 12px 16px 24px;
    max-width: 100%;
}

body.page-player .all-channels-section {
    display: none;
}

/* Pleyer sahifasida footer bir qatorga siqiladi, lekin huquqiy havolalar qoladi */
body.page-player .site-footer {
    margin-top: 20px;
    padding: 14px 0 0;
}

body.page-player .footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    padding-bottom: 12px;
}

body.page-player .footer-col--brand,
body.page-player .footer-col--channels,
body.page-player .footer-col-title,
body.page-player .footer-disclaimer {
    display: none;
}

body.page-player .footer-col {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
}

body.page-player .footer-bottom {
    padding-top: 12px;
}

@media (max-width: 600px) {
    .channels-grid,
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .tv-channel-card {
        border-radius: 14px;
        aspect-ratio: 1 / 1;
    }
    .channel-logo-wrap {
        padding: 16% 12% 30%;
    }
    .channel-title {
        font-size: 12px;
        line-height: 1.25;
    }
    .channel-meta { font-size: 10px; }
    .live-badge,
    .quality-badge {
        font-size: 8px;
        padding: 2px 6px;
    }
    .channel-rank {
        min-width: 22px;
        height: 22px;
        font-size: 10px;
    }
    .remote-key { display: none; }
    .player-now-playing {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    .player-actions {
        width: 100%;
    }
    .player-actions .action-btn {
        flex: 1;
        min-height: 44px;
    }
    .tg-shimmer {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
    .tg-shimmer--wide .tg-shimmer__go { display: none; }
    .discussion-toggle { padding: 14px; }
    .discussion-panel { padding: 4px 12px 14px; }
    .dsc-hint { display: none; }
    .epg-horizontal-container { margin-top: 10px; }
    .epg-card {
        min-width: 140px;
        padding: 10px;
    }
    .channels-toolbar h1,
    .channels-toolbar h2 { font-size: 1rem; }
    .site-footer { padding-bottom: 8px; font-size: 12px; }
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
    .footer-col--brand { grid-column: 1 / -1; }
    .content-wrapper { padding-left: 12px; padding-right: 12px; }
    .tv-search { padding: 12px; border-radius: 14px; }
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .tv-search-form #dosearch {
        min-width: 96px !important;
        padding: 0 14px !important;
    }
    .site-hero {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 14px;
    }
}

@media (max-width: 380px) {
    .channels-grid { gap: 8px; }
    .remote-channel-display { min-width: 56px; font-size: 18px; }
    .remote-list-label { display: none; }
}

/* TV / large screen focus */
@media (min-width: 1280px) {
    .tv-channel-card:focus { transform: scale(1.06); }
}

/* ==========================================================
   Onlayn radio
   ========================================================== */
.km-radio {
    position: relative;
    padding-bottom: 24px;
    isolation: isolate;
}

.km-radio::before {
    content: "";
    position: absolute;
    inset: -24px -6% auto;
    height: 260px;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 90% at 12% 20%, rgba(30, 181, 58, 0.18), transparent 60%),
        radial-gradient(ellipse 50% 70% at 88% 10%, rgba(31, 95, 168, 0.16), transparent 55%);
    filter: blur(2px);
}

.km-radio__head {
    margin-bottom: 24px;
}

.km-radio__eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.km-radio__eyebrow i {
    color: var(--brand-primary);
    margin-right: 4px;
}

.km-radio__title {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.km-radio__lead {
    margin: 0;
    max-width: 52ch;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-muted);
}

.km-radio__now {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 18px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(30, 181, 58, 0.3);
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(30, 181, 58, 0.16), transparent 55%),
        linear-gradient(180deg, var(--bg-elevated), var(--bg-card));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
}

.km-radio__now[hidden] {
    display: none !important;
}

.km-radio__now-cover {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.km-radio__now-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.km-radio__now-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.km-radio__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--uz-red);
}

.km-radio__live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--uz-red);
    animation: km-radio-pulse 1.6s ease-out infinite;
}

@keyframes km-radio-pulse {
    0% { box-shadow: 0 0 0 0 rgba(206, 17, 38, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(206, 17, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(206, 17, 38, 0); }
}

.km-radio__now-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.km-radio__status {
    font-size: 12px;
    color: var(--text-muted);
}

.km-radio__status.is-error {
    color: #ff8080;
}

.km-radio__eq {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
    margin-top: 2px;
}

.km-radio.is-playing .km-radio__eq {
    display: inline-flex;
}

.km-radio__eq i {
    display: block;
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: var(--brand-accent);
    transform-origin: bottom;
    animation: km-radio-eq 0.9s ease-in-out infinite;
}

.km-radio__eq i:nth-child(1) { animation-delay: 0s; height: 40%; }
.km-radio__eq i:nth-child(2) { animation-delay: 0.12s; height: 70%; }
.km-radio__eq i:nth-child(3) { animation-delay: 0.24s; height: 100%; }
.km-radio__eq i:nth-child(4) { animation-delay: 0.08s; height: 55%; }
.km-radio__eq i:nth-child(5) { animation-delay: 0.3s; height: 80%; }

@keyframes km-radio-eq {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

.km-radio__now-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.km-radio__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    transition: var(--transition);
}

.km-radio__btn:hover {
    transform: scale(1.05);
}

.km-radio__btn--play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--brand-accent), var(--brand-primary) 55%, var(--brand-secondary));
    box-shadow: 0 10px 28px var(--brand-glow);
}

.km-radio__btn--stop {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.km-radio__btn--stop:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.km-radio__vol {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.km-radio__vol-label {
    font-size: 11px;
    color: var(--text-muted);
}

.km-radio__vol input[type="range"] {
    width: 140px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.km-radio__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.km-radio__station {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px;
    text-align: left;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--bg-card);
    color: inherit;
    cursor: pointer;
    font: inherit;
    transition: var(--transition);
}

.km-radio__station:hover {
    border-color: rgba(30, 181, 58, 0.45);
    background: linear-gradient(180deg, rgba(30, 181, 58, 0.12), transparent 55%), var(--bg-elevated);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.km-radio__station:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.km-radio__station.is-active {
    border-color: rgba(30, 181, 58, 0.7);
    background: linear-gradient(180deg, rgba(30, 181, 58, 0.2), transparent 60%), var(--bg-elevated);
    box-shadow: 0 14px 32px rgba(30, 181, 58, 0.18), inset 0 0 0 1px rgba(30, 181, 58, 0.25);
}

.km-radio__logo {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-black);
    border: 1px solid var(--glass-border);
}

.km-radio__logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.km-radio__station:hover .km-radio__logo img {
    transform: scale(1.04);
}

.km-radio__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 2px 2px;
}

.km-radio__name {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.km-radio__tag {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--uz-red);
}

@media (min-width: 640px) {
    .km-radio__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}

@media (min-width: 1100px) {
    .km-radio__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .km-radio__now {
        top: 8px;
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 12px 14px;
    }

    .km-radio__now-cover { width: 68px; height: 68px; border-radius: 14px; }

    .km-radio__now-controls {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

/* ==========================================================
   Telegram havolasi (yaltiroq effekt bilan)
   ========================================================== */
.tg-shimmer {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(41, 171, 226, 0.35);
    background: linear-gradient(135deg, rgba(41, 171, 226, 0.16), rgba(41, 171, 226, 0.06));
    color: #7ed0f5;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    isolation: isolate;
    transition: var(--transition);
}

.tg-shimmer:hover {
    border-color: rgba(41, 171, 226, 0.6);
    color: #a8e2ff;
    transform: translateY(-1px);
}

.tg-shimmer:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.tg-shimmer i {
    font-size: 15px;
}

.tg-shimmer .fa-telegram {
    color: #29abe2;
    font-size: 17px;
}

.tg-shimmer__go {
    font-size: 11px !important;
    opacity: 0.65;
    transition: var(--transition);
}

.tg-shimmer:hover .tg-shimmer__go {
    opacity: 1;
    transform: translateX(3px);
}

/* Yaltiroq to'lqin — matn ustidan sekin o'tadi */
.tg-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    z-index: -1;
    background: linear-gradient(100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.13) 45%,
        rgba(126, 208, 245, 0.22) 55%,
        transparent 100%);
    animation: tg-sheen 3.4s ease-in-out infinite;
}

@keyframes tg-sheen {
    0%   { left: -60%; }
    55%  { left: 115%; }
    100% { left: 115%; }
}

.tg-shimmer--wide {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .tg-shimmer::after { animation: none; }
    .tg-shimmer:hover { transform: none; }
}

/* ==========================================================
   Kanal muhokamasi (yopiq holatda, bosilganda ochiladi)
   ========================================================== */
.channel-discussion {
    margin-top: 16px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
}

.discussion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 15px 18px;
    border: 0;
    background: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.discussion-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.discussion-toggle:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.dsc-label {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.dsc-label > i {
    color: var(--brand-primary);
}

.dsc-hint {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.dsc-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.dsc-chevron.rotated {
    transform: rotate(180deg);
}

.discussion-panel {
    padding: 4px 18px 18px;
    border-top: 1px solid var(--glass-border);
}

.discussion-panel[hidden] {
    display: none;
}

.discussion-state {
    padding: 18px 0;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.discussion-state--fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
}

.dsc-fb-text {
    margin: 0;
    max-width: 46ch;
    line-height: 1.6;
}

/* ==========================================================
   Huquqiy / matnli sahifalar (DMCA, qoidalar, bog'lanish, xarita)
   ========================================================== */
.legal-page {
    max-width: 900px;
    padding-bottom: 32px;
    color: #c3cbd8;
    font-size: 15px;
    line-height: 1.7;
}

.legal-page h1 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3.2vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.legal-page .legal-updated {
    margin: 0 0 26px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.legal-page h2 {
    margin: 30px 0 12px;
    font-size: 1.18rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.legal-page p {
    margin: 0 0 14px;
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.legal-page li {
    margin-bottom: 7px;
}

.legal-page a {
    color: var(--brand-accent);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.legal-page strong {
    color: var(--text-main);
}

.legal-note {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-left: 3px solid var(--brand-primary);
    border-radius: 0 12px 12px 0;
    background: rgba(30, 181, 58, 0.07);
    font-size: 14px;
}

.legal-note--warn {
    border-left-color: #ffb020;
    background: rgba(255, 176, 32, 0.08);
}

.legal-contact {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 22px;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid rgba(30, 181, 58, 0.32);
    background: rgba(30, 181, 58, 0.1);
    color: var(--brand-accent) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
}

.legal-contact:hover {
    background: rgba(30, 181, 58, 0.18);
}

/* Sayt xaritasi */
.sitemap-group {
    margin-bottom: 26px;
}

.sitemap-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sitemap-links li {
    margin: 0;
}

.sitemap-links a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sitemap-links a:hover {
    border-color: var(--glass-border);
    background: var(--bg-card);
    text-decoration: none;
}

/* Test rejimi haqida ogohlantirish */
.footer-testmode {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 176, 32, 0.35);
    background: rgba(255, 176, 32, 0.1);
    color: #ffc352;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* --- PUSH XABARNOMA OYNASI --- */
.tv-push-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(6, 8, 13, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tv-push-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 400px;
    padding: 32px 24px 24px;
    border-radius: 20px;
    border: 1px solid rgba(30, 181, 58, 0.22);
    background: linear-gradient(160deg, var(--bg-elevated), var(--bg-dark));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(30, 181, 58, 0.08);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -42%) scale(0.96);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

.tv-push-overlay.active,
.tv-push-modal.active { opacity: 1; visibility: visible; }
.tv-push-modal.active { transform: translate(-50%, -50%) scale(1); }

.tv-push-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(30, 181, 58, 0.12);
    color: var(--brand-primary);
    font-size: 27px;
    animation: tvPushPulse 2.4s infinite;
}

@keyframes tvPushPulse {
    0% { box-shadow: 0 0 0 0 rgba(30, 181, 58, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(30, 181, 58, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 181, 58, 0); }
}

.tv-push-title {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}

.tv-push-desc {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.tv-push-buttons {
    display: flex;
    gap: 10px;
}

.tv-push-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 11px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.tv-push-btn-yes {
    background: linear-gradient(135deg, var(--uz-green), #2ed06a);
    color: #041208;
}

.tv-push-btn-yes:hover,
.tv-push-btn-yes:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 181, 58, 0.28);
}

.tv-push-btn-no {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.tv-push-btn-no:hover,
.tv-push-btn-no:focus-visible { background: rgba(255, 255, 255, 0.1); }

@media (max-width: 480px) {
    .tv-push-modal { padding: 26px 18px 20px; }
    .tv-push-icon { width: 58px; height: 58px; font-size: 23px; }
    .tv-push-title { font-size: 1.05rem; }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
