/* ============================================================
   Pooyana — VOD platform stylesheet
   Theme A: Cinema Midnight-Glass (default)
   Theme B: Kids Wonderland
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #040714;
  --bg-2: #080b1c;
  --surface: #1a1d29;
  --surface-2: #21253a;
  --text: #f9f9f9;
  --text-dim: #b8bccd;
  --text-mute: #7f849b;
  --primary: #0072d2;
  --accent: #00d4ff;
  --accent-2: #00a6ff;
  --line: rgba(249, 249, 249, 0.14);
  --line-strong: rgba(249, 249, 249, 0.4);
  --glass: rgba(26, 29, 41, 0.55);
  --glass-2: rgba(12, 15, 30, 0.72);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --amb-1: #0e3b52;
  --amb-2: #00d4ff;
  --amb-a: 0.42;
  --header-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

body.theme-kids {
  --bg: #fffdf7;
  --bg-2: #fff6e6;
  --surface: #e0f7fa;
  --surface-2: #fff3e0;
  --text: #2c2233;
  --text-dim: #5f5568;
  --text-mute: #8b8295;
  --primary: #00bfa5;
  --accent: #ff7a00;
  --accent-2: #ffd600;
  --line: rgba(44, 34, 51, 0.12);
  --line-strong: rgba(44, 34, 51, 0.3);
  --glass: rgba(255, 253, 247, 0.72);
  --glass-2: rgba(255, 253, 247, 0.88);
  --radius: 24px;
  --radius-lg: 32px;
  --shadow: 0 16px 40px rgba(255, 122, 0, 0.18);
  --amb-a: 0.3;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.4s var(--ease);
}

body { min-height: 100vh; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #040714; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(249, 249, 249, 0.18); border-radius: 99px; }
body.theme-kids ::-webkit-scrollbar-thumb { background: rgba(44, 34, 51, 0.2); }

/* ---------- ambient harmony layer ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 78% 8%, color-mix(in srgb, var(--amb-2) 60%, transparent) 0%, transparent 58%),
    radial-gradient(100% 70% at 12% 42%, color-mix(in srgb, var(--amb-1) 85%, transparent) 0%, transparent 62%),
    radial-gradient(90% 60% at 50% 100%, color-mix(in srgb, var(--amb-2) 30%, transparent) 0%, transparent 60%);
  opacity: var(--amb-a);
  transition: background 0.6s var(--ease), opacity 0.6s var(--ease);
  filter: blur(10px);
}
.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.62;
}
body.theme-kids .ambient::after { opacity: 0.55; }

.starlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.starlight i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  animation: drift linear infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
body.theme-kids .starlight i { display: none; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: 0.65; }
  88% { opacity: 0.35; }
  100% { transform: translate3d(-40px, -160px, 0); opacity: 0; }
}

/* ---------- app frame ---------- */
.app { position: relative; z-index: 2; }

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(16px, 3.4vw, 54px);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s;
}
.header.scrolled {
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.theme-kids .header.scrolled {
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 70%, transparent)); }
.brand-name {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(100deg, var(--text) 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-kids .brand-name { background: linear-gradient(100deg, #2c2233 20%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: rgba(249, 249, 249, 0.1); }
body.theme-kids .nav a:hover { background: rgba(255, 122, 0, 0.12); }
.nav a.active { color: var(--text); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--bounce), background 0.25s, border-color 0.25s;
}
.icon-btn:hover { transform: scale(1.08); border-color: var(--line-strong); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* profile + kids switcher */
.profile-wrap { position: relative; }
.profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.25s, background 0.25s;
}
.profile:hover { border-color: var(--line-strong); }
.profile-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #040714;
}
.profile .chev { width: 12px; height: 12px; fill: currentColor; opacity: 0.7; }

.profile-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 12px);
  width: 300px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--glass-2);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.28s var(--ease);
  z-index: 70;
}
.profile-menu.open { opacity: 1; visibility: visible; transform: none; }
.profile-menu h4 { margin: 0 0 12px; font-size: 14px; color: var(--text-mute); font-weight: 600; }
.mode-switch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(249, 249, 249, 0.05);
  color: var(--text);
  text-align: start;
  transition: all 0.25s;
}
body.theme-kids .mode-switch { background: rgba(44, 34, 51, 0.05); }
.mode-switch:hover { border-color: var(--accent); transform: translateX(-4px); }
.mode-switch .ms-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; flex: 0 0 auto; }
.mode-switch.cinema .ms-icon { background: linear-gradient(135deg, #0072d2, #00d4ff); }
.mode-switch.kids .ms-icon { background: linear-gradient(135deg, #ff7a00, #ffd600); }
.mode-switch b { display: block; font-size: 14px; }
.mode-switch span { font-size: 12px; color: var(--text-mute); }
.pm-divider { height: 1px; background: var(--line); margin: 14px 0; }
.pm-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 14px; color: var(--text-dim); transition: 0.2s; }
.pm-link:hover { background: rgba(249, 249, 249, 0.08); color: var(--text); }
body.theme-kids .pm-link:hover { background: rgba(255, 122, 0, 0.12); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 900px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 30px) clamp(16px, 3.4vw, 54px) clamp(28px, 5vh, 70px);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center 28%;
  filter: blur(26px) saturate(120%);
  transform: scale(1.12);
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.2) translate3d(-1.5%, -1.5%, 0); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(270deg, rgba(4, 7, 20, 0.96) 0%, rgba(4, 7, 20, 0.78) 38%, rgba(4, 7, 20, 0.12) 70%, transparent 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 46%);
}
body.theme-kids .hero-scrim {
  background:
    radial-gradient(70% 90% at 82% 20%, rgba(255, 214, 0, 0.22), transparent 60%),
    radial-gradient(60% 80% at 20% 70%, rgba(0, 191, 165, 0.2), transparent 62%),
    linear-gradient(270deg, rgba(255, 253, 247, 0.99) 0%, rgba(255, 253, 247, 0.93) 46%, rgba(255, 253, 247, 0.6) 78%, rgba(255, 253, 247, 0.25) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 46%);
}
body.theme-kids .hero-bg { filter: blur(40px) saturate(140%) brightness(1.08); }
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(60% 60% at 72% 30%, color-mix(in srgb, var(--amb-2) 45%, transparent), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.5;
  transition: background 0.6s var(--ease);
}
body.theme-kids .hero-glow { mix-blend-mode: multiply; opacity: 0.28; }

.hero-inner { display: flex; gap: clamp(24px, 4vw, 70px); align-items: flex-end; width: 100%; max-width: 1560px; margin: 0 auto; }
.hero-copy { flex: 1 1 auto; max-width: 660px; }
.hero-kicker svg { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  margin-bottom: 16px;
}
.hero-title {
  margin: 0 0 6px;
  font-size: clamp(34px, 5.6vw, 76px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}
.hero-sub { font-size: clamp(14px, 1.5vw, 18px); color: var(--text-dim); margin: 0 0 14px; font-weight: 500; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-mute); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.laurel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(8px);
}
.laurel svg { width: 15px; height: 15px; flex: 0 0 auto; }
.laurel.gold { border-color: rgba(255, 210, 88, 0.55); color: #ffd758; background: rgba(255, 190, 40, 0.1); }
.laurel.cyan { border-color: rgba(0, 212, 255, 0.5); color: var(--accent); background: rgba(0, 212, 255, 0.1); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-art {
  flex: 0 0 auto;
  width: clamp(180px, 22vw, 300px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line);
  transform: perspective(1200px) rotateY(-7deg);
  animation: floatArt 9s ease-in-out infinite;
}
@keyframes floatArt {
  0%, 100% { transform: perspective(1200px) rotateY(-7deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(-7deg) translateY(-14px); }
}
.hero-art img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

.hero-nav { position: absolute; bottom: 26px; inset-inline-start: clamp(16px, 3.4vw, 54px); display: flex; align-items: center; gap: 8px; }
.dot-ind { width: 9px; height: 9px; border-radius: 50%; background: rgba(249, 249, 249, 0.35); border: 0; padding: 0; transition: 0.3s var(--bounce); }
.dot-ind.on { width: 30px; border-radius: 99px; background: var(--accent); }
.mute-btn {
  position: absolute;
  bottom: 26px;
  inset-inline-end: clamp(16px, 3.4vw, 54px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}
.mute-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.24s var(--bounce), background 0.24s, box-shadow 0.24s, border-color 0.24s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn-primary { background: #f9f9f9; color: #040714; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45); }
.btn-primary:hover { background: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); }
.btn-ghost { background: rgba(249, 249, 249, 0.12); color: var(--text); border-color: rgba(249, 249, 249, 0.28); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(249, 249, 249, 0.2); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent { background: linear-gradient(100deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 30%, transparent); }
body.theme-kids .btn-accent { color: #fff; background: linear-gradient(100deg, #ff7a00, #ffd600); }
.btn-kids { background: linear-gradient(100deg, #ff7a00, #ffd600); color: #3a1d00; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ---------- sections ---------- */
.wrap { position: relative; z-index: 2; max-width: 1560px; margin: 0 auto; padding: 0 clamp(16px, 3.4vw, 54px); }
.section { margin: clamp(26px, 4vw, 52px) 0; }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sec-title { margin: 0; font-size: clamp(19px, 2.3vw, 28px); font-weight: 800; letter-spacing: -0.3px; display: flex; align-items: center; gap: 10px; }
.sec-title::before { content: ''; width: 4px; height: 26px; border-radius: 99px; background: linear-gradient(180deg, var(--accent), var(--primary)); }
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: 0.25s;
  white-space: nowrap;
}
.view-all svg { width: 15px; height: 15px; fill: currentColor; transition: transform 0.25s var(--ease); }
.view-all:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.view-all:hover svg { transform: translateX(-4px); }

/* ---------- rails ---------- */
.rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 2px 16px;
  scrollbar-width: thin;
}
.rail::-webkit-scrollbar { height: 5px; }
.rail::-webkit-scrollbar-track { background: rgba(249, 249, 249, 0.06); border-radius: 99px; }
.rail::-webkit-scrollbar-thumb { background: rgba(249, 249, 249, 0.22); border-radius: 99px; }
.rail { scrollbar-width: thin; scrollbar-color: rgba(249, 249, 249, 0.25) rgba(249, 249, 249, 0.06); }
body.theme-kids .rail::-webkit-scrollbar-track { background: rgba(44, 34, 51, 0.06); }
body.theme-kids .rail::-webkit-scrollbar-thumb { background: rgba(44, 34, 51, 0.25); }

/* ---------- cards ---------- */
.card {
  position: relative;
  flex: 0 0 auto;
  width: 208px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid transparent;
  transition: transform 0.42s var(--ease), border-color 0.3s, box-shadow 0.42s var(--ease);
  will-change: transform;
}
.card.wide { width: 268px; }
.card:hover { transform: scale(1.07); border-color: #f9f9f9; z-index: 5; box-shadow: 0 24px 54px rgba(0, 0, 0, 0.6); }
body.theme-kids .card:hover { border-color: #ff7a00; box-shadow: 0 22px 44px rgba(255, 122, 0, 0.28); }

.card-art { position: relative; aspect-ratio: 2/3; overflow: hidden; background: linear-gradient(160deg, var(--c1, #24314d), var(--c2, #0d1224)); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), opacity 0.5s var(--ease); }
.card:hover .card-art img { transform: scale(1.09); }

/* hover preview layer (simulated live teaser) */
.card-preview {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s var(--ease);
  background-size: cover;
  background-position: center 30%;
  filter: saturate(115%) contrast(1.05);
  animation: previewPan 9s linear infinite alternate;
}
@keyframes previewPan {
  from { transform: scale(1.02); }
  to { transform: scale(1.16) translateY(-2%); }
}
.card.previewing .card-preview { opacity: 1; }
.card.previewing .card-art > img { opacity: 0; }
.card-art > img { transition: transform 0.6s var(--ease), opacity 0.45s var(--ease); }
.card-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4, 7, 20, 0.85), transparent 52%);
}
.card-grain {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.card:hover .card-grain { opacity: 1; }
.card-progress {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 4px;
  background: rgba(249, 249, 249, 0.25);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover .card-progress { opacity: 1; }
.card-progress i { display: block; height: 100%; width: 38%; background: var(--accent); animation: fillBar 12s linear infinite; }
@keyframes fillBar { from { width: 4%; } to { width: 100%; } }

.card-quick {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.35s var(--ease);
}
.card:hover .card-quick { opacity: 1; transform: none; }
.quick-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(4, 7, 20, 0.65);
  color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
}
.quick-btn svg { width: 15px; height: 15px; fill: currentColor; }
.quick-btn:hover { background: var(--accent); color: #040714; }

.card-label {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 34px 12px 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s var(--ease);
  background: linear-gradient(0deg, rgba(4, 7, 20, 0.92), transparent);
}
.card:hover .card-label { opacity: 1; transform: none; }
.card-label b { display: block; font-size: 15px; font-weight: 800; }
.card-label span { font-size: 12px; color: var(--text-dim); }

.card-cap { padding: 9px 3px 0; }
.card-cap b { display: block; font-size: 14px; font-weight: 700; }
.card-cap span { font-size: 11.5px; color: var(--text-mute); }

/* poster placeholder for titles without art */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--c1), var(--c2));
}
.ph span { font-size: 46px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45)); display: grid; place-items: center; }
.ph span svg { width: 58px; height: 58px; fill: rgba(255, 255, 255, 0.92); }
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 10%, rgba(255, 255, 255, 0.22), transparent 60%);
}

/* ---------- hub tiles ---------- */
.hubs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.hub {
  position: relative;
  aspect-ratio: 16/11;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}
.hub:hover { transform: translateY(-6px) scale(1.02); border-color: var(--line-strong); box-shadow: var(--shadow); }
.hub-bg { position: absolute; inset: 0; background: linear-gradient(150deg, var(--h1), var(--h2)); }
.hub-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 80% at 20% 10%, rgba(255, 255, 255, 0.28), transparent 55%);
}
.hub-motif { position: absolute; inset: 0; opacity: 0.5; }
.hub-motif svg { width: 100%; height: 100%; }
.hub b { position: relative; font-size: clamp(15px, 1.5vw, 20px); font-weight: 800; text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
.hub span { position: relative; display: block; font-size: 12px; opacity: 0.85; }

/* ---------- directors ---------- */
.dir {
  flex: 0 0 auto;
  width: 138px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.35s var(--bounce);
}
.dir:hover { transform: translateY(-6px); }
.dir-face {
  width: 108px; height: 108px;
  margin: 0 auto 12px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  background: linear-gradient(150deg, var(--d1), var(--d2));
  transition: box-shadow 0.4s var(--ease), border-color 0.3s;
}
.dir:hover .dir-face { border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent), 0 18px 40px rgba(0, 0, 0, 0.5); }
.dir-face svg { width: 100%; height: 100%; }
.dir-face .mono {
  position: absolute;
  bottom: 8px;
  font-size: 20px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.dir b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.dir span { display: block; font-size: 11.5px; color: var(--text-mute); margin-top: 3px; }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--glass);
  cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.news-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.news-art { aspect-ratio: 16/9; background-size: cover; background-position: center; }
.news-body { padding: 16px 18px 20px; }
.news-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-mute); margin-bottom: 8px; }
.news-cat { color: var(--accent); font-weight: 700; }
.news-card h4 { margin: 0 0 8px; font-size: 17px; font-weight: 800; line-height: 1.6; }
.news-card p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.9; }

/* ---------- browse / grid page ---------- */
.page-head { padding: calc(var(--header-h) + 46px) 0 24px; }
.crumbs { font-size: 13px; color: var(--text-mute); margin-bottom: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs svg { width: 14px; height: 14px; fill: currentColor; flex: 0 0 auto; }
.crumbs a:hover { color: var(--accent); }
.page-title { margin: 0 0 10px; font-size: clamp(28px, 4.4vw, 52px); font-weight: 900; letter-spacing: -1px; }
.page-lead { margin: 0 0 22px; color: var(--text-dim); font-size: 15px; max-width: 700px; line-height: 2; }

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  transition: 0.25s var(--bounce);
}
.chip:hover { color: var(--text); transform: translateY(-2px); }
.chip.on { background: var(--text); color: #040714; border-color: var(--text); }
body.theme-kids .chip.on { background: var(--accent); color: #3a1d00; border-color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; }
.grid .card { width: 100%; }

/* ---------- detail page ---------- */
.detail-hero { position: relative; min-height: 74vh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.detail-bg { position: absolute; inset: 0; z-index: -3; background-size: cover; background-position: center 22%; filter: blur(22px) saturate(115%); transform: scale(1.1); }
.detail-scrim { position: absolute; inset: 0; z-index: -2; background: linear-gradient(0deg, var(--bg) 3%, rgba(4, 7, 20, 0.55) 52%, rgba(4, 7, 20, 0.75) 100%); }
body.theme-kids .detail-scrim { background: linear-gradient(0deg, var(--bg) 3%, rgba(255, 253, 247, 0.7) 52%, rgba(255, 253, 247, 0.85) 100%); }
.detail-inner { display: flex; gap: clamp(20px, 3vw, 48px); align-items: flex-end; width: 100%; max-width: 1560px; margin: 0 auto; padding: calc(var(--header-h) + 40px) clamp(16px, 3.4vw, 54px) 34px; }
.detail-poster { flex: 0 0 auto; width: clamp(170px, 19vw, 260px); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.detail-copy { flex: 1 1 auto; }
.detail-copy h1 { margin: 0 0 8px; font-size: clamp(28px, 4.4vw, 58px); font-weight: 900; letter-spacing: -1px; }
.detail-en { color: var(--text-mute); font-size: 15px; margin-bottom: 14px; letter-spacing: 0.4px; }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 0 0 30px; }
.tab {
  position: relative;
  padding: 16px 2px;
  background: none;
  border: 0;
  color: var(--text-mute);
  font-size: 16px;
  font-weight: 700;
  transition: color 0.25s;
}
.tab:hover { color: var(--text-dim); }
.tab.on { color: var(--text); }
.tab.on::after {
  content: '';
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
body.theme-kids .tab.on::after { background: linear-gradient(90deg, #ff7a00, #ffd600); }

.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 34px; padding-bottom: 60px; }
.panel-title { font-size: 19px; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.panel-title svg { width: 19px; height: 19px; fill: var(--accent); }
.synopsis { font-size: 15.5px; line-height: 2.25; color: var(--text-dim); margin: 0 0 24px; }

.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.award {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  transition: 0.3s;
}
.award:hover { border-color: var(--accent); transform: translateY(-3px); }
.award .ai { width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; background: rgba(0, 212, 255, 0.12); border: 1px solid rgba(0, 212, 255, 0.3); }
.award .ai svg { width: 20px; height: 20px; fill: var(--accent); }
.award.gold .ai { background: rgba(255, 199, 44, 0.14); border-color: rgba(255, 199, 44, 0.42); }
.award.gold .ai svg { fill: #ffc72c; }
.award b { display: block; font-size: 14px; font-weight: 700; line-height: 1.8; }
.award span { font-size: 12px; color: var(--text-mute); }

.fact { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.fact:last-child { border-bottom: 0; }
.fact span { color: var(--text-mute); }
.fact b { font-weight: 700; text-align: end; }

.critique {
  margin-top: 26px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--amb-2) 10%, transparent), transparent 70%), var(--glass);
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-dim);
}
.critique b { color: var(--text); display: block; margin-bottom: 8px; font-size: 15px; }

/* ---------- player overlay ---------- */
.player {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: none;
  flex-direction: column;
}
.player.open { display: flex; }
.player-stage { flex: 1 1 auto; position: relative; display: grid; place-items: center; overflow: hidden; }
.player-stage .art { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(26px) brightness(0.55) saturate(120%); transform: scale(1.15); }
.player-stage .focus { position: relative; width: min(420px, 62vw); aspect-ratio: 2/3; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8); border: 1px solid rgba(255, 255, 255, 0.12); }
.player-stage .focus img { width: 100%; height: 100%; object-fit: cover; animation: previewPan 16s linear infinite alternate; }
.player-title { position: absolute; bottom: 34px; inset-inline-start: 40px; z-index: 3; }
.player-title b { display: block; font-size: 26px; font-weight: 900; }
.player-title span { font-size: 13px; color: var(--text-dim); }

/* controls: forced LTR */
.player-controls {
  direction: ltr;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35));
  padding: 16px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pc-row { display: flex; align-items: center; gap: 16px; }
.pc-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid; place-items: center;
  transition: transform 0.2s var(--bounce), background 0.2s;
}
.pc-btn:hover { transform: scale(1.12); background: rgba(255, 255, 255, 0.14); }
.pc-btn svg { width: 21px; height: 21px; fill: currentColor; }
.pc-time { font-size: 13px; color: #d8dbe6; font-variant-numeric: tabular-nums; min-width: 96px; }
.scrub { flex: 1 1 auto; height: 22px; display: flex; align-items: center; cursor: pointer; position: relative; }
.scrub-track { width: 100%; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.26); position: relative; overflow: hidden; }
.scrub-buffer { position: absolute; inset-block: 0; inset-inline-start: 0; width: 72%; background: rgba(255, 255, 255, 0.28); }
.scrub-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0%; background: linear-gradient(90deg, #0072d2, #00d4ff); border-radius: 99px; }
.scrub-knob {
  position: absolute;
  top: 50%;
  inset-inline-start: 0%;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s var(--bounce);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
}
.scrub:hover .scrub-knob { transform: translate(-50%, -50%) scale(1); }
.pc-right { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.quality-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid rgba(0, 212, 255, 0.42);
  background: rgba(0, 212, 255, 0.13);
  color: #7ee6ff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.quality-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #35e08a; box-shadow: 0 0 8px #35e08a; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.quality-menu {
  position: absolute;
  bottom: 76px;
  inset-inline-end: 26px;
  background: rgba(8, 10, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 8px;
  min-width: 220px;
  display: none;
  backdrop-filter: blur(12px);
}
.quality-menu.open { display: block; }
.quality-menu h5 { margin: 4px 8px 8px; font-size: 12px; color: #9aa0b5; font-weight: 600; }
.qm-item {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dfe3ee;
  font-size: 13.5px;
  text-align: start;
}
.qm-item:hover { background: rgba(255, 255, 255, 0.1); }
.qm-item.on { color: #00d4ff; }
.qm-item small { color: #7f849b; font-size: 11.5px; }
.fullscreen-hint { font-size: 12px; color: #8b90a5; }

/* ---------- AI view ---------- */
.ai-wrap { max-width: 900px; margin: 0 auto; padding: calc(var(--header-h) + 40px) 20px 80px; }
.ai-head { text-align: center; margin-bottom: 26px; }
.ai-orb {
  width: 78px; height: 78px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #0072d2, #00d4ff, #7c4dff, #0072d2);
  animation: spin 6s linear infinite;
  display: grid; place-items: center;
  box-shadow: 0 0 44px rgba(0, 212, 255, 0.45);
}
.ai-orb::after { content: '✦'; width: 62px; height: 62px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 26px; color: var(--accent); animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-head h1 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; }
.ai-head p { margin: 0; color: var(--text-dim); font-size: 15px; }

.ai-box { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 20px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); }
.ai-box input { flex: 1 1 auto; background: none; border: 0; outline: 0; color: var(--text); font-size: 15.5px; font-family: inherit; padding: 12px 0; }
.ai-box input::placeholder { color: var(--text-mute); }
.ai-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; flex: 0 0 auto; transition: transform 0.25s var(--bounce); }
.ai-send:hover { transform: scale(1.08); }
.ai-send svg { width: 20px; height: 20px; fill: currentColor; }

.ai-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 18px 0 28px; }
.ai-chip { padding: 9px 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass); color: var(--text-dim); font-size: 13px; transition: 0.25s var(--bounce); }
.ai-chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

.chat { display: flex; flex-direction: column; gap: 16px; }
.bubble { max-width: 84%; padding: 18px 20px; border-radius: 20px; font-size: 15px; line-height: 2.1; }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-bottom-left-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--glass); border: 1px solid var(--line); border-bottom-right-radius: 6px; }
.bubble h5 { margin: 0 0 10px; font-size: 13px; color: var(--accent); display: flex; align-items: center; gap: 7px; }
.bubble h5 svg { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }
.bubble .ai-cards { display: flex; gap: 12px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; }
.bubble .ai-cards .card { width: 158px; }
.typing { display: inline-flex; gap: 5px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ---------- my list ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--text-mute); }
.empty .e-icon { font-size: 54px; margin-bottom: 14px; }

/* ---------- reels ---------- */
.reels {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(2, 4, 12, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  place-items: center;
  padding: 20px;
}
.reels.open { display: grid; }
.reels-card { width: min(420px, 94vw); border-radius: 26px; overflow: hidden; background: #0a0d1c; border: 1px solid var(--line); box-shadow: var(--shadow); }
.reels-stage { position: relative; aspect-ratio: 9/16; background-size: cover; background-position: center; }
.reels-stage::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 7, 20, 0.85), transparent 45%); }
.reels-bookmark {
  position: absolute;
  top: 18px;
  inset-inline-end: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 99px;
  background: rgba(4, 7, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.reels-bookmark svg { width: 17px; height: 17px; fill: var(--accent); }
.reels-cap { position: absolute; bottom: 18px; inset-inline: 18px; z-index: 2; }
.reels-cap b { display: block; font-size: 18px; font-weight: 800; }
.reels-cap span { font-size: 12.5px; color: var(--text-dim); }
.reels-bar { display: flex; align-items: center; gap: 10px; padding: 16px; direction: ltr; }
.reels-bar .scrub { height: 20px; }
.reels-actions { display: flex; gap: 10px; margin-top: 12px; }
.reels-actions .btn { flex: 1 1 0; justify-content: center; }
.reels-close { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 3; }

/* ---------- toasts ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  inset-inline-start: 50%;
  transform: translateX(50%) translateY(24px);
  z-index: 300;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  background: rgba(10, 13, 28, 0.94);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- bottom nav (mobile) ---------- */
.bottom-nav { display: none; }
.kids-toggle { display: none; }

/* ============================================================
   MOBILE APP MODE
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-h: 52px; }
  .desktop-nav, .profile-label, .header .mode-inline { display: none !important; }
  .kids-toggle { display: grid; font-size: 19px; }
  .header { gap: 12px; padding: 0 16px; }
  .header-actions { gap: 8px; }
  .brand-name { font-size: 21px; }

  body { padding-bottom: calc(74px + var(--safe-b)); }

  .hero { min-height: 76vh; padding: calc(var(--header-h) + 20px) 18px 78px; align-items: flex-end; }
  .hero-inner { flex-direction: column-reverse; align-items: stretch; gap: 18px; }
  .hero-art { width: 140px; align-self: flex-start; }
  .hero-title { font-size: 32px; }
  .hero-actions .btn { flex: 1 1 140px; justify-content: center; }
  .hero-nav { bottom: 12px; inset-inline-start: 18px; }
  .mute-btn { bottom: 12px; inset-inline-end: 18px; }

  .hubs { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .hub { aspect-ratio: 16/10; padding: 13px; }
  .hub:last-child { grid-column: span 2; }

  .card { width: 152px; }
  .card.wide { width: 196px; }
  .rail { gap: 11px; padding-bottom: 12px; }

  .dir { width: 96px; }
  .dir-face { width: 76px; height: 76px; }

  .cols { grid-template-columns: 1fr; gap: 26px; }
  .detail-inner { flex-direction: column; align-items: stretch; }
  .detail-poster { width: 132px; }
  .detail-hero { min-height: auto; }
  .tabs { gap: 18px; overflow-x: auto; }
  .tab { font-size: 14.5px; white-space: nowrap; }

  .news-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }

  .bubble { max-width: 94%; font-size: 14px; padding: 15px 16px; }
  .bubble .ai-cards .card { width: 132px; }

  .player-controls { padding: 12px 14px 16px; }
  .pc-time { min-width: 74px; font-size: 12px; }
  .quality-badge { font-size: 11px; padding: 6px 10px; }
  .fullscreen-hint { display: none; }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 90;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(66px + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: var(--glass-2);
    backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid var(--line);
  }
  .bn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 0;
    color: var(--text-mute);
    font-size: 10.5px;
    font-weight: 600;
    padding: 8px 2px;
    transition: color 0.25s, transform 0.25s var(--bounce);
  }
  .bn svg { width: 21px; height: 21px; fill: currentColor; }
  .bn.on { color: var(--accent); }
  body.theme-kids .bn.on { color: #ff7a00; }
  .bn.on svg { transform: translateY(-2px); }
  .bn .bn-dot { position: absolute; margin-top: -26px; margin-inline-start: 24px; width: 7px; height: 7px; border-radius: 50%; background: #ff3b5c; }

  .toast { bottom: calc(84px + var(--safe-b)); }
  .reels-card { width: min(340px, 92vw); }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card { width: 138px; }
}

/* ============================================================
   KIDS MODE TOUCHES
   ============================================================ */
body.theme-kids .hero-title { text-shadow: 0 6px 20px rgba(255, 122, 0, 0.22); }
body.theme-kids .sec-title::before { background: linear-gradient(180deg, #ff7a00, #ffd600); }
body.theme-kids .card:hover { transform: scale(1.05) translateY(-6px); }
body.theme-kids .card-cap b { font-weight: 800; }
body.theme-kids .hub { border-radius: 28px; }
body.theme-kids .btn:hover { transform: translateY(-3px) scale(1.04) rotate(-0.6deg); }
body.theme-kids .chip:hover { transform: translateY(-3px) scale(1.04); }
body.theme-kids .news-card { border-radius: 28px; }
body.theme-kids .ai-orb { box-shadow: 0 0 44px rgba(255, 122, 0, 0.4); }
body.theme-kids .ai-orb::after { color: #ff7a00; }
body.theme-kids .player-title b, body.theme-kids .bubble h5 { color: inherit; }

/* floating stickers in kids mode */
.stickers { display: none; }
body.theme-kids .stickers { display: block; position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.stickers span { position: absolute; font-size: 26px; opacity: 0.5; animation: floaty 7s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}

/* ============================================================
   V2 — SABZ AFRANG / POOYANA STAR GRAPHIC SYSTEM
   palette: #009F87 teal · #FF6B3D orange · #202124 ink · #F7F7F2 cream
   ============================================================ */
:root {
  --bg: #14161a;
  --bg-2: #1a1d22;
  --surface: #202124;
  --surface-2: #292d33;
  --text: #f7f7f2;
  --text-dim: rgba(247, 247, 242, 0.72);
  --text-mute: rgba(247, 247, 242, 0.45);
  --primary: #009f87;
  --accent: #ff6b3d;
  --accent-2: #009f87;
  --line: rgba(247, 247, 242, 0.12);
  --line-strong: rgba(247, 247, 242, 0.3);
  --glass: rgba(32, 33, 36, 0.62);
  --glass-2: rgba(20, 22, 26, 0.86);
  --cream: #f7f7f2;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}
body.theme-kids {
  --bg: #f7f7f2;
  --bg-2: #fffdf8;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --text: #202124;
  --text-dim: rgba(32, 33, 36, 0.72);
  --text-mute: rgba(32, 33, 36, 0.5);
  --primary: #009f87;
  --accent: #ff6b3d;
  --accent-2: #f0a400;
  --line: rgba(32, 33, 36, 0.12);
  --line-strong: rgba(32, 33, 36, 0.3);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.9);
}

/* ---- star graphic system ---- */
.s4 { width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; }
.s4-o { fill: none; stroke: currentColor; stroke-width: 1.6; }
.pattern-stars {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23009F87'%3E%3Cpath opacity='.16' d='M26 0c.8 8.4 5.9 13.5 14.3 14.3C31.9 15.1 26.8 20.2 26 28.6c-.8-8.4-5.9-13.5-14.3-14.3C20.1 13.5 25.2 8.4 26 0z'/%3E%3Cpath opacity='.1' d='M104 64c.6 6.3 4.4 10.1 10.7 10.7-6.3.6-10.1 4.4-10.7 10.7-.6-6.3-4.4-10.1-10.7-10.7 6.3-.6 10.1-4.4 10.7-10.7z'/%3E%3C/g%3E%3C/svg%3E");
}
.divider-stars { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.divider-stars::before, .divider-stars::after { content: ''; height: 1px; flex: 1 1 auto; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.divider-stars svg { width: 13px; height: 13px; fill: currentColor; }

/* featured badge — orange pill with star */
.badge-star {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 107, 61, 0.32);
}
.badge-star svg { width: 15px; height: 15px; fill: currentColor; }
.badge-star.teal { background: var(--primary); box-shadow: 0 8px 22px rgba(0, 159, 135, 0.32); }
.badge-star.ink { background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: none; }

/* 4-point star play button */
.play-star {
  position: relative;
  width: 74px; height: 74px;
  display: grid; place-items: center;
  border: 0; background: transparent; padding: 0;
  transition: transform 0.3s var(--bounce);
}
.play-star svg { width: 100%; height: 100%; }
.play-star:hover { transform: scale(1.08) rotate(6deg); }
.play-star .st-fill { fill: var(--accent); }
.play-star .st-cut { fill: var(--cream); }

/* loading — ring of stars */
.loading-stars { position: relative; width: 54px; height: 54px; margin: 0 auto; animation: spin 9s linear infinite; }
.loading-stars i { position: absolute; inset: 0; display: grid; place-items: center; }
.loading-stars i::after { content: ''; width: 9px; height: 9px; background: var(--primary); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.loading-stars i:nth-child(1) { transform: rotate(0deg) translateY(-24px); }
.loading-stars i:nth-child(2) { transform: rotate(60deg) translateY(-24px); }
.loading-stars i:nth-child(3) { transform: rotate(120deg) translateY(-24px); }
.loading-stars i:nth-child(4) { transform: rotate(180deg) translateY(-24px); }
.loading-stars i:nth-child(5) { transform: rotate(240deg) translateY(-24px); }
.loading-stars i:nth-child(6) { transform: rotate(300deg) translateY(-24px); }

/* festival map pin */
.pin-star {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 159, 135, 0.16);
  border: 1px solid rgba(0, 159, 135, 0.42);
  color: var(--primary);
}
.pin-star svg { width: 15px; height: 15px; fill: currentColor; }

/* hover detail corner star */
.hover-star { position: absolute; top: 10px; inset-inline-start: 10px; width: 26px; height: 26px; color: var(--accent); opacity: 0; transform: scale(0.6) rotate(-40deg); transition: all 0.4s var(--bounce); pointer-events: none; }
.card:hover .hover-star, .news-card:hover .hover-star { opacity: 1; transform: none; }
.hover-star svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }

/* image mask — star cut-out over artwork */
.mask-star { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mask-star svg { position: absolute; bottom: -14%; inset-inline-start: -6%; width: 42%; fill: rgba(20, 22, 26, 0.55); }

/* ---- V2 stage (hero) — cinematic full-bleed, no floating poster card ---- */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(20px, 3.2vw, 48px);
  padding: 0 clamp(16px, 3.4vw, 54px) clamp(30px, 5vh, 60px);
  min-height: clamp(540px, 80vh, 780px);
  overflow: hidden;
  isolation: isolate;
}
.stage-copy {
  padding-top: calc(var(--header-h) + 16px);
}
.stage::before {
  content: '';
  position: absolute; inset: 0; z-index: -3;
  background: radial-gradient(90% 70% at 78% 18%, rgba(0, 159, 135, 0.22), transparent 62%), var(--bg);
}
.stage::after {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23ffffff'%3E%3Cpath opacity='.035' d='M34 0c.9 10 6.9 16 17 17-10.1.9-16.1 6.9-17 17-.9-10.1-6.9-16-17-17C27.1 16 33.1 10 34 0z'/%3E%3Cpath opacity='.025' d='M120 82c.7 8 5.6 12.9 13.7 13.7-8.1.7-13 5.6-13.7 13.7-.7-8.1-5.6-13-13.7-13.7 8.1-.7 13-5.6 13.7-13.7z'/%3E%3C/g%3E%3C/svg%3E");
}
.stage-media {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 44px 100px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line);
  background: #0a0c0f;
}
.stage-media video, .stage-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-media .mask-star svg { fill: rgba(10, 12, 15, 0.42); }
.stage-media-tag {
  position: absolute; inset-inline-start: 14px; bottom: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(10, 12, 15, 0.6); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--text);
  backdrop-filter: blur(8px);
}
.stage-media-tag svg { width: 14px; height: 14px; fill: var(--accent); }
.stage-copy h1 {
  margin: 14px 0 4px;
  font-size: clamp(32px, 5.2vw, 72px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -1.5px;
}
.stage-copy .sub { color: var(--text-dim); font-size: clamp(14px, 1.5vw, 17px); margin: 0 0 16px; font-weight: 600; letter-spacing: .3px; }
.stage-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stage-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(247, 247, 242, 0.06);
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
}
.stage-pill svg { width: 13px; height: 13px; fill: var(--primary); }
.stage-pill b { color: var(--text); font-weight: 800; }
.stage-synopsis { color: var(--text-dim); font-size: 15px; line-height: 2.1; margin: 0 0 20px; max-width: 560px; }
.stage-facts { display: grid; gap: 9px; margin-bottom: 24px; }
.stage-fact { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-dim); }
.stage-fact svg { width: 16px; height: 16px; fill: var(--primary); }
.stage-fact b { color: var(--text); font-weight: 700; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stage-dots { display: flex; gap: 8px; margin-top: 26px; }
.stage-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: rgba(247,247,242,.28); padding: 0; transition: all .3s var(--bounce); }
.stage-dots button.on { width: 34px; background: var(--accent); }
.stage-dots button:hover { background: var(--primary); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 30px rgba(255, 107, 61, 0.3); }
.btn-primary:hover { background: #ff8059; }
.btn-accent { background: linear-gradient(100deg, var(--primary), #00c9a7); color: #fff; }
body.theme-kids .btn-accent { background: linear-gradient(100deg, var(--accent), #f0a400); }
.btn-kids { background: linear-gradient(100deg, #ff6b3d, #f0a400); color: #fff; }
.brand-name { background: linear-gradient(100deg, var(--text) 15%, var(--primary) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-kids .brand-name { background: linear-gradient(100deg, #202124 15%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; }
.brand-mark { filter: drop-shadow(0 0 12px rgba(0, 159, 135, 0.6)); }
.nav a.active { color: var(--primary); }
.nav a:hover { color: var(--primary); background: rgba(0, 159, 135, 0.12); }
.sec-title::before { background: linear-gradient(180deg, var(--primary), var(--accent)); }
.view-all:hover { color: var(--accent); }
.laurel.gold { border-color: rgba(255, 107, 61, 0.5); color: #ff8a63; background: rgba(255, 107, 61, 0.1); }
.laurel.cyan { border-color: rgba(0, 159, 135, 0.5); color: #2fd6b6; background: rgba(0, 159, 135, 0.12); }
.profile-avatar { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.card:hover { border-color: var(--primary); }
.card-preview { opacity: 0; }
.card.previewing .card-preview { opacity: 1; }
.hub { border-radius: 24px; }
.hub:hover { border-color: var(--primary); }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.card-quick { inset-inline-start: 10px; }
.quick-btn:hover { background: var(--primary); color: #fff; }
.toast { background: rgba(20, 22, 26, 0.95); border-color: var(--line-strong); }
.trophy-star { color: var(--accent); }

/* ---- V2 playback page ---- */
.play-page { position: relative; z-index: 2; }
.play-hero { position: relative; background: #0a0c0f; }
.play-stage { position: relative; width: 100%; aspect-ratio: 16/9; max-height: 82vh; background: #000; overflow: hidden; }
.play-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.play-poster { position: absolute; inset: 0; display: grid; place-items: center; background-size: cover; background-position: center; }
.play-poster .pp-inner { text-align: center; }
.play-poster .pp-inner b { display: block; font-size: clamp(22px, 3vw, 38px); font-weight: 900; margin: 14px 0 16px; }
.play-info { max-width: 1500px; margin: 0 auto; padding: 34px clamp(16px, 3.4vw, 54px) 70px; }
.play-head { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 26px; }
.play-head h1 { margin: 0 0 8px; font-size: clamp(26px, 3.6vw, 46px); font-weight: 900; letter-spacing: -1px; }
.play-head .p-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.rate-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rate-score { display: flex; align-items: baseline; gap: 6px; }
.rate-score b { font-size: 30px; font-weight: 900; color: var(--accent); }
.rate-score span { font-size: 12.5px; color: var(--text-mute); }
.rate-stars { display: flex; gap: 3px; direction: ltr; }
.rate-stars button { background: none; border: 0; padding: 2px; color: rgba(247, 247, 242, 0.22); transition: transform .2s var(--bounce), color .2s; }
.rate-stars button svg { width: 21px; height: 21px; fill: currentColor; }
.rate-stars button.on { color: var(--accent); }
.rate-stars button:hover { transform: scale(1.2); }
.rate-label { font-size: 13px; color: var(--text-mute); }
.play-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 34px; }
.cast-list { display: grid; gap: 10px; }
.cast-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--line); background: rgba(247, 247, 242, 0.03); }
.cast-row .c-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.cast-row b { display: block; font-size: 14px; }
.cast-row span { font-size: 12px; color: var(--text-mute); }
.comment-form { display: grid; gap: 10px; padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: rgba(247, 247, 242, 0.035); }
.comment-form .cf-row { display: flex; gap: 10px; }
.comment-form input, .comment-form textarea {
  width: 100%; background: rgba(10, 12, 15, 0.5); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 14px; resize: vertical;
}
body.theme-kids .comment-form input, body.theme-kids .comment-form textarea { background: #fff; }
.comment-form input:focus, .comment-form textarea:focus { outline: 0; border-color: var(--primary); }
.comment { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment .c-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.comment .c-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.comment .c-head b { font-size: 14px; }
.comment .c-head span { font-size: 11.5px; color: var(--text-mute); }
.comment .c-head .c-stars { color: var(--accent); font-size: 12px; letter-spacing: 1px; }
.comment p { margin: 0; font-size: 14px; line-height: 1.95; color: var(--text-dim); }
.comment-del { background: none; border: 0; color: var(--text-mute); font-size: 12px; margin-inline-start: auto; }
.comment-del:hover { color: var(--accent); }

/* ---- V2 reviews ---- */
.review-card {
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(0, 159, 135, 0.08), rgba(247, 247, 242, 0.03));
  padding: 20px; position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .3s;
}
.review-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.review-score { position: absolute; top: 18px; inset-inline-end: 18px; font-size: 26px; font-weight: 900; color: var(--accent); }
.review-card h4 { margin: 0 0 8px; font-size: 17px; font-weight: 800; line-height: 1.7; padding-inline-end: 60px; }
.review-card p { margin: 0 0 14px; font-size: 13.5px; line-height: 2; color: var(--text-dim); }
.review-by { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-mute); }
.review-by .rb-av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }

/* ---- V2 reels ---- */
.reels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.reel-tile {
  position: relative; aspect-ratio: 9/16; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  transition: transform .35s var(--ease), border-color .3s;
}
.reel-tile:hover { transform: translateY(-6px) scale(1.02); border-color: var(--primary); }
.reel-tile .rt-art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.reel-tile .rt-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,15,.94) 12%, rgba(10,12,15,.15) 55%); }
.reel-tile .rt-bookmark { position: absolute; top: 12px; inset-inline-end: 10px; width: 26px; height: 26px; color: var(--cream); }
.reel-tile .rt-bookmark svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.reel-tile .rt-body { position: absolute; inset-inline: 14px; bottom: 14px; z-index: 2; }
.reel-tile .rt-text { font-size: 14px; font-weight: 800; line-height: 1.8; margin-bottom: 7px; }
.reel-tile .rt-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-dim); }
.reel-tile .rt-meta b { color: var(--primary); }
.reel-tile.tone-orange .rt-scrim { background: linear-gradient(0deg, rgba(120,38,16,.94) 12%, rgba(10,12,15,.2) 55%); }
.reel-tile.tone-ink .rt-scrim { background: linear-gradient(0deg, rgba(20,22,26,.96) 12%, rgba(10,12,15,.2) 55%); }
.reel-tile.tone-cream .rt-scrim { background: linear-gradient(0deg, rgba(247,247,242,.94) 14%, rgba(10,12,15,.25) 55%); }
.reel-tile.tone-cream .rt-text { color: #202124; }
.reel-tile.tone-cream .rt-meta { color: rgba(32,33,36,.65); }

/* ---- V2 profile ---- */
.profile-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.profile-hero .ph-av { width: 104px; height: 104px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #fff; box-shadow: 0 16px 40px rgba(0,159,135,.3); }
.profile-hero h1 { margin: 0 0 6px; font-size: clamp(24px, 3.2vw, 38px); font-weight: 900; }
.profile-hero p { margin: 0; color: var(--text-dim); font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { padding: 18px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: rgba(247,247,242,.035); }
.stat b { display: block; font-size: 28px; font-weight: 900; color: var(--primary); }
.stat span { font-size: 12.5px; color: var(--text-mute); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; font-size: 14.5px; }
.setting-row span { font-size: 12.5px; color: var(--text-mute); }
.switch { width: 52px; height: 30px; border-radius: 99px; border: 1px solid var(--line); background: rgba(247,247,242,.1); position: relative; transition: background .3s; flex: 0 0 auto; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .3s var(--bounce); }
.switch.on { background: var(--primary); border-color: var(--primary); }
.switch.on::after { transform: translateX(-22px); }

/* ---- news grid v2 ---- */
.news-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.news-lead { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; align-items: center; margin-bottom: 26px; padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: rgba(247,247,242,.035); }
.news-lead .nl-art { aspect-ratio: 16/9; border-radius: 18px; background-size: cover; background-position: center; }
.news-lead h3 { margin: 10px 0 10px; font-size: clamp(20px, 2.4vw, 30px); font-weight: 900; line-height: 1.6; }
.news-lead p { color: var(--text-dim); font-size: 14px; line-height: 2; margin: 0 0 14px; }

@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; }
  .stage-media { order: 2; }
  .stage-copy { order: 1; }
  .play-cols { grid-template-columns: 1fr; }
  .news-lead { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .stage { min-height: auto; padding: calc(var(--header-h) + 18px) 18px 40px; }
  .stage-media { aspect-ratio: 16/10; }
  .stage-copy h1 { font-size: 30px; }
  .play-info { padding: 22px 16px 90px; }
  .reels-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .news-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   V2.1 — palette correction + reels tools + player polish
   ============================================================ */
.scrub-fill { background: linear-gradient(90deg, #009f87, #00c79f); }
.scrub-buffer { background: rgba(247, 247, 242, 0.24); }
.qm-item.on { color: var(--primary); }
.mode-switch.cinema .ms-icon { background: linear-gradient(135deg, #009f87, #ff6b3d); }
.quality-badge { border-color: rgba(0, 159, 135, 0.42); color: var(--text); }
.quality-badge .s4 { width: 13px; height: 13px; fill: var(--primary); }
.quality-menu { background: rgba(32, 33, 36, 0.96); border-color: rgba(247, 247, 242, 0.16); }
.quality-menu h5 { color: var(--text-mute); }

/* player controls on the inline playback page */
.player-controls { position: relative; }
.play-stage + .player-controls { background: linear-gradient(0deg, rgba(20, 22, 26, 0.96), rgba(20, 22, 26, 0.55)); }
.play-stage .play-poster { z-index: 1; }
.play-poster .pp-inner .s4 { width: 54px; height: 54px; fill: var(--primary); }
.quality-menu { bottom: 74px; }

/* reels clipper — canvas on top, tools below */
.reels { background: rgba(10, 12, 15, 0.9); }
.reels-card { background: var(--surface); }
.reels-stage { background: #0e1013; }
.reels-stage::after { z-index: 1; }
.reels-stage #reelsImg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; display: none;
}
.reels-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }
.reels-bookmark { z-index: 3; }
.reels-bookmark svg { fill: var(--primary); }

.reels-tools { padding: 14px 16px 0; display: grid; gap: 12px; }
.reels-text-wrap { display: grid; gap: 7px; }
.reels-text-wrap > span { font-size: 12px; color: var(--text-mute); font-weight: 600; }
#reelsText {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); padding: 11px 14px;
  font: inherit; font-size: 13.5px; outline: none;
}
#reelsText:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 159, 135, 0.18); }
#reelsText::placeholder { color: var(--text-mute); }
.reels-tones { display: flex; gap: 8px; }
.reels-tone {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line);
  background: transparent; padding: 3px; cursor: pointer;
  transition: transform 0.25s var(--bounce), border-color 0.25s;
}
.reels-tone i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.reels-tone:hover { transform: scale(1.1); }
.reels-tone.on { border-color: var(--accent); transform: scale(1.1); }
.reels-actions { padding: 14px 16px 18px; }
.reels-actions .btn { font-size: 13px; padding: 11px 12px; }

/* reels modal — fit inside the viewport on short screens */
.reels { overflow-y: auto; place-items: center; padding: 18px; }
.reels-card { margin: auto; display: flex; flex-direction: column; }
.reels-stage {
  height: min(54vh, 520px);
  width: auto;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  flex: 0 0 auto;
}
.reels-stage canvas { object-fit: cover; }
.reels-bookmark { top: 14px; inset-inline-end: 12px; }
@media (max-height: 700px) {
  .reels-stage { height: min(46vh, 420px); }
  .reels-tools { padding: 10px 14px 0; }
  .reels-actions { padding: 10px 14px 14px; }
}

/* ---- v2.2 grid rhythm: even rows on the home page ---- */
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* poster placeholders — cinematic tone instead of raw palette gradients */
.ph {
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(247, 247, 242, 0.16), transparent 62%),
    linear-gradient(160deg, var(--c1), var(--c2));
  filter: saturate(0.72) brightness(0.66);
}
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 52% at 50% 46%, rgba(10, 12, 15, 0.42), rgba(10, 12, 15, 0.82));
}
.ph > * { position: relative; z-index: 2; }
