/* NocturneSuite design system — gold + blue/violet accents on a night-blue field. */
:root {
  --bg: #08090e;
  --surface: #121521;
  --elevated: #1a1e2e;
  --fg: #f6f3eb;
  --muted: #aaa8b5;
  --subtle: #7a7688;
  --accent: #e1bf75;
  --accent-fg: #171108;
  --violet: #9275ff;
  --cyan: #63d7ef;
  --border: #292d3c;
  --danger: #ff9ba7;
  --ok: #91edbf;
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", "Liberation Serif", Georgia, serif;
  --shadow-soft: 0 20px 70px #0004;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; color-scheme: dark }
body {
  margin: 0;
  background:
    radial-gradient(circle at 10% -10%, #34265e 0, transparent 33%),
    radial-gradient(circle at 90% 0, #153a45 0, transparent 28%),
    var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance }
p { margin: 0; text-wrap: pretty }
a { color: inherit }
.wrap, .section { width: min(1200px, calc(100% - 32px)); margin-inline: auto }
.section { padding-block: 72px }

/* nav */
.nav {
  min-height: 68px; padding: 12px max(16px, calc((100% - 1200px) / 2));
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  border-bottom: 1px solid var(--border);
  background: #09090bd9; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.01em; color: var(--fg); text-decoration: none }
.brand .mark {
  width: 28px; height: 28px; fill: var(--accent); border-radius: 10px; padding: 4px;
  background: conic-gradient(from 210deg, var(--accent), var(--violet), var(--cyan), var(--accent));
  box-shadow: 0 0 25px #9a78ff66;
}
.brand-title { font-family: var(--font-display); }
.brand-badge {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(225, 191, 117, 0.12);
  border: 1px solid rgba(225, 191, 117, 0.28);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 6px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .brand-badge { display: none; }
}
.nav nav, .footer nav { display: flex; gap: 18px; flex-wrap: wrap }
.nav a:not(.brand), .footer a { color: var(--muted); font-size: .9rem; text-decoration: none; transition: color 0.15s ease; }
.nav a:not(.brand):hover, .footer a:hover { color: var(--accent) }

/* hero — Cinema and discovery sanctuary: navy field, gold rules, featured focus stage */
.hero {
  position: relative; overflow: hidden; min-height: 72vh;
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(circle at 12% 42%, #3d2a9a66, transparent 42%),
    linear-gradient(90deg, #0c0a16 0%, #0a0b12 55%, #08070c 100%);
}
.hero-slogan-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 10px;
  border-radius: 999px;
  background: rgba(26, 30, 46, 0.88);
  border: 1px solid rgba(225, 191, 117, 0.35);
  box-shadow: 0 0 25px rgba(225, 191, 117, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
}
.slogan-sparkle {
  color: var(--accent);
  font-size: 0.95rem;
  animation: pulse-glow 2.5s infinite ease-in-out;
}
.slogan-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.slogan-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg);
  opacity: 0.9;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  padding-left: 8px;
}
.hero-signals-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-signal-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--muted);
}
.hero-signal-item strong {
  color: var(--fg);
}
.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.hero-rule { height: 1px; width: 100%; background: var(--accent); opacity: .75; flex-shrink: 0 }
.hero-inner {
  position: relative; width: min(1200px, calc(100% - 32px)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 18rem; align-items: center; gap: 48px;
  padding: 72px 0;
}
.hero-aside { display: flex; flex-direction: column; align-items: center; gap: 22px }
.hero-portrait {
  width: 16rem; height: 16rem; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--accent), 0 24px 60px #0008;
}
.hero-swatches { display: flex; gap: 8px }
.swatch { width: 22px; height: 22px; border-radius: 4px }
.swatch-ink { background: #0a0a0c; border: 1px solid #4a4a52 }
.swatch-cream { background: #f3efe4 }
.swatch-gold { background: var(--accent) }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--accent) }
.hero h1 { margin-top: 16px; max-width: 48rem; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .95 }
.lead { margin-top: 20px; max-width: 36rem; color: var(--muted); font-size: 1.05rem }
.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px }

/* features + idea */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px }
.features h2 { font-size: 1.5rem }
.features p { margin-top: 12px; color: var(--muted); font-size: .95rem }
.idea-panel { border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 40px 48px; box-shadow: var(--shadow-soft) }
.idea-panel h2 { margin-top: 12px; max-width: 48rem; font-size: clamp(1.75rem, 3.5vw, 2.4rem) }
.idea-panel .muted { margin-top: 16px; max-width: 42rem }
.tagline { margin-top: 24px; font-family: var(--font-display); font-size: 1.3rem; color: var(--fg) }

/* panels + sections */
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-soft) }
.panel h2 { font-size: 1.5rem }
.panel .muted { margin-top: 8px; font-size: .95rem }
.members { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px }
.section-heading h2 { margin-top: 10px; font-size: 1.9rem }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }

/* buttons */
.button, .link-button {
  border: 1px solid var(--border); background: transparent; color: var(--fg);
  border-radius: 12px; padding: 10px 18px; font: 600 .92rem var(--font-sans);
  cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
  touch-action: manipulation;
}
.button:hover { border-color: var(--accent); color: var(--accent) }
.button.primary { background: linear-gradient(135deg, var(--accent), #b18431); color: var(--accent-fg); border-color: #ffe6a3 }
.button.primary:hover { filter: brightness(1.08) }
.button:focus-visible, .link-button:focus-visible, .nav a:focus-visible, .footer a:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px
}
.link-button { background: none; border: none; padding: 8px 0; color: var(--accent); font-weight: 500; display: inline-flex }
.link-button:hover { color: #ffe6a3 }
.danger { color: var(--danger) }

/* forms */
form { display: grid; gap: 12px; margin-top: 16px }
label { display: grid; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--muted) }
input, select, textarea {
  font: inherit; color: var(--fg); background: #0e0e11;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 120px; resize: vertical }
input:focus, select:focus, textarea:focus { outline: 3px solid #9275ff55; border-color: var(--violet) }
.check-row { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; color: var(--muted) }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--accent) }
.privacy-note { color: var(--subtle); font-size: .78rem }

/* states + JS-generated */
.status { min-height: 24px; color: var(--accent); margin: 12px 0 0; font-size: .9rem }
.muted { color: var(--muted) }
.assurance-state { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #0e0e11; color: var(--muted); font-size: .95rem }
.assurance-state.is-pending { border-color: #e1bf7566; color: #f0d99f; background: #2a21142e }
.assurance-state.is-complete { border-color: #9eceb366; color: var(--ok); background: #11201a }
.assurance-state.is-error { border-color: #e8a0a866; color: var(--danger); background: #231417 }
#ageForm { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: #0e0e1180 }
.assurance-panel { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start }

/* library */
.grid { display: grid; gap: 16px }
.library-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) }
.panel.video { display: grid; gap: 10px; padding: 16px }
.panel.video h3 { font-size: 1.2rem }
.panel.video .thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16/9;
  border: 0; padding: 0; border-radius: 12px; overflow: hidden;
  background: #0e0e11; cursor: pointer;
}
.panel.video .thumb img { width: 100%; height: 100%; object-fit: cover }
.panel.video .thumb .badge { position: absolute; left: 10px; bottom: 10px; background: #09090bd9; padding: 4px 8px; border-radius: 999px }
.player-stage { margin-bottom: 24px; display: grid; gap: 16px }
.player-frame { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: #000 }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.player-meta h3 { font-size: 1.6rem }
.player-meta p { margin-top: 8px }
.badge { color: var(--accent); font-size: .8rem; font-weight: 500 }
.why { color: var(--muted); font-size: .82rem; font-style: italic; min-height: 1.2em }
.taste-summary {
  margin: 8px 0 16px; padding: 14px 16px; border: 1px solid #e1bf7533;
  border-radius: 14px; background: #16130e; color: #f0d99f; font-size: .98rem;
}
.taste-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px }
.taste-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px;
  font-size: .78rem; letter-spacing: .04em; color: var(--accent);
}
.taste-chip.avoid { color: var(--muted); border-style: dashed }
.sampler-choice { display: flex; gap: 8px; flex-wrap: wrap }
.sampler-choice .button.is-on { border-color: var(--accent); color: var(--accent) }
.empty { grid-column: 1 / -1; padding: 32px; border: 1px dashed var(--border); border-radius: 18px; text-align: center }
.empty p { margin-top: 8px; color: var(--muted); font-size: .92rem }

/* tickets */
.ticket { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: .95rem }
.ticket:last-child { border: 0 }
.ticket p { margin: .3rem 0 }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--muted); font-size: .88rem; width: min(1200px, calc(100% - 32px)); margin-inline: auto }
.footer p { max-width: 60rem }
.footer nav { margin-top: 14px }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important }
}
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; gap: 28px }
  .assurance-panel { grid-template-columns: 1fr }
}
@media (max-width: 720px) {
  .nav { align-items: flex-start; flex-direction: column; padding-block: 14px }
  .hero { min-height: 68vh }
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0; gap: 32px }
  .hero-portrait { width: 12rem; height: 12rem }
  .members { grid-template-columns: 1fr }
  .section { padding-block: 48px }
  .section-heading { align-items: flex-start; flex-direction: column }
  .idea-panel { padding: 28px }
}

/* ──────────────────────────────────────────────────────────────────────
   NocturneSuite AI Video Similarity, Matcher, and Taste Card Styles
   ────────────────────────────────────────────────────────────────────── */

.library-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0 24px;
}
.search-box {
  position: relative;
  width: 100%;
}
.search-box input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(225, 191, 117, 0.15);
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-pills .pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pills .pill:hover {
  color: var(--fg);
  border-color: var(--accent);
}
.filter-pills .pill.active {
  background: linear-gradient(135deg, rgba(225, 191, 117, 0.2), rgba(146, 117, 255, 0.2));
  border-color: var(--accent);
  color: var(--accent);
}

.match-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, rgba(225, 191, 117, 0.25), rgba(146, 117, 255, 0.3));
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-left: 6px;
}

.similar-shelf {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.shelf-header h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}
.shelf-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(99, 215, 239, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}
.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.matcher-panel {
  background: linear-gradient(160deg, #121521, #0c0e17);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}
.matcher-header h2 {
  font-size: 2rem;
  margin: 8px 0 12px;
  color: var(--fg);
}
.search-input-group {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.search-input-group input {
  flex: 1;
  min-width: 260px;
  padding: 14px 20px;
  border-radius: 12px;
  background: #08090e;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 1rem;
}
.search-input-group input:focus {
  outline: none;
  border-color: var(--accent);
}
.target-meta {
  background: rgba(146, 117, 255, 0.08);
  border: 1px solid rgba(146, 117, 255, 0.25);
  border-radius: 14px;
  padding: 18px 24px;
  margin-top: 20px;
}
.target-meta h3 {
  color: var(--accent);
  margin-bottom: 4px;
}

.taste-card-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.taste-card-box {
  position: relative;
  background: #121521;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}
.taste-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
.taste-close-btn:hover {
  color: var(--fg);
}
.card-img-wrap {
  margin: 20px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}
.card-img-wrap img, .card-img-wrap svg {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
}
.card-dl-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

/* ── YouTube History Intelligence & Embed Styles ── */
.history-panel {
  border-color: rgba(196, 165, 116, 0.25);
  background: linear-gradient(180deg, rgba(20, 22, 33, 0.95) 0%, rgba(13, 14, 21, 0.95) 100%);
  position: relative;
  overflow: hidden;
}
.history-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 165, 116, 0.5), transparent);
}
.history-header {
  margin-bottom: 24px;
}
.history-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.history-dropzone {
  border: 2px dashed rgba(196, 165, 116, 0.3);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}
.history-dropzone:hover, .history-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(196, 165, 116, 0.06);
  transform: translateY(-1px);
}
.drop-icon {
  color: var(--accent);
  margin-bottom: 8px;
}
.dropzone-title {
  font-size: 1.05rem;
  color: var(--fg);
  margin-bottom: 6px;
}
.dropzone-title strong {
  color: #ffffff;
}
.dropzone-hint {
  font-size: 0.85rem;
  color: var(--muted);
}
.dropzone-hint code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: #e8cf9b;
}
.history-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 600;
}
.history-divider::before, .history-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.history-divider span {
  padding: 0 14px;
}
.paste-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.paste-wrap textarea {
  width: 100%;
  background: #090a10;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg);
  font-family: monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}
.paste-wrap textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(196, 165, 116, 0.2);
}
.history-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.history-output {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.archetype-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(196, 165, 116, 0.3);
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 28px;
  position: relative;
}
.archetype-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.count-badge {
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(196, 165, 116, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196, 165, 116, 0.25);
  font-weight: 600;
}
.archetype-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #151722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
}
.chip-tag {
  color: #d6d2e1;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.chip-pct {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  background: rgba(196, 165, 116, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}
.embed-generator-box {
  background: #0d0f17;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
}
.embed-header {
  margin-bottom: 20px;
}
.embed-header h4 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 4px;
}
.embed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) {
  .embed-grid { grid-template-columns: 1fr; }
}
.embed-preview-pane {
  display: flex;
  flex-direction: column;
}
.embed-frame-wrapper {
  background: #06070a;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 340px;
}
.embed-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.embed-code-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.code-snippet-block {
  background: #090a10;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
}
.snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
}
.code-snippet-block pre {
  padding: 12px 14px;
  margin: 0;
  overflow-x: auto;
  font-family: monospace, monospace;
  font-size: 0.8rem;
  color: #c7c3d4;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
}
.button-copy {
  background: rgba(196, 165, 116, 0.15);
  color: var(--accent);
  border: 1px solid rgba(196, 165, 116, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.button-copy:hover {
  background: var(--accent);
  color: #0d0f17;
}
.button-copy.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

/* ── Command Palette & Navigation Actions ── */
.btn-cmd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-cmd:hover {
  background: rgba(196, 165, 116, 0.15);
  border-color: rgba(196, 165, 116, 0.35);
  color: var(--accent);
}
.btn-cmd kbd {
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}
.btn-queue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
.btn-queue:hover {
  background: rgba(196, 165, 116, 0.15);
  border-color: rgba(196, 165, 116, 0.35);
  color: var(--accent);
}
.badge-pill {
  background: var(--accent);
  color: #0b0c14;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.cmd-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 14, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  padding-left: 16px;
  padding-right: 16px;
  animation: cmdFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cmd-modal[hidden] {
  display: none !important;
}
@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cmd-box {
  width: 620px;
  max-width: 100%;
  background: #0e101a;
  border: 1px solid rgba(196, 165, 116, 0.3);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cmd-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cmd-search-icon {
  color: var(--accent);
  flex-shrink: 0;
}
.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: #f8fafc;
  font-family: inherit;
}
.cmd-input::placeholder {
  color: #64748b;
}
.cmd-kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: monospace;
}

.cmd-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}
.cmd-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  margin-bottom: 2px;
}
.cmd-item:hover,
.cmd-item.is-selected {
  background: rgba(196, 165, 116, 0.12);
  border-color: rgba(196, 165, 116, 0.28);
}
.cmd-item-icon {
  font-size: 1.15rem;
  width: 28px;
  text-align: center;
  margin-right: 12px;
  flex-shrink: 0;
  color: var(--accent);
}
.cmd-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.cmd-item-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-item-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-item-kbd {
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cmd-item.is-selected .cmd-item-kbd,
.cmd-item:hover .cmd-item-kbd {
  opacity: 1;
}

.cmd-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  color: var(--muted);
}
.cmd-tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cmd-tip kbd {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.7rem;
}

/* ── Playback Queue Drawer ── */
.queue-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #0d0f18;
  border-left: 1px solid rgba(196, 165, 116, 0.22);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.7);
  z-index: 990;
  display: flex;
  flex-direction: column;
  animation: queueSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.queue-drawer[hidden] {
  display: none !important;
}
@keyframes queueSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.queue-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.queue-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.queue-title-wrap h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
}
.count-badge {
  background: rgba(196, 165, 116, 0.18);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}
.queue-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.queue-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(196, 165, 116, 0.2);
}
.queue-item.is-current {
  border-color: var(--accent);
  background: rgba(196, 165, 116, 0.1);
}
.queue-item-drag {
  color: var(--muted);
  font-size: 0.8rem;
  cursor: grab;
}
.queue-item-info {
  flex: 1;
  overflow: hidden;
}
.queue-item-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.queue-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
}
.queue-item-remove {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.queue-item-remove:hover {
  color: #ef4444;
}

/* ── Card Queue Button ── */
.card-btn-queue {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.card-btn-queue:hover {
  background: rgba(196, 165, 116, 0.18);
  border-color: rgba(196, 165, 116, 0.4);
  color: var(--accent);
}

/* ── Picture-in-Picture Mini-Player ── */
.player-stage.is-pip {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 360px !important;
  max-width: 90vw !important;
  z-index: 950 !important;
  margin: 0 !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(196, 165, 116, 0.35) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #0b0c14 !important;
  animation: pipDockIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
@keyframes pipDockIn {
  from { transform: translateY(30px) scale(0.92); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.player-stage.is-pip .player-frame-wrap {
  aspect-ratio: 16 / 9;
}
.player-stage.is-pip .player-pip-bar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(13, 15, 24, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pip-label {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.pip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pip-btn:hover {
  background: rgba(196, 165, 116, 0.2);
  color: var(--accent);
}

/* ── Toast Notifications ── */
.ns-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #151722;
  color: #f8fafc;
  border: 1px solid rgba(196, 165, 116, 0.4);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.ns-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ── Hero Featured In Focus Card ── */
.featured-focus-card {
  background: rgba(18, 20, 30, 0.7);
  border: 1px solid rgba(196, 165, 116, 0.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  width: 320px;
  max-width: 100%;
}
.featured-focus-card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 165, 116, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 24px rgba(196, 165, 116, 0.2);
}
.featured-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.featured-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.featured-focus-card:hover .featured-poster {
  transform: scale(1.04);
}
.featured-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(196, 165, 116, 0.4);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.featured-play-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0c14;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}
.featured-play-btn:hover {
  transform: scale(1.12);
  background: #ecd4a8;
}
.featured-meta {
  padding: 16px 18px 20px;
}
.featured-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 600;
}
.featured-title {
  font-family: var(--font-serif, "Instrument Serif", Georgia, serif);
  font-size: 1.35rem;
  margin: 0 0 6px;
  color: #f8fafc;
  line-height: 1.25;
}
.featured-snippet {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}

/* ── Kids Nav Pill ── */
.kids-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.kids-nav-pill:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(56, 189, 248, 0.28));
  border-color: #fbbf24;
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}
.kids-icon {
  font-size: 0.95rem;
}

/* ── Nocturne Kids Section ── */
.kids-section {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.8) 0%, rgba(12, 17, 29, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 24px;
  padding: 32px 32px 40px;
  margin-bottom: 48px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.kids-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kids-banner-copy {
  flex: 1;
  min-width: 280px;
}
.kids-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.kids-banner-copy h2 {
  font-family: var(--font-serif, "Instrument Serif", Georgia, serif);
  font-size: 2.1rem;
  color: #f8fafc;
  margin: 0 0 8px;
  line-height: 1.2;
}
.kids-lead {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
  max-width: 620px;
}

/* ── Screen Time Timer Widget ── */
.kids-timer-widget {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 14px 18px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}
.timer-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.03em;
}
.timer-buttons {
  display: flex;
  gap: 6px;
}
.timer-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.timer-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #e0f2fe;
}
.timer-btn.active {
  background: #38bdf8;
  color: #0c1524;
  border-color: #38bdf8;
}
.timer-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 600;
  animation: pulseCountdown 2s infinite ease-in-out;
}
@keyframes pulseCountdown {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ── Kids Bracket Tabs ── */
.kids-bracket-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.bracket-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f8fafc;
}
.bracket-tab:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}
.bracket-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.08));
  border-color: #38bdf8;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}
.bracket-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.bracket-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bracket-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
}
.bracket-tab.active .bracket-title {
  color: #38bdf8;
}
.bracket-age {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* ── Kids Player Stage ── */
.kids-player-stage {
  margin: 20px 0 32px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(56, 189, 248, 0.35);
  animation: kidsPlayerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes kidsPlayerSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
.kids-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kids-player-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #38bdf8;
}

/* ── Kids Video Grid & Cards ── */
.kids-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.kids-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.kids-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
}
.kids-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c1322;
  overflow: hidden;
  cursor: pointer;
}
.kids-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.kids-card:hover .kids-card-thumb {
  transform: scale(1.05);
}
.kids-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.kids-card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.kids-play-bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #38bdf8;
  color: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.kids-card-thumb-wrap:hover .kids-play-bubble {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}
.kids-card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.kids-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 6px;
  line-height: 1.3;
}
.kids-card-creator {
  font-size: 0.74rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 6px;
}
.kids-card-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0 0 12px;
  flex: 1;
}
.kids-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.kids-card-play-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.kids-card-play-btn:hover {
  background: #38bdf8;
  color: #0c1524;
}

/* ── Kids Footer Bar ── */
.kids-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.kids-safe-badge {
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 600;
}
.kids-exit-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.kids-exit-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ── Kids Mode Active Cinema Mode ── */
body.kids-mode-active {
  background: #090d16;
}
body.kids-mode-active .hero,
body.kids-mode-active .features,
body.kids-mode-active .idea,
body.kids-mode-active #matcher,
body.kids-mode-active #history,
body.kids-mode-active #member,
body.kids-mode-active #taste,
body.kids-mode-active #library,
body.kids-mode-active #support,
body.kids-mode-active .footer {
  display: none !important;
}
body.kids-mode-active .kids-section {
  border-color: #38bdf8;
  margin-top: 20px;
}

/* ── Parent Gate Modal ── */
.parent-gate-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: gateFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.parent-gate-modal[hidden] {
  display: none !important;
}
@keyframes gateFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.parent-gate-box {
  width: 440px;
  max-width: 100%;
  background: #0f1523;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}
.parent-gate-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.parent-gate-box h3 {
  font-size: 1.4rem;
  margin: 0 0 8px;
  color: #f8fafc;
}
.math-question-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  padding: 16px;
  border-radius: 12px;
  margin: 20px 0;
}
.math-question {
  font-size: 1.5rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.05em;
}
.parent-gate-input {
  width: 100%;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.3rem;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  outline: none;
  font-weight: 600;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.parent-gate-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}
.parent-gate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── Bedtime / Sleepy Night Starry Overlay ── */
.bedtime-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: #04060c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: bedtimeFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.bedtime-overlay[hidden] {
  display: none !important;
}
@keyframes bedtimeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.bedtime-sky {
  text-align: center;
  position: relative;
  max-width: 500px;
}
.moon {
  font-size: 4.5rem;
  display: inline-block;
  margin-bottom: 16px;
  animation: gentleFloat 4s ease-in-out infinite;
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.bedtime-content h2 {
  font-family: var(--font-serif, "Instrument Serif", Georgia, serif);
  font-size: 2.4rem;
  color: #e0e7ff;
  margin: 0 0 12px;
}
.bedtime-sub {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 32px;
}
.bedtime-unlock-btn {
  border-color: rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

/* ═════════════════════════════════════════════════════════════════
   YouTube Kids Suite Design System
   ═════════════════════════════════════════════════════════════════ */

/* ── Category Navigation Bar ── */
.ytk-category-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0 24px;
}
.ytk-category-bar::-webkit-scrollbar {
  display: none;
}
.ytk-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  user-select: none;
}
.ytk-cat-pill:hover {
  transform: scale(1.06) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.ytk-cat-pill:active {
  transform: scale(0.96);
}
.ytk-cat-pill .cat-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.ytk-cat-pill.active {
  background: #38bdf8;
  color: #040812;
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.45);
}
.ytk-cat-pill[data-category="shows"].active {
  background: #ff6b6b;
  border-color: #ff6b6b;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.45);
}
.ytk-cat-pill[data-category="explore"].active {
  background: #4ecdc4;
  border-color: #4ecdc4;
  box-shadow: 0 8px 24px rgba(78, 205, 196, 0.45);
}
.ytk-cat-pill[data-category="crafts"].active {
  background: #ffd166;
  border-color: #ffd166;
  box-shadow: 0 8px 24px rgba(255, 209, 102, 0.45);
}
.ytk-cat-pill[data-category="puzzles"].active {
  background: #a29bfe;
  border-color: #a29bfe;
  box-shadow: 0 8px 24px rgba(162, 155, 254, 0.45);
}
.ytk-cat-pill[data-category="bedtime"].active {
  background: #fd79a8;
  border-color: #fd79a8;
  box-shadow: 0 8px 24px rgba(253, 121, 168, 0.45);
}

/* ── Kid-Safe Search Bar ── */
.ytk-search-wrap {
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 6px 18px;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.ytk-search-wrap:focus-within {
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}
.ytk-search-icon {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-right: 8px;
}
.ytk-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}
.ytk-search-input::placeholder {
  color: #64748b;
}
.ytk-search-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  display: none;
}
.ytk-search-clear:hover {
  color: #fff;
}

/* ── Favorite Heart Button on Cards ── */
.kids-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
}
.kids-card-fav:hover {
  transform: scale(1.15);
  color: #ff6b6b;
  border-color: #ff6b6b;
}
.kids-card-fav.favorited {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.2);
  border-color: #ff4757;
  transform: scale(1.05);
}

/* ── Shelves & Carousels ── */
.kids-shelf-section {
  margin-bottom: 32px;
}
.kids-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.kids-shelf-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.kids-shelf-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ── Theater Stage Player ── */
.kids-theater-wrap {
  background: #080c14;
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  animation: theaterPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes theaterPop {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.kids-theater-frame-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  max-height: 600px;
  margin: 0 auto;
}
.kids-theater-frame-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.kids-theater-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #0c121e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 16px;
}
.kids-theater-info h3 {
  font-size: 1.3rem;
  margin: 0 0 4px;
  color: #fff;
  font-weight: 800;
}
.kids-theater-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 600;
}
.kids-theater-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theater-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.theater-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.theater-btn.active {
  background: #38bdf8;
  color: #0b1120;
  border-color: #38bdf8;
}
.theater-btn.heart-btn.favorited {
  background: #ff4757;
  color: #fff;
  border-color: #ff4757;
}

/* ── Next Up Carousel in Theater ── */
.kids-next-up-shelf {
  padding: 20px 24px;
  background: #090e18;
}
.kids-next-up-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kids-next-up-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.kids-next-card {
  flex: 0 0 200px;
  background: #111726;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.kids-next-card:hover {
  transform: scale(1.03);
  border-color: #38bdf8;
}
.kids-next-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.kids-next-body {
  padding: 10px;
}
.kids-next-body h5 {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kids-next-body p {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ── Parent Settings Modal ── */
.parent-settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: gateFadeIn 0.2s ease;
}
.parent-settings-modal[hidden] {
  display: none !important;
}
.parent-settings-card {
  width: 500px;
  max-width: 100%;
  background: #0f1523;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  color: #f8fafc;
}
.parent-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.parent-settings-header h3 {
  margin: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.parent-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
}
.parent-close-btn:hover {
  color: #fff;
}
.parent-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.parent-setting-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.parent-setting-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}
.parent-timer-chips {
  display: flex;
  gap: 6px;
}
.parent-timer-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.parent-timer-chip.active {
  background: #38bdf8;
  color: #0b1120;
  border-color: #38bdf8;
}
.parent-toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}
.parent-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #334155;
  border-radius: 26px;
  transition: 0.3s;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
.parent-toggle-switch input:checked + .toggle-slider {
  background: #38bdf8;
}
.parent-toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

