/* Verified Streams — production UI (dark) */
:root {
  --bg: #0a0a0f;
  --bg-elev: #101019;
  --surface: #16161f;
  --surface-2: #1f1f2b;
  --border: #2a2a38;
  --border-2: #353548;
  --text: #f4f4f7;
  --muted: #9aa0ad;
  --muted-2: #6b7280;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --danger: #ff5c7c;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .5);
  --maxw: 1240px;
  --header-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--brand-2); text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.brand-gradient { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .6rem 1.05rem; border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .92rem;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s;
}
.btn:hover { background: #2a2a3a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { border: none; color: #fff; background: linear-gradient(135deg, var(--brand), #5a3fff); }
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--brand), #5a3fff); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); }
.btn-sm { padding: .4rem .7rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn { white-space: nowrap; }
.btn svg, .back svg { width: 17px; height: 17px; flex: 0 0 auto; }
.back { white-space: nowrap; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0 clamp(1rem, 4vw, 2.4rem);
  background: rgba(10, 10, 15, .72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.logo .mark { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.logo .mark svg { width: 16px; height: 16px; }
.logo b { background: linear-gradient(120deg, #fff, #c9c4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.header nav { display: flex; gap: .3rem; }
.navlink { padding: .4rem .7rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.navlink:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.navlink.active { color: var(--text); }
.header .spacer { flex: 1; }
.search { position: relative; display: none; }
.search input {
  width: 200px; padding: .45rem .7rem .45rem 2rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.search svg { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
@media (min-width: 720px) { .search { display: block; } }

.acct { display: flex; align-items: center; gap: .55rem; padding: .3rem .3rem .3rem .7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.acct:hover { border-color: var(--border-2); }
.acct .tier { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-2); }
.acct .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1rem, 4vw, 2.4rem) 5rem; }
.section-title { font-size: 1.15rem; font-weight: 700; margin: 1.8rem 0 1rem; letter-spacing: -.01em; }

/* ---------- hero ---------- */
.hero {
  position: relative; border-radius: 20px; overflow: hidden; margin-bottom: .5rem;
  min-height: 320px; display: flex; align-items: flex-end; border: 1px solid var(--border);
}
.hero .bg { position: absolute; inset: 0; z-index: 0; }
.hero .scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8, 8, 12, .92) 0%, rgba(8, 8, 12, .6) 45%, rgba(8, 8, 12, .15) 100%); }
.hero .content { position: relative; z-index: 2; padding: clamp(1.4rem, 4vw, 2.6rem); max-width: 620px; }
.hero .eyebrow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-2); margin-bottom: .5rem; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); line-height: 1.05; margin: 0 0 .6rem; letter-spacing: -.02em; }
.hero p { color: #d4d4dd; margin: 0 0 1.1rem; max-width: 48ch; }
.hero .actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ---------- poster grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 18px; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); text-align: left; padding: 0;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.poster:hover, .poster:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-2); outline: none; }
.poster .art { position: absolute; inset: 0; display: grid; place-items: center; }
.poster .art .ph { font-weight: 800; font-size: 1.05rem; color: rgba(255, 255, 255, .9); padding: 0 .8rem; text-align: center; line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.poster .grad { position: absolute; inset: 0; }
.poster .meta { position: absolute; inset: auto 0 0 0; z-index: 2; padding: .9rem .7rem .6rem; background: linear-gradient(transparent, rgba(8, 8, 12, .92)); }
.poster .meta .t { font-weight: 700; font-size: .9rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster .meta .sub { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.poster .badge { position: absolute; top: .55rem; left: .55rem; z-index: 3; }
.poster .play-cue { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; opacity: 0; transition: opacity .14s; }
.poster:hover .play-cue, .poster:focus-visible .play-cue { opacity: 1; }
.poster .play-cue span { width: 52px; height: 52px; border-radius: 50%; background: rgba(20, 20, 30, .7); backdrop-filter: blur(6px); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); }
.poster .play-cue svg { width: 20px; height: 20px; margin-left: 3px; }
.poster.locked .art::after { content: ""; position: absolute; inset: 0; background: rgba(6, 6, 10, .45); }

.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .22rem .5rem; border-radius: 999px; backdrop-filter: blur(6px); }
.badge.free { background: rgba(52, 211, 153, .18); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, .3); }
.badge.premium { background: rgba(124, 92, 255, .2); color: #c4b5ff; border: 1px solid rgba(124, 92, 255, .35); }

/* ---------- skeleton ---------- */
.skel { aspect-ratio: 2/3; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- player view ---------- */
.player-wrap { max-width: 1000px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 600; background: none; border: none; padding: .4rem 0; margin-bottom: .8rem; }
.back:hover { color: var(--text); }
.video-shell { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; }
.video-shell video { width: 100%; height: 100%; display: block; background: #000; }
.video-shell .spin { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; background: rgba(0, 0, 0, .4); }
.player-meta { margin-top: 1.1rem; }
.player-meta h2 { margin: 0 0 .3rem; font-size: 1.4rem; letter-spacing: -.01em; }
.player-meta .desc { color: var(--muted); max-width: 70ch; }

/* ---------- account ---------- */
.panel { max-width: 620px; margin: 0 auto; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row .k { color: var(--muted); font-size: .9rem; }
.row .v { font-weight: 600; word-break: break-all; text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.pill { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.pill.ok { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.pill.warn { background: rgba(251, 191, 36, .16); color: #fcd34d; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(4, 4, 8, .68); backdrop-filter: blur(4px); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 430px; background: var(--bg-elev); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow); padding: 1.5rem; animation: pop .16s; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal h3 { margin: 0 0 .3rem; font-size: 1.25rem; letter-spacing: -.01em; }
.modal .lead { color: var(--muted); margin: 0 0 1.1rem; font-size: .92rem; }
.modal label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: .9rem 0 .35rem; }
.modal input[type=email], .modal input[type=text] { width: 100%; padding: .7rem .8rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-2); color: var(--text); }
.modal input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.modal .actions { display: flex; flex-direction: column; gap: .55rem; margin-top: 1.2rem; }
.modal .x { position: relative; float: right; margin: -.4rem -.4rem 0 0; background: none; border: none; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: .2rem .4rem; }
.modal .x:hover { color: var(--text); }
.note { font-size: .82rem; padding: .7rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); }
.note.warn { border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); color: #fcd34d; }
.keybox { font-family: ui-monospace, monospace; font-size: .78rem; word-break: break-all; background: #000; border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: .7rem; color: #c9c4ff; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 80; bottom: 1.2rem; right: 1.2rem; display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.toast { padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: .9rem; animation: slidein .18s; }
.toast.danger { border-color: rgba(255, 92, 124, .5); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 4rem 1rem; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition: none !important; }
}
