/* ============================================================
   Galaxeel — Design System (Drameeo-inspired dark purple)
   ============================================================ */
:root {
  --bg: #0F0B16;
  --bg-2: #141019;
  --sidebar: #1A1421;
  --surface: #1E1727;
  --surface-2: #251C31;
  --surface-3: #2C223B;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #F5F3FF;
  --muted: #9CA3AF;
  --muted-2: #6B7280;
  --accent: #8B5CF6;
  --accent-2: #EC4899;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --grad: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(139,92,246,.25), rgba(236,72,153,.25));
  --danger: #EF4444;
  --success: #10B981;
  --warning: #F59E0B;
  --star: #FBBF24;
  --pill: rgba(255, 255, 255, 0.13);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --sidebar-w: 264px;
  --sidebar-w-c: 84px;
  --topbar-h: 74px;
  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
html[data-theme="light"] {
  --bg: #F6F4FA;
  --bg-2: #FFFFFF;
  --sidebar: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F1EDF8;
  --surface-3: #E9E2F5;
  --border: rgba(26, 20, 33, 0.09);
  --border-2: rgba(26, 20, 33, 0.16);
  --text: #1A1421;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --pill: rgba(26, 20, 33, 0.07);
  --shadow: 0 18px 40px -18px rgba(76, 29, 149, 0.18);
  --shadow-card: 0 10px 28px -14px rgba(76, 29, 149, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
  min-height: 100vh;
}
body.modal-open, body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex{display:flex;gap:12px;align-items:center}
.flex-between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wrap{flex-wrap:wrap}
.grow{flex:1}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}

/* ============ App shell ============ */
.app { min-height: 100vh; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .28s ease; }
body.sb-collapsed .main { margin-left: var(--sidebar-w-c); }
.main-inner { flex: 1; padding: 0 28px 48px; width: 100%; max-width: 1600px; margin: 0 auto; }

/* ============ Sidebar ============ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 90;
  background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 16px;
  transition: width .28s ease, transform .3s ease;
}
body.sb-collapsed .sidebar { width: var(--sidebar-w-c); }
.sb-logo { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.sb-logo .logo-ic {
  width: 42px; height: 42px; border-radius: 14px; background: var(--grad);
  display: grid; place-items: center; color: #fff; flex: 0 0 auto; font-size: 20px;
  box-shadow: 0 8px 20px -6px rgba(139, 92, 246, .55);
  overflow: hidden;
}
.sb-logo .logo-ic img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.sb-logo .logo-tx { font-size: 21px; font-weight: 800; letter-spacing: .2px; }
.sb-logo .logo-tx span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sb-toggle { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.sb-toggle:hover { background: var(--pill); color: var(--text); }
.sb-collapse-btn { position: absolute; right: -14px; top: 88px; width: 28px; height: 28px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); display: grid; place-items: center; z-index: 95; }
.sb-collapse-btn:hover { color: var(--text); border-color: var(--accent); }

.sb-scroll { overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -6px; padding: 0 6px; }
.sb-label { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted-2); margin: 18px 12px 8px; white-space: nowrap; }
.sb-label i { font-size: 15px; opacity: .85; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; }
.sb-item {
  display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 14px;
  color: var(--muted); font-size: 14.5px; font-weight: 500; white-space: nowrap;
  transition: background .18s, color .18s; position: relative;
}
.sb-item i { font-size: 21px; flex: 0 0 auto; }
.sb-item:hover { background: var(--pill); color: var(--text); }
.sb-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.sb-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 22px; border-radius: 99px; background: var(--grad); }
.sb-item .nav-badge { margin-left: auto; background: var(--grad); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-top: 1px solid var(--border); margin-top: 10px; }
.sb-user .avatar { width: 40px; height: 40px; font-size: 15px; }
.sb-user .nm { font-weight: 700; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user .rl { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }

body.sb-collapsed .sb-logo .logo-tx, body.sb-collapsed .sb-item span.tx,
body.sb-collapsed .sb-label, body.sb-collapsed .sb-user .u-info,
body.sb-collapsed .sb-item .nav-badge { display: none; }
body.sb-collapsed .sb-item { justify-content: center; padding: 11px 0; }
body.sb-collapsed .sb-user { justify-content: center; }
.sb-backdrop { display: none; }

/* ============ Avatar ============ */
.avatar {
  width: 44px; height: 44px; border-radius: 50% !important; object-fit: cover; flex: 0 0 auto;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 16px; overflow: hidden; border: 2px solid var(--border-2);
}
img.avatar { aspect-ratio: 1 / 1; } /* profile photos are ALWAYS perfect circles */

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 80; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.hamburger { display: none; width: 42px; height: 42px; border-radius: 12px; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.search-wrap { position: relative; flex: 1 1 260px; min-width: 0; max-width: 520px; width: auto; }
.search-box input { min-width: 0; }
.search-box {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 99px; padding: 11px 18px; color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box input { background: none; border: none; outline: none; width: 100%; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box kbd { font-family: inherit; font-size: 11px; background: var(--pill); border-radius: 6px; padding: 2px 8px; color: var(--muted); border: 1px solid var(--border); }
.search-pop {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow);
  overflow: hidden; display: none; z-index: 99;
}
.search-pop.open { display: block; animation: pop .18s ease; }
.search-pop .sp-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.search-pop .sp-item:hover { background: var(--pill); }
.search-pop .sp-item img { width: 38px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.search-pop .sp-item .t { font-weight: 600; font-size: 14px; }
.search-pop .sp-item .m { font-size: 12px; color: var(--muted); }
.search-pop .sp-none { padding: 18px; color: var(--muted); text-align: center; font-size: 13.5px; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.top-actions .btn { flex-shrink: 0; white-space: nowrap; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 99px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 20px;
  transition: border-color .2s, transform .2s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
}
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.92); }
.drop-close { display: none; width: 34px; height: 34px; border-radius: 10px; place-items: center; color: var(--muted); background: var(--pill); }
.drop-close:hover { color: var(--text); background: var(--surface-3); }
.u-sheet-head { display: none; }
.dot-badge {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; background: var(--grad); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--bg); animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(236,72,153,.5); } 50% { box-shadow: 0 0 0 6px rgba(236,72,153,0); } }

/* Notifications panel */
.drop {
  position: absolute; top: calc(100% + 12px); right: 0; width: min(400px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px;
  box-shadow: var(--shadow); overflow: hidden; display: none; z-index: 120;
}
/* Portaled dropdowns use JS-set fixed coordinates (escapes any filtered ancestor) */
.drop[data-portaled] { position: fixed; }
.drop-list { overscroll-behavior: contain; }
.drop.open { display: block; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.drop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drop-head h4 { font-size: 15px; }
.mark-read { font-size: 12.5px; color: var(--accent); font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.mark-read:hover { background: var(--accent-soft); }
.drop-list { max-height: 420px; overflow-y: auto; }
.n-item { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.n-item:hover { background: var(--pill); }
.n-item.unread { background: var(--accent-soft); }
.n-item:last-child { border-bottom: none; }
.n-ic { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; font-size: 18px; color: #fff; }
.n-item .nt { font-size: 13.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.n-item .nb { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.n-item .nm { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.n-empty { padding: 38px 20px; text-align: center; color: var(--muted); }
.n-empty i { font-size: 40px; opacity: .4; }

/* User dropdown */
.user-drop { position: relative; }
.u-menu { right: 0; width: 240px; }
.u-menu .n-item { cursor: pointer; border: none; border-radius: 12px; margin: 2px 8px; padding: 10px 12px; font-size: 14.5px; line-height: 1.35; }
/* Icon: fixed square, grid-centered — always matches label height */
.u-menu .n-item i {
  width: 22px; height: 22px; font-size: 20px; line-height: 1;
  display: inline-grid; place-items: center; flex: 0 0 auto; text-align: center;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 24px; border-radius: 99px; font-weight: 700; font-size: 14.5px;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, opacity .18s;
  border: 1px solid transparent; line-height: 1.2;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -10px rgba(139, 92, 246, .6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(139, 92, 246, .7); }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-soft { background: var(--pill); color: var(--text); }
.btn-soft:hover { background: var(--accent-soft); }
.btn-danger { background: rgba(239, 68, 68, .14); color: #F87171; border-color: rgba(239, 68, 68, .3); }
.btn-danger:hover { background: #EF4444; color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 15.5px; }
.btn-icon { width: 48px; height: 48px; border-radius: 99px; padding: 0; }
.btn-icon.btn-sm { width: 38px; height: 38px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: var(--pill); color: var(--text); }
.badge-primary { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: rgba(16,185,129,.14); color: #34D399; }
.badge-danger { background: rgba(239,68,68,.14); color: #F87171; }
.badge-warning { background: rgba(245,158,11,.14); color: #FBBF24; }
.badge-grad { background: var(--grad); color: #fff; }

/* ============ Hero slider ============ */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; margin-top: 24px; box-shadow: var(--shadow); }
.hero .swiper { width: 100%; }
.hero-slide { position: relative; aspect-ratio: 21 / 9; max-height: 500px; min-height: 420px; }
.hero-slide img.bg { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,6,16,.94) 0%, rgba(10,6,16,.72) 34%, rgba(10,6,16,.18) 62%, rgba(10,6,16,.45) 100%); }
html[data-theme="light"] .hero-slide::after { background: linear-gradient(90deg, rgba(10,6,16,.86) 0%, rgba(10,6,16,.6) 34%, rgba(10,6,16,.1) 62%, rgba(10,6,16,.35) 100%); }
.hero-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 48px 56px; max-width: 640px; }
.hero-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; background: var(--pill); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 99px; animation: fadeUp .5s ease both .1s; }
.hero-genres { display: flex; gap: 8px; animation: fadeUp .5s ease both .18s; }
.hero-genres span { font-size: 12px; font-weight: 600; color: #EDE9FE; background: var(--pill); border: 1px solid rgba(255,255,255,.18); padding: 5px 13px; border-radius: 99px; backdrop-filter: blur(6px); }
.hero-title { font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; color: #fff; line-height: 1.12; animation: fadeUp .5s ease both .26s; text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.hero-desc { font-size: 14.5px; color: rgba(237, 233, 254, .88); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; animation: fadeUp .5s ease both .34s; }
.hero-actions { display: flex; gap: 12px; margin-top: 6px; animation: fadeUp .5s ease both .42s; }
/* Hero buttons (screenshot design): solid-purple rounded-square CTA +
   translucent square icon siblings — one uniform height for the whole row */
.hero-actions .btn { height: 50px; border-radius: 14px; padding: 0 28px; }
.hero-actions .btn-primary {
  background: var(--grad);
  box-shadow: 0 14px 28px -10px rgba(139, 92, 246, .75);
}
.hero-actions .btn-primary:hover { background: var(--grad); filter: brightness(1.12); box-shadow: 0 18px 34px -10px rgba(139, 92, 246, .85); }
.hero-actions .btn-icon, .hero-actions .wl-btn {
  width: 50px; height: 50px; padding: 0; flex: 0 0 auto; font-size: 19px;
  border-radius: 14px; color: #fff;
  background: rgba(10, 6, 16, .5);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-actions .wl-btn {
  position: static; opacity: 1; transform: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.hero-actions .wl-btn:hover { background: var(--accent); border-color: transparent; color: #fff; }
.hero-actions .wl-btn.active { color: var(--accent-2); background: rgba(10, 6, 16, .5); }
.hero-meta { display: flex; gap: 8px; align-items: center; color: #EDE9FE; font-size: 13px; animation: fadeUp .5s ease both .3s; }
.hero-meta .star { color: var(--star); }
.hero .hero-dots { position: absolute; right: 26px; bottom: 22px; z-index: 5; display: flex; gap: 7px; }
.hero-dots .hd { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.4); cursor: pointer; transition: all .25s; }
.hero-dots .hd.active { width: 26px; background: #fff; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ============ Sections & rows ============ */
.section { margin-top: 40px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(18px, 2vw, 23px); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sec-head .see-all { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--pill); padding: 8px 16px; border-radius: 99px; transition: all .2s; }
.sec-head .see-all:hover { color: var(--accent); background: var(--accent-soft); }

/* Horizontal slider rows (screenshot design) — fixed-width slides, last one
   peeks past the row's edge. rg-wide = continue-watching, rg-ch = channels. */
/* Horizontal slider rows (screenshot design) — fixed-width slides, last one
   peeks past the row's edge. rg-wide = continue-watching, rg-ch = channels. */
.rowswiper { overflow: hidden; padding: 10px 2px 14px; }
.rowswiper .swiper-slide { width: auto !important; }
.rowswiper .card { width: 186px; }
.rowswiper.rg-wide .swiper-slide { width: 312px !important; }
.rowswiper.rg-ch .swiper-slide { width: 264px !important; }
.rowswiper .rcard-wrap { width: 100%; }
/* Slider channel cards: one fixed box for every card — logo 64px + 22px padding */
.rowswiper .channel-card { width: 100%; height: 108px; }

/* Poster card */
.card { width: 186px; position: relative; display: block; }
.card-media { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 2 / 3; background: var(--surface-2); box-shadow: var(--shadow-card); transition: transform .25s ease, box-shadow .25s ease; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media { transform: translateY(-6px); box-shadow: 0 18px 34px -12px rgba(139, 92, 246, .4); }
.card:hover .card-media img { transform: scale(1.07); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.75) 100%); opacity: 0; transition: opacity .25s; display: flex; align-items: center; justify-content: center; }
.card:hover .card-overlay { opacity: 1; }
.card-play { width: 52px; height: 52px; border-radius: 99px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 22px; transform: scale(.7); transition: transform .25s; box-shadow: 0 10px 22px -6px rgba(139,92,246,.65); }
.card:hover .card-play { transform: scale(1); }
.card-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; z-index: 2; }
.chip-rate { display: inline-flex; gap: 4px; align-items: center; background: rgba(10,6,16,.65); backdrop-filter: blur(8px); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.chip-rate .star { color: var(--star); }
.chip-type { background: rgba(10,6,16,.65); backdrop-filter: blur(8px); color: #fff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 9px; border-radius: 99px; }
.wl-btn { position: absolute; bottom: 10px; right: 10px; width: 36px; height: 36px; border-radius: 99px; background: rgba(10,6,16,.65); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; opacity: 0; transform: translateY(6px); transition: all .22s; z-index: 3; }
.card:hover .wl-btn, .wl-btn.active { opacity: 1; transform: none; }
.wl-btn.active { color: var(--accent-2); }
.wl-btn:hover { background: var(--accent); }
.card-body { padding: 11px 4px 0; }
.card-body h3 { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body p { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Series status chip on poster thumbnails */
.card-series-status {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .4px; text-transform: uppercase;
  background: rgba(10,6,16,.68); backdrop-filter: blur(8px); color: #fff;
}
.card-series-status i { font-size: 12px; }
.card-series-status.ongoing { color: #34D399; }
.card-series-status.complete { color: #A5B4FC; }
.card:hover .card-series-status { background: rgba(10,6,16,.82); }

/* Resume / continue watching card — info overlaid on the artwork (screenshot design) */
.rcard-wrap { position: relative; }
.rcard { width: 100%; display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-card); transition: transform .25s ease, box-shadow .25s ease; }
.rcard:hover { transform: translateY(-5px); box-shadow: 0 18px 34px -12px rgba(139, 92, 246, .4); }
.rcard img { width: 100%; height: 100%; object-fit: cover; }
.rc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,16,.05) 28%, rgba(10,6,16,.42) 60%, rgba(10,6,16,.9) 100%); }
.rc-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 99px; background: rgba(10,6,16,.55); backdrop-filter: blur(6px); border: 1.5px solid rgba(255,255,255,.35); display: grid; place-items: center; color: #fff; font-size: 22px; z-index: 2; opacity: 0; transform: scale(.75); transition: all .25s; }
.rcard:hover .rc-play { opacity: 1; transform: scale(1); background: var(--grad); border-color: transparent; }
.rc-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 16px 18px; }
.rc-info h3 { font-size: 15.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.rc-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 12px; color: rgba(237,233,254,.78); }
.rc-meta span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Progress flush along the card's bottom edge, track visible over the artwork */
.rc-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 4px; margin: 0; border-radius: 0; background: rgba(255,255,255,.22); }
.rc-progress > span { border-radius: 0; }
/* Remove floats above the artwork, top-right — hover-reveal on pointer, always on touch */
.rc-remove {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center;
  color: #fff; background: rgba(10,6,16,.62); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s, color .15s, background .15s;
}
.rcard-wrap:hover .rc-remove { opacity: 1; }
@media (hover: none) { .rcard-wrap .rc-remove { opacity: 1; } }
.rc-remove:hover { color: #F87171; background: rgba(10,6,16,.85); }
.progress { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 11px; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .4s ease; }

/* Genre chips */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 9px 18px; border-radius: 99px; transition: all .2s; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
/* Radio chips (Requests type picker): hidden native dot, palette-colored active state */
.chip-radio { position: relative; cursor: pointer; user-select: none; transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s; }
.chip-radio input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.chip-radio:active { transform: scale(.97); }
.chip-radio.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 10px 22px -10px rgba(139, 92, 246, .65);
}
.chip-radio.active i { color: #fff; }
.chip-radio input[type="radio"]:focus-visible + * { outline: none; }
.chip-radio:has(input:focus-visible) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ============ Page headers ============ */
.page-head { margin: 30px 0 22px; }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 6px; }

/* ============ Detail page (full-bleed TMDb backdrop) ============ */
.page-bg {
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg) center 18% / cover no-repeat;
}
body.has-page-bg { background: transparent; }
.page-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,11,22,.38) 0%, rgba(15,11,22,.62) 32%, rgba(15,11,22,.88) 58%, var(--bg) 84%);
}
html[data-theme="light"] .page-bg::after {
  background: linear-gradient(180deg, rgba(15,11,22,.46) 0%, rgba(15,11,22,.68) 32%, rgba(15,11,22,.9) 58%, var(--bg) 84%);
}
.detail-hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: clamp(440px, 74vh, 680px);
  margin: 0 -28px; padding: 96px 28px 34px;
}
.detail-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,6,16,.62) 0%, rgba(10,6,16,.28) 45%, transparent 72%);
}
.detail-wrap { position: relative; z-index: 2; display: flex; gap: 32px; padding: 0; width: 100%; align-items: flex-end; }
.detail-poster { width: 230px; flex: 0 0 auto; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border-2); aspect-ratio: 2/3; background: var(--surface-2); }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-size: clamp(26px, 3.4vw, 42px); color: #fff; font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 12px; color: #EDE9FE; font-size: 14px; }
.detail-meta .star { color: var(--star); }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.detail-actions .btn { flex: 0 1 auto; }
.detail-actions .btn-lg { white-space: nowrap; }
/* Favourite = square icon button that matches btn-lg height */
.btn-fav {
  flex: 0 0 auto; width: 54px; height: 54px; padding: 0; aspect-ratio: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 99px; font-size: 22px;
}
.btn-fav.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 12px 26px -10px rgba(236,72,153,.55); }
.btn-fav.wl-btn { position: static; opacity: 1; transform: none; }
.btn-fav.wl-btn:hover { opacity: 1; transform: none; }
.btn-fav i { font-size: 24px; }
/* Compact favourite (watch page): same pill size as the sibling Details btn-sm */
.btn-sm.btn-fav { width: auto; height: auto; padding: 8px 16px; font-size: 13px; }
.btn-sm.btn-fav i { font-size: 17px; }

.cast-strip { display: flex; gap: 22px; overflow-x: auto; padding: 6px 2px 14px; }
.cast-card { flex: 0 0 auto; text-align: center; width: 96px; }
.cast-card .cc-photo { width: 88px; height: 88px; aspect-ratio: 1; margin: 0 auto; border-radius: 99px; object-fit: cover; object-position: center 25%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; overflow: hidden; border: 3px solid var(--surface-3); transition: border-color .2s, transform .2s; }
.cast-card .cc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; border-radius: 99px; }
.cast-card:hover .cc-photo { border-color: var(--accent); transform: translateY(-3px); }
.cast-card .cc-nm { font-size: 13px; font-weight: 700; margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-card .cc-ch { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Player ============ */
.watch-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; margin-top: 24px; align-items: start; }
.player-box { border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--border-2); box-shadow: var(--shadow); aspect-ratio: 16 / 9; position: relative; }
.player-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; gap: 10px; }
.src-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 4px; }
.src-pill { font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border-2); color: var(--muted); transition: all .2s; }
.src-pill:hover { color: var(--text); border-color: var(--accent); }
.src-pill.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(139,92,246,.6); }
.ep-list { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.ep-item { display: flex; gap: 14px; padding: 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); transition: all .2s; }
.ep-item:hover { border-color: var(--accent); }
.ep-item.now { border-color: var(--accent); background: var(--accent-soft); }
.ep-item img, .ep-thumb { width: 112px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.ep-num { font-size: 11.5px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .6px; }
.ep-item .t { font-size: 14px; font-weight: 700; margin-top: 2px; line-height: 1.3; }
.ep-item .o { font-size: 12px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.season-select { width: 100%; }

/* ============ Episode list — title detail page ============ */
.epv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow-card); }
.epv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.epv-title { font-size: 15px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.epv-title i { color: var(--muted-2); font-size: 17px; }
.season-pill { position: relative; flex: 0 0 auto; }
.season-pill select { appearance: none; -webkit-appearance: none; -moz-appearance: none; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; padding: 9px 38px 9px 18px; border-radius: 999px; cursor: pointer; transition: border-color .2s, background .2s; }
.season-pill select:hover { background: var(--surface-3); }
.season-pill select:focus { outline: none; border-color: var(--accent); }
.season-pill .ph-caret-down { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.epv-list { display: flex; flex-direction: column; gap: 20px; }
.epv-row { display: flex; align-items: center; gap: 16px; padding: 4px 6px; border-radius: var(--r-sm); text-decoration: none; transition: background .2s; }
.epv-row:hover { background: rgba(255, 255, 255, .035); }
.epv-thumb { width: 66px; height: 66px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.epv-body { flex: 1; min-width: 0; }
.epv-t { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epv-o { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.epv-play { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-size: 15px; border: 1.5px solid var(--border-2); transition: all .2s; }
.epv-play i { transform: translateX(1px); }
.epv-row:hover .epv-play { color: #fff; background: var(--accent); border-color: var(--accent); transform: scale(1.06); box-shadow: 0 8px 20px -8px rgba(139, 92, 246, .7); }
.epv-row.watched .epv-play { color: var(--accent); border-color: rgba(139, 92, 246, .45); }
.epv-row.watched:hover .epv-play { color: #fff; }
@media (max-width: 640px) {
  .epv-card { padding: 16px; }
  .epv-head { margin-bottom: 14px; }
  .epv-list { gap: 15px; }
  .epv-row { gap: 12px; padding: 2px; }
  .epv-thumb { width: 58px; height: 58px; }
  .epv-play { width: 34px; height: 34px; font-size: 13px; }
}

/* ============ Forms ============ */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-card); min-width: 0; }
.panel > * { min-width: 0; }
code { word-break: break-all; overflow-wrap: anywhere; font-size: .92em; }
.hint { overflow-wrap: anywhere; }
.alert span { overflow-wrap: anywhere; }

/* Episodes modal: Season / Episode / Fetch row */
.ep-fetch-row { display: flex; align-items: flex-end; gap: 0 14px; flex-wrap: wrap; }
.ep-fetch-field { margin-top: 16px; flex: 1 1 110px; min-width: 0; }
.ep-fetch-btn { flex: 0 0 auto; margin-bottom: 1px; white-space: nowrap; }
@media (max-width: 640px) {
  .ep-fetch-row { gap: 10px; }
  .ep-fetch-field { margin-top: 14px; flex: 1 1 calc(50% - 5px); }
  .ep-fetch-btn { flex: 1 1 100%; justify-content: center; }
}
.panel + .panel { margin-top: 22px; }
.panel h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  padding: 12px 15px; font-size: 14.5px; color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder { color: var(--muted-2); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }
select.input { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 256 256'%3E%3Cpath fill='%239CA3AF' d='M128 184 44 96h168z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-sm); font-size: 13.5px; margin: 14px 0; border: 1px solid; }
.alert i { font-size: 19px; margin-top: 1px; }
.alert-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: #34D399; }
.alert-error { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #F87171; }
.alert-info { background: var(--accent-soft); border-color: rgba(139,92,246,.3); color: var(--accent); }

/* ============ Tables (admin) ============ */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--pill); }
.table .t-thumb { width: 56px; height: 84px; aspect-ratio: 2 / 3; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: block; transform: translateZ(0); } /* 2:3 poster ratio — block+GPU hint: fixes iOS paint bug in scrollable tables */
.td-thumb { width: 66px; min-width: 66px; white-space: nowrap; } /* fixed column — never collapses on narrow screens */
.c-modal-side img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; } /* poster preview in the add/edit modal */
.row-actions { display: flex; gap: 6px; }
.act-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: var(--pill); font-size: 17px; transition: all .18s; }
.act-btn:hover { color: var(--text); background: var(--surface-3); }
.act-btn.danger:hover { color: #F87171; background: rgba(239,68,68,.15); }
.act-btn.ok:hover { color: #34D399; background: rgba(16,185,129,.15); }

/* Stats cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; display: flex; gap: 16px; align-items: center; transition: transform .2s, border-color .2s; }
.stat:hover { transform: translateY(-3px); border-color: var(--accent); }
.stat .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; color: #fff; flex: 0 0 auto; }
.stat .v { font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--muted); }

/* ============ Comments (composer + threaded discussion) ============ */
/* Header: "Comments [n]" + sort pill */
.cmt-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cmt-header .cmt-title { font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmt-header .cmt-title i { color: var(--accent); }
.cmt-header .cmt-title .badge-primary { background: var(--accent); color: #fff; }
.cmt-sort-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 99px; padding: 8px 14px; color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; }
.cmt-sort-pill:hover { border-color: var(--accent); color: var(--accent); }
.cmt-sort-pill select { appearance: none; -webkit-appearance: none; background: none; border: none; outline: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; }
.cmt-sort-pill select option { background: var(--surface); color: var(--text); }

/* Composer card: avatar outside, elevated rounded card with toolbar + Post pill */
.cmt-composer { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.cmt-composer-card { position: relative; flex: 1; min-width: 0; display: block; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r-md); padding: 14px 16px 12px; box-shadow: var(--shadow-card); transition: border-color .2s, box-shadow .2s; }
.cmt-composer-card:focus-within { border-color: var(--accent); box-shadow: var(--shadow-card), 0 0 0 4px var(--accent-soft); }
.cmt-composer-card > textarea.input { background: none; border: none; box-shadow: none; width: 100%; min-height: 52px; padding: 2px; resize: vertical; }
.cmt-composer-card > textarea.input:focus { box-shadow: none; }
.cmt-composer.guest .cmt-composer-card { text-decoration: none; }
.cmt-guest-text { display: block; font-size: 14px; color: var(--muted-2); padding: 14px 2px 4px; min-height: 52px; }
.cmt-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.cmt-tools { position: relative; display: flex; align-items: center; gap: 6px; }
.cmt-tool { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: none; border: 1px solid var(--border-2); color: var(--muted); font-size: 17px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cmt-tool:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cmt-post-btn { margin-left: auto; border-radius: 99px; padding: 9px 24px; font-weight: 700; }

/* Emoji picker popup (anchored above the composer toolbar) */
.emoji-pop { display: none; position: absolute; bottom: calc(100% + 12px); left: 0; width: min(308px, calc(100vw - 60px)); background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; z-index: 60; }
.emoji-pop.open { display: block; animation: pop .18s ease; }
.emoji-pop .ep-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); margin-bottom: 8px; }
.emoji-pop .ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 184px; overflow-y: auto; }
.emoji-pop .ep-grid button { font-size: 20px; padding: 6px 0; background: none; border: none; border-radius: 9px; cursor: pointer; transition: background .15s, transform .15s; }
.emoji-pop .ep-grid button:hover { background: var(--pill); transform: scale(1.18); }

/* Comment list */
.cmt-list { margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--border); min-width: 0; }
.cmt-empty { text-align: center; padding: 44px 16px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.cmt-empty i { font-size: 42px; opacity: .4; display: block; margin-bottom: 12px; color: var(--accent); }
.comment-thread { padding: 0 0 28px; min-width: 0; }
.comment-thread:last-child { padding-bottom: 4px; }
.comment-thread.collapsed .replies { display: none; }
.comment { display: flex; gap: 14px; min-width: 0; }
.comment > .avatar { flex: 0 0 auto; }
.avatar.av-sm { width: 38px; height: 38px; font-size: 14px; }
.cmt-main { flex: 1; min-width: 0; }
.cmt-toprow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.cmt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cmt-head .nm { font-weight: 700; font-size: 14.5px; }
.cmt-head .tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }
.cmt-head .tm { font-size: 12px; color: var(--muted-2); }

/* "..." overflow menu */
.cmt-menu { position: relative; flex: 0 0 auto; }
.cmt-menu-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: none; border: none; color: var(--muted-2); font-size: 18px; cursor: pointer; transition: background .15s, color .15s; }
.cmt-menu-btn:hover, .cmt-menu.open .cmt-menu-btn { background: var(--pill); color: var(--text); }
.cmt-menu-drop { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 70; }
.cmt-menu-drop.open { display: block; animation: pop .18s ease; }
.cmt-menu-drop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--text); font-family: inherit; font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.cmt-menu-drop button i { font-size: 16px; }
.cmt-menu-drop button:hover { background: var(--accent-soft); color: var(--accent); }
.cmt-menu-drop button.danger:hover { background: rgba(239, 68, 68, .12); color: var(--danger); }

.cmt-text { margin-top: 5px; font-size: 14px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }

/* Rich comment bodies: auto links, inline images, @mention chips, spoiler boxes */
.cmt-text a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 2px; overflow-wrap: anywhere; }
.cmt-text a:hover { text-decoration-color: var(--accent); }
.cmt-text .cmt-img { display: block; width: auto; max-width: min(340px, 100%); max-height: 280px; border-radius: 12px; border: 1px solid var(--border-2); margin: 8px 0 2px; object-fit: cover; }
.cmt-mention { color: var(--accent); font-weight: 700; }
/* Spoiler chip — compact rounded pill, blurred text behind an icon + label overlay */
.cmt-spoiler {
  position: relative; display: inline-block; vertical-align: top; max-width: 100%;
  min-width: 122px; min-height: 48px; padding: 10px 20px;
  border-radius: 14px; background: var(--surface-3);
  border: 1px solid var(--border-2); overflow: hidden; cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .25s ease;
}
.cmt-sp-body { filter: blur(7px); opacity: .5; transition: filter .3s ease, opacity .3s ease; pointer-events: none; }
.cmt-sp-tag {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent); user-select: none; white-space: nowrap;
  background: linear-gradient(135deg, rgba(139, 92, 246, .12), rgba(236, 72, 153, .08));
}
.cmt-sp-tag i { font-size: 14px; transition: transform .2s ease; }
.cmt-spoiler:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cmt-spoiler:hover .cmt-sp-tag i { transform: scale(1.15); }
.cmt-spoiler.revealed { background: var(--accent-soft); border-color: transparent; }
.cmt-spoiler.revealed .cmt-sp-body { filter: none; opacity: 1; pointer-events: auto; }
.cmt-spoiler.revealed .cmt-sp-tag { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.cmt-spoiler:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Action row: purple like · gray dislike · "Reply (2) ▾" composite control */
.cmt-actions { margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.cmt-actions button { font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; background: none; border: none; padding: 4px 8px; margin: -4px -8px; border-radius: 9px; cursor: pointer; transition: color .15s, background .15s; }
.cmt-actions button:hover { color: var(--accent); background: var(--accent-soft); }
.cmt-actions .vote-btn.like { color: var(--accent); }
.cmt-actions .vote-btn.dislike.active { color: var(--danger); }
.cmt-actions .vote-btn.dislike:hover { color: var(--danger); background: rgba(239, 68, 68, .1); }
.cmt-actions .vote-btn .vc:empty { display: none; }
.cmt-reply-group { display: inline-flex; align-items: center; }
.cmt-actions .cmt-reply-btn { color: var(--accent); }
.cmt-actions .cmt-reply-group .cmt-reply-btn { margin-right: -10px; border-radius: 9px 4px 4px 9px; }
.cmt-actions .cmt-reply-group .cmt-toggle-replies { color: var(--accent); margin-left: -2px; gap: 5px; border-radius: 4px 9px 9px 4px; }
.cmt-actions .cmt-reply-group .cmt-toggle-replies i { font-size: 13px; transition: transform .2s; }
.comment-thread.collapsed .cmt-toggle-replies i { transform: rotate(-90deg); }

/* Reply rail: rounded elbow connector hanging from the parent's avatar gutter into each reply.
   Every descendant stays in this one rail, so deep discussions never drift off-screen. */
.replies { position: relative; margin: 4px 0 0 8px; padding-left: 30px; min-width: 0; }
.replies .comment { position: relative; padding: 14px 0 0; }
.replies .comment::before { content: ''; position: absolute; left: -20px; top: -14px; width: 18px; height: 47px; border-left: 2px solid var(--border-2); border-bottom: 2px solid var(--border-2); border-bottom-left-radius: 12px; }

/* Inline reply form */
.reply-form { margin: 12px 0 0; display: none; max-width: 100%; }
.reply-form.open { display: block; animation: pop .2s ease; }
.reply-form-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.reply-form-row .input { flex: 1 1 auto; min-width: 0; min-height: 56px; border-radius: 14px; background: var(--surface-2); }
.reply-form-row .btn { flex: 0 0 auto; margin-top: 2px; border-radius: 99px; }

/* Comments on small screens: tighter gutters, slimmer thread rail */
@media (max-width: 640px) {
  .cmt-composer { gap: 10px; }
  .cmt-composer > .avatar { width: 38px; height: 38px; font-size: 14px; }
  .cmt-composer-card { padding: 12px 12px 10px; }
  .cmt-toolbar { gap: 5px; }
  .cmt-tool { width: 32px; height: 32px; font-size: 16px; }
  .cmt-post-btn { padding: 8px 18px; }
  .comment { gap: 10px; }
  .avatar.av-sm { width: 32px; height: 32px; font-size: 12px; }
  .replies { margin-left: 2px; padding-left: 20px; }
  .replies .comment::before { left: -16px; width: 15px; top: -12px; height: 42px; }
  .cmt-text .cmt-img { max-width: 100%; }
}

/* ============ Grids ============ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 22px 16px; }
.grid-cards .card { width: 100%; }
.grid-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.continue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.channel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px; display: flex; gap: 16px; align-items: center; transition: all .22s; }
.channel-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.channel-card .ch-logo { width: 64px; height: 64px; border-radius: 18px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 800; flex: 0 0 auto; overflow: hidden; }
.channel-card .ch-logo img { width: 100%; height: 100%; object-fit: cover; }
.channel-card .grow { min-width: 0; }
.channel-card h3 { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-card p { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Live TV (channels page) ============ */
.tv-wrap { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 22px; margin-top: 24px; align-items: start; }
.tv-side {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  position: sticky; top: calc(var(--topbar-h) + 18px);
  max-height: calc(100vh - var(--topbar-h) - 36px); min-width: 0;
}
.tv-side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.tv-side-head h1 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.tv-side-head h1 i { color: var(--accent); font-size: 22px; }
.tv-search {
  display: flex; align-items: center; gap: 10px; margin: 0 16px 12px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; color: var(--muted);
  transition: border-color .2s;
}
.tv-search:focus-within { border-color: var(--accent); }
.tv-search input { background: none; border: none; outline: none; width: 100%; color: var(--text); font-size: 14px; }
.tv-search input::placeholder { color: var(--muted-2); }
.tv-chips { padding: 0 16px 14px; }
.tv-list { flex: 1; overflow-y: auto; border-top: 1px solid var(--border); padding: 8px; -webkit-overflow-scrolling: touch; }
.tv-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  position: relative; transition: background .15s; min-height: 64px;
}
.tv-row:hover { background: var(--pill); }
.tv-row.active { background: rgba(124, 58, 237, .13); }
.tv-row.active::before {
  content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 4px;
  border-radius: 99px; background: var(--accent);
}
.tv-logo {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px; overflow: hidden; flex: 0 0 auto;
}
.tv-logo img { width: 100%; height: 100%; object-fit: cover; }
.tv-logo.big { width: 40px; height: 40px; }
.tv-info { min-width: 0; }
.tv-info .nm, .tv-player-head .nm { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-info .ct { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.tv-live {
  font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #FB7185;
  background: rgba(225, 29, 72, .14); padding: 3px 8px; border-radius: 99px; flex: 0 0 auto;
}
.tv-play { font-size: 24px; color: var(--accent); flex: 0 0 auto; }
.tv-none { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.tv-main { min-width: 0; }
.tv-player-head {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  background: var(--surface); border: 1px solid var(--border); border-bottom: none;
  border-radius: 18px 18px 0 0;
}
.tv-player-head .ct { font-size: 12px; color: var(--muted); }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px; background: #E11D48; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .8px; padding: 6px 13px; border-radius: 99px; flex: 0 0 auto;
}
.live-pill .dot { width: 7px; height: 7px; border-radius: 99px; background: #fff; animation: pulse 2s infinite; }
.tv-player { position: relative; background: #000; border: 1px solid var(--border); border-radius: 0 0 18px 18px; overflow: hidden; aspect-ratio: 16 / 9; }
.tv-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.tv-copy {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(10, 8, 18, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 700; padding: 8px 13px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14); transition: border-color .2s;
}
.tv-copy:hover { border-color: var(--accent); }
.tv-about { margin-top: 18px; }

/* ============ Auth pages ============ */
/* Shared identity assets: starfield + deep-space gradients (Galaxeel) */
:root {
  --gx-stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='28' cy='46' r='1.5' opacity='.85'/%3E%3Ccircle cx='96' cy='132' r='1' opacity='.45'/%3E%3Ccircle cx='165' cy='58' r='1.2' opacity='.7'/%3E%3Ccircle cx='238' cy='118' r='1.7' opacity='.9'/%3E%3Ccircle cx='312' cy='40' r='1' opacity='.5'/%3E%3Ccircle cx='382' cy='96' r='1.4' opacity='.75'/%3E%3Ccircle cx='52' cy='228' r='1.1' opacity='.55'/%3E%3Ccircle cx='140' cy='286' r='1.6' opacity='.8'/%3E%3Ccircle cx='218' cy='238' r='1' opacity='.4'/%3E%3Ccircle cx='296' cy='300' r='1.3' opacity='.7'/%3E%3Ccircle cx='366' cy='248' r='1.8' opacity='.9'/%3E%3Ccircle cx='80' cy='368' r='1.2' opacity='.6'/%3E%3Ccircle cx='186' cy='394' r='1' opacity='.5'/%3E%3Ccircle cx='268' cy='366' r='1.5' opacity='.8'/%3E%3Ccircle cx='348' cy='392' r='1.1' opacity='.55'/%3E%3Ccircle cx='12' cy='168' r='1' opacity='.45'/%3E%3Ccircle cx='404' cy='176' r='1.2' opacity='.65'/%3E%3Ccircle cx='126' cy='22' r='1' opacity='.5'/%3E%3Ccircle cx='336' cy='148' r='1.1' opacity='.6'/%3E%3Ccircle cx='24' cy='306' r='1.4' opacity='.75'/%3E%3Ccircle cx='234' cy='24' r='1.2' opacity='.6'/%3E%3Ccircle cx='398' cy='330' r='1.3' opacity='.7'/%3E%3Ccircle cx='104' cy='196' r='.9' opacity='.4'/%3E%3Ccircle cx='258' cy='176' r='.9' opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
  --gx-space:
    radial-gradient(90rem 60rem at 85% -20%, rgba(139, 92, 246, .34), transparent 55%),
    radial-gradient(70rem 50rem at -15% 115%, rgba(236, 72, 153, .26), transparent 55%),
    radial-gradient(46rem 34rem at 55% 125%, rgba(124, 58, 237, .18), transparent 60%),
    linear-gradient(200deg, #171022 0%, #0F0B16 58%, #0C0913 100%);
}
.auth-wrap { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-wrap.auth-single { grid-template-columns: 1fr; }
/* Identity background across the whole auth page at 50% opacity */
.auth-wrap::before {
  content: ''; position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none;
  background-color: #0F0B16;
  background-image: var(--gx-stars), var(--gx-space);
  background-size: 420px 420px, auto, auto, auto, auto;
}
.auth-form-side { position: relative; z-index: 1; }
/* Brand-identity art panel: deep-space gradient + starfield + planet orbs (pure CSS, responsive) */
.auth-art {
  position: relative; overflow: hidden; display: none; z-index: 1;
  background-color: #0F0B16;
  background-image: var(--gx-stars), var(--gx-space);
  background-size: 420px 420px, auto, auto, auto, auto;
}
.auth-art::before {
  content: ''; position: absolute; inset: 0; z-index: 1; animation: twinkle 7s ease-in-out infinite alternate;
  background-image: var(--gx-stars);
  background-size: 420px 420px;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.auth-art::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(12, 9, 19, .88) 0%, rgba(12, 9, 19, .25) 38%, transparent 60%);
}
.art-orb { position: absolute; border-radius: 50%; z-index: 1; }
.art-orb-big {
  width: clamp(190px, 26vw, 350px); aspect-ratio: 1 / 1; right: -7%; top: 11%;
  background: radial-gradient(circle at 32% 28%, #DDD6FE 0%, #A78BFA 26%, #8B5CF6 52%, #5B21B6 78%, #2E1065 100%);
  box-shadow: 0 0 110px 14px rgba(139, 92, 246, .42), inset -22px -30px 70px rgba(0, 0, 0, .38);
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.art-orb-moon {
  width: clamp(52px, 7vw, 88px); aspect-ratio: 1 / 1; left: 15%; bottom: 27%;
  background: radial-gradient(circle at 35% 30%, #FBCFE8, #EC4899 58%, #9D174D 100%);
  box-shadow: 0 0 48px rgba(236, 72, 153, .5), inset -8px -10px 26px rgba(0, 0, 0, .3);
  animation: orbFloat 11s ease-in-out infinite alternate-reverse;
}
.art-ring {
  position: absolute; z-index: 1; right: -14%; top: 22%;
  width: clamp(250px, 34vw, 470px); aspect-ratio: 2.7 / 1;
  border: 1.5px dashed rgba(255, 255, 255, .2); border-radius: 50%;
  transform: rotate(-18deg);
}
@keyframes orbFloat { from { transform: translateY(-10px); } to { transform: translateY(12px); } }
.auth-art .art-quote { position: absolute; z-index: 3; bottom: 54px; left: 54px; right: 54px; color: #fff; }
.auth-art .art-quote h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; }
.auth-art .art-quote p { color: rgba(237, 233, 254, .8); margin-top: 10px; font-size: 14.5px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-box h1 { font-size: 27px; font-weight: 800; }
.auth-box .sub { color: var(--muted); margin: 8px 0 24px; font-size: 14.5px; }
.field-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.link-accent { color: var(--accent); font-weight: 600; text-decoration: none; transition: color .15s; }
.link-accent:hover { color: var(--accent-2); }
/* Show/hide password eye toggle */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 18px;
  display: grid; place-items: center; cursor: pointer;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.pw-toggle:hover { color: var(--text); background: var(--pill); }

/* ---- Modern checklist: custom gradient checkboxes (global) ---- */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 21px; height: 21px; margin: 0; flex: 0 0 auto;
  border: 2px solid var(--border-2); border-radius: 7px;
  background: var(--surface-2);
  display: inline-grid; place-content: center; vertical-align: middle;
  cursor: pointer;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
input[type="checkbox"]::after {
  content: ''; width: 12px; height: 12px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background: #fff;
  transform: scale(0) rotate(-14deg);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.35);
}
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked {
  background: var(--grad); border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(139, 92, 246, .65);
}
input[type="checkbox"]:checked::after { transform: scale(1) rotate(0deg); }
input[type="checkbox"]:active { transform: scale(.9); }
input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
/* .switch keeps its own hidden input + track UI */

/* ---- Donate page ---- */
.dn-hero { text-align: center; padding: clamp(10px, 2vw, 26px) 0 4px; }
.dn-hero-ic {
  display: inline-grid; place-items: center; width: clamp(64px, 8vw, 84px); aspect-ratio: 1; border-radius: 26px;
  background: var(--grad); color: #fff; font-size: clamp(30px, 4vw, 40px);
  box-shadow: 0 18px 40px -12px rgba(236, 72, 153, .55); margin-bottom: 16px;
}
.dn-hero h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
.dn-hero .grad-t { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dn-hero p { color: var(--muted); max-width: 560px; margin: 10px auto 0; font-size: clamp(13.5px, 1.4vw, 15px); line-height: 1.7; }
.dn-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start; max-width: 1060px; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) { .dn-layout { grid-template-columns: 1fr; } }
.dn-wrap { max-width: 640px; margin-left: auto; margin-right: auto; }
/* Payment method switcher (segmented) */
.dn-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; }
@media (max-width: 480px) { .dn-methods { grid-template-columns: 1fr; } }
.dn-method {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 14px; border-radius: 11px; border: 1.5px solid transparent; background: transparent;
  color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.dn-method i { font-size: 19px; }
.dn-method:hover { color: var(--text); background: var(--pill); }
.dn-method.active { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(139, 92, 246, .65); }
.dn-mbody { margin-top: 18px; }
.dn-qr { width: min(300px, 100%); margin: 0 auto; display: block; border-radius: 16px; border: 1px solid var(--border); background: #fff; padding: 14px; }
.dn-qr-none {
  aspect-ratio: 1; display: grid; place-content: center; gap: 10px; text-align: center;
  border: 2px dashed var(--border-2); background: transparent; color: var(--muted); font-size: 13px; line-height: 1.6; padding: 20px;
}
.dn-qr-none i { font-size: 44px; margin: 0 auto; color: var(--muted-2); }
.dn-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 14px auto 0; }
.dn-step { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.dn-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.dn-step b { color: var(--text); }
/* Confirm payment block + modal */
.dn-confirm { text-align: center; }
.dn-confirm-btn { min-width: min(320px, 100%); }
.dn-modal { max-width: 520px; }
/* Payment proof upload dropzone */
.dn-drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; outline: none;
  border: 2px dashed var(--border-2); border-radius: 16px; padding: 26px 16px;
  background: var(--surface-2); transition: border-color .18s, background .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.dn-drop:hover, .dn-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.dn-drop:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.dn-drop.drag { border-color: var(--accent-2); background: var(--accent-soft); transform: scale(1.012); }
.dn-drop-empty { display: flex; flex-direction: column; align-items: center; }
.dn-drop-ic { font-size: 48px; line-height: 1; color: var(--accent); }
.dn-drop-title { margin-top: 14px; font-weight: 700; font-size: 15px; color: var(--text); }
.dn-drop-sub { margin-top: 6px; color: var(--muted-2); font-size: 12.5px; }
.dn-drop-browse {
  margin-top: 18px; padding: 10px 38px; border-radius: 99px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer;
  transition: border-color .18s, color .18s, background .18s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.dn-drop-browse:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dn-drop-browse:active { transform: scale(.97); }
.dn-drop-file { display: flex; flex-direction: column; align-items: center; width: 100%; }
.dn-drop-name { font-weight: 700; font-size: 13px; word-break: break-all; color: var(--muted); }
.dn-drop-name.err { color: var(--danger); }
/* Leaderboard — concise, status-led community board */
.dn-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; max-width: 1100px; margin-left: auto; margin-right: auto; }
@media (max-width: 980px) { .dn-main { grid-template-columns: 1fr; max-width: 680px; } }
.dn-side { min-width: 0; margin-top: 12px; }
@media (min-width: 981px) { .dn-side { position: sticky; top: calc(var(--topbar-h) + 18px); } }
.dn-board { position: relative; overflow: hidden; padding: clamp(20px, 3vw, 28px); border-radius: 28px; border-color: rgba(139, 92, 246, .22); }
.dn-board > *:not(.dn-board-orbit) { position: relative; z-index: 1; }
.dn-board-orbit { position: absolute; width: 260px; aspect-ratio: 1; right: -146px; top: -164px; border: 1px solid rgba(236, 72, 153, .22); border-radius: 50%; box-shadow: 0 0 0 34px rgba(139, 92, 246, .045), 0 0 0 70px rgba(236, 72, 153, .03); }
.dn-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dn-board-eyebrow { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.dn-board-eyebrow i { color: var(--star); font-size: 14px; }
.dn-board-head h2 { font-size: clamp(21px, 2vw, 25px); margin-top: 3px; }
.dn-board-head p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.dn-board-live { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--success); border: 1px solid rgba(16,185,129,.24); background: rgba(16,185,129,.08); border-radius: 99px; font-size: 10.5px; font-weight: 800; }
.dn-board-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(16,185,129,.12); animation: dn-live 1.8s infinite; }
@keyframes dn-live { 50% { transform: scale(.75); opacity: .55; } }
.dn-board-stats { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; margin-top: 18px; }
.dn-board-stats div { min-width: 0; padding: 10px 12px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.dn-board-stats b, .dn-board-stats span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-board-stats b { font-size: 14px; }
.dn-board-stats span { color: var(--muted); margin-top: 2px; font-size: 10.5px; }
.dn-champion { display: grid; grid-template-columns: auto 54px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 12px; padding: 14px; background: linear-gradient(125deg, rgba(251,191,36,.14), rgba(139,92,246,.1)); border: 1px solid rgba(251,191,36,.28); border-radius: 18px; }
.dn-champion-rank { align-self: start; color: #8A6300; background: linear-gradient(135deg, #FDE68A, #F5C842); padding: 4px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.dn-champion-avatar { width: 54px; aspect-ratio: 1; border-radius: 16px; object-fit: cover; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; border: 2px solid rgba(253,230,138,.75); box-shadow: 0 8px 18px -10px rgba(245,200,66,.8); }
.dn-champion-info { min-width: 0; display: flex; flex-direction: column; }
.dn-champion-info > span { color: var(--muted); font-size: 10.5px; }
.dn-champion-info strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-champion-info small { color: var(--muted); font-size: 10.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-champion-info small i { color: var(--success); }
.dn-champion-total { align-self: center; color: var(--star); font-size: 14px; white-space: nowrap; }
.dn-board-note { display: flex; gap: 6px; margin-top: 10px; padding: 9px 10px; background: var(--surface-2); border-radius: 11px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.dn-board-note i { flex: 0 0 auto; color: var(--star); }
.dn-runner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dn-runner { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 14px; }
.dn-runner-rank { position: absolute; top: 5px; right: 7px; color: var(--muted-2); font-size: 9.5px; font-weight: 800; }
.dn-runner img, .dn-runner-avatar { width: 34px; aspect-ratio: 1; border-radius: 11px; object-fit: cover; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.dn-runner-2 img, .dn-runner-2 .dn-runner-avatar { border: 1px solid rgba(203,213,225,.72); }
.dn-runner-3 img, .dn-runner-3 .dn-runner-avatar { border: 1px solid rgba(217,142,74,.8); }
.dn-runner div { min-width: 0; padding-right: 18px; }
.dn-runner b, .dn-runner span:not(.dn-runner-rank) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-runner b { font-size: 11.5px; }
.dn-runner span:not(.dn-runner-rank) { color: var(--muted); font-size: 10.5px; }
.dn-board-list-title { display: flex; justify-content: space-between; color: var(--muted-2); margin: 18px 4px 6px 38px; font-size: 10px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.dn-board-list { list-style: none; display: flex; flex-direction: column; gap: 4px; counter-reset: rank; }
.dn-board-list li { display: grid; grid-template-columns: 19px 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 5px; border-radius: 10px; transition: background .18s; }
.dn-board-list li:hover { background: var(--pill); }
.dn-board-rank { color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.dn-board-list img, .dn-board-avatar { width: 32px; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.dn-board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.dn-board-name small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.dn-board-list li > b { font-size: 11.5px; white-space: nowrap; }
.dn-board-empty { text-align: center; padding: 30px 8px 5px; }
.dn-board-empty > span { width: 62px; aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto 12px; color: var(--star); background: rgba(251,191,36,.11); border: 1px solid rgba(251,191,36,.25); border-radius: 20px; font-size: 30px; }
.dn-board-empty h3 { font-size: 16px; }
.dn-board-empty p { color: var(--muted); font-size: 12.5px; max-width: 230px; margin: 6px auto 15px; }
@media (max-width: 380px) {
  .dn-board { padding: 18px; }
  .dn-champion { grid-template-columns: 45px minmax(0, 1fr) auto; }
  .dn-champion-rank { display: none; }
  .dn-champion-avatar { width: 45px; border-radius: 14px; }
  .dn-champion-total { font-size: 12px; }
}
/* Admin: donor management list */
.dn-adm-list { display: flex; flex-direction: column; gap: 7px; }
.dn-adm-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 13px; background: var(--surface-2);
}
.dn-adm-row:first-child { background: linear-gradient(120deg, rgba(251, 191, 36, .12), rgba(139, 92, 246, .08)); border: 1px solid rgba(251, 191, 36, .3); }
.dn-adm-row .nm { font-weight: 800; font-size: 14px; }
.dn-adm-row .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dn-adm-row form { flex: 0 0 auto; }
@media (max-width: 420px) { .dn-rank-amt { font-size: 12.5px; } .dn-rank-row { gap: 9px; } .dn-podium { gap: 6px; } .dn-pod.p2, .dn-pod.p3 { padding-bottom: 18px; } }
/* "Donating as" account chip (confirm modal) */
.dn-as {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 10px 14px;
}
.dn-as img, .dn-as .avatar { width: 38px; height: 38px; font-size: 15px; background: var(--grad); flex: 0 0 auto; }
.dn-as .lbl { display: block; font-size: 11px; color: var(--muted); }
.dn-as b { font-size: 14.5px; }
/* Admin: Donate & Top Contributor side-by-side */
.dn-admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .dn-admin-grid { grid-template-columns: 1fr; } }
.switch input[type="checkbox"] { width: 1px; height: 1px; opacity: 0; position: absolute; }
/* Series status toggle (Ongoing / Complete) — admin contents modal */
.series-status-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.series-status-toggle label { position: relative; display: block; cursor: pointer; border-radius: 10px; transition: background .18s, color .18s, box-shadow .18s; }
.series-status-toggle input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.series-status-toggle span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.series-status-toggle span i { font-size: 17px; }
.series-status-toggle label:hover span { color: var(--text); }
.series-status-toggle label.active { background: var(--grad); box-shadow: 0 9px 20px -10px rgba(139,92,246,.75); }
.series-status-toggle label.active span { color: #fff; }
.series-status-toggle label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Profile photo card (screenshot design × Galaxeel palette) — fully responsive */
.avatar-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(20px, 3.5vw, 46px); padding: clamp(20px, 3.2vw, 40px);
}
@media (min-width: 641px) { .avatar-card { justify-content: flex-start; } }
.avatar-preview {
  width: clamp(96px, 13vw, 168px); aspect-ratio: 1 / 1; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden; flex: 0 0 auto;
  background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow-card);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview .letter {
  font-size: clamp(40px, 6.5vw, 70px); font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.avatar-info { min-width: 0; flex: 1 1 260px; }
@media (max-width: 640px) { .avatar-info { flex-basis: 100%; } }
.avatar-info .av-title { font-size: clamp(19px, 2.1vw, 26px); font-weight: 800; }
.avatar-info .av-hint { color: var(--muted); font-size: clamp(12px, 1.2vw, 13.5px); margin: 8px 0 18px; }
.av-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 640px) { .av-actions { justify-content: center; } }
.av-actions form { display: inline; }
.av-upload {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--pill); color: var(--text); font-weight: 700; font-size: clamp(13px, 1.3vw, 14.5px);
  border: 1px solid var(--border-2); border-radius: 14px; padding: clamp(10px, 1.4vw, 13px) clamp(20px, 2.6vw, 28px); cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.av-upload:hover { background: var(--accent-soft); border-color: var(--accent); }
.av-upload:active { transform: scale(.97); }
.av-remove {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-weight: 700; font-size: clamp(13px, 1.3vw, 14.5px); padding: 12px 8px;
  transition: color .15s; -webkit-tap-highlight-color: transparent;
}
.av-remove:hover { color: var(--danger); }
@media (max-width: 640px) {
  .avatar-card { flex-direction: column; text-align: center; }
}

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-bg { position: absolute; inset: 0; background: rgba(5,3,9,.7); backdrop-filter: blur(8px); animation: fadeIn .2s ease; }
.modal-box { position: relative; width: 100%; max-width: 720px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow); animation: pop .22s ease; max-height: 88vh; overflow-y: auto; }
.modal-box .close-x { position: absolute; top: 16px; right: 16px; }
.modal.wide .modal-box { max-width: 960px; padding: 12px; background: #000; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.trailer-frame { width: 100%; aspect-ratio: 16/9; border-radius: 14px; }

/* ============ Toasts ============ */
.toasts { position: fixed; bottom: 92px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }

/* ---- Floating donate pill (bottom-right): icon + label ---- */
.donate-fab {
  position: fixed; right: clamp(16px, 2.6vw, 26px); bottom: clamp(16px, 2.6vw, 26px); z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  height: clamp(48px, 5vw, 56px); padding: 0 clamp(18px, 2.2vw, 26px);
  border-radius: 999px; background: var(--grad); color: #fff;
  font-weight: 800; font-size: clamp(14px, 1.6vw, 16px); text-decoration: none; letter-spacing: .2px;
  box-shadow: 0 16px 34px -10px rgba(236, 72, 153, .55);
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.donate-fab i { font-size: clamp(19px, 2.3vw, 22px); animation: fabBeat 2.4s ease-in-out infinite; }
.donate-fab::before {
  content: ''; position: absolute; inset: -6px; border-radius: 999px;
  border: 2px solid rgba(236, 72, 153, .45);
  animation: fabPulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes fabPulse { 0% { transform: scale(.85); opacity: 1; } 70%, 100% { transform: scale(1.28); opacity: 0; } }
.donate-fab:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 20px 40px -10px rgba(236, 72, 153, .7); }
.donate-fab:active { transform: scale(.94); }
@keyframes fabBeat { 0%, 100% { transform: scale(1); } 10% { transform: scale(1.18); } 20% { transform: scale(1); } 30% { transform: scale(1.12); } 40% { transform: scale(1); } }
.toast { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); padding: 13px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); animation: toastIn .3s ease; max-width: 340px; }
.toast.success { border-color: rgba(16,185,129,.4); }
.toast.error { border-color: rgba(239,68,68,.4); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* Modern tab bar (admin settings etc.) */
.tabs {
  position: sticky; top: calc(var(--topbar-h) + 12px); z-index: 60;
  display: flex; gap: 8px; padding: 8px; margin: 4px 0 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 18px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 13.5px;
  transition: color .18s, background .22s, box-shadow .22s, transform .18s;
  -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.tab i { font-size: 17px; }
.tab:hover { color: var(--text); background: var(--pill); }
.tab.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(139, 92, 246, .65);
}
.tab.active i { color: #fff; }
.tab:active { transform: scale(.97); }
.tab-body { animation: fadeTab .28s ease; }
@keyframes fadeTab { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeTab .3s ease; }
.tab-panel.active .panel { max-width: 760px; }
/* Admin settings → API tab: API Integrations left, Video Servers right (fills page width) */
.api-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; align-items: stretch; }
.tab-panel.active .api-grid .panel { max-width: none; }
.api-grid .panel + .panel { margin-top: 0; }
@media (max-width: 1150px) {
  .api-grid { grid-template-columns: minmax(0, 1fr); }
  .api-grid .panel + .panel { margin-top: 22px; }
}
@media (max-width: 640px) {
  .tabs { top: calc(var(--topbar-h) + 8px); gap: 4px; padding: 6px; border-radius: 16px; }
  .tab { padding: 10px 14px; font-size: 12.5px; gap: 6px; border-radius: 10px; }
  .tab span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
}

/* Video Servers card — count chip, note box, pager */
.srv-count {
  display: inline-grid; place-items: center; vertical-align: middle;
  min-width: 26px; height: 26px; padding: 0 9px; margin-left: 8px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 800;
}
.srv-note {
  margin-top: 14px; padding: 12px 16px;
  border: 1px dashed var(--border-2); border-radius: 12px; background: var(--bg-2);
  color: var(--muted); font-size: 12.5px; line-height: 1.7;
}
.srv-pager { margin-top: 14px; }
.srv-pager-info { align-self: center; margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--muted-2); background: none; border: none; min-width: auto; height: auto; }

/* Social login — circular icon buttons (screenshot design) */
.social-auth { margin-top: 22px; }
.or-divider { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 3vw, 20px); }
.social-circle {
  width: clamp(46px, 11vw, 58px); aspect-ratio: 1 / 1; border-radius: 50%;
  display: grid; place-items: center;
  padding: 0; border: 0; font: inherit; cursor: pointer; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s;
  -webkit-tap-highlight-color: transparent; box-shadow: 0 8px 20px -8px rgba(0,0,0,.45);
}
.social-circle:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 26px -8px rgba(0,0,0,.55); }
.social-circle:active { transform: scale(.95); }
.social-circle i { flex: 0 0 auto; font-size: clamp(21px, 5.5vw, 27px); line-height: 1; color: #fff; }

/* Telegram login: the official widget iframe is laid invisibly over the
   circular button — clicking the circle clicks the real Telegram button. */
.tg-slot { position: relative; display: inline-flex; width: clamp(46px, 11vw, 58px); aspect-ratio: 1 / 1; }
.tg-slot .social-circle { width: 100%; height: 100%; }
.tg-slot iframe {
  position: absolute !important; inset: 0; margin: 0; border: 0; padding: 0;
  width: 100% !important; height: 100% !important; max-width: none !important;
  opacity: 0; z-index: 3; cursor: pointer; background: transparent;
}
@media (max-width: 480px) {
  .social-auth .or-divider { gap: 10px; font-size: 12px; }
}

/* iOS-style toggle switch (screenshot design × Galaxeel palette) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: 0 0 auto; user-select: none; -webkit-tap-highlight-color: transparent; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  position: relative; display: block; width: 56px; height: 32px; border-radius: 99px;
  background: var(--surface-3); border: 1px solid var(--border-2);
  transition: background .25s ease, border-color .25s ease;
}
.switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 99px;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.switch input:checked + .track { background: var(--grad); border-color: transparent; }
.switch input:checked + .track .thumb { transform: translateX(24px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--accent-soft); }
.switch .sw-label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.switch .sw-label.on { color: var(--accent); }
.switch:active .thumb { width: 27px; } /* squeeze effect while pressing */
@media (max-width: 640px) {
  .switch .track { width: 50px; height: 29px; }
  .switch .thumb { width: 22px; height: 22px; }
  .switch input:checked + .track .thumb { transform: translateX(21px); }
}

/* Cloudflare Turnstile widget (responsive) */
.ts-field .cf-turnstile { display: flex; justify-content: center; min-height: 65px; }
.ts-field iframe { max-width: 100% !important; width: 100% !important; border-radius: 12px; }
.ts-field .btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 480px) {
  .ts-field { margin-left: -4px; margin-right: -4px; }
  .ts-field .cf-turnstile { min-height: 60px; }
}

/* Custom icon tooltip */
.gx-tip {
  position: fixed; z-index: 400; pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  background: #0B0712; color: #F5F3FF; border: 1px solid var(--border-2);
  font-size: 12px; font-weight: 600; letter-spacing: .2px; white-space: nowrap;
  padding: 6px 12px; border-radius: 9px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .14s ease;
}
.gx-tip.show { opacity: 1; }
.gx-tip.below { transform: translate(-50%, 16px); }
html[data-theme="light"] .gx-tip { background: #241A33; }

/* ============ Empty / footer ============ */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty i { font-size: 46px; opacity: .35; display: block; margin-bottom: 14px; }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
/* Inline icon inside empty-state sentence stays small & full color */
.empty p i { display: inline; font-size: 1em; opacity: 1; vertical-align: -.12em; }
footer.footer { border-top: 1px solid var(--border); padding: 30px 28px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
footer.footer .f-logo { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; color: var(--text); margin-bottom: 8px; }
footer.footer .f-logo img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; display: inline-block; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Pagination */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 34px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 13.5px; color: var(--muted); padding: 0 10px; }
.pager .cur { background: var(--grad); color: #fff; border-color: transparent; }
.pager .dots { background: none; border: none; color: var(--muted-2); min-width: auto; }
.pager-info { text-align: center; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }

/* ============ Responsive helpers (base) ============ */
.chips, .cast-strip, .rowswiper, .ep-list, .drop-list, .sb-scroll { -webkit-overflow-scrolling: touch; }
.c-modal-side { width: 170px; flex: 0 0 auto; text-align: center; }
form.flex { flex-wrap: wrap; }

/* ============ Responsive — large tablet / small laptop ============ */
@media (max-width: 1280px) {
  .watch-layout { grid-template-columns: 1fr 300px; }
  .hero-content { padding: 40px 44px; }
}

/* ============ Responsive — tablet portrait & below ============ */
@media (max-width: 1080px) {
  :root { --topbar-h: 66px; }
  .sidebar { transform: translateX(-104%); width: var(--sidebar-w) !important; box-shadow: 0 0 80px rgba(0,0,0,.5); }
  body.sb-open .sidebar { transform: none; }
  .main, body.sb-collapsed .main { margin-left: 0; }
  .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(5,3,9,.6); backdrop-filter: blur(3px); z-index: 88; opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
  .sb-collapse-btn { display: none; }
  body.sb-collapsed .sb-logo .logo-tx, body.sb-collapsed .sb-item span.tx,
  body.sb-collapsed .sb-label, body.sb-collapsed .sb-user .u-info { display: block; }
  body.sb-collapsed .sb-item { justify-content: flex-start; padding: 11px 12px; }
  body.sb-collapsed .sb-item .nav-badge { display: inline-flex; margin-left: auto; }
  .watch-layout { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: block; min-height: 200px; }
  .auth-art .art-quote { left: 28px; right: 28px; bottom: 20px; }
  .auth-art .art-quote h2 { font-size: 22px; }
  .detail-wrap { flex-direction: column; align-items: flex-start; }
  .detail-poster { width: 170px; }
}

/* Any 2-col layout (incl. inline-styled admin grids) stacks below 1024px */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr !important; }
}

/* ============ Responsive — small tablet ============ */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-head { flex-wrap: wrap; }
  .ep-item img, .ep-thumb { width: 96px; }
  .watch-layout aside .ep-list { max-height: none; }
}

/* ============ Responsive — mobile ============ */
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .main-inner { padding: 0 16px 40px; }
  .topbar { padding: 0 14px; gap: 8px; height: 62px; }
  .hamburger { display: grid; width: 38px; height: 38px; }
  .search-wrap { flex: 1 1 150px; max-width: 340px; }
  .search-box { padding: 9px 14px; gap: 8px; }
  .search-box input { font-size: 16px; } /* 16px prevents iOS focus zoom */
  .input { font-size: 16px; }
  .search-box kbd { display: none; }
  .icon-btn { width: 44px; height: 44px; font-size: 20px; }
  .avatar { width: 42px; height: 42px; }
  /* Hero becomes fixed-height portrait card */
  .hero-slide { aspect-ratio: auto; height: 460px; min-height: 0; max-height: none; }
  .hero-content { padding: 24px 20px 44px; max-width: 100%; justify-content: flex-end; gap: 12px; }
  .hero-title { font-size: clamp(26px, 7vw, 34px); }
  .hero-desc { -webkit-line-clamp: 2; font-size: 13.5px; }
  .hero-actions { flex-wrap: wrap; }
  .hero .hero-dots { right: 16px; bottom: 14px; }
  .card { width: 100%; }
  .rcard, .rcard-wrap { width: 100%; }
  .rowswiper .card { width: 152px; }
  .rowswiper.rg-wide .swiper-slide { width: 264px !important; }
  .rowswiper.rg-ch .swiper-slide { width: 248px !important; }
  .rc-info { padding: 12px 13px 16px; }
  .rc-info h3 { font-size: 14px; }
  .rc-meta { font-size: 11.5px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px 12px; }
  .grid-channels { grid-template-columns: 1fr; }
  .grid-channels .channel-card { max-width: 540px; }
  .panel { padding: 18px; }
  .detail-wrap { gap: 18px; }
  .detail-hero { margin: 0 -16px; padding: 84px 16px 24px; min-height: clamp(420px, 78vh, 620px); }
  .page-bg { background-position: center center; }
  .page-bg::after { background: linear-gradient(180deg, rgba(15,11,22,.5) 0%, rgba(15,11,22,.72) 30%, rgba(15,11,22,.92) 60%, var(--bg) 85%); }
  html[data-theme="light"] .page-bg::after { background: linear-gradient(180deg, rgba(15,11,22,.55) 0%, rgba(15,11,22,.76) 30%, rgba(15,11,22,.93) 60%, var(--bg) 85%); }
  .detail-poster { width: 150px; }
  .detail-info h1 { font-size: clamp(24px, 6.5vw, 30px); }
  .detail-actions { gap: 10px; }
  .detail-actions .btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .detail-actions .btn-icon { flex: 0 0 auto; }
  .stats { gap: 12px; }
  .stat { padding: 16px; gap: 12px; }
  .stat .v { font-size: 20px; }
  .stat .ic { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
  .cast-card { width: 82px; }
  .cast-card .cc-photo { width: 74px; height: 74px; }
  .comment { gap: 10px; }
  .cmt-composer { gap: 10px; }
  .cmt-composer .avatar { width: 36px; height: 36px; font-size: 13px; }
  .cmt-header .cmt-title { font-size: 16px; }
  .avatar.av-sm { width: 32px; height: 32px; font-size: 12px; }
  .replies { padding-left: 22px; }
  .replies .comment::before { left: -16px; width: 14px; top: -12px; height: 42px; border-bottom-left-radius: 10px; }
  .reply-form-row { gap: 8px; }
  .reply-form-row .btn { min-width: 38px; padding-left: 9px; padding-right: 9px; }
  .cmt-post-btn { padding: 8px 18px; }
  .toasts { left: 14px; right: 14px; bottom: 86px; }
  .toast { max-width: none; }
  .modal { padding: 12px; }
  .modal-box { padding: 18px; max-height: 90vh; }
  .pager { flex-wrap: wrap; }
  .footer { padding: 24px 16px; }
  .ep-item { padding: 8px; gap: 10px; }
  .ep-item img, .ep-thumb { width: 84px; }
  .table th, .table td { padding: 10px; font-size: 13px; }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; }
  .act-btn { width: 32px; height: 32px; font-size: 16px; }
  .page-head { margin: 22px 0 16px; }
  .src-bar .muted { display: none; }
  .auth-form-side { padding: 28px 16px; }
  .c-modal-side { width: 100%; }
  .c-modal-side img { width: 110px; margin: 0 auto; }
}

/* Dropdowns become bottom sheets on phones — toggled via .sheet by JS (≤640px) */
@keyframes sheetUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.drop.sheet {
  position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto;
  border-radius: 22px 22px 0 0; max-height: 80vh; z-index: 210;
  animation: sheetUp .28s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .5);
}
.drop.sheet.open { animation: sheetUp .28s ease; }
.drop.sheet::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 99px; background: var(--border-2); margin: 10px auto 0; }
.drop.sheet .drop-close { display: grid; }
.drop.sheet .u-sheet-head { display: flex; }
.drop.sheet .drop-head { padding: 14px 16px; }
.drop.sheet .drop-head h4 { font-size: 16px; }
.drop.sheet .drop-list { max-height: 52vh; }
.drop.sheet .n-item { padding: 14px 16px; }
.drop.sheet .n-item .nt { font-size: 14.5px; }
.drop.sheet .n-item .nb { font-size: 13.5px; }
.drop.sheet.u-menu { width: auto; }
.drop.sheet.u-menu .n-item { margin: 3px 8px; padding: 13px 14px; font-size: 15.5px; line-height: 1.35; border-radius: 14px; }
.drop.sheet.u-menu .n-item i { width: 24px; height: 24px; font-size: 22px; }
/* No-JS / pre-portal fallback keeps sheet behaviour on phones */
@media (max-width: 640px) {
  .drop:not([data-portaled]) {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto;
    border-radius: 22px 22px 0 0; max-height: 80vh; z-index: 210;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .5);
  }
  .drop:not([data-portaled]) .drop-close { display: grid; }
  .drop:not([data-portaled]) .u-sheet-head { display: flex; }
}

/* Mobile: Sign Up becomes a square icon button, Sign in chip hidden */
@media (max-width: 600px) {
  .top-actions .btn-ghost { display: none; }
  .top-signup .btn-tx { display: none; }
  .top-signup { flex: 0 0 38px; width: 38px; height: 38px; padding: 0; aspect-ratio: 1; }
}

/* ============ Responsive — large phones ============ */
@media (max-width: 480px) {
  .icon-btn { width: 40px; height: 40px; font-size: 18px; }
  .top-signup { flex: 0 0 40px; width: 40px; height: 40px; }
  .search-wrap { flex-basis: 110px; max-width: 240px; }
  .search-box { padding: 8px 12px; }
  .hero-slide { height: 430px; }
  .hero-actions .btn { height: 46px; }
  .hero-actions .btn-icon, .hero-actions .wl-btn { width: 46px; height: 46px; }
  .btn { padding: 11px 18px; font-size: 14px; }
  .btn-lg { padding: 13px 22px; font-size: 14.5px; }
  .btn-fav { width: 48px; height: 48px; }
  .btn-fav i { font-size: 21px; }
  .card { width: 100%; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rowswiper .card { width: 142px; }
  .rowswiper.rg-wide .swiper-slide { width: 252px !important; }
  .rowswiper.rg-ch .swiper-slide { width: 240px !important; }
  .grid-channels .channel-card { padding: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .n-item { padding: 11px 14px; }
  .drop-head { padding: 12px 14px; }
  .detail-poster { width: 132px; }
  .detail-actions { gap: 10px; }
  .detail-actions .btn-lg { flex: 1 1 auto; }
  .continue-grid { grid-template-columns: 1fr !important; }
  .continue-grid .rcard, .continue-grid .rcard-wrap { width: 100% !important; }
}

/* ============ Responsive — small phones (≤380px) ============ */
@media (max-width: 380px) {
  .card { width: 128px; }
  .stats { grid-template-columns: 1fr; }
  .hero-slide { height: 410px; }
  .hero-content { padding: 18px 16px 40px; }
  .chip { padding: 8px 14px; font-size: 12.5px; }
  .topbar { padding: 0 10px; }
  .search-wrap { flex-basis: 96px; }
}

/* ============ Responsive — short landscape phones ============ */
@media (max-height: 480px) and (max-width: 900px) {
  .hero-slide { height: 340px; }
  .hero-content { padding: 16px 20px 34px; gap: 8px; }
  .hero-desc { display: none; }
  .drop-list { max-height: 46vh; }
  .topbar { height: 56px; }
  .detail-hero { min-height: 380px; padding-top: 64px; }
}

/* ============ Admin panel responsive ============ */
.table-wrap { -webkit-overflow-scrolling: touch; }

/* ============ Live TV responsive ============ */
@media (max-width: 1080px) {
  .tv-wrap { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  .tv-side { position: static; max-height: none; order: 2; }
  .tv-main { order: 1; }
  .tv-list { max-height: 430px; }
}
@media (max-width: 640px) {
  .tv-side-head { padding: 16px 14px 10px; }
  .tv-side-head h1 { font-size: 17px; }
  .tv-search { margin: 0 12px 10px; padding: 9px 12px; }
  .tv-search input { font-size: 16px; }
  .tv-chips { padding: 0 12px 12px; }
  .tv-list { padding: 6px; }
  .tv-row { padding: 9px 10px; gap: 10px; min-height: 58px; }
  .tv-logo { width: 40px; height: 40px; border-radius: 9px; font-size: 16px; }
  .tv-logo.big { width: 34px; height: 34px; }
  .tv-player-head { padding: 10px 12px; gap: 10px; border-radius: 14px 14px 0 0; }
  .tv-player { border-radius: 0 0 14px 14px; }
  .tv-copy { font-size: 11px; padding: 7px 10px; top: 10px; right: 10px; }
  .live-pill { font-size: 10px; padding: 5px 10px; }
}

/* Slider preview cards */
.slide-prev { position: relative; aspect-ratio: 21 / 7; min-height: 150px; }
.slide-head { position: relative; z-index: 2; padding: 22px 26px; display: flex; align-items: center; gap: 16px; height: 100%; }

@media (max-width: 768px) {
  /* Page-head toolbars: forms go full-width, controls share one row */
  .page-head form { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .page-head form .input { width: auto !important; flex: 1 1 140px; min-width: 0; }
  .page-head form select.input { flex: 1 1 120px; }
  .page-head form .btn-sm { flex: 0 0 auto; }
  .page-head .flex > .btn:not(.btn-sm) { flex: 1 1 100%; }
  .page-head .flex-between { gap: 12px; }
  /* Title picker (episodes page) becomes full width */
  .ep-title-picker { width: 100%; min-width: 0 !important; }
  .ep-title-picker select { width: 100%; }
  /* Tables & row actions */
  .table { min-width: 620px; }
  .row-actions .btn-sm { padding: 8px 12px; font-size: 12.5px; }
  .row-actions .btn-sm i { font-size: 14px; }
  /* Slider previews: fixed height instead of wide aspect ratio */
  .slide-prev { aspect-ratio: auto; min-height: 230px; }
  .slide-head { padding: 16px; }
}

@media (max-width: 640px) {
  .row-actions { justify-content: flex-end; }
  .table th, .table td { padding: 9px 10px; }
  /* Thumbnails stay visible & slightly larger on phones */
  .table .t-thumb { width: 46px; height: auto; border: 2px solid var(--surface-3); }
  .td-thumb { width: 56px; min-width: 56px; padding-right: 2px !important; }
  .slide-head { flex-wrap: wrap; align-content: center; gap: 10px; }
  .slide-head .grow { min-width: 100%; }
  .slide-head .row-actions { flex: 0 0 auto; }
}

/* ============ Actors & Actress ============ */
.people-hero { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 250px; margin-top: 24px; padding: clamp(28px, 5vw, 58px); overflow: hidden; border: 1px solid rgba(139,92,246,.22); border-radius: var(--r-lg); background: linear-gradient(122deg, rgba(139,92,246,.24), rgba(236,72,153,.13) 58%, var(--surface)); }
.people-hero::before { content: ''; position: absolute; z-index: -1; width: 380px; height: 380px; top: -230px; right: 2%; border-radius: 50%; background: radial-gradient(circle, rgba(236,72,153,.32), transparent 64%); }
.people-hero-copy { max-width: 650px; }
.people-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.people-kicker i { color: var(--accent-2); font-size: 15px; }
.people-hero h1 { max-width: 620px; margin-top: 9px; font-size: clamp(28px, 4vw, 47px); font-weight: 800; letter-spacing: -.04em; }
.people-hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.people-hero p { max-width: 590px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.people-hero-art { position: relative; flex: 0 0 205px; height: 155px; }
.people-hero-art span { position: absolute; display: grid; place-items: center; width: 62px; aspect-ratio: 1; color: #fff; background: linear-gradient(135deg, rgba(139,92,246,.92), rgba(236,72,153,.85)); border: 1px solid rgba(255,255,255,.25); border-radius: 21px; box-shadow: 0 18px 30px -16px rgba(0,0,0,.8); font-size: 27px; transform: rotate(-9deg); }
.people-hero-art span:nth-child(1) { top: 5px; left: 17px; background: linear-gradient(135deg, #FBBF24, #F97316); transform: rotate(13deg); }
.people-hero-art span:nth-child(2) { top: 44px; right: 12px; width: 88px; border-radius: 28px; font-size: 36px; transform: rotate(-9deg); }
.people-hero-art span:nth-child(3) { bottom: 0; left: 37px; width: 49px; border-radius: 17px; font-size: 20px; transform: rotate(-19deg); }
.people-directory { margin-top: 32px; }
.people-directory-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.people-directory-head h2 { font-size: clamp(19px, 2vw, 24px); }
.people-directory-head p { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.people-directory-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; max-width: 650px; }
.people-search { display: flex; align-items: center; gap: 7px; flex: 1 1 250px; min-width: 0; padding: 4px 5px 4px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; transition: border-color .18s, box-shadow .18s; }
.people-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.people-search > i { flex: 0 0 auto; color: var(--muted-2); font-size: 16px; }
.people-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.people-search input::placeholder { color: var(--muted-2); }
.people-search a { display: grid; place-items: center; flex: 0 0 auto; width: 26px; aspect-ratio: 1; color: var(--muted); border-radius: 50%; font-size: 14px; }
.people-search a:hover { color: var(--text); background: var(--pill); }
.people-search button { flex: 0 0 auto; padding: 7px 12px; color: #fff; background: var(--grad); border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.people-filters { display: flex; gap: 6px; padding: 4px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; }
.people-filters button { flex: 0 0 auto; padding: 7px 12px; color: var(--muted); border-radius: 99px; font-size: 11.5px; font-weight: 700; transition: color .18s, background .18s; }
.people-filters button:hover { color: var(--text); }
.people-filters button.active { color: #fff; background: var(--grad); box-shadow: 0 7px 15px -9px rgba(139,92,246,.9); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: clamp(12px, 2vw, 20px); }
.person-card { display: block; min-width: 0; }
.person-card[hidden] { display: none; }
.person-card-photo { position: relative; overflow: hidden; aspect-ratio: .79 / 1; border-radius: 18px; background: var(--surface-2); box-shadow: var(--shadow-card); }
.person-card-photo::after { content: ''; position: absolute; inset: 42% 0 0; background: linear-gradient(180deg, transparent, rgba(10,6,16,.72)); pointer-events: none; }
.person-card-photo img, .person-card-fallback { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.person-card-fallback { display: grid; place-items: center; color: #fff; background: var(--grad); font-size: 42px; font-weight: 800; }
.person-card-open { position: absolute; z-index: 2; right: 10px; bottom: 10px; width: 34px; aspect-ratio: 1; display: grid; place-items: center; opacity: 0; color: #fff; background: var(--grad); border-radius: 11px; transform: translateY(7px); transition: opacity .2s, transform .2s; }
.person-card:hover .person-card-open, .person-card:focus-visible .person-card-open { opacity: 1; transform: none; }
.person-card:hover .person-card-photo { box-shadow: 0 20px 34px -15px rgba(139,92,246,.56); }
.person-card:hover .person-card-photo img { transform: scale(1.055); }
.person-card-photo img { transition: transform .35s ease; }
.person-card-body { padding: 10px 4px 0; }
.person-card-body h3 { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.person-card-body p { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.people-filter-empty { padding: 25px; color: var(--muted); text-align: center; }
/* Numbered pagination — actors directory */
.people-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 28px; }
.people-page, .people-page-nav {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px;
  color: var(--muted); font-size: 13px; font-weight: 700; transition: color .18s, border-color .18s, background .18s, transform .18s;
}
.people-page:hover, .people-page-nav:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.people-page.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 9px 20px -10px rgba(139,92,246,.8); pointer-events: none; }
.people-page-nav i { font-size: 15px; }
.people-state { max-width: 560px; margin: 42px auto; padding: 36px 28px; text-align: center; }
.people-state-icon { width: 58px; aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto 13px; color: var(--accent); background: var(--accent-soft); border-radius: 18px; font-size: 28px; }
.people-state h2 { font-size: 18px; }
.people-state p { max-width: 375px; margin: 8px auto 0; color: var(--muted); font-size: 13px; }
.person-profile { position: relative; isolation: isolate; overflow: hidden; margin: 24px 0 0; padding: clamp(24px, 4vw, 48px); border: 1px solid rgba(139,92,246,.24); border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(139,92,246,.16), var(--surface) 52%); }
.person-profile-glow { position: absolute; z-index: -1; right: -110px; bottom: -170px; width: 380px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(236,72,153,.22), transparent 66%); }
.person-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: clamp(22px, 3.2vw, 35px); color: var(--muted); font-size: 12px; font-weight: 700; }
.person-back:hover { color: var(--accent); }
.person-profile-grid { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: end; gap: clamp(24px, 4vw, 48px); }
.person-profile-photo { overflow: hidden; aspect-ratio: .77 / 1; border: 3px solid rgba(255,255,255,.2); border-radius: 22px; background: var(--grad); box-shadow: 0 22px 38px -20px rgba(0,0,0,.8); }
.person-profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.person-profile-photo > span { display: grid; width: 100%; height: 100%; place-items: center; color: #fff; font-size: 64px; font-weight: 800; }
.person-profile-copy h1 { margin-top: 8px; font-size: clamp(29px, 4vw, 46px); letter-spacing: -.035em; }
.person-department { margin-top: 3px; color: var(--muted); font-size: 14px; }
.person-facts { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 22px; }
.person-facts div { min-width: 105px; }
.person-facts dt { color: var(--muted-2); font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.person-facts dd { margin-top: 2px; font-size: 12.5px; font-weight: 700; }
.person-credit-count { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 12px; color: var(--accent); background: var(--accent-soft); border-radius: 99px; font-size: 12px; font-weight: 700; }
.person-credit-count > i { font-size: 15px; }
.person-credit-count span { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.person-bio .panel p { max-width: 920px; color: var(--muted); line-height: 1.85; white-space: normal; }
.person-bio-text { white-space: pre-line; }
.credit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: clamp(12px, 2vw, 20px); }
.credit-card { display: block; min-width: 0; }
.credit-card-poster { position: relative; overflow: hidden; aspect-ratio: 2 / 3; border-radius: 16px; background: var(--surface-2); box-shadow: var(--shadow-card); }
.credit-card-poster > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.credit-card-poster > span:not(.credit-card-type):not(.credit-card-play) { display: grid; width: 100%; height: 100%; place-items: center; color: var(--muted-2); font-size: 30px; }
.credit-card-type { position: absolute; top: 9px; left: 9px; padding: 3px 7px; color: #fff; background: rgba(10,6,16,.68); backdrop-filter: blur(8px); border-radius: 6px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.credit-card-play { position: absolute; inset: 0; width: 42px; height: 42px; display: grid; place-items: center; margin: auto; opacity: 0; color: #fff; background: var(--grad); border-radius: 50%; transform: scale(.78); transition: opacity .2s, transform .2s; }
a.credit-card:hover .credit-card-poster { box-shadow: 0 18px 32px -14px rgba(139,92,246,.62); }
a.credit-card:hover .credit-card-poster img { transform: scale(1.06); }
a.credit-card:hover .credit-card-play, a.credit-card:focus-visible .credit-card-play { opacity: 1; transform: none; }
.credit-card-copy { padding: 9px 3px 0; }
.credit-card-copy h3 { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.credit-card-copy p { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .people-directory-head { align-items: flex-start; flex-direction: column; }
  .people-directory-tools { width: 100%; max-width: none; }
}
@media (max-width: 640px) {
  .people-hero { min-height: 0; padding: 28px 22px; }
  .people-hero-art { display: none; }
  .people-directory-head { align-items: flex-start; flex-direction: column; }
  .people-directory-tools { width: 100%; max-width: none; align-items: stretch; flex-direction: column; }
  .people-search { flex-basis: auto; width: 100%; }
  .people-filters { width: 100%; }
  .people-filters button { flex: 1 0 auto; }
  .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
  .person-card-photo { border-radius: 14px; }
  .person-card-body { padding-top: 8px; }
  .person-card-body h3 { font-size: 12px; }
  .person-card-body p { font-size: 10px; }
  .person-profile { padding: 22px; }
  .person-profile-grid { grid-template-columns: 110px minmax(0, 1fr); align-items: start; gap: 18px; }
  .person-profile-photo { border-radius: 16px; }
  .person-profile-copy h1 { font-size: 27px; }
  .person-facts { gap: 10px 16px; margin-top: 15px; }
  .person-facts div { min-width: 0; }
  .person-credit-count { margin-top: 15px; font-size: 10.5px; }
  .credit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
  .credit-card-poster { border-radius: 13px; }
  .credit-card-copy h3 { font-size: 11.5px; }
  .credit-card-copy p { font-size: 10px; }
}
@media (max-width: 380px) {
  .people-grid, .credit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-profile-grid { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
  .person-profile-copy h1 { font-size: 24px; }
}

/* ===== Profile settings sheet (site palette) ===== */
.profile-sheet {
  max-width: 630px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
}
.ps-sec { display: flex; flex-direction: column; }
.ps-sec + .ps-sec { margin-top: 38px; }
/* Profile top row: profile picture | details | change password — equal widths, full page width like other panels */
.ps-top-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.ps-top-grid .profile-sheet { max-width: none; }
/* Tablet: 2-up — profile picture + details side by side, change password spans below */
@media (max-width: 1279px) {
  .ps-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-top-grid > .profile-sheet:last-child { grid-column: 1 / -1; }
}
/* Mobile: single column — profile picture → details → change password */
@media (max-width: 940px) { .ps-top-grid { grid-template-columns: minmax(0, 1fr); } }
/* Stack First/Last fields when the details card column gets narrow (3-up/2-up layouts) */
.profile-sheet { container-type: inline-size; }
@container (max-width: 460px) { .ps-row { grid-template-columns: 1fr; gap: 16px; } }
.ps-h { font-size: 22px; font-weight: 700; letter-spacing: -.3px; color: var(--text); margin: 0 0 18px; }

/* Avatar section */
.ps-avatar-row { flex-direction: row; align-items: center; gap: 26px; flex-wrap: wrap; }
.ps-avatar {
  width: 130px; height: 130px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent-soft); border: 1px solid var(--border-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px -6px rgba(139, 92, 246, .45);
}
.ps-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ps-avatar .letter {
  font-size: 54px; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-av-info { min-width: 0; }
.ps-av-h { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.ps-hint { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.ps-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ps-update {
  border: none; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--accent);
}
.ps-update:hover { color: var(--accent-2); text-decoration: underline; }
.ps-remove {
  border: none; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
}
.ps-remove:hover { color: var(--danger); }

/* Forms */
.ps-form { display: flex; flex-direction: column; gap: 16px; }
.ps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ps-field label { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ps-input {
  width: 100%; height: 48px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text);
  padding: 0 20px; font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.ps-input::placeholder { color: var(--muted-2); }
.ps-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ps-pw { position: relative; }
.ps-pw .ps-input { padding-right: 50px; }
.ps-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; color: var(--muted); font-size: 18px; cursor: pointer;
}
.ps-eye:hover { color: var(--text); background: var(--accent-soft); }
.ps-save {
  align-self: flex-start; height: 48px; min-width: 70px; padding: 0 30px;
  border: none; border-radius: 999px; background: var(--grad); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 26px -10px rgba(139, 92, 246, .6);
  transition: transform .18s, box-shadow .18s;
}
.ps-save:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(139, 92, 246, .7); }
.ps-save:active { transform: scale(.97); }

@media (max-width: 640px) {
  .profile-sheet { padding: 22px; border-radius: 18px; }
  .ps-sec + .ps-sec { margin-top: 30px; }
  .ps-h { font-size: 19px; }
  .ps-row { grid-template-columns: 1fr; gap: 16px; }
  .ps-avatar-row { gap: 18px; }
  .ps-avatar { width: 104px; height: 104px; }
  .ps-avatar .letter { font-size: 42px; }
  .ps-av-h { font-size: 18px; }
}

/* ============ Responsive — misc mobile fixes ============ */
/* Explore/search filter bar: selects share one full-width row on phones */
@media (max-width: 640px) {
  .explore-filters form { width: 100%; }
  .explore-filters form .input { flex: 1 1 calc(50% - 4px); min-width: 0; }
}
/* 16px inputs on phones prevent iOS Safari auto-zoom on focus */
@media (max-width: 640px) {
  .ps-input,
  .people-search input,
  .season-pill select,
  .cmt-sort-pill select { font-size: 16px; }
}

