/* desi.study — flat dark theme (zinc palette, blue accent, Inter) */

:root {
  --bg: #09090b;
  --bg-raised: #101117;
  --bg-hover: #171821;
  --text: #f4f4f5;
  --muted: #9d9fa8;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 12px;
  --gap: 16px;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win over any display rule below —
   otherwise overlays like .player-error cover the player permanently. */
[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 65px;
}

.logo {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--text);
  white-space: nowrap;
}

.logo .logo-accent { color: var(--accent); }

.search-form {
  flex: 1;
  display: flex;
  max-width: 520px;
  margin-left: auto;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-raised);
}

.search-form:focus-within { border-color: var(--accent); }

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.search-form input::placeholder { color: var(--muted); }

.search-form button {
  display: grid;
  place-items: center;
  padding: 0 15px;
  border: 0;
  background: var(--accent-strong);
  color: #fff;
  cursor: pointer;
}

.search-form button svg { width: 18px; height: 18px; }

.search-form button:hover { background: var(--accent); }

.header-actions {
  display: flex;
  gap: 8px;
  margin-left: 4px;
}

.header-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
}

.header-icon:hover { color: var(--accent); border-color: var(--accent); }

.header-icon svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------- home grid -- */

.shelf { margin: 30px 0 8px; }

.shelf-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.shelf-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.sec-icon {
  display: inline-flex;
  color: var(--accent);
}

.sec-icon svg { width: 20px; height: 20px; }

.shelf-note { margin: 0; font-size: 12.5px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap);
}

/* --------------------------------------------------------------- card -- */

.card { display: block; min-width: 0; }

.thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.card:hover .thumb-wrap img,
.card:focus-visible .thumb-wrap img { transform: scale(1.05); }

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.play svg {
  width: 52px;
  height: 52px;
  padding: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
}

.card:hover .play,
.card:focus-visible .play { opacity: 1; }

.duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.card:hover .card-title { color: var(--accent); }

/* -------------------------------------------------------- watch page -- */

.watch { margin-top: 22px; }

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  /* Plyr theming (flat accent) */
  --plyr-color-main: #3b82f6;
  --plyr-video-control-color: #fff;
  --plyr-range-fill-background: #3b82f6;
  --plyr-video-background: #000;
  --plyr-badge-background: #171821;
  --plyr-menu-background: #101117;
  --plyr-menu-color: #f4f4f5;
}

.player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* Plyr wraps the <video> in its own containers — they must all fill the
   player or the video renders at zero size (chunks load, nothing shows).
   Same overrides as teradownloader.com's player.html. */
.player-wrap .plyr,
.player-wrap .plyr--video,
.player-wrap .plyr__video-wrapper {
  width: 100%;
  height: 100% !important;
  padding-top: 0 !important;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.player-loader .spinner {
  width: 45px;
  height: 45px;
  border: 4px solid rgba(255, 255, 255, 0.33);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Banner box (filled from ads.json "banner") — centred, never wider than the page */
.ad-slot {
  display: flex;
  justify-content: center;
  max-width: 100%;
  margin: 22px auto;
  overflow: hidden;
}

.ad-slot[hidden] { display: none; }

/* VAST preroll layer — sits over the player until the ad ends or is skipped */
.vast-layer {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #000;
}

.vast-layer video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.vast-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.vast-btn {
  position: absolute;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.vast-more { top: 10px; right: 10px; }
.vast-sound { left: 10px; bottom: 14px; }

.vast-skip {
  right: 0;
  bottom: 14px;
  padding: 10px 14px;
  border-right: 0;
  border-radius: 6px 0 0 6px;
}

.vast-skip:disabled { opacity: 0.75; cursor: default; }

.preview-gate {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: center;
  padding: 20px;
}

.preview-box {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  animation: gateIn 0.35s ease both;
}

@keyframes gateIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* shared gate elements */
.gcard { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.gate-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gate-cta svg { width: 18px; height: 18px; }
.gate-cta-xl {
  padding: 14px 28px;
  font-size: 16px;
  min-width: min(300px, 80vw);
  animation: btnPulse 1.6s ease-in-out 0.4s infinite;
}
.app-icon { border-radius: 14px; width: 56px; height: 56px; }
.app-name { margin: 0; font-weight: 800; font-size: 17px; }
.proof { margin: 0; color: var(--muted); font-size: 13.5px; }
.proof strong { color: var(--text); }

/* d1 — animated walkthrough */
.g1 { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.g1-phone {
  position: relative;
  width: 210px;
  height: 150px;
  border-radius: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

/* d10: 30% wider animation */
.g1-phone-lg { width: 273px; height: 195px; border-radius: 20px; }
.g1-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: g1step 8.4s infinite;
}
.g1-tap { animation-delay: 0s; }
.g1-store { animation-delay: 2.8s; }
.g1-video { animation-delay: 5.6s; }
@keyframes g1step {
  0% { opacity: 0; transform: translateY(8px); }
  3% { opacity: 1; transform: none; }
  30% { opacity: 1; transform: none; }
  33% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; }
}
.g1-btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.g1-btn-mini svg { width: 13px; height: 13px; }
.g1-finger {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid #fff;
  animation: g1tap 8.4s infinite;
}
@keyframes g1tap {
  0%, 55% { transform: translateY(-34px) scale(0.8); opacity: 0; }
  62% { transform: translateY(-12px) scale(1); opacity: 1; }
  70% { transform: translateY(-12px) scale(0.85); opacity: 0.9; }
  78%, 100% { opacity: 0; }
}
.g1-store { flex-direction: row; gap: 10px; }
.g1-icon { width: 44px; height: 44px; border-radius: 11px; }
.g1-store-meta { display: flex; flex-direction: column; align-items: flex-start; }
.g1-store-meta strong { font-size: 14px; }
.g1-store-meta span { font-size: 11.5px; color: var(--muted); }
.g1-install {
  position: relative;
  overflow: hidden;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}
.g1-install em { font-style: normal; position: relative; z-index: 1; }
.g1-install-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--accent-strong);
  animation: g1fill 8.4s infinite;
}
.g1-install-fill::after { content: none; }
@keyframes g1fill {
  0%, 58% { width: 0; }
  62% { width: 0; }
  78%, 100% { width: 100%; }
}
.g1-install.done em { color: #fff; }
/* mock "video playing": a scene that slowly pans (camera movement),
   a play glyph and a progress bar synced to the step cycle */
.g1-videoframe {
  position: relative;
  width: 150px;
  height: 84px;
  border-radius: 10px;
  background: #000;
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.g1-scene {
  position: absolute;
  inset: 0;
  display: block;
  background: #0b1020;
  animation: g1pan 8.4s ease-in-out infinite;
}
.g1-sun {
  position: absolute;
  right: 22%;
  top: 14%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffb03a;
}
.g1-cloud {
  position: absolute;
  left: 12%;
  top: 22%;
  width: 26px;
  height: 8px;
  border-radius: 5px;
  background: #2b3550;
  animation: g1drift 8.4s linear infinite;
}
.g1-m1, .g1-m2, .g1-m3 {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
}
.g1-m1 {
  left: -6%;
  border-width: 0 34px 34px 34px;
  border-color: transparent transparent #1f2c4d transparent;
}
.g1-m2 {
  left: 34%;
  border-width: 0 44px 46px 44px;
  border-color: transparent transparent #18223d transparent;
}
.g1-m3 {
  right: -8%;
  border-width: 0 38px 30px 38px;
  border-color: transparent transparent #232f52 transparent;
}
@keyframes g1pan {
  0%, 100% { transform: translateX(0) scale(1.06); }
  50%      { transform: translateX(-7%) scale(1.06); }
}
@keyframes g1drift {
  from { transform: translateX(0); }
  to   { transform: translateX(120px); }
}
.g1-vplay {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.g1-vplay svg { width: 15px; height: 15px; }
.g1-progress {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.g1-progress b {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: #ff4d4d;
  animation: g1prog 8.4s linear infinite;
}
@keyframes g1prog {
  0%, 66% { width: 0; }
  100%    { width: 100%; }
}
.g1-check { color: #4ade80; font-size: 20px; font-weight: 800; }

/* d5 — Play badge CTA */
.gate-cta-badge { background: #000; border: 1px solid #fff; padding: 10px 18px; }

@keyframes btnPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}
.playbadge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.playbadge svg { width: 22px; height: 24px; }
.playbadge-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.playbadge-txt small { font-size: 10px; letter-spacing: 0.5px; }
.playbadge-txt strong { font-size: 15px; }

/* welcome-back dialog */
.welcome-back {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  animation: toastIn 0.3s ease both;
}
.wb-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  flex-wrap: wrap;
}
.wb-card .app-icon { width: 44px; height: 44px; border-radius: 11px; }
.wb-text { flex: 1; min-width: 140px; }
.wb-title { margin: 0; font-weight: 800; font-size: 14.5px; }
.wb-sub { margin: 0; color: var(--muted); font-size: 12.5px; }
.wb-card .btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; font-size: 13.5px; }
.wb-card .btn svg { width: 15px; height: 15px; }
.wb-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.wb-close:hover { color: var(--text); }
.wb-close svg { width: 15px; height: 15px; }

.preview-note { margin: 0; font-size: 18px; font-weight: 800; }
.preview-sub { margin: 0; color: var(--muted); font-size: 13px; }

.preview-gate .btn { display: inline-flex; align-items: center; gap: 8px; }
.preview-gate .btn svg { width: 18px; height: 18px; }

.watch-actions {
  max-width: 1200px;
  margin: 14px auto 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.watch-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.watch-actions .btn svg { width: 18px; height: 18px; }
.watch-actions #btnBookmark.bookmarked {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  max-width: 90vw;
  animation: toastIn 0.25s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.bm-cell { position: relative; }

.bm-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.bm-cell:hover .bm-remove,
.bm-remove:focus-visible { opacity: 1; }

.bm-remove svg { width: 14px; height: 14px; }

/* --------------------------------------------------------- analytics -- */

.analytics-login {
  display: flex;
  gap: 10px;
  margin: 18px 0 8px;
  max-width: 420px;
}

.analytics-login input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.analytics-login input:focus { border-color: var(--accent); }

.analytics-error { color: var(--danger, #ff5470); margin: 6px 0 0; font-size: 14px; }

.analytics-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.analytics-rows { display: flex; flex-direction: column; gap: 6px; }

.analytics-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}

.a-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.a-bar {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.a-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); }

.a-nums { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-nums strong { color: var(--text); }

.a-sub { font-size: 16px; font-weight: 800; margin: 26px 0 10px; }

/* --------------------------------------------------------- SEO text -- */

.home-h1 {
  margin: 26px 0 2px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.seo-text {
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 900px;
}

.landing-h1 { margin: 26px 0 8px; font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }

.landing-intro { margin: 0 0 18px; color: #c6c8cf; font-size: 14.5px; max-width: 780px; }

.landing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
}

.landing-links a {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.landing-links a:hover { color: var(--accent); border-color: var(--accent); }

.kw-nav { margin-top: 10px; }

.analytics-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}

.analytics-filters select,
.analytics-filters input[type="date"] {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}

.analytics-filters select:focus,
.analytics-filters input[type="date"]:focus { border-color: var(--accent); }

.range-sep { color: var(--muted); }

/* by-design rows: mini gate preview + label */
.a-design { grid-template-columns: minmax(200px, 1.2fr) 1fr auto; }

.a-dfirst { display: flex; align-items: center; gap: 10px; min-width: 0; }

.a-dlabel { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.a-dlabel strong { font-size: 13.5px; }
.a-dlabel em { font-style: normal; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.a-prev {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 64px;
  height: 40px;
  padding: 0 7px;
  border-radius: 7px;
  background: #05060a;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.a-prev-icon { width: 15px; height: 15px; border-radius: 4px; background: #3b82f6; flex-shrink: 0; }

.a-prev-cta {
  font-style: normal;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.a-prev-cta.badge { background: #000; border: 1px solid #fff; }

.a-prev-time { font-style: normal; font-size: 9px; color: #fff; font-variant-numeric: tabular-nums; }

.a-prev-phone {
  width: 22px; height: 32px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  position: relative;
  flex-shrink: 0;
}

.a-prev-phone b {
  position: absolute;
  left: 7px; top: 12px;
  width: 0; height: 0;
  border-left: 7px solid var(--accent);
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}

.a-prev-phone-lg { width: 28px; height: 40px; }

/* install survey — centered modal */
.sv-bar {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 18px;
  animation: svIn 0.3s ease both;
}

@keyframes svIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sv-card {
  width: min(420px, 100%);
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6);
}

.sv-title { margin: 0 0 10px; font-weight: 800; font-size: 14.5px; }

.sv-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sv-actions .btn { padding: 8px 16px; font-size: 13.5px; }

.sv-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.sv-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}

.sv-chip:hover { border-color: var(--accent); color: var(--accent); }
.sv-chip:disabled { opacity: 0.45; cursor: default; }

.sv-other { display: flex; gap: 8px; margin-top: 10px; }

.sv-other input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.sv-other input:focus { border-color: var(--accent); }
.sv-other .btn { padding: 8px 14px; font-size: 13px; }

@media (max-width: 560px) {
  .sv-chip { font-size: 11.5px; padding: 6px 11px; }
}

/* d11 — focus dim: everything except the player dialog fades */
body.dimmed-page .site-header,
body.dimmed-page .site-footer,
body.dimmed-page main .watch > :not(.player-wrap),
body.dimmed-page main > :not(.watch) {
  opacity: 0.25;
  transition: opacity 0.4s ease;
}

@media (max-width: 560px) {
  .analytics-filters select,
  .analytics-filters input[type="date"] { padding: 7px 10px; font-size: 12.5px; }
}

.player-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  background: #000;
  font-size: 14px;
  text-align: center;
  padding: 0 20px;
}

.watch-title {
  max-width: 1200px;
  margin: 18px auto 8px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.watch-meta {
  max-width: 1200px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.watch-meta .pill {
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.watch-tags {
  max-width: 1200px;
  margin: 0 auto 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.tag:hover { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------- search page -- */

.search-page { margin-top: 26px; }

.page-title {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
}

.search-status { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.search-empty { margin: 40px 0; color: var(--muted); }

/* ------------------------------------------------------------ legal -- */

.legal { max-width: 800px; margin: 34px auto 60px; }

.legal h1 { font-size: 26px; margin: 0 0 6px; }

.legal .updated { color: var(--muted); font-size: 13px; margin: 0 0 24px; }

.legal h2 { font-size: 17px; margin: 28px 0 8px; }

.legal p, .legal li { color: #c6c8cf; font-size: 14.5px; }

.legal a { color: var(--accent); text-decoration: underline; }

.legal code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-size: 13px;
}

/* -------------------------------------------------------- pagination -- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 10px;
}

.page-link,
.page-arrow,
.page-ellipsis {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.page-link:hover,
.page-arrow:hover:not(.disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-link.current {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.page-arrow.disabled,
.page-ellipsis {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  cursor: default;
}

.browse-all-row {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* ----------------------------------------------------------- age gate --
   Temporarily disabled — markup/JS removed; styles kept for easy re-enable. */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
}

.age-card {
  max-width: 440px;
  padding: 32px 30px;
  border-radius: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  text-align: center;
}

.age-card .sec-icon { justify-content: center; margin-bottom: 14px; }
.age-card .sec-icon svg { width: 34px; height: 34px; }

.age-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; }

.age-card p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

.age-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

body.age-locked { overflow: hidden; }
body.age-locked main, body.age-locked .site-header, body.age-locked .site-footer { filter: blur(6px); pointer-events: none; user-select: none; }

/* --------------------------------------------------------- popland -- */
body.popland-body { background:#fff; overflow-x:hidden; }
body.popland-body .site-header, body.popland-body .site-footer, body.popland-body .toast { display:none !important; }
body.popland-body main { padding:0 !important; max-width:none !important; }
.popland { max-width:575px; margin:0 auto; font-family:system-ui,-apple-system,sans-serif; cursor:pointer; user-select:none; -webkit-user-select:none; -webkit-tap-highlight-color:rgba(0,102,255,.15); }
.pl-video-block { width:100%; aspect-ratio:16/9; overflow:hidden; background:#000; }
.pl-video { width:100%; height:100%; object-fit:cover; display:block; }
.pl-wrapper { background:#fff; position:relative; z-index:2; border-radius:10px; margin-top:-20px; padding:0 20px 16px; }
.pl-header { position:relative; padding-top:12px; }
.pl-logo { position:absolute; top:-45px; left:0; width:110px; height:110px; border-radius:50%; border:3px solid #fff; background:#0068ff; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.15); z-index:999; }
.pl-logo img { width:104px; height:104px; border-radius:50%; border:3px solid #fff; }
.pl-info { padding-top:70px; }
.pl-name { margin:0 0 7px; font-size:1.5rem; color:#000; display:flex; align-items:center; gap:5px; line-height:2rem; }
.pl-title-img { width:40px; height:auto; }
.pl-desc { margin:0 0 5px; font-size:1.1rem; color:#98999a; font-weight:500; line-height:1.5rem; }
.pl-stats { display:flex; align-items:center; gap:5px; font-size:1.1rem; color:#98999a; font-weight:500; line-height:1.5rem; }
.pl-stats strong { color:#000; font-weight:500; margin-right:3px; }
.pl-stats .dot { color:#ccc; }
.pl-actions { margin:16px 0; }
.pl-install { display:block; text-align:center; padding:22px 0; background:#0068ff; color:#fff; font-size:1rem; font-weight:700; border-radius:8px; text-decoration:none; }
.pl-install:hover { background:#0052cc; }
.pl-stories { display:flex; justify-content:space-around; overflow-x:auto; padding:16px 8px; scrollbar-width:none; }
.pl-stories::-webkit-scrollbar { display:none; }
.pl-story { flex-shrink:0; width:62px; height:62px; min-width:62px; border-radius:50%; border:3px solid #0068ff; overflow:hidden; display:grid; place-items:center; background:#f0f0f0; }
.pl-story img { width:100%; height:100%; object-fit:cover; border-radius:50%; border:3px solid #fff; }
.pl-links { display:flex; padding-top:16px; margin:0 10px 10px; }
.pl-link { flex:1; display:grid; place-items:center; padding:8px 0; border-radius:20px; font-size:.9rem; font-weight:600; color:#787878; }
.pl-link.active { background:#eef7ff; color:#2d7dbd; }
.pl-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:2px; }
.pl-gallery-item { position:relative; overflow:hidden; aspect-ratio:1; background:#eee center/cover no-repeat; display:block; }
.pl-reels { position:absolute; top:8px; right:8px; width:16px; height:16px; background:rgba(255,255,255,.9); border-radius:3px; }
.pl-reels::after { content:''; position:absolute; inset:3px; border:1.5px solid #333; border-radius:2px; }

/* ------------------------------------------------------------- misc -- */

.notfound { text-align: center; padding: 90px 0; }

.notfound h1 { margin: 0; font-size: 64px; font-weight: 900; color: var(--accent); }

.notfound p { color: var(--muted); }

.btn {
  display: inline-block;
  padding: 11px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-strong);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover { background: var(--accent); }

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}

.btn.ghost:hover { color: var(--text); border-color: var(--text); }

.site-footer {
  margin-top: 60px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.site-footer .age-statement { max-width: 860px; margin: 0 0 16px; }

.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }

.footer-nav a:hover { color: var(--accent); }

.site-footer .copy { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .wrap { padding: 0 12px; }
  .header-inner { gap: 8px; height: 56px; }
  .logo { font-size: 18px; }
  .header-actions { gap: 6px; }
  .header-icon { width: 34px; height: 34px; }
  .search-form input { padding: 8px 10px; font-size: 13px; }
  .search-form button { padding: 0 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .watch-title { font-size: 17px; }
  .shelf-head h2 { font-size: 18px; }

  /* action buttons: tidy 2×2 grid instead of squeezed flex row */
  .watch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .watch-actions .btn {
    justify-content: center;
    width: 100%;
    padding: 10px 6px;
    font-size: 13px;
    gap: 6px;
    white-space: nowrap;
  }
  .watch-actions .btn svg { width: 16px; height: 16px; flex-shrink: 0; }

  /* gate designs on small screens — the player is only ~190px tall at 16:9
     (360px viewport), so every gate must fit inside ~180px */
  .preview-gate { padding: 6px; overflow: hidden; }
  .preview-box { max-width: 100%; gap: 6px; }
  .preview-note { font-size: 13.5px; margin: 0; }
  .app-icon { width: 38px; height: 38px; border-radius: 10px; }
  .app-name { font-size: 13px; }
  .proof { font-size: 11.5px; }
  .gate-cta-xl { min-width: min(220px, 78vw); padding: 10px 16px; font-size: 13.5px; }

  /* d1 compact: phone mockup 116×84, internals scaled down */
  .g1 { gap: 6px; }
  .g1-phone { width: 116px; height: 84px; border-radius: 9px; }
  .g1-phone-lg { width: 150px; height: 109px; border-radius: 11px; }
  .g1-btn-mini { padding: 4px 8px; font-size: 9.5px; gap: 3px; border-radius: 7px; }
  .g1-btn-mini svg { width: 9px; height: 9px; }
  .g1-finger { width: 18px; height: 18px; bottom: 6px; margin-left: -9px; }
  .g1-store { gap: 5px; }
  .g1-icon { width: 22px; height: 22px; border-radius: 6px; }
  .g1-store-meta strong { font-size: 9.5px; }
  .g1-store-meta span { font-size: 8px; }
  .g1-install { padding: 3px 6px; font-size: 8.5px; border-radius: 6px; }
  .g1-videoframe { width: 84px; height: 44px; border-radius: 7px; }
  .g1-videoframe .g1-vplay { width: 20px; height: 20px; }
  .g1-videoframe .g1-vplay svg { width: 10px; height: 10px; }
  .g1-videoframe .g1-sun { width: 9px; height: 9px; }
  .g1-videoframe .g1-cloud { width: 14px; height: 5px; }
  .g1-videoframe .g1-m1 { border-width: 0 18px 17px 18px; }
  .g1-videoframe .g1-m2 { border-width: 0 22px 23px 22px; }
  .g1-videoframe .g1-m3 { border-width: 0 19px 15px 19px; }
  .g1-videoframe .g1-progress { left: 4px; right: 4px; bottom: 3px; height: 2px; }
  .g1-check { font-size: 12px; }
  .gate-cta-badge { padding: 7px 12px; }
  .playbadge svg { width: 16px; height: 18px; }
  .playbadge-txt small { font-size: 8px; }
  .playbadge-txt strong { font-size: 12px; }

  /* welcome-back bar */
  .welcome-back { left: 8px; right: 8px; bottom: 8px; }
  .wb-card { gap: 10px; padding: 10px 12px; }
  .wb-text { flex: 1; min-width: 130px; }
  .wb-card .btn { flex: 1 1 auto; justify-content: center; }
  .wb-close { order: 5; }

  .analytics-row { grid-template-columns: 84px 1fr; row-gap: 4px; }
  .a-nums { grid-column: 1 / -1; }
}

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

/* popland: full-page tap target */
.popland { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: rgba(0,102,255,.15); }
.pl-video-block { cursor: pointer; }
.pl-wrapper { cursor: pointer; }
