:root {
  --bg: #000;
  --fg: #fff;
  --muted: #a1a1aa;
  --card: #141417;
  --line: #2a2a30;
  --accent: #fe2c55;
  --accent-2: #25f4ee;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 100%; height: 100%; fill: currentColor; display: block; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.7), transparent); }
.topbar.solid { background: rgba(10,10,12,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.5px; }
.logo span { color: var(--accent); }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.08); padding: 4px; border-radius: 999px; }
.tabs a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; color: var(--muted); }
.tabs a.active { background: var(--fg); color: #000; }
.icon-btn { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: rgba(255,255,255,.1); }
.spacer { width: 38px; }

/* ---------- reels feed ---------- */
.reels-page { overflow: hidden; }
.chips { position: fixed; top: 56px; left: 0; right: 0; z-index: 15; display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; justify-content: safe center; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.chip.active { background: var(--fg); color: #000; border-color: var(--fg); }

.feed { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.feed::-webkit-scrollbar { display: none; }
.reel { height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; justify-content: center; align-items: center; }
.stage { position: relative; width: 100%; height: 100%; max-width: calc(100dvh * 9 / 16);
  background: #111; overflow: hidden; user-select: none; }
.stage video { width: 100%; height: 100%; object-fit: cover; display: block; }

.actions { position: absolute; right: 8px; bottom: 96px; display: flex; flex-direction: column; gap: 16px; align-items: center; z-index: 3; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.act .ic { width: 48px; height: 48px; padding: 11px; border-radius: 50%; background: rgba(0,0,0,.35); backdrop-filter: blur(4px); transition: transform .15s; }
.act:active .ic { transform: scale(.88); }
.act.like.on .ic { color: var(--accent); }

.meta { position: absolute; left: 14px; right: 80px; bottom: 26px; z-index: 3; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.author { font-weight: 700; font-size: 16px; text-decoration: none; }
.desc { font-size: 14px; margin-top: 6px; line-height: 1.35; }
.credit { font-size: 12px; color: #d4d4d8; margin-top: 6px; opacity: .85; }
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent); }

.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.2); z-index: 4; }
.progress i { display: block; height: 100%; width: 0; background: var(--fg); }

.pause-ind { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; padding: 20px;
  margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 3; }
.reel.paused .pause-ind { opacity: 1; }
.heart-burst { position: absolute; width: 96px; height: 96px; color: var(--accent); pointer-events: none;
  opacity: 0; z-index: 5; transform: translate(-50%, -50%) scale(.4); }
.heart-burst.go { animation: burst .8s ease-out; }
@keyframes burst {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.4) rotate(-12deg); }
  25% { opacity: 1; transform: translate(-50%,-50%) scale(1.15) rotate(-12deg); }
  60% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(-12deg); }
  100% { opacity: 0; transform: translate(-50%,-110%) scale(1.1) rotate(-12deg); }
}

.loader { position: fixed; left: 50%; bottom: 24px; width: 28px; height: 28px; margin-left: -14px; z-index: 30;
  border: 3px solid rgba(255,255,255,.25); border-top-color: var(--fg); border-radius: 50%;
  animation: spin .8s linear infinite; display: none; }
.loader.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; left: 50%; top: 104px; transform: translate(-50%, -12px); z-index: 40;
  background: rgba(30,30,34,.95); color: var(--fg); padding: 10px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .reel { padding: 64px 0 16px; }
  .stage { border-radius: var(--radius); }
}

/* ---------- downloader page ---------- */
.dl-page { overflow-y: auto; background:
  radial-gradient(900px 500px at 10% -10%, rgba(254,44,85,.18), transparent 60%),
  radial-gradient(900px 500px at 100% 0%, rgba(37,244,238,.14), transparent 60%), var(--bg); }
.container { max-width: 760px; margin: 0 auto; padding: 96px 16px 48px; }
.hero { text-align: center; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.1; letter-spacing: -1px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 14px auto 28px; max-width: 520px; line-height: 1.5; }

.dl-form { display: flex; gap: 10px; flex-wrap: wrap; }
.input-wrap { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 6px 6px 14px; }
.input-wrap:focus-within { border-color: #52525b; }
.input-wrap input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font-size: 16px; padding: 10px 0; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: rgba(37,244,238,.15); color: var(--accent-2); white-space: nowrap; }
.ghost { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.08); }
.primary { flex: 0 0 auto; font-weight: 700; padding: 14px 26px; border-radius: var(--radius);
  background: var(--accent); color: #fff; min-width: 140px; }
.primary:disabled { opacity: .6; cursor: progress; }
@media (max-width: 520px) { .primary { flex: 1 1 100%; } }

.error { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(254,44,85,.12);
  border: 1px solid rgba(254,44,85,.35); color: #fecdd3; font-size: 14px; text-align: left; }

.result { margin-top: 24px; }
.card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.thumb { position: relative; flex: 0 0 132px; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: #222 center/cover; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 4px; }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.info h3 { font-size: 16px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.by { color: var(--muted); font-size: 13px; }
.q-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.q { font-size: 14px; font-weight: 700; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; }
.q:first-child { background: var(--fg); color: #000; border-color: var(--fg); }
.q:disabled { opacity: .55; cursor: progress; }
.q .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.note { font-size: 13px; color: var(--muted); min-height: 1em; }
@media (max-width: 520px) { .card { flex-direction: column; } .thumb { flex-basis: auto; width: 55%; margin: 0 auto; } }

.section { margin-top: 56px; }
.section h2 { font-size: 20px; margin-bottom: 14px; }
.plist { display: flex; flex-wrap: wrap; gap: 8px; }
.plist span { font-size: 14px; padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); margin-bottom: 10px; font-size: 14px; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 4px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 10px; }
.disclaimer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: #71717a; font-size: 12.5px; line-height: 1.6; text-align: center; }

/* ---------- SEO pages: links, prose, footer ---------- */
.plist a { font-size: 14px; padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.plist a:hover { border-color: var(--accent); }
ol.steps { list-style: none; padding: 0; }
.prose p { color: var(--muted); line-height: 1.65; font-size: 15px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 14px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; text-align: center; }
.crumbs a { color: var(--muted); }
.hero.small h1 { font-size: clamp(26px, 5vw, 36px); }
.primary-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.site-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 12px; }
.footer-links a { color: var(--muted); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--fg); }
.site-footer .disclaimer { margin-top: 12px; padding-top: 0; border-top: 0; }
.copy { color: #52525b; font-size: 12px; margin-top: 8px; }
