/* ================================================================
   TimStreams v2 — Main Stylesheet
   Color palette: #0a0c10 · #161b22 · #3b82f6 · #c9d1d9
================================================================ */

/* ---------- Reset & Variables ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-0:        #07090d;
    --bg-1:        #0a0c10;
    --bg-2:        #111520;
    --bg-3:        #161b22;
    --bg-4:        #1e2430;
    --border:      #252d3a;
    --border-lt:   #3a4455;
    --blue:        #3b82f6;
    --blue-d:      #2563eb;
    --blue-glow:   rgba(59,130,246,.35);
    --blue-dim:    rgba(59,130,246,.12);
    --red:         #f85149;
    --red-glow:    rgba(248,81,73,.4);
    --yellow:      #e3b341;
    --green:       #22c55e;
    --purple:      #9b59b6;
    --text-1:      #e6edf3;
    --text-2:      #c9d1d9;
    --text-3:      #8b949e;
    --white:       #ffffff;
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   18px;
    --shadow-sm:   0 2px 8px rgba(0,0,0,.4);
    --shadow-md:   0 6px 24px rgba(0,0,0,.5);
    --shadow-lg:   0 12px 40px rgba(0,0,0,.7);
    --t-fast:      .18s ease;
    --t-med:       .28s ease;
    --t-slow:      .45s ease;
    --header-h:    68px;
    --font-body:   'Inter', system-ui, sans-serif;
    --font-head:   'Space Grotesk', 'Inter', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-1);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59,130,246,.08) 0%, transparent 60%),
        linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px;
    color: var(--text-2);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--blue); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--blue-d); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-lt); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---- Banner ---- */
.site-banner {
    background: linear-gradient(90deg, var(--blue-d), var(--blue));
    color: #fff;
    padding: 9px 44px 9px 12px;
    font-size: .88rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
/* Desktop: centred static */
.banner-inner {
    display: block;
    text-align: center;
}
/* Mobile: continuous scroll */
@media (max-width: 768px) {
    .site-banner { padding: 9px 36px 9px 0; }
    .banner-inner {
        display: inline-block;
        animation: bannerScroll 18s linear infinite;
        padding-left: 100%;
    }
    @keyframes bannerScroll {
        0%   { transform: translateX(0); }
        100% { transform: translateX(-100%); }
    }
}
.banner-close {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer;
    z-index: 2; padding: 0 4px;
}

/* ================================================================
   HEADER
================================================================ */
.header {
    background: rgba(10,12,16,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000;
    height: var(--header-h);
}
.header-inner {
    max-width: 1440px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.logo-link {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.logo { height: 36px; width: auto; object-fit: contain; }
.logo-text {
    font-family: var(--font-head);
    font-size: 1.25rem; font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.3px;
}
.logo-text:hover { color: var(--text-1); }

.nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 500;
    color: var(--text-3);
    transition: all var(--t-fast);
    display: flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-1);
    background: var(--blue-dim);
}
.nav-link.active { color: var(--blue); }

.btn-discord {
    margin-left: 6px;
    padding: 8px 16px;
    background: #5865f2;
    color: #fff !important;
    border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 600;
    display: flex; align-items: center; gap: 7px;
    transition: all var(--t-fast);
}
.btn-discord:hover { background: #4752c4; transform: translateY(-1px); }

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: all var(--t-fast);
    position: relative;
}
.hamburger::before { content: ''; transform: translateY(-7px); }
.hamburger::after  { content: ''; transform: translateY(5px); }
.header.nav-open .hamburger { background: transparent; }
.header.nav-open .hamburger::before { transform: translateY(0) rotate(45deg); }
.header.nav-open .hamburger::after  { transform: translateY(-2px) rotate(-45deg); }

/* ================================================================
   BUTTONS
================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .9rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-d); }

.btn-secondary {
    background: var(--bg-3); color: var(--text-2);
    border-color: var(--border); 
}
.btn-secondary:hover { background: var(--bg-4); border-color: var(--border-lt); color: var(--text-1); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #d64040; }

.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; }
.btn-full { width: 100%; }

/* ================================================================
   LAYOUT
================================================================ */
.container { max-width: 1440px; width: 95%; margin: 0 auto; padding: 36px 0; flex: 1; }
.section { margin-bottom: 56px; }

/* ================================================================
   HERO / CATEGORY SELECTOR
================================================================ */
.hero {
    text-align: center;
    padding: 64px 20px 48px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--blue-dim); border: 1px solid var(--blue);
    color: var(--blue); padding: 5px 14px;
    border-radius: 50px; font-size: .78rem; font-weight: 600;
    letter-spacing: .5px; text-transform: uppercase;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800; color: var(--text-1);
    letter-spacing: -1px; line-height: 1.1;
    margin-bottom: 14px;
}
.hero h1 span { color: var(--blue); }
.hero p {
    font-size: clamp(.95rem, 2vw, 1.1rem);
    color: var(--text-3); max-width: 560px; margin: 0 auto 36px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px; max-width: 820px; margin: 0 auto;
}
.cat-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    cursor: pointer;
    transition: all var(--t-med);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    text-align: center;
}
.cat-card:hover {
    background: var(--bg-4);
    border-color: var(--blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px var(--blue-glow);
}
.cat-card-icon {
    width: 52px; height: 52px;
    background: var(--blue-dim);
    border: 1px solid var(--blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--blue);
}
.cat-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.cat-card p { font-size: .82rem; color: var(--text-3); }

/* ================================================================
   SECTION HEADER
================================================================ */
.section-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 14px; margin-bottom: 22px;
}
.section-head h2 {
    font-family: var(--font-head);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 700; color: var(--text-1);
    display: flex; align-items: center; gap: 10px;
}
.section-head h2 .section-count {
    font-size: .75rem; font-weight: 600;
    background: var(--blue-dim); color: var(--blue);
    padding: 3px 8px; border-radius: 50px;
    border: 1px solid var(--blue);
}
.section-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Filters row */
.filters-row {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 22px; align-items: center;
}
.filter-select, .search-input {
    padding: 9px 14px;
    background: var(--bg-3); color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: .88rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    outline: none;
}
.filter-select:focus, .search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}
.search-input {
    flex: 1; min-width: 200px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%238b949e' viewBox='0 0 20 20'%3E%3Cpath d='M12.9 14.32a8 8 0 1 1 1.41-1.41l4.25 4.25a1 1 0 0 1-1.42 1.42l-4.24-4.25zM14 8A6 6 0 1 0 2 8a6 6 0 0 0 12 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px;
    padding-left: 36px;
}

/* ================================================================
   CARD GRID + CARDS
================================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
    animation: cardIn .4s ease both;
}
.card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-lt);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card:nth-child(1)  { animation-delay: .05s; }
.card:nth-child(2)  { animation-delay: .10s; }
.card:nth-child(3)  { animation-delay: .15s; }
.card:nth-child(4)  { animation-delay: .20s; }
.card:nth-child(5)  { animation-delay: .25s; }
.card:nth-child(6)  { animation-delay: .30s; }
.card:nth-child(n+7){ animation-delay: .35s; }

.card-thumb {
    width: 100%; aspect-ratio: 16/9;
    background: var(--bg-2); overflow: hidden; position: relative;
}
.card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--t-slow), filter var(--t-med);
    filter: saturate(.85);
}
.card:hover .card-thumb img { transform: scale(1.08); filter: saturate(1.1); }

.card-body {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.card-title {
    font-size: 1.02rem; font-weight: 600; color: var(--text-1);
    line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.genre-badge {
    font-size: .75rem; font-weight: 500;
    background: rgba(255,255,255,.06); color: var(--text-3);
    padding: 3px 9px; border-radius: 4px;
    border: 1px solid var(--border);
}

/* Status badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .78rem; font-weight: 600;
    padding: 4px 10px; border-radius: var(--radius-sm);
    border: 1px solid transparent;
}
.badge-live {
    background: rgba(248,81,73,.15); color: var(--red);
    border-color: rgba(248,81,73,.35);
    box-shadow: 0 0 12px var(--red-glow);
}
.badge-live .dot {
    width: 7px; height: 7px;
    background: var(--red); border-radius: 50%;
    animation: pulse 1.4s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.8); }
}
.badge-upcoming {
    background: rgba(227,179,65,.1); color: var(--yellow);
    border-color: rgba(227,179,65,.25);
}
.badge-replay {
    background: rgba(34,197,94,.1); color: var(--green);
    border-color: rgba(34,197,94,.25);
}

.card-cta { margin-top: auto; }
.btn-watch {
    width: 100%;
    background: var(--blue); color: #fff;
    border: 1px solid var(--blue);
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: .9rem;
    cursor: pointer;
    transition: all var(--t-fast);
    display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-watch:hover {
    background: var(--blue-d);
    box-shadow: 0 4px 16px var(--blue-glow);
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center; padding: 56px 24px;
    background: var(--bg-2); border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-3);
}
.empty-state i { font-size: 2.8rem; margin-bottom: 14px; opacity: .4; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-2); margin-bottom: 6px; }

/* ================================================================
   WATCH PAGE
================================================================ */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 22px; align-items: flex-start;
}
.watch-main { display: flex; flex-direction: column; gap: 18px; }

.watch-card {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
}
.watch-card-inner { padding: 18px 20px; }

.stream-title-bar {
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.stream-title-bar h1 {
    font-family: var(--font-head);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 700; color: var(--text-1);
    line-height: 1.3;
}

.player-wrap {
    position: relative; width: 100%; padding-bottom: 56.25%; height: 0;
    background: #000;
}
.player-wrap iframe,
.player-wrap > div {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

.stream-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; padding: 14px 20px 16px;
    border-top: 1px solid var(--border);
}
.stream-selector-wrap { display: flex; align-items: center; gap: 8px; }
.stream-selector-wrap label { font-size: .82rem; color: var(--text-3); }
.stream-select {
    padding: 7px 12px;
    background: var(--bg-2); color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem; cursor: pointer;
}
.stream-select:focus { outline: none; border-color: var(--blue); }

.viewer-pill {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-2); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 50px;
    font-size: .82rem; color: var(--text-3);
}
.viewer-pill strong { color: var(--blue); font-size: .9rem; }

/* ================================================================
   MULTIVIEW
================================================================ */
.multiview-grid {
    display: grid;
    height: calc(100vh - var(--header-h) - 80px);
    gap: 8px;
}
.view-slot {
    position: relative; background: #000;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border); overflow: hidden;
}
.view-slot iframe, .view-slot video { width: 100%; height: 100%; border: none; }
.view-overlay {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(7,9,13,.85); backdrop-filter: blur(6px);
    border: 1px solid var(--border-lt);
    padding: 5px 10px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 7px;
    font-size: .8rem; pointer-events: none; max-width: 80%;
}
.view-overlay img { height: 20px; width: auto; border-radius: 3px; }
.view-controls {
    position: absolute; top: 8px; left: 8px; right: 8px;
    display: flex; gap: 6px; justify-content: space-between;
    align-items: flex-start;
}
.view-select {
    flex: 1; max-width: 200px;
    background: rgba(7,9,13,.85); backdrop-filter: blur(6px);
    color: var(--text-2); border: 1px solid var(--border-lt);
    padding: 5px 8px; border-radius: var(--radius-sm);
    font-size: .8rem;
}
.view-btns { display: flex; gap: 4px; }
.view-btn {
    background: rgba(7,9,13,.85); backdrop-filter: blur(6px);
    color: var(--text-3); border: 1px solid var(--border-lt);
    padding: 5px 8px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: .78rem; transition: all var(--t-fast);
}
.view-btn:hover { color: var(--text-1); background: var(--bg-4); }

/* ================================================================
   FOOTER
================================================================ */
.footer {
    background: var(--bg-3); border-top: 1px solid var(--border);
    margin-top: auto; padding: 36px 24px;
}
.footer-inner {
    max-width: 1440px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center;
    gap: 16px; text-align: center;
}
.footer-logo-text {
    font-family: var(--font-head); font-size: 1.1rem;
    font-weight: 700; color: var(--text-1);
}
.footer-brand p { font-size: .85rem; color: var(--text-3); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: .85rem; color: var(--text-3); }
.footer-links a:hover { color: var(--blue); }
.footer-disclaimer { font-size: .78rem; color: var(--text-3); max-width: 600px; }
.footer-copy { font-size: .78rem; color: var(--border-lt); }

/* ================================================================
   PRELOADER
================================================================ */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-1);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 16px;
    transition: opacity .5s;
}
#preloader p { font-size: .85rem; color: var(--text-3); }
.spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(255,255,255,.1);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
body.loaded #preloader { opacity: 0; pointer-events: none; }

/* ================================================================
   MAINTENANCE
================================================================ */
.maintenance-screen {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 40px;
    gap: 16px;
}
.maintenance-screen i { font-size: 3rem; color: var(--blue); }
.maintenance-screen h1 { font-size: 2rem; color: var(--text-1); }
.maintenance-screen p { color: var(--text-3); }

/* ================================================================
   DONATE PAGE
================================================================ */
.donate-hero { text-align: center; padding: 48px 24px 36px; }
.donate-hero h1 { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--text-1); margin-bottom: 10px; }
.donate-hero p { color: var(--text-3); max-width: 480px; margin: 0 auto; }
.donate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.donate-card {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 28px 22px;
    display: flex; flex-direction: column; gap: 14px;
}
.donate-card-header { display: flex; align-items: center; gap: 12px; }
.crypto-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.donate-card h3 { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.address-row { display: flex; gap: 6px; }
.address-input {
    flex: 1; padding: 9px 12px;
    background: var(--bg-2); color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: .78rem;
    font-family: monospace; cursor: text;
}
.btn-copy-addr { white-space: nowrap; }
.qr-box { display: flex; justify-content: center; }
.qr-box canvas, .qr-box img { border-radius: var(--radius-sm); }

/* ================================================================
   404
================================================================ */
.not-found {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 60px 24px;
}
.not-found .err-code {
    font-family: var(--font-head); font-size: 8rem; font-weight: 800;
    color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text; background-clip: text;
    line-height: 1;
}
.not-found h2 { font-size: 1.4rem; color: var(--text-1); margin: 12px 0 8px; }
.not-found p { color: var(--text-3); margin-bottom: 24px; }

/* ================================================================
   ADMIN PANEL
================================================================ */
.admin-body {
    background: var(--bg-0);
    background-image: none;
}
.admin-layout {
    display: flex; min-height: 100vh;
}
.admin-sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--bg-3); border-right: 1px solid var(--border);
    padding: 24px 0; position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.sidebar-brand span { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--text-1); }
.sidebar-brand small { display: block; font-size: .75rem; color: var(--purple); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 500; color: var(--text-3);
    transition: all var(--t-fast);
}
.sidebar-link:hover, .sidebar-link.active {
    background: var(--blue-dim); color: var(--blue);
}
.sidebar-link i { width: 18px; text-align: center; }

.admin-content { flex: 1; padding: 32px; overflow: auto; }
.admin-page-title {
    font-family: var(--font-head);
    font-size: 1.6rem; font-weight: 700; color: var(--text-1);
    margin-bottom: 6px;
}
.admin-page-sub { font-size: .88rem; color: var(--text-3); margin-bottom: 28px; }

/* Admin stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 20px;
    display: flex; flex-direction: column; gap: 8px;
}
.stat-card .stat-label { font-size: .78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.stat-card .stat-value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--text-1); }
.stat-card .stat-icon { font-size: 1.3rem; color: var(--blue); }

/* Admin table */
.admin-table-wrap { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.admin-table-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.admin-table-head h3 { font-size: 1rem; font-weight: 600; color: var(--text-1); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 11px 16px; font-size: .78rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: .88rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-table .thumb { width: 48px; height: 30px; object-fit: cover; border-radius: 4px; background: var(--bg-2); }
.admin-table .item-name { font-weight: 500; color: var(--text-1); }
.admin-table .item-sub { font-size: .78rem; color: var(--text-3); }
.table-actions { display: flex; gap: 6px; }

/* Admin form */
.admin-form { background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; max-width: 700px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group label { font-size: .83rem; font-weight: 600; color: var(--text-2); }
.form-control {
    padding: 10px 14px;
    background: var(--bg-2); color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: .9rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.form-control-sm { padding: 7px 10px; font-size: .82rem; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.stream-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.stream-row input { flex: 1; }

.form-help { font-size: .78rem; color: var(--text-3); }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 8px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 20px; border: 1px solid; }
.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: var(--green); }
.alert-error   { background: rgba(248,81,73,.1); border-color: rgba(248,81,73,.3); color: var(--red); }
.alert-info    { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }

/* Admin login */
.admin-login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg-0); padding: 24px;
}
.admin-login-card {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 40px 36px;
    width: 100%; max-width: 380px;
    box-shadow: var(--shadow-lg);
}
.admin-login-card h1 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.admin-login-card p { color: var(--text-3); font-size: .88rem; margin-bottom: 24px; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1100px) {
    .watch-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; }
    .sidebar-nav { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
    .admin-content { padding: 20px 16px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav {
        position: fixed;
        top: var(--header-h); left: 0; right: 0;
        background: rgba(10,12,16,.98); backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column; align-items: stretch;
        padding: 12px 16px 20px; gap: 4px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 32px rgba(0,0,0,.5);
        /* hidden by default */
        max-height: 0; overflow: hidden;
        padding-top: 0; padding-bottom: 0;
        transition: max-height .3s ease, padding .3s ease;
        z-index: 999;
        pointer-events: none;
    }
    .header.nav-open .nav {
        max-height: 400px;
        padding: 12px 16px 20px;
        pointer-events: auto;
    }
    .nav-link, .btn-discord { text-align: center; justify-content: center; padding: 13px; }
    .category-grid { grid-template-columns: 1fr; max-width: 400px; }
    .form-row { grid-template-columns: 1fr; }
    .filters-row { flex-direction: column; }
    .search-input { max-width: 100%; }
}

@media (max-width: 480px) {
    .container { padding: 20px 0; width: 97%; }
    .card-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
    .not-found .err-code { font-size: 5rem; }
}