:root {
    --bg: #f4f7fb;
    --bg-panel: #ffffff;
    --bg-soft: #eef3fa;
    --bg-hover: #e8eff8;
    --border: #d8e2ef;
    --border-light: #ecf1f8;
    --text: #1e293b;
    --text-muted: #64748b;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft: #eef2ff;
    --success: #059669;
    --success-soft: #ecfdf5;
    --warning: #d97706;
    --warning-soft: #fffbeb;
    --now: #dc2626;
    --now-soft: #fef2f2;
    --star: #f59e0b;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Icons */
.icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
    vertical-align: -0.2em;
    flex-shrink: 0;
}

.icon--xs { width: 0.95rem; height: 0.95rem; }
.icon--sm { width: 1.1rem; height: 1.1rem; }
.icon--lg { width: 1.5rem; height: 1.5rem; }
.icon--xl { width: 2.5rem; height: 2.5rem; }
.icon--star { width: 1.15rem; height: 1.15rem; vertical-align: middle; }

.programme__channel,
.modal__channel {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.programme__channel .icon,
.modal__channel .icon,
.community-card__meta .icon {
    color: var(--text-muted);
}

/* Header */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header__brand { display: flex; align-items: center; gap: 0.85rem; }

.header__logo-link {
    display: block;
    flex-shrink: 0;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.header__logo-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.28);
}

.header__logo {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 14px;
}

.header__title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 55%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header__subtitle { color: var(--text-muted); margin-top: 0.15rem; font-size: 0.92rem; }

.header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.select--compact { width: auto; min-width: 9.5rem; padding: 0.45rem 0.65rem; font-size: 0.85rem; }

#lang-select option { font-size: 0.95rem; line-height: 1.4; }

.layout { min-height: calc(100vh - 180px); }

.tab-panel { display: none; }

.tab-panel--active {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: calc(100vh - 180px);
}

#tab-search.tab-panel--active,
#tab-community.tab-panel--active,
#tab-rankings.tab-panel--active {
    display: block;
    grid-template-columns: unset;
}

@media (max-width: 900px) {
    .tab-panel--active { grid-template-columns: 1fr; }
}

/* Sidebar */
.sidebar {
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
}

.panel {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.1rem;
}

.panel--grow { flex: 1; display: flex; flex-direction: column; min-height: 200px; }

.panel h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.select, .input-search, .input-date {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.select:focus, .input-search:focus, .input-date:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.epg-status { font-size: 0.82rem; margin-top: 0.55rem; }
.epg-status--available { color: var(--success); }
.epg-alt-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.55rem; line-height: 1.45; }

.channel-list__item--no-epg { opacity: 0.45; }
.channel-list__badge { margin-left: auto; color: var(--text-muted); font-size: 0.75rem; }

.date-nav { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.55rem; }

.btn {
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--icon .icon { color: var(--text-muted); }

.btn--icon:hover:not(:disabled) { background: var(--bg-hover); }

.btn--secondary {
    width: 100%;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--secondary:hover:not(:disabled) { background: var(--bg-hover); }

.btn--primary {
    background: var(--accent);
    color: #fff;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn--primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }

.channel-list { list-style: none; overflow-y: auto; flex: 1; margin-top: 0.5rem; }

.channel-list__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
}

.channel-list__item:hover { background: #fff; box-shadow: var(--shadow); }

.channel-list__item--active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.channel-list__item--active:hover { background: var(--accent-hover); }

.channel-list__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.channel-list__icon--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-soft);
}

.channel-list__name { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.channel-list__empty { color: var(--text-muted); font-size: 0.9rem; padding: 1.5rem 0; text-align: center; }

/* Content */
.content { padding: 1.75rem 2rem; overflow-y: auto; position: relative; }

.schedule-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.schedule-header h2 { font-size: 1.35rem; color: #0f172a; }

.badge {
    background: var(--accent-soft);
    border: 1px solid #c7d2fe;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

.schedule-grid { display: flex; flex-direction: column; gap: 0.65rem; }

.programme {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.programme:hover { border-color: #c7d2fe; }

.programme--now {
    border-color: #fca5a5;
    background: var(--now-soft);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.1);
}

.programme--clickable { cursor: pointer; }
.programme--clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.programme__time { font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.programme__time-end { font-size: 0.75rem; opacity: 0.75; }
.programme__title { font-weight: 600; font-size: 1rem; color: #0f172a; }
.programme__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.programme__channel { font-size: 0.82rem; color: var(--accent); margin: 0.25rem 0; font-weight: 500; }
.programme__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.programme__live {
    display: inline-block;
    background: var(--now);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.programme__rating { font-size: 0.82rem; margin-top: 0.35rem; display: block; }
.programme__rating em { color: var(--text-muted); font-style: normal; }

.btn-fav { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #cbd5e1; padding: 0; line-height: 1; transition: transform 0.15s; }
.btn-fav:hover { transform: scale(1.15); }
.btn-fav--active { color: #ef4444; }

.loading { display: flex; align-items: center; gap: 0.75rem; padding: 2rem; color: var(--text-muted); }

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.notice {
    background: var(--warning-soft);
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #92400e;
}

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state__icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h2 { color: #0f172a; margin-bottom: 0.5rem; }

/* Home welcome */
.home-welcome {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 45%, #fdf4ff 100%);
    border: 1px solid #c7d2fe;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    margin-top: 0.5rem;
}

.home-welcome__glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, transparent 70%);
    top: -80px;
    right: -60px;
    pointer-events: none;
    animation: homePulse 6s ease-in-out infinite;
}

@keyframes homePulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
}

.home-welcome__inner { position: relative; max-width: 720px; }

.home-welcome__eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.home-welcome__title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-welcome__desc {
    font-size: 1.02rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.75rem;
    max-width: 560px;
}

.home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.home-stat {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.15rem;
    min-width: 110px;
    box-shadow: var(--shadow);
}

.home-stat__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}

.home-stat__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.home-quick { margin-bottom: 1.75rem; }

.home-quick__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.home-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.home-country {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.home-country:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .home-features { grid-template-columns: 1fr; }
    .home-welcome { padding: 1.75rem 1.25rem; }
}

.home-feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: inherit;
}

.home-feature:hover {
    border-color: #c7d2fe;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.home-feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.15rem;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.home-feature strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.home-feature span:last-child {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.hidden { display: none !important; }

.footer {
    text-align: center;
    padding: 1.25rem 2rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: #fff;
}

.site-intro {
    max-width: 720px;
    margin: 0 auto 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.site-intro p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.footer-nav a {
    color: var(--accent);
    font-weight: 500;
}

.footer-nav a:hover { text-decoration: underline; }

.footer-nav__sep {
    color: var(--border);
    user-select: none;
}

/* HTML Sitemap */
.sitemap-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sitemap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.sitemap-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.sitemap-header__brand:hover { text-decoration: none; }

.sitemap-header__title {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 55%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sitemap-back {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    transition: background 0.15s;
}

.sitemap-back:hover {
    background: var(--bg-soft);
    text-decoration: none;
}

.sitemap-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.sitemap-hero {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.sitemap-hero h1 {
    font-size: 1.85rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.sitemap-hero p {
    color: var(--text-muted);
    max-width: 62ch;
    line-height: 1.6;
}

.sitemap-xml-note {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.sitemap-section {
    margin-bottom: 2.25rem;
}

.sitemap-section h2 {
    font-size: 1.15rem;
    color: #0f172a;
    margin-bottom: 0.85rem;
}

.sitemap-count {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sitemap-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.sitemap-links a {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
}

.sitemap-links--langs a { font-size: 0.9rem; }

.sitemap-countries {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.35rem 1rem;
}

.sitemap-countries a {
    display: block;
    padding: 0.35rem 0;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.sitemap-countries a:hover {
    color: var(--accent);
    border-bottom-color: #c7d2fe;
    text-decoration: none;
}

.sitemap-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .sitemap-header { padding: 1rem; flex-direction: column; align-items: flex-start; }
    .sitemap-main { padding: 1.25rem; }
    .sitemap-countries { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* Contact */
.contact-main { max-width: 960px; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2rem;
    align-items: start;
}

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

.contact-info h2,
.contact-form-panel h2 {
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 1rem;
}

.contact-card {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}

.contact-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    flex-shrink: 0;
}

.contact-card h3 {
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.contact-card p,
.contact-card a {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.contact-card a { font-weight: 500; }

.contact-form-panel {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .contact-form__row { grid-template-columns: 1fr; }
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-field span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    background: #fff;
}

.contact-field textarea { resize: vertical; min-height: 120px; }

.contact-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.contact-form__submit {
    align-self: flex-start;
    padding: 0.7rem 1.5rem;
}

.contact-feedback {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
}

.contact-feedback--success {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #6ee7b7;
}

.contact-feedback--error {
    background: var(--now-soft);
    color: var(--now);
    border: 1px solid #fca5a5;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.35rem;
    background: #fff;
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.tabs__btn {
    padding: 0.55rem 1.15rem;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.tabs__btn:hover { color: var(--text); background: var(--bg-soft); }
.tabs__btn--active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25); }

/* Live bar */
.live-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.65rem 0;
    overflow-x: auto;
}

.live-bar__label { color: var(--now); font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }

.live-bar__item {
    background: #fff;
    border: 1px solid #fca5a5;
    color: var(--text);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}

.live-bar__item:hover { background: var(--now-soft); }

/* Stars */
.stars { display: inline-flex; align-items: center; gap: 0.15rem; }
.star { color: #e2e8f0; display: inline-flex; }
.star--filled { color: var(--star); }
.stars--interactive .star { cursor: pointer; transition: transform 0.1s; }
.stars--interactive .star:hover { transform: scale(1.15); }
.stars__label { color: var(--text-muted); font-size: 0.85rem; margin-left: 0.35rem; }

.rating-label { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0 0.35rem; display: block; }

/* Search */
.search-panel, .community-panel { padding: 2rem; max-width: 1100px; margin: 0 auto; }

.search-panel__header { margin-bottom: 1.5rem; }
.search-panel__header h2 { font-size: 1.6rem; color: #0f172a; margin-bottom: 0.35rem; }
.search-panel__header p { color: var(--text-muted); }

.search-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

.input-search--lg { font-size: 1.05rem; padding: 0.9rem 1rem; }

.search-form__filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
}

.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip input { accent-color: var(--accent); }

.results-heading { font-size: 1rem; margin: 1.5rem 0 0.75rem; color: var(--text-muted); font-weight: 600; }

.channel-results { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.result-chip {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.55rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.result-chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Community */
.community-hero {
    background: linear-gradient(135deg, #fff 0%, #eef2ff 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.community-hero h2 { font-size: 1.75rem; color: #0f172a; margin-bottom: 0.5rem; }
.community-hero p { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }

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

.community-section {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.community-section__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.community-section__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-section__icon--hot {
    background: var(--warning-soft);
    color: var(--warning);
}

.community-section__icon--chat {
    background: var(--accent-soft);
    color: var(--accent);
}

.community-section h3 { font-size: 1.1rem; color: #0f172a; }

.community-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.community-card:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }

.community-card--trending { border-left: 4px solid var(--star); }

.community-card__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.community-card__title { font-weight: 600; color: #0f172a; margin-bottom: 0.3rem; line-height: 1.35; }

.community-card__meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.community-card__rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.community-card__count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.community-card__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.community-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.community-card__author { font-weight: 600; color: #0f172a; }

.community-card__comment {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-top: 0.35rem;
}

.community-card__date { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }

.community-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.community-empty__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    opacity: 0.55;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
}

.modal__content {
    position: relative;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: var(--shadow-lg);
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: all 0.15s;
}

.modal__close .icon { color: inherit; }

.modal__close:hover { background: var(--bg-hover); color: var(--text); }

.modal__programme {
    background: linear-gradient(135deg, #eef2ff 0%, #fff 100%);
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.modal__meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.modal__programme h2 { font-size: 1.45rem; color: #0f172a; margin-bottom: 0.45rem; line-height: 1.3; }
.modal__channel { color: var(--accent); font-weight: 500; margin-bottom: 0.65rem; font-size: 0.9rem; }
.modal__desc { color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.6; font-size: 0.92rem; }

.modal__avg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-top: 0.65rem;
    font-size: 0.88rem;
}

body.modal-open { overflow: hidden; }

.opinion-form {
    padding: 1.5rem 1.75rem;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}

.opinion-form h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #0f172a;
    font-weight: 600;
}

.opinion-form__success {
    background: var(--success-soft);
    border: 1px solid #6ee7b7;
    color: var(--success);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    display: none;
}

.opinion-form__success--visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

#rating-picker { margin: 0.25rem 0 0.75rem; }

.textarea {
    width: 100%;
    padding: 0.85rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    margin: 0.5rem 0 1rem;
    min-height: 90px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); background: #fff; }

.opinions-list { padding: 1.5rem 1.75rem 1.75rem; }

.opinions-list h3 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.opinion-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.65rem;
    animation: fadeIn 0.35s ease;
}

.opinion-card--new {
    border-color: #6ee7b7;
    background: var(--success-soft);
}

.opinion-card__header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.45rem; }
.opinion-card__author { font-weight: 600; color: #0f172a; }
.opinion-card__date { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.opinion-card p { color: var(--text); line-height: 1.5; font-size: 0.92rem; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
}

.toast--success { border-color: #6ee7b7; background: var(--success-soft); color: var(--success); }
.toast--error { border-color: #fca5a5; background: var(--now-soft); color: var(--now); }

.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.channel-list__item { display: flex; align-items: center; gap: 0.5rem; }

.channel-list__name-btn {
    flex: 1; background: none; border: none; font: inherit; color: inherit;
    text-align: left; cursor: pointer; padding: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.channel-list__profile {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 8px;
    color: var(--accent); background: var(--accent-soft); flex-shrink: 0;
}

.channel-list__profile:hover { background: #c7d2fe; text-decoration: none; }

.rankings-panel { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.rankings-hero { margin-bottom: 2rem; }
.rankings-hero h2 { font-size: 1.75rem; color: #0f172a; margin-bottom: 0.35rem; }
.rankings-hero p { color: var(--text-muted); }
.rankings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .rankings-grid { grid-template-columns: 1fr; } }
.rankings-section h3 {
    font-size: 1.05rem; color: #0f172a; margin-bottom: 0.85rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-light);
}

.channel-main { max-width: 960px; margin: 0 auto; padding: 2rem; }
.channel-hero {
    background: #fff; border: 1px solid var(--border-light);
    border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.channel-hero__head { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1rem; }
.channel-hero__logo { width: 72px; height: 72px; border-radius: 14px; object-fit: contain; border: 1px solid var(--border-light); }
.channel-hero__logo--placeholder { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.channel-hero__country { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; }
.channel-hero h1 { font-size: 1.75rem; color: #0f172a; }
.channel-hero__rating { color: var(--accent); font-weight: 500; font-size: 0.9rem; margin-top: 0.25rem; }
.channel-story { color: var(--text); line-height: 1.65; margin-bottom: 1rem; }
.channel-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; font-size: 0.88rem; }
.channel-meta dt { color: var(--text-muted); font-weight: 500; }
.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 800px) { .channel-grid { grid-template-columns: 1fr; } }
.channel-section { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.channel-section h2 { font-size: 1.05rem; margin-bottom: 1rem; color: #0f172a; }
.channel-empty { color: var(--text-muted); font-size: 0.9rem; padding: 1rem 0; }
.ranking-list { list-style: none; }
.ranking-item { display: flex; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border-light); }
.ranking-item__rank {
    width: 24px; height: 24px; background: var(--accent); color: #fff; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.ranking-item__meta { font-size: 0.8rem; color: var(--text-muted); }
.channel-opinion-form { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-light); }
.channel-stars-wrap .stars { font-size: 1.35rem; }
