/* ============================================================
   Sports Stream - Pure PHP Theme
   Dark glass-morphism with neon accents, RTL Arabic layout.
   ============================================================ */

:root {
    --bg-0: #030712;
    --bg-1: #0b1120;
    --bg-2: #111827;
    --bg-3: #1f2937;
    --border-soft: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.25);
    --text-100: #f8fafc;
    --text-200: #e2e8f0;
    --text-300: #cbd5e1;
    --text-400: #94a3b8;
    --text-500: #64748b;
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.45);
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.45);
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.45);
    --rose: #f43f5e;
    --rose-glow: rgba(244, 63, 94, 0.5);
    --amber: #f59e0b;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text-200);
    font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
    direction: rtl;
    min-height: 100vh;
    line-height: 1.6;
}

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(6, 182, 212, 0.12), transparent 60%),
        radial-gradient(900px 500px at 10% 10%, rgba(16, 185, 129, 0.10), transparent 60%),
        linear-gradient(180deg, #030712 0%, #0b1120 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--emerald); }

img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 32px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-100);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 6px;
    height: 22px;
    background: linear-gradient(180deg, var(--emerald), var(--cyan));
    border-radius: 3px;
    box-shadow: 0 0 12px var(--emerald-glow);
}

/* ---------- Top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(3, 7, 18, 0.7);
    border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 14px 0;
}

.topbar-nav {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.topbar-nav a {
    color: var(--text-300);
    font-weight: 600;
    font-size: 15px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.topbar-nav a:hover, .topbar-nav a.active {
    color: var(--text-100);
    border-bottom-color: var(--emerald);
}

.topbar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.topbar-logo .name {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--emerald), var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.4px;
}

.topbar-logo .tag {
    font-size: 11px;
    color: var(--text-500);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.topbar-logo.has-image {
    flex-direction: row;
    justify-content: center;
}

.topbar-logo .logo-img {
    height: 50px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.topbar-social {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.topbar-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-300);
    transition: transform 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.topbar-social a:hover {
    color: var(--emerald);
    border-color: var(--emerald);
    transform: translateY(-1px);
    box-shadow: 0 0 12px var(--emerald-glow);
}

.topbar-social svg { width: 16px; height: 16px; }

/* Mobile: stack the topbar */
@media (max-width: 800px) {
    .topbar-inner {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .topbar-nav, .topbar-social { justify-content: center; }
    .topbar-nav { order: 2; }
    .topbar-social { order: 3; }
    .topbar-logo { order: 1; }
}

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(11, 17, 32, 0.7);
    padding: 14px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 56px;
    animation: marquee 36s linear infinite;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-300);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

.marquee-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.marquee-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 4px;
}

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 24px;
    text-align: center;
}

.hero h1 {
    font-size: 38px;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--text-100);
    font-weight: 900;
    letter-spacing: -0.5px;
}

.hero h1 .grad {
    background: linear-gradient(90deg, var(--emerald), var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--text-300);
    font-size: 17px;
    max-width: 720px;
    margin: 0 auto;
}

.hero-stats {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.hero-stats .pill {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-300);
    font-weight: 700;
    font-size: 13px;
}

@media (max-width: 600px) {
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 14px; }
}

/* ---------- 3-Day grid ---------- */
.day-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.day-card {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(11, 17, 32, 0.6));
    padding: 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

.day-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-soft);
}

.day-card-head h3 {
    margin: 0;
    color: var(--text-100);
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-card-head .badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--emerald);
    font-weight: 700;
}

.day-card .empty {
    color: var(--text-500);
    text-align: center;
    padding: 24px 0;
    font-size: 14px;
}

.day-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 460px;
    overflow-y: auto;
    padding-inline-end: 4px;
}

.day-card-list::-webkit-scrollbar { width: 6px; }
.day-card-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
}

/* ---------- Match card ---------- */
.match-card {
    position: relative;
    display: block;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(11, 17, 32, 0.55);
    padding: 14px;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.match-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.match-card.is-live {
    border-color: rgba(244, 63, 94, 0.45);
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.10), rgba(11, 17, 32, 0.55));
}

.match-card.is-live::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.25), 0 0 32px rgba(244, 63, 94, 0.15) inset;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-400);
    font-size: 12px;
    margin-bottom: 12px;
}

.match-meta .league {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.match-meta .league img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.match-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.status-live {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), #fb7185);
    box-shadow: 0 0 12px var(--rose-glow);
}

.status-live .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.status-finished {
    color: var(--text-300);
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid var(--border-soft);
}

.status-scheduled {
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.match-team .logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px;
    border: 1px solid var(--border-soft);
    object-fit: contain;
}

.match-team .name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-200);
    line-height: 1.2;
    max-width: 110px;
}

.match-score {
    text-align: center;
    color: var(--text-100);
    font-weight: 900;
    font-size: 24px;
    min-width: 64px;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    direction: ltr;
    font-feature-settings: "tnum";
}

.match-score.placeholder {
    font-size: 14px;
    color: var(--text-400);
    font-weight: 700;
}

.match-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-soft);
    color: var(--text-400);
    font-size: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.match-footer .channel {
    color: var(--cyan);
    font-weight: 700;
}

/* ---------- Matches list ---------- */
.matches-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.filter-bar a {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-300);
    font-weight: 700;
    font-size: 13px;
    transition: all 0.15s;
}

.filter-bar a:hover {
    border-color: var(--emerald);
    color: var(--text-100);
}

.filter-bar a.active {
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    border-color: transparent;
    color: #02110e;
}

/* ---------- News ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(11, 17, 32, 0.55);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    color: inherit;
    display: block;
}

.news-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}

.news-card .image {
    aspect-ratio: 16 / 9;
    background: #0b1120 center/cover no-repeat;
    border-bottom: 1px solid var(--border-soft);
}

.news-card .body {
    padding: 14px 16px 18px;
}

.news-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-100);
    line-height: 1.4;
}

.news-card .summary {
    color: var(--text-400);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .meta {
    margin-top: 10px;
    color: var(--text-500);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

/* ---------- About ---------- */
.about-card {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(11, 17, 32, 0.6));
    padding: 28px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.about-card p { color: var(--text-300); font-size: 15px; }

.about-card .socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.about-card .socials a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    color: var(--text-200);
    font-weight: 700;
    font-size: 13px;
    background: rgba(15, 23, 42, 0.5);
    transition: all 0.15s;
}

.about-card .socials a:hover {
    border-color: var(--emerald);
    box-shadow: 0 0 12px var(--emerald-glow);
}

/* ---------- Footer ---------- */
.footer {
    margin-top: 40px;
    padding: 28px 0;
    border-top: 1px solid var(--border-soft);
    color: var(--text-500);
    text-align: center;
    font-size: 13px;
}

.footer a { color: var(--text-300); }

/* ---------- Match detail ---------- */
.match-detail {
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(11, 17, 32, 0.65));
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.match-detail .league-info {
    text-align: center;
    color: var(--text-400);
    margin-bottom: 12px;
    font-weight: 700;
}

.match-detail .league-info img {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
    margin-inline-end: 6px;
}

.match-detail .teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.match-detail .team {
    text-align: center;
}

.match-detail .team img {
    width: 110px;
    height: 110px;
    margin: 0 auto;
    object-fit: contain;
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
    padding: 12px;
    border: 1px solid var(--border-soft);
}

.match-detail .team .name {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-100);
}

.match-detail .big-score {
    text-align: center;
    color: var(--text-100);
    font-weight: 900;
    font-size: 56px;
    direction: ltr;
    font-feature-settings: "tnum";
}

.match-detail .big-score.placeholder {
    font-size: 24px;
    color: var(--text-400);
}

.match-detail .meta-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
    color: var(--text-300);
    font-size: 14px;
}

.match-detail .meta-row .item {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-soft);
    padding: 8px 14px;
    border-radius: 12px;
}

.match-detail .stream-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 14px 28px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    color: #02110e;
    font-weight: 900;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}

.match-detail .stream-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
}

.match-detail .stream-btn-wrap { text-align: center; }

/* Inline video player (auto-opens for live matches) */
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 22px;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-soft);
}

.video-frame iframe,
.video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    display: block;
}

@media (max-width: 700px) {
    .match-detail { padding: 18px; }
    .match-detail .team img { width: 80px; height: 80px; }
    .match-detail .team .name { font-size: 16px; }
    .match-detail .big-score { font-size: 36px; }
    .video-frame { margin-top: 16px; border-radius: 10px; }
}

/* ---------- News detail ---------- */
.news-detail {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: rgba(11, 17, 32, 0.6);
    padding: 28px;
    backdrop-filter: blur(8px);
}

.news-detail h1 {
    color: var(--text-100);
    font-size: 28px;
    margin: 0 0 12px;
}

.news-detail .meta {
    color: var(--text-500);
    font-size: 13px;
    margin-bottom: 18px;
}

.news-detail .image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    background-color: #0b1120;
    border: 1px solid var(--border-soft);
}

.news-detail .content {
    color: var(--text-300);
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-wrap;
}

/* ---------- Buttons / utilities ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-200);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
}

.btn:hover { border-color: var(--emerald); color: var(--text-100); }

.btn-primary {
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    color: #02110e;
    border-color: transparent;
}

.btn-primary:hover { color: #02110e; box-shadow: 0 0 16px var(--emerald-glow); }

.btn-danger {
    background: linear-gradient(90deg, #ef4444, var(--rose));
    color: #fff;
    border-color: transparent;
}

.btn-danger:hover { color: #fff; box-shadow: 0 0 16px var(--rose-glow); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- Auth (login) ---------- */
.auth-shell {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(11,17,32,0.85));
    padding: 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 0 1px rgba(16,185,129,0.12), 0 16px 64px rgba(0,0,0,0.5);
}

.auth-card h1 {
    margin: 0 0 6px;
    text-align: center;
    color: var(--text-100);
}

.auth-card p { text-align: center; color: var(--text-400); margin: 0 0 22px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-200);
    font-weight: 700;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: rgba(3, 7, 18, 0.6);
    color: var(--text-100);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2394a3b8' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: 14px 50%;
    padding-inline-start: 36px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

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

.form-grid.full { grid-template-columns: 1fr; }

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-error {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.form-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ---------- Admin layout ---------- */
.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    background: var(--bg-0);
}

.admin-sidebar {
    border-inline-start: 1px solid var(--border-soft);
    background: rgba(11, 17, 32, 0.85);
    padding: 20px 14px;
    backdrop-filter: blur(10px);
}

.admin-sidebar .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
    text-align: center;
}

.admin-sidebar .brand .brand-img {
    max-width: 100%;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 4px;
}

.admin-sidebar .brand .name {
    font-size: 19px;
    font-weight: 900;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.admin-sidebar .brand .tag {
    font-size: 11px;
    color: var(--text-500);
    letter-spacing: 1px;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-300);
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.admin-sidebar nav a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.admin-sidebar nav a:hover {
    background: rgba(16, 185, 129, 0.07);
    color: var(--text-100);
}

.admin-sidebar nav a.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.10));
    color: var(--text-100);
    border-color: rgba(16, 185, 129, 0.35);
}

.admin-sidebar .logout {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.admin-content {
    padding: 24px 28px;
    overflow-x: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header h1 {
    margin: 0;
    color: var(--text-100);
    font-size: 24px;
}

.auto-refresh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text-300);
    font-size: 13px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 7px 12px;
    border-radius: 999px;
    transition: background 0.15s, border-color 0.15s;
}

.auto-refresh-toggle:hover {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.45);
}

.auto-refresh-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--emerald);
    cursor: pointer;
}

.auto-refresh-toggle #auto-refresh-counter {
    display: inline-block;
    min-width: 14px;
    text-align: center;
    color: var(--emerald);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.auto-refresh-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-500);
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.20);
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    min-height: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.auto-refresh-status.auto-refresh-status--show {
    opacity: 1;
    transform: translateY(0);
    max-width: 600px;
    color: var(--text-300);
}

.admin-card {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: rgba(11, 17, 32, 0.7);
    padding: 22px;
    margin-bottom: 18px;
}

.admin-card h2 {
    color: var(--text-100);
    font-size: 18px;
    margin: 0 0 14px;
}

@media (max-width: 800px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-sidebar.open { display: block; }
    .admin-content { padding: 16px; }
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    background: rgba(3, 7, 18, 0.4);
    color: var(--text-200);
}

table.data th, table.data td {
    padding: 11px 14px;
    text-align: start;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
    vertical-align: middle;
}

table.data th {
    background: rgba(11, 17, 32, 0.7);
    color: var(--text-300);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

table.data tr:hover td { background: rgba(16, 185, 129, 0.04); }

table.data .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

table.data img.thumb {
    width: 32px; height: 32px; object-fit: contain;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 2px;
}

/* ---------- Stats grid (admin dashboard) ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(11, 17, 32, 0.6));
    padding: 18px;
}

.stat-card .label {
    color: var(--text-400);
    font-size: 13px;
    font-weight: 700;
}

.stat-card .value {
    color: var(--text-100);
    font-size: 28px;
    font-weight: 900;
    margin-top: 6px;
}

.stat-card .delta {
    color: var(--emerald);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 700;
}

/* ---------- Period tabs (home page) ---------- */
.section-tight { padding: 14px 0 0; }

.period-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 auto;
    max-width: 760px;
}

.period-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(11, 17, 32, 0.55));
    color: var(--text-300);
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.2s, background 0.2s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.period-tab:hover {
    border-color: rgba(16, 185, 129, 0.6);
    color: var(--text-100);
    transform: translateY(-2px);
}

.period-tab .period-tab-icon { font-size: 26px; line-height: 1; }
.period-tab .period-tab-label { font-size: 16px; }
.period-tab .period-tab-count {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-500);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 2px 10px;
    margin-top: 2px;
}

.period-tab.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.18));
    border-color: var(--emerald);
    color: var(--text-100);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.18);
}

.period-tab.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    height: 3px;
    bottom: auto;
    top: 0;
}

.period-tab.active .period-tab-count {
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    color: #02110e;
}

@media (max-width: 600px) {
    .period-tab { padding: 14px 8px; }
    .period-tab .period-tab-icon { font-size: 22px; }
    .period-tab .period-tab-label { font-size: 14px; }
}

.section-title-count {
    color: var(--text-500);
    font-weight: 700;
    font-size: 16px;
    margin-inline-start: 6px;
}

/* ---------- Image upload UI (admin) ---------- */
.image-preview {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(11, 17, 32, 0.55);
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}
.image-preview img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 4px;
}
.image-preview span {
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.upload-row .form-control { flex: 1 1 240px; min-width: 200px; }
.upload-or {
    color: var(--text-500);
    font-weight: 800;
    font-size: 12px;
    padding: 0 4px;
}

.file-input {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.file-input input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.file-input-label {
    display: inline-block;
    padding: 9px 16px;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    color: #02110e;
    font-weight: 800;
    font-size: 13px;
    border-radius: 10px;
    transition: transform 0.15s;
}
.file-input:hover .file-input-label { transform: translateY(-1px); }
.file-input-name {
    color: var(--text-300);
    font-size: 13px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-hint {
    display: block;
    color: var(--text-500);
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.6;
}

/* Flash messages */
.flash-list { margin-bottom: 14px; }
.flash {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    border: 1px solid var(--border-soft);
}
.flash-success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.flash-error { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.4); color: #fca5a5; }
.flash-info { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.4); color: #67e8f9; }

/* ============================================================
   Theme toggle button (sun/moon)
   ============================================================ */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-300);
    cursor: pointer;
    margin-inline-start: 8px;
    transition: transform 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
    flex-shrink: 0;
}
.theme-toggle:hover {
    color: var(--emerald);
    border-color: var(--emerald);
    transform: translateY(-1px);
    box-shadow: 0 0 12px var(--emerald-glow);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   API source badge + Refresh button
   ============================================================ */
.badge-api {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.18));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--emerald);
}
.btn-refresh {
    background: rgba(6, 182, 212, 0.14);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--cyan);
}
.btn-refresh:hover {
    color: var(--text-100);
    border-color: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-glow);
}

/* API import table tweaks */
.api-import-table img { display: inline-block; vertical-align: middle; }
.api-pick-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-300);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

/* ============================================================
   LIGHT THEME — toggled by setting data-theme="light" on <html>.
   Only color/background overrides; layout stays the same.
   ============================================================ */
[data-theme="light"] {
    --bg-0: #f4f6fb;
    --bg-1: #eef2f9;
    --bg-2: #e2e8f3;
    --bg-3: #cbd5e1;
    --border-soft: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 23, 42, 0.18);
    --text-100: #0f172a;
    --text-200: #1e293b;
    --text-300: #334155;
    --text-400: #475569;
    --text-500: #64748b;
}

[data-theme="light"] body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(6, 182, 212, 0.10), transparent 60%),
        radial-gradient(900px 500px at 10% 10%, rgba(16, 185, 129, 0.08), transparent 60%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f9 100%);
    background-attachment: fixed;
    color: var(--text-200);
}

[data-theme="light"] .topbar       { background: rgba(255, 255, 255, 0.78); }
[data-theme="light"] .marquee      { background: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .marquee-item img { background: rgba(15, 23, 42, 0.04); }

[data-theme="light"] .topbar-social a,
[data-theme="light"] .theme-toggle,
[data-theme="light"] .btn,
[data-theme="light"] .filter-bar a,
[data-theme="light"] .hero-stats .pill,
[data-theme="light"] .about-card .socials a {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-300);
}

[data-theme="light"] .day-card,
[data-theme="light"] .about-card,
[data-theme="light"] .match-detail,
[data-theme="light"] .stat-card,
[data-theme="light"] .auth-card,
[data-theme="light"] .period-tab,
[data-theme="light"] .image-preview,
[data-theme="light"] .news-detail {
    background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .match-card,
[data-theme="light"] .news-card,
[data-theme="light"] .admin-card {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .match-card.is-live {
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.08), rgba(255, 255, 255, 0.95));
}

[data-theme="light"] .match-team .logo,
[data-theme="light"] .match-detail .team img,
[data-theme="light"] table.data img.thumb,
[data-theme="light"] .image-preview img,
[data-theme="light"] .marquee-item img {
    background: rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .match-score {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-100);
}

[data-theme="light"] .match-detail .meta-row .item {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .news-card .image,
[data-theme="light"] .news-detail .image {
    background-color: #e2e8f0;
}

[data-theme="light"] .form-control {
    background: #ffffff;
    color: var(--text-100);
    border-color: var(--border-strong);
}
[data-theme="light"] .form-control::placeholder { color: var(--text-500); }

[data-theme="light"] .admin-shell  { background: var(--bg-0); }
[data-theme="light"] .admin-sidebar { background: rgba(255, 255, 255, 0.95); }
[data-theme="light"] .admin-sidebar nav a:hover { background: rgba(16, 185, 129, 0.08); }
[data-theme="light"] .admin-sidebar nav a.active { background: linear-gradient(90deg, rgba(16,185,129,0.18), rgba(6,182,212,0.12)); }

[data-theme="light"] table.data            { background: rgba(255, 255, 255, 0.95); color: var(--text-200); }
[data-theme="light"] table.data th         { background: rgba(15, 23, 42, 0.04); color: var(--text-300); }
[data-theme="light"] table.data tr:hover td { background: rgba(16, 185, 129, 0.05); }

[data-theme="light"] .day-card-list::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.18); }

[data-theme="light"] .status-finished      { color: var(--text-300); background: rgba(15, 23, 42, 0.06); }
[data-theme="light"] .form-error           { color: #b91c1c; background: rgba(244, 63, 94, 0.08); }
[data-theme="light"] .form-success,
[data-theme="light"] .flash-success        { color: #047857; background: rgba(16, 185, 129, 0.10); }
[data-theme="light"] .flash-error          { color: #b91c1c; background: rgba(244, 63, 94, 0.10); }
[data-theme="light"] .flash-info           { color: #0369a1; background: rgba(6, 182, 212, 0.12); }

[data-theme="light"] .match-detail .stream-btn,
[data-theme="light"] .btn-primary,
[data-theme="light"] .file-input-label,
[data-theme="light"] .filter-bar a.active { color: #02110e; }

/* ============================================================
   Responsive enhancements
   ============================================================ */

/* Wider matches grid: 3 columns on desktop, 2 on tablet, 1 on mobile */
@media (min-width: 1100px) {
    .matches-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1099px) and (min-width: 600px) {
    .matches-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .matches-list { grid-template-columns: 1fr; }
}

/* Topbar collapse — show theme toggle inline; keep social row tidy */
@media (max-width: 800px) {
    .topbar-inner       { padding: 10px 0; }
    .topbar-logo .name  { font-size: 18px; }
    .topbar-logo .tag   { font-size: 10px; letter-spacing: 1.5px; }
    .topbar-nav         { gap: 14px; font-size: 14px; }
    .topbar-nav a       { font-size: 14px; }
    .topbar-social      { gap: 6px; flex-wrap: wrap; }
    .topbar-social a, .theme-toggle { width: 32px; height: 32px; }
    .theme-toggle       { margin-inline-start: 4px; }
}

/* Match-card on very small screens */
@media (max-width: 420px) {
    .match-card           { padding: 12px; }
    .match-team .logo     { width: 44px; height: 44px; padding: 5px; }
    .match-team .name     { font-size: 12px; max-width: 90px; }
    .match-score          { font-size: 20px; min-width: 54px; padding: 4px 8px; }
    .match-meta           { font-size: 11px; }
}

/* Admin sidebar: drawer-style on small screens (toggleable via JS) */
@media (max-width: 800px) {
    .admin-shell      { grid-template-columns: 1fr; }
    .admin-sidebar    {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        z-index: 60;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        display: block;
        overflow-y: auto;
    }
    [dir="rtl"] .admin-sidebar { inset: 0 0 0 auto; }
    .admin-sidebar.open    { transform: translateX(0); }
    .admin-sidebar-toggle  {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        border: 1px solid var(--border-strong);
        background: rgba(15, 23, 42, 0.6);
        color: var(--text-200);
        cursor: pointer;
    }
    .admin-content    { padding: 16px; }
}
.admin-sidebar-toggle { display: none; }

.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.admin-overlay.open { opacity: 1; pointer-events: auto; }

/* Convert admin tables to card-rows on phones */
@media (max-width: 640px) {
    table.data, table.data thead, table.data tbody, table.data tr, table.data th, table.data td {
        display: block;
        width: 100%;
    }
    table.data thead { display: none; }
    table.data tr {
        background: var(--bg-1);
        border: 1px solid var(--border-soft);
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 6px 4px;
    }
    table.data td {
        border-bottom: 1px dashed var(--border-soft);
        padding: 8px 12px;
        text-align: start;
        position: relative;
    }
    table.data td:last-child { border-bottom: none; }
    table.data td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--text-500);
        margin-bottom: 4px;
    }
    table.data .actions { flex-wrap: wrap; gap: 6px; }
    [data-theme="light"] table.data tr { background: rgba(255, 255, 255, 0.95); }
}

/* Ensure long match titles never overflow */
.match-team .name, .news-card h3 { word-break: break-word; }

/* Form-grid on tablets: 2 cols up to 900px (already 2 cols; phones get 1 col via existing rule) */
@media (max-width: 480px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* Period tabs: ensure usable down to 360px */
@media (max-width: 380px) {
    .period-tabs { gap: 6px; }
    .period-tab { padding: 12px 4px; }
    .period-tab .period-tab-label { font-size: 13px; }
    .period-tab .period-tab-count { font-size: 11px; padding: 2px 7px; }
}

/* Hide admin toggle on desktop */
@media (min-width: 801px) {
    .admin-sidebar-toggle, .admin-overlay { display: none !important; }
}

/* ---------- Channels (public listing + detail) ---------- */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.channel-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.channel-card:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 28px -12px rgba(16, 185, 129, 0.35);
}
.channel-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
}
.channel-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.channel-body { display: flex; flex-direction: column; gap: 8px; }
.channel-name {
    color: var(--text-100);
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}
.channel-desc {
    color: var(--text-400);
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.channel-watch {
    display: inline-block;
    margin-top: 4px;
    color: var(--emerald);
    font-weight: 700;
    font-size: 13px;
}

.channel-detail {
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 22px;
}
.channel-detail-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.channel-detail-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 6px;
}
.channel-detail-name {
    color: var(--text-100);
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 800;
}
.channel-detail-desc {
    color: var(--text-400);
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 480px) {
    .channels-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .channel-card { padding: 14px; }
    .channel-logo { height: 84px; margin-bottom: 10px; }
    .channel-name { font-size: 15px; }
    .channel-detail { padding: 16px; }
    .channel-detail-logo { width: 64px; height: 64px; }
    .channel-detail-name { font-size: 19px; }
}
