/* LugaFlix web. One stylesheet, one set of tokens: black, the logo's blue, flat. */

:root {
  --bg: #000;
  --bg-2: #0b0d10;
  --surface: #14171c;
  --surface-2: #1c2027;
  --line: #262b33;
  --line-2: #363c46;
  --text: #f2f4f7;
  --muted: #a1a9b5;
  --faint: #6f7783;
  --brand: #1f74c9;
  --brand-2: #2e88e4;
  --brand-soft: rgba(31, 116, 201, 0.16);
  --accent: #ffd400;
  --ok: #2fb574;
  --ok-soft: rgba(47, 181, 116, 0.14);
  --warn: #e6a23c;
  --warn-soft: rgba(230, 162, 60, 0.14);
  --bad: #ef5a5f;
  --bad-soft: rgba(239, 90, 95, 0.14);
  --r-s: 8px;
  --r: 10px;
  --r-l: 14px;
  --header: 60px;
  --bottom: 58px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 700; }
h3 { font-size: 16px; line-height: 1.35; font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.text-link { color: var(--brand-2); font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-l { display: flex; flex-direction: column; gap: 24px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-s { max-width: 760px; }
.page { padding-top: 20px; padding-bottom: 40px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #252a33; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-s { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-s); }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 16px; /* under 16px, iOS zooms the page on focus */
  outline: none; transition: border-color .12s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--brand-2); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { min-height: 110px; resize: vertical; }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a1a9b5' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-group { position: relative; }
.input-group .input { padding-right: 46px; }
.input-action { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.hint { font-size: 13px; color: var(--faint); }
.field-error { font-size: 13px; color: var(--bad); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .form-row { grid-template-columns: 1fr; } }

/* ── Notices, states ─────────────────────────────────────────────────────── */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 14px; background: var(--surface); border: 1px solid var(--line); }
.notice svg { flex: none; margin-top: 2px; }
.notice-bad { background: var(--bad-soft); border-color: transparent; color: #ffb4b6; }
.notice-ok { background: var(--ok-soft); border-color: transparent; color: #8fe3bb; }
.notice-warn { background: var(--warn-soft); border-color: transparent; color: #f1c98c; }
.notice-info { background: var(--brand-soft); border-color: transparent; color: #a9d0f7; }
.state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 48px 20px; color: var(--muted); }
.state svg { color: var(--faint); }
.state h2, .state h3 { color: var(--text); }
.state .btn { margin-top: 8px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-brand { background: var(--brand-soft); color: var(--brand-2); }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--brand-2); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner-s { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loading { display: flex; align-items: center; justify-content: center; min-height: 50vh; }

.skeleton { background: var(--surface); border-radius: var(--r-s); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .spinner { animation-duration: 3s; } html { scroll-behavior: auto; } }

/* ── Header ──────────────────────────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 40; background: rgba(0, 0, 0, .92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .header { background: rgba(0, 0, 0, .78); backdrop-filter: blur(10px); } }
.header-in { display: flex; align-items: center; gap: 8px; height: var(--header); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; flex: none; }
.logo img { width: 32px; height: 32px; }
.header-search { display: none; flex: 1; max-width: 560px; position: relative; }
.header-search .input { min-height: 40px; padding: 7px 12px 7px 38px; font-size: 14px; background: var(--surface); border-color: var(--line); border-radius: 99px; }
.header-search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.header-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--muted); }
.avatar-l { width: 72px; height: 72px; font-size: 26px; }
.only-wide { display: none; }
@media (min-width: 900px) {
  :root { --gutter: 28px; }
  .header-search { display: flex; }
  .only-narrow { display: none !important; }
  .only-wide { display: inline-flex; }
  .header-search + .header-end { margin-left: auto; }
  h1 { font-size: 32px; }
  h2 { font-size: 21px; }
}

/* ── The desktop shell: a menu that is always there ──────────────────────── */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: var(--r-s); background: var(--brand); color: #fff; font-weight: 600; }
.skip:focus { left: 8px; }
.side { display: none; }
.app-main { min-width: 0; }
@media (min-width: 900px) {
  .app { --side-w: 236px; }
  .side {
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 45;
    width: var(--side-w); padding: 8px 10px 12px; background: #07080a; border-right: 1px solid var(--line);
    overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; transition: width .16s;
  }
  .app-main { margin-left: var(--side-w); transition: margin-left .16s; }
  .side-top { height: calc(var(--header) - 8px); display: flex; align-items: center; padding: 0 8px; margin-bottom: 4px; flex: none; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side-head { margin: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
  .side-link {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 42px; padding: 0 12px; flex: none;
    border-radius: var(--r); color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; text-align: left;
  }
  .side-link svg { flex: none; }
  .side-link span { overflow: hidden; text-overflow: ellipsis; }
  .side-link:hover { background: var(--surface); color: var(--text); }
  .side-link.active { background: var(--surface-2); color: var(--text); }
  .side-link.active svg { color: var(--brand-2); }
  .side-toggle { margin-top: 12px; color: var(--faint); }
  /* The narrow menu: icons only, the name on hover. */
  .app.side-mini { --side-w: 72px; }
  .app.side-mini .side-link { justify-content: center; padding: 0; gap: 0; }
  .app.side-mini .side-link span, .app.side-mini .side-logo span { display: none; }
  .app.side-mini .side-top { justify-content: center; padding: 0; }
  .app.side-mini .side-head { height: 1px; margin: 12px 10px; padding: 0; overflow: hidden; font-size: 0; background: var(--line); }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .app:not(.side-open) { --side-w: 72px; }
  .app:not(.side-open) .side-link { justify-content: center; padding: 0; gap: 0; }
  .app:not(.side-open) .side-link span, .app:not(.side-open) .side-logo span { display: none; }
  .app:not(.side-open) .side-top { justify-content: center; padding: 0; }
  .app:not(.side-open) .side-head { height: 1px; margin: 12px 10px; padding: 0; overflow: hidden; font-size: 0; background: var(--line); }
}

/* Search suggestions */
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; z-index: 50; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; text-align: left; font-size: 14px; }
.suggest button:hover, .suggest button.on { background: var(--surface-2); }
.suggest svg { color: var(--faint); flex: none; }

/* ── Bottom nav (phones) ─────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottom) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #08090b; border-top: 1px solid var(--line);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--faint); }
.bottom-nav a.active { color: var(--text); }
.bottom-nav a.active svg { color: var(--brand-2); }
.has-bottom-nav { padding-bottom: calc(var(--bottom) + var(--safe-b)); }
@media (min-width: 900px) { .bottom-nav { display: none; } .has-bottom-nav { padding-bottom: 0; } }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.footer h4 { font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 10px; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--text); }
.footer-end { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ── Posters, rows, grids ────────────────────────────────────────────────── */
.poster { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--surface); border-radius: var(--r-s); overflow: hidden; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); padding: 8px; text-align: center; font-size: 12px; }
.card { display: block; min-width: 0; }
.card .poster { transition: outline-color .12s; outline: 2px solid transparent; outline-offset: -2px; }
.card:hover .poster { outline-color: var(--brand-2); }
.card-title { margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-meta { margin-top: 2px; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-chip { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .78); font-size: 11px; font-weight: 600; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .22); }
.card-progress i { display: block; height: 100%; background: var(--brand-2); }
.card-remove { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, .78); display: flex; align-items: center; justify-content: center; }
.card-remove:hover { background: var(--bad); }

.row { padding: 14px 0; content-visibility: auto; contain-intrinsic-size: auto 330px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.row-head a.more { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.row-head a.more:hover { color: var(--text); }
.row-frame { position: relative; }
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 124px; gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  scroll-padding-left: var(--gutter);
  overscroll-behavior-x: contain;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
.row-arrow { display: none; }
@media (min-width: 900px) {
  .row-scroll { grid-auto-columns: 160px; gap: 14px; }
  .row-arrow { position: absolute; top: 33%; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .86); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .12s; z-index: 2; }
  .row-frame:hover .row-arrow { opacity: 1; }
  .row-arrow:hover { background: var(--surface-2); }
  .row-arrow.left { left: -12px; }
  .row-arrow.right { right: -12px; }
  .row-arrow:disabled { display: none; }
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); } }
.load-more { display: flex; justify-content: center; padding: 24px 0 8px; min-height: 60px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: -24px; background-size: cover; background-position: center 20%; filter: blur(28px) brightness(.32) saturate(1.1); }
.hero-in { position: relative; display: flex; gap: 16px; align-items: flex-end; padding-top: 20px; padding-bottom: 20px; }
.hero-poster { width: 112px; flex: none; }
.hero-text { min-width: 0; flex: 1; }
.hero-text h1 { font-size: 22px; margin-bottom: 4px; }
.hero-meta { color: var(--muted); font-size: 13px; }
.hero-desc { display: none; color: #d6dbe2; margin-top: 8px; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (min-width: 900px) {
  .hero-in { gap: 28px; padding-top: 44px; padding-bottom: 44px; align-items: center; }
  .hero-poster { width: 200px; }
  .hero-text h1 { font-size: 40px; margin-bottom: 8px; }
  .hero-meta { font-size: 15px; }
  .hero-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-actions { margin-top: 18px; }
}
.pitch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-top: 16px; background: var(--brand-soft); border-radius: var(--r-l); }
.pitch strong { display: block; font-size: 15px; }
.pitch span { color: #b9d7f5; font-size: 13px; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 18px; }
.filters .input { min-height: 42px; font-size: 14px; padding-top: 6px; padding-bottom: 6px; }
@media (min-width: 720px) { .filters { display: flex; } .filters .input { width: auto; min-width: 150px; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--line-2); }

/* ── A title's page ──────────────────────────────────────────────────────── */
.title-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.title-in { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding-top: 20px; padding-bottom: 20px; }
.title-text { min-width: 0; }
.title-text h1 { font-size: 22px; }
.title-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.title-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.title-actions .btn-primary { flex: 1 1 100%; }
.title-body { padding-top: 20px; }
.title-desc { color: #d6dbe2; max-width: 760px; }
.credits { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin-top: 14px; font-size: 14px; }
.credits dt { color: var(--faint); }
.credits dd { margin: 0; color: var(--muted); }
.title-progress { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 10px; max-width: 320px; }
.title-progress i { display: block; height: 100%; background: var(--brand-2); }
@media (min-width: 720px) {
  .title-in { grid-template-columns: 220px 1fr; gap: 28px; padding-top: 36px; padding-bottom: 36px; align-items: end; }
  .title-text h1 { font-size: 36px; }
  .title-facts { font-size: 15px; margin-top: 10px; }
  .title-actions { grid-column: 2; }
  .title-actions .btn-primary { flex: 0 1 auto; min-width: 180px; }
}
.episodes { display: grid; gap: 8px; }
@media (min-width: 760px) { .episodes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .episodes { grid-template-columns: repeat(3, 1fr); } }
.episode { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.episode:hover { background: var(--surface); border-color: var(--line-2); }
.episode.on { border-color: var(--brand); background: var(--brand-soft); }
.episode-n { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; }
.episode-t { min-width: 0; flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stars { display: inline-flex; gap: 2px; }
.stars button { color: var(--line-2); padding: 2px; }
.stars button.on { color: var(--accent); }

/* ── Plans and paying ────────────────────────────────────────────────────── */
.plans { display: grid; gap: 12px; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); }
.plan.best { border-color: var(--brand); }
.plan-price { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-features { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); flex: 1; }
.plan-features li { display: flex; gap: 8px; }
.plan-features svg { flex: none; color: var(--ok); margin-top: 3px; }
.pay-box { max-width: 480px; margin: 0 auto; }
.pay-summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface); border-radius: var(--r); }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--line-2); border-radius: var(--r); font-weight: 600; font-size: 14px; color: var(--muted); }
.pay-tab[aria-pressed="true"] { border-color: var(--brand-2); background: var(--brand-soft); color: var(--text); }
.pay-wait { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 28px 16px; }
.pay-wait .spinner { width: 40px; height: 40px; border-width: 3px; }
.steps { display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; font-size: 14px; color: var(--muted); }
.steps li { display: flex; gap: 10px; }
.steps b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* ── Account ─────────────────────────────────────────────────────────────── */
.acct { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; padding-bottom: 40px; }
.acct-side { min-width: 0; }
.acct-who { display: none; }
.acct-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tabs a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; background: var(--surface); }
.acct-tabs a.active { background: var(--brand); color: #fff; }
.acct-tabs svg { display: none; flex: none; }
.acct-main { min-width: 0; flex: 1; }
.acct-title { margin-bottom: 14px; }
.acct-title p { color: var(--muted); font-size: 14px; margin-top: 2px; }
@media (min-width: 900px) {
  .acct { flex-direction: row; gap: 32px; padding-top: 28px; align-items: flex-start; }
  .acct-side { width: 248px; flex: none; position: sticky; top: calc(var(--header) + 20px); }
  .acct-who { display: flex; align-items: center; gap: 12px; padding: 0 12px 16px; }
  .acct-who div { min-width: 0; }
  .acct-who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .acct-tabs { flex-direction: column; gap: 2px; margin: 0; padding: 0; overflow: visible; }
  .acct-tabs a { background: none; border-radius: var(--r-s); padding: 10px 12px; }
  .acct-tabs a:hover { background: var(--surface); color: var(--text); }
  .acct-tabs a.active { background: var(--surface-2); color: var(--text); }
  .acct-tabs a.active svg { color: var(--brand-2); }
  .acct-tabs svg { display: block; color: var(--faint); }
}
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
@media (min-width: 900px) { .panel { padding: 20px; } }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: block; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); }
.tile:hover { border-color: var(--line-2); }
.tile strong { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.tile span { font-size: 12px; color: var(--muted); }
.member-card { display: flex; align-items: center; gap: 14px; }
.member-card h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-id { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding: 2px 0; }
.member-id:hover { color: var(--text); }
.plan-card { display: flex; flex-direction: column; gap: 12px; }
.plan-card.active { border-color: rgba(47, 181, 116, .4); }
.plan-card.off { border-color: var(--brand); }
.plan-days { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.plan-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--ok); }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-main { min-width: 0; flex: 1; }
.list-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { font-size: 13px; color: var(--muted); }
a.list-row:hover .list-title { color: var(--brand-2); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Support conversation */
.thread { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 14px; }
.bubble { max-width: 86%; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.bubble.mine { background: var(--brand); color: #fff; align-self: flex-end; }
.bubble small { display: block; margin-top: 4px; font-size: 11px; opacity: .7; }

/* ── Sign-in pages ───────────────────────────────────────────────────────── */
.auth { display: flex; justify-content: center; padding: 28px var(--gutter) 40px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 24px; margin-bottom: 4px; }
.auth-box > p { color: var(--muted); margin-bottom: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-end { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.checks { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* ── Dialogs, toasts ─────────────────────────────────────────────────────── */
.dialog-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .72); padding: 0; }
.dialog { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l) var(--r-l) 0 0; padding: 20px 20px calc(20px + var(--safe-b)); }
.dialog h2 { margin-bottom: 8px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (min-width: 560px) { .dialog-back { align-items: center; padding: 20px; } .dialog { border-radius: var(--r-l); padding-bottom: 20px; } }
.toasts { position: fixed; left: 50%; bottom: calc(var(--bottom) + var(--safe-b) + 12px); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 12px 14px; border-radius: var(--r); background: #23272f; border: 1px solid var(--line-2); font-size: 14px; pointer-events: auto; }
.toast-bad { background: #3a1c1e; border-color: #5c2a2d; }
.toast-ok { background: #15301f; border-color: #235037; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }

/* ── Player ──────────────────────────────────────────────────────────────── */
.watch { background: #000; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; }
.player:fullscreen { aspect-ratio: auto; height: 100%; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.idle { cursor: none; }
.player-top, .player-bottom { position: absolute; left: 0; right: 0; z-index: 3; transition: opacity .18s; color: #fff; }
.player-top { top: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px 30px; background: linear-gradient(rgba(0, 0, 0, .75), transparent); }
.player-title { min-width: 0; flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bottom { bottom: 0; padding: 30px 10px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); }
.player.idle .player-top, .player.idle .player-bottom, .player.idle .player-center { opacity: 0; pointer-events: none; }
.player-center { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 28px; pointer-events: none; transition: opacity .18s; color: #fff; }
.player-center button { pointer-events: auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, .5); }
.player-center button.big { width: 68px; height: 68px; background: rgba(0, 0, 0, .6); }
.player-center button:hover { background: var(--brand); }
.player-tools { display: flex; align-items: center; gap: 2px; }
.player-tools .icon-btn { color: #fff; width: 38px; height: 38px; }
.player-tools .icon-btn:hover { background: rgba(255, 255, 255, .16); }
.player-time { font-size: 13px; font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap; }
.player-spacer { flex: 1; }
.player-tools .player-download { width: auto; min-width: 38px; gap: 6px; font-size: 13px; font-weight: 600; }
@media (min-width: 900px) { .player-tools .player-download { padding: 0 10px; } }
.seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek-track { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.seek:hover .seek-track { height: 6px; }
.seek-buffer, .seek-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.seek-buffer { background: rgba(255, 255, 255, .35); }
.seek-fill { background: var(--brand-2); }
.seek-thumb { position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; margin-top: -7px; border-radius: 50%; background: #fff; }
.seek-tip { position: absolute; bottom: 24px; transform: translateX(-50%); padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .85); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.volume { display: none; align-items: center; }
.volume input { width: 74px; accent-color: var(--brand-2); }
@media (hover: hover) and (min-width: 700px) { .volume { display: flex; } }
.player-menu { position: absolute; right: 10px; bottom: 56px; z-index: 5; min-width: 120px; padding: 6px; background: rgba(20, 23, 28, .97); border: 1px solid var(--line-2); border-radius: var(--r); }
.player-menu button { display: flex; width: 100%; padding: 7px 10px; border-radius: 6px; font-size: 14px; color: #fff; }
.player-menu button:hover { background: var(--surface-2); }
.player-menu button.on { color: var(--brand-2); font-weight: 600; }
.player-cover { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: rgba(0, 0, 0, .86); color: #fff; }
.player-cover p { max-width: 460px; color: var(--muted); font-size: 14px; }
.player-chip { position: absolute; left: 12px; bottom: 76px; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 99px; background: rgba(0, 0, 0, .78); font-size: 13px; color: #fff; }
.player-chip button { color: var(--brand-2); font-weight: 600; }
.player-next { position: absolute; right: 12px; bottom: 76px; z-index: 4; }
.player-notes { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; max-width: 92%; pointer-events: none; }
.player-pill { display: flex; align-items: center; gap: 8px; pointer-events: auto; text-align: center; padding: 6px 12px; border-radius: 99px; background: rgba(0, 0, 0, .8); font-size: 13px; color: #fff; }
.player-pill button { color: var(--brand-2); font-weight: 600; }
.player-prep { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 20px; border-radius: var(--r-l); background: rgba(0, 0, 0, .66); text-align: center; pointer-events: auto; }
.player-prep strong { font-size: 15px; }
.player-prep span { font-size: 12px; color: #c9d1db; font-variant-numeric: tabular-nums; }
.prep-bar { width: 200px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.prep-bar i { display: block; height: 100%; background: var(--brand-2); transition: width .25s; }
.player-left { padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, .16); font-size: 11px; font-weight: 600; }
.player-download.used-up { opacity: .6; }

/* The watch page: the player inside the site, the menu beside it. */
.watch { display: grid; gap: 16px; padding-bottom: 32px; }
.watch-main { min-width: 0; }
.player-wrap { background: #000; }
.watch-info { padding: 14px var(--gutter) 0; }
.watch-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.watch-title { font-size: 20px; line-height: 1.25; }
.watch-actions { flex: 0 1 auto; min-width: 0; }
@media (max-width: 559px) { .watch-actions { flex: 1 1 100%; } .watch-actions > * { flex: 1 1 auto; } }
.watch-desc { margin-top: 12px; max-width: 820px; }
.watch-aside { padding: 0 var(--gutter); min-width: 0; }
.watch-aside-head { margin-bottom: 10px; }
.episode-list { display: grid; gap: 6px; }
@media (min-width: 640px) { .episode-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .watch { padding: 18px var(--gutter) 32px; max-width: 1640px; margin: 0 auto; }
  .player-wrap { border-radius: var(--r-l); overflow: hidden; display: flex; justify-content: center; }
  .player-wrap .player { max-width: calc((100vh - var(--header) - 150px) * 16 / 9); }
  .player-wrap .player:fullscreen { max-width: none; }
  .watch-info, .watch-aside { padding-left: 0; padding-right: 0; }
  .watch-title { font-size: 24px; }
  .player-title { font-size: 16px; }
  .player-top, .player-bottom { padding-left: 16px; padding-right: 16px; }
  .episode-list { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .watch.watch-series { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .watch-series .watch-aside {
    position: sticky; top: calc(var(--header) + 18px); display: flex; flex-direction: column;
    max-height: calc(100vh - var(--header) - 36px); padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l);
  }
  .watch-series .episode-list { grid-template-columns: 1fr; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
}

/* ── Live ────────────────────────────────────────────────────────────────── */
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.station { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; text-align: left; width: 100%; }
.station:hover { border-color: var(--line-2); }
.station.on { border-color: var(--brand); background: var(--brand-soft); }
.station-logo { width: 42px; height: 42px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; }
.station-logo.empty { background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.station-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-player { background: #000; border-radius: var(--r-l); overflow: hidden; margin-bottom: 16px; }
.live-player video { width: 100%; aspect-ratio: 16 / 9; display: block; }
.radio-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-l); margin-bottom: 16px; }

/* ── Sports ──────────────────────────────────────────────────────────────── */
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.match:last-child { border-bottom: 0; }
.match-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match-team.away { flex-direction: row-reverse; text-align: right; }
.match-team img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.match-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-score { font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; min-width: 56px; }
.match-score small { display: block; font-weight: 500; color: var(--faint); font-size: 11px; }
.match-score.live small { color: var(--ok); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Text pages ──────────────────────────────────────────────────────────── */
.prose { color: #d6dbe2; max-width: 760px; }
.prose h1 { color: var(--text); margin-bottom: 8px; }
.prose h2 { color: var(--text); margin: 28px 0 10px; font-size: 18px; }
.prose h3 { color: var(--text); margin: 20px 0 8px; }
.prose p { margin-bottom: 12px; }
.prose ul, .prose ol { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--brand-2); }
.prose img { border-radius: var(--r); height: auto; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r); }
.post-card { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-card img { width: 112px; height: 72px; object-fit: cover; border-radius: var(--r-s); flex: none; background: var(--surface); }
.post-card h3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-card:hover h3 { color: var(--brand-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 18px; line-height: 1.2; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 8px; }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); }
.feature svg { color: var(--brand-2); margin-bottom: 8px; }
.feature h3 { margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 14px; }
.offline-bar { background: var(--warn-soft); color: #f1c98c; text-align: center; font-size: 13px; padding: 6px 12px; }
