/* SAMBOX PLAYER — client website (compiled from panels/shared/client.scss).
   Dark cinematic primary (Netflix-like); light mode via [data-theme="light"].
   Presentation only — frozen /api/v1, all form IDs unchanged. */

/* ============ 1. Tokens ============ */
:root,
[data-theme="dark"] {
  --cx-bg: #060a12;
  --cx-bg-2: #0a101c;
  --cx-surface: #0e1622;
  --cx-surface-2: #131c2c;
  --cx-border: rgba(255, 255, 255, 0.09);
  --cx-text: #f3f6fb;
  --cx-muted: #a3b0c2;
  --cx-accent: #00e0b5;
  --cx-accent-2: #3f8cff;
  --cx-accent-ink: #04241c;
  --cx-hero-glow-a: rgba(0, 224, 181, 0.16);
  --cx-hero-glow-b: rgba(63, 140, 255, 0.18);
  --cx-input-bg: #0a111c;
  --cx-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --cx-focus: #3f8cff;
}
[data-theme="light"] {
  --cx-bg: #f4f6fa;
  --cx-bg-2: #eef1f6;
  --cx-surface: #ffffff;
  --cx-surface-2: #ffffff;
  --cx-border: #e2e6ea;
  --cx-text: #10151d;
  --cx-muted: #5b6570;
  --cx-accent: #00856d;
  --cx-accent-2: #2456e0;
  --cx-accent-ink: #ffffff;
  --cx-hero-glow-a: rgba(0, 133, 109, 0.1);
  --cx-hero-glow-b: rgba(36, 86, 224, 0.1);
  --cx-input-bg: #ffffff;
  --cx-shadow: 0 12px 32px rgba(16, 21, 29, 0.1);
  --cx-focus: #2456e0;
}

/* ============ 2. Base ============ */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0; background: var(--cx-bg); color: var(--cx-text); line-height: 1.6;
}
.cx-skip { position: absolute; left: -9999px; }
.cx-skip:focus { left: 12px; top: 12px; z-index: 200; background: #000; color: #fff; padding: 10px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
main[data-page] { display: block; }
.cx-section { max-width: 1120px; margin: 0 auto; padding: 40px 20px; }
.cx-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-accent); margin-bottom: 8px; }
.cx-h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.cx-lead { color: var(--cx-muted); max-width: 62ch; margin: 0 0 20px; }

/* ============ 3. Injected top bar + nav (layout.js) ============ */
.cx-topnav {
  min-height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 8px 20px; font-weight: 800; letter-spacing: 0.01em;
  background: rgba(6, 10, 18, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cx-border); color: var(--cx-text);
  position: sticky; top: 0; z-index: 60;
}
[data-theme="light"] .cx-topnav { background: rgba(255, 255, 255, 0.9); }
.cx-topnav .gx-badge { font-size: 11px; font-weight: 700; border: 1px solid var(--cx-border); border-radius: 999px; padding: 3px 10px; color: var(--cx-muted); }
#theme-toggle { margin-left: auto; }
.cx-wrap { max-width: none; }
.cx-subbar { border-bottom: 1px solid var(--cx-border); background: var(--cx-bg); position: sticky; top: 60px; z-index: 55; }
.cx-subbar-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; min-height: 56px; }
.cx-burger { display: none; background: none; border: 1px solid var(--cx-border); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; padding: 0; }
.cx-burger span { display: block; height: 2px; margin: 5px 11px; background: var(--cx-text); border-radius: 2px; }
nav.cx-nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav.cx-nav a {
  color: var(--cx-muted); text-decoration: none; font-weight: 600; font-size: 14px;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px;
}
nav.cx-nav a:hover { color: var(--cx-text); background: rgba(127, 144, 168, 0.14); }
nav.cx-nav a[aria-current="page"] { color: var(--cx-text); background: rgba(0, 224, 181, 0.12); box-shadow: inset 0 -2px 0 var(--cx-accent); }
[data-theme="light"] nav.cx-nav a[aria-current="page"] { background: rgba(0, 133, 109, 0.1); }
.cx-wrap > footer { color: var(--cx-muted); font-size: 12px; padding: 18px 20px 28px; text-align: center; }

/* ============ 4. Hero ============ */
.hero { position: relative; overflow: hidden; background: var(--cx-bg); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(560px 340px at 12% 8%, var(--cx-hero-glow-a), transparent 70%),
    radial-gradient(720px 420px at 88% 12%, var(--cx-hero-glow-b), transparent 70%),
    radial-gradient(900px 500px at 50% 115%, rgba(63, 140, 255, 0.1), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(127, 144, 168, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 144, 168, 0.13) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(760px 420px at 50% 20%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 64px 20px 56px; display: grid; gap: 36px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); line-height: 1.06; letter-spacing: -0.03em; margin: 14px 0 12px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--cx-accent), var(--cx-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--cx-muted); font-size: clamp(1rem, 2vw, 1.15rem); max-width: 56ch; margin: 0 0 24px; }
.trial-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--cx-text); border: 1px solid var(--cx-border); background: rgba(127, 144, 168, 0.1); border-radius: 999px; padding: 6px 14px; }
.trial-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-accent); box-shadow: 0 0 12px var(--cx-accent); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 10px; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: linear-gradient(135deg, var(--cx-accent), var(--cx-accent-2)); color: #04110d; box-shadow: 0 10px 30px rgba(0, 224, 181, 0.35); }
[data-theme="light"] .btn-primary { color: #fff; box-shadow: 0 10px 26px rgba(0, 133, 109, 0.35); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--cx-text); border-color: var(--cx-border); }
.btn-ghost:hover { border-color: var(--cx-accent); }
.hero-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; color: var(--cx-muted); font-size: 13.5px; }
.hero-stats b { display: block; font-size: 20px; color: var(--cx-text); }
/* abstract screen mock (pure CSS/SVG — no copyrighted imagery) */
.hero-visual { position: relative; }
.screen {
  border: 1px solid var(--cx-border); border-radius: 16px; background: linear-gradient(180deg, var(--cx-surface-2), var(--cx-surface));
  box-shadow: var(--cx-shadow); overflow: hidden;
}
.screen-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--cx-border); }
.screen-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(127, 144, 168, 0.4); }
.screen-bar i:first-child { background: var(--cx-accent); }
.screen-body { padding: 18px; display: grid; gap: 10px; }
.skel-row { display: flex; gap: 12px; align-items: center; border: 1px solid var(--cx-border); border-radius: 10px; padding: 10px 12px; background: rgba(127, 144, 168, 0.07); }
.skel-thumb { width: 52px; height: 34px; border-radius: 6px; background: linear-gradient(135deg, var(--cx-accent), var(--cx-accent-2)); opacity: 0.85; flex: none; }
.skel-lines { flex: 1; }
.skel-lines i { display: block; height: 8px; border-radius: 4px; background: rgba(127, 144, 168, 0.35); }
.skel-lines i + i { margin-top: 6px; width: 55%; }
.skel-play { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--cx-accent); display: grid; place-items: center; color: var(--cx-accent); font-size: 11px; }
.float-chip {
  position: absolute; font-size: 12.5px; font-weight: 700; border: 1px solid var(--cx-border);
  background: var(--cx-surface); border-radius: 999px; padding: 8px 14px; box-shadow: var(--cx-shadow);
}
.float-a { top: -16px; right: 12px; }
.float-b { bottom: -14px; left: 12px; }

/* ============ 5. Trust strip / features / steps / devices ============ */
.strip { border-top: 1px solid var(--cx-border); border-bottom: 1px solid var(--cx-border); background: var(--cx-bg-2); }
.strip-inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px; display: flex; gap: 10px 28px; flex-wrap: wrap; align-items: center; justify-content: center; color: var(--cx-muted); font-size: 14px; font-weight: 600; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.badge-row span { border: 1px solid var(--cx-border); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--cx-text); background: rgba(127, 144, 168, 0.08); }
.grid-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
.feat { border: 1px solid var(--cx-border); border-radius: var(--cx-r, 14px); background: var(--cx-surface); padding: 22px; }
.feat:hover { border-color: rgba(0, 224, 181, 0.45); }
.feat svg { width: 34px; height: 34px; stroke: var(--cx-accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { margin: 12px 0 6px; font-size: 17px; }
.feat p { margin: 0; color: var(--cx-muted); font-size: 14.5px; }
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: step; }
.step { position: relative; border: 1px solid var(--cx-border); background: var(--cx-surface); border-radius: 14px; padding: 22px 22px 22px 76px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 20px; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, var(--cx-accent), var(--cx-accent-2)); color: #04110d;
}
[data-theme="light"] .step::before { color: #fff; }
.step h3 { margin: 0 0 4px; font-size: 17px; }
.step p { margin: 0 0 10px; color: var(--cx-muted); font-size: 14.5px; }
.step a { color: var(--cx-accent); font-weight: 700; font-size: 14px; }
.devices { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.device { border: 1px solid var(--cx-border); background: var(--cx-surface); border-radius: 14px; padding: 20px; text-align: center; }
.device b { display: block; margin-top: 8px; }
.device small { color: var(--cx-muted); }
.device svg { width: 36px; height: 36px; stroke: var(--cx-text); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ============ 6. FAQ / CTA band / footer ============ */
.faq details { border: 1px solid var(--cx-border); border-radius: 12px; background: var(--cx-surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; padding: 12px 18px; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--cx-accent); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--cx-muted); font-size: 15px; }
.cta-band { border: 1px solid var(--cx-border); border-radius: 18px; padding: 40px 28px; text-align: center; background: linear-gradient(140deg, var(--cx-hero-glow-a), var(--cx-hero-glow-b)), var(--cx-surface); }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 2rem); }
.cta-band p { color: var(--cx-muted); margin: 0 0 20px; }
.cx-footer { border-top: 1px solid var(--cx-border); background: var(--cx-bg-2); margin-top: 20px; }
.cx-footer-inner { max-width: 1120px; margin: 0 auto; padding: 40px 20px 20px; display: grid; gap: 28px; grid-template-columns: 1fr; }
.cx-footer h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cx-muted); }
.cx-footer a { display: block; color: var(--cx-text); text-decoration: none; padding: 6px 0; font-size: 14.5px; min-height: 32px; }
.cx-footer a:hover { color: var(--cx-accent); }
.cx-footer-bottom { max-width: 1120px; margin: 0 auto; padding: 16px 20px 26px; border-top: 1px solid var(--cx-border); color: var(--cx-muted); font-size: 12.5px; display: flex; gap: 8px 20px; flex-wrap: wrap; }

/* ============ 7. Forms / alerts / cards ============ */
.page-head { max-width: 1120px; margin: 0 auto; padding: 44px 20px 8px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; }
.page-head p { color: var(--cx-muted); margin: 0; max-width: 62ch; }
.form-card { max-width: 520px; margin: 24px auto 48px; border: 1px solid var(--cx-border); background: var(--cx-surface); border-radius: 16px; padding: 28px; box-shadow: var(--cx-shadow); }
.form-card h2 { margin: 0 0 4px; }
.form-card .hint { color: var(--cx-muted); font-size: 14px; margin: 0 0 16px; }
label.cx-label { display: block; font-size: 13.5px; font-weight: 700; margin: 14px 0 6px; }
.cx-input, .cx-select {
  width: 100%; box-sizing: border-box; background: var(--cx-input-bg); color: var(--cx-text);
  border: 1px solid var(--cx-border); border-radius: 10px; min-height: 48px; padding: 10px 14px; font-size: 15px;
}
.cx-input:focus, .cx-select:focus { border-color: var(--cx-accent); outline: 2px solid var(--cx-focus); outline-offset: 1px; }
.cx-field-help { font-size: 12.5px; color: var(--cx-muted); margin: 6px 0 0; }
.btn-block { width: 100%; margin-top: 18px; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-top: 16px; overflow-wrap: anywhere; border: 1px solid var(--cx-border); background: rgba(127, 144, 168, 0.1); color: var(--cx-text); }
.alert:empty { display: none; }
.alert[data-state="ok"] { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.12); }
.alert[data-state="err"] { border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.12); }
.pl-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pl-head h2 { margin: 0; margin-right: auto; }
ul.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pl-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--cx-border); background: var(--cx-surface); border-radius: 12px; padding: 14px 16px; overflow-wrap: anywhere; }
.pl-type { flex: none; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--cx-accent); color: var(--cx-accent); border-radius: 999px; padding: 4px 10px; }
.pl-url { flex: 1; font-size: 13.5px; color: var(--cx-muted); min-width: 0; }
.pl-open { flex: none; color: var(--cx-accent); font-weight: 700; font-size: 14px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* ============ 8. Theater player ============ */
.theater { background: #000; border-top: 1px solid var(--cx-border); border-bottom: 1px solid var(--cx-border); }
.theater-inner { max-width: 1120px; margin: 0 auto; padding: 24px 20px 32px; }
.video-shell { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 0 80px rgba(0, 224, 181, 0.12), 0 24px 60px rgba(0, 0, 0, 0.6); background: #000; }
.video-shell video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-shell:fullscreen { border-radius: 0; border: 0; }
.video-shell:fullscreen video { aspect-ratio: auto; height: 100vh; }
.player-tools { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.episode-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.episode-list li a { display: flex; gap: 10px; align-items: center; border: 1px solid var(--cx-border); border-radius: 10px; padding: 10px 14px; color: var(--cx-text); text-decoration: none; font-size: 14px; background: var(--cx-surface); overflow-wrap: anywhere; }
.episode-list li a:hover { border-color: var(--cx-accent); }

/* ============ 9. Legal modal + article ============ */
#legal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 6, 12, 0.78); backdrop-filter: blur(8px); }
#legal .legal-box { background: var(--cx-surface); border: 1px solid var(--cx-border); color: var(--cx-text); border-radius: 18px; max-width: 580px; width: 100%; max-height: 86vh; overflow: auto; padding: 30px; box-shadow: var(--cx-shadow); }
#legal h2 { margin: 0 0 8px; font-size: 22px; }
#legal p { color: var(--cx-muted); font-size: 14.5px; }
#legal .btn { width: 100%; margin-top: 16px; }
.article { max-width: 68ch; }
.article h2 { margin: 28px 0 8px; font-size: 20px; }
.article h3 { margin: 22px 0 6px; font-size: 16px; }
.article p, .article li { color: var(--cx-muted); font-size: 15px; }
.article p { margin: 0 0 12px; }
.version-pill { display: inline-block; font-size: 12px; font-weight: 800; border: 1px solid var(--cx-accent); color: var(--cx-accent); border-radius: 999px; padding: 4px 12px; }

/* ============ 10. Responsive + motion ============ */
@media (min-width: 640px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .cx-footer-inner { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; padding: 88px 20px 72px; }
  .grid-cards { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .devices { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 899px) {
  .cx-burger { display: block; }
  .cx-subbar-inner { gap: 12px; }
  nav.cx-nav { display: none; width: 100%; flex-direction: column; padding: 8px 0 14px; }
  nav.cx-nav.open { display: flex; }
  nav.cx-nav a { min-height: 48px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > div:first-child { animation: rise 0.6s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
