@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #0b0f1c;
  --navy-1: #121729;
  --navy-2: #1a2138;
  --navy-3: #232c48;
  --gold: #d4af37;
  --gold-soft: #f0dfa0;
  --gold-dim: rgba(212, 175, 55, 0.16);
  --cream: #f6f3ec;
  --muted: #9089a0;
  --muted-2: #6b6478;
  --done: #6fbf8b;
  --danger: #d97757;
  --radius: 18px;
  --radius-sm: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--navy);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  overscroll-behavior-y: none;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(600px 300px at 50% -80px, rgba(212,175,55,0.10), transparent 60%),
    var(--navy);
}

h1, h2, h3, .display {
  font-family: 'Sora', sans-serif;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

.screen {
  flex: 1;
  padding: calc(20px + var(--safe-top)) 20px 100px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #9c7a1f);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 13px;
  color: var(--navy);
}

/* ---------- Progress ring ---------- */
.ring-wrap {
  position: relative;
  width: 46px; height: 46px;
}
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--gold);
}

.btn {
  border-radius: 100px;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.96); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--cream); border: 1px solid rgba(255,255,255,0.12); }
.btn-done { background: var(--done); color: #0b1f14; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 12.5px; }

/* ---------- Hero card ---------- */
.hero-card {
  background: linear-gradient(155deg, var(--navy-3), var(--navy-1) 70%);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 24px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 70%);
}
.hero-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.hero-title {
  font-size: 22px;
  line-height: 1.3;
  margin: 10px 0 8px;
  font-weight: 700;
  position: relative;
}
.hero-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: #cfc9dd;
  margin-bottom: 18px;
  position: relative;
}
.hero-actions { display: flex; gap: 10px; position: relative; }
.hero-actions .btn-gold { flex: 1; }

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 26px 0 12px;
}
.section-head h2 { font-size: 15px; font-weight: 700; color: var(--cream); }
.section-head .see-all { font-size: 12.5px; color: var(--gold-soft); font-weight: 600; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--navy-2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 6px;
}
.stat-strip .big-num { font-family:'Sora',sans-serif; font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-strip .big-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat-strip .divider { width: 1px; height: 34px; background: rgba(255,255,255,0.1); }

.qc-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.qc-bar-fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* ---------- Detail header ---------- */
.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.back-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--cream);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.detail-header h1 { font-size: 18px; font-weight: 700; }

.tip-box {
  background: var(--gold-dim);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
}
.warning-box {
  background: rgba(217,119,87,0.12);
  border-left: 3px solid var(--danger);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 12.5px;
  color: #f0c9ba;
  line-height: 1.5;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  z-index: 20;
}
.bottom-nav-inner {
  width: 100%;
  max-width: 480px;
  display: flex;
  background: rgba(18,23,41,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 10px 8px calc(10px + var(--safe-bottom));
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  color: var(--muted);
}
.nav-btn .nav-icon { font-size: 19px; line-height: 1; }
.nav-btn .nav-label { font-size: 10.5px; font-weight: 600; }
.nav-btn.active { color: var(--gold); }

/* ---------- Onboarding / gate ---------- */
.onboard-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 26px;
  max-width: 480px;
  margin: 0 auto;
}

.splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 40px;
}
.splash .brand-mark { width: 84px; height: 84px; border-radius: 22px; font-size: 26px; }
.splash h1 { font-size: 22px; }
.splash p { color: var(--muted); font-size: 14px; max-width: 280px; }

/* ---------- Profile ---------- */
.profile-card {
  background: var(--navy-2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #9c7a1f);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--navy);
  font-family: 'Sora', sans-serif;
}
.list-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px; font-weight: 600;
}
.chev { color: var(--muted-2); font-size: 18px; }

::-webkit-scrollbar { display: none; }

/* ---------- Table of contents rows (Home) ---------- */
.toc-list { display: flex; flex-direction: column; gap: 8px; }
.toc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: left;
  width: 100%;
}
.toc-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--navy-3);
  border: 1px solid rgba(212,175,55,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
}
.toc-text { flex: 1; min-width: 0; }
.toc-title { font-size: 14px; font-weight: 700; color: var(--cream); }
.toc-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.toc-count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.music-card {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 8px;
}

/* ---------- Author screen ---------- */
.autor-wrap { text-align: center; }
.autor-photo {
  width: 130px; height: 130px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid var(--gold);
}
.autor-subtitle { color: var(--muted); font-size: 12px; margin-bottom: 16px; }

/* ---------- Install banner + guide ---------- */
.install-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1c1710, var(--navy-2));
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.install-icon { font-size: 22px; flex-shrink: 0; }
.install-text { flex: 1; min-width: 0; }
.install-title { font-size: 13px; font-weight: 700; color: var(--cream); line-height: 1.3; }
.install-sub { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.install-close {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.install-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13.5px;
  color: #d8d0e8;
  line-height: 1.5;
}
.install-step strong { color: var(--gold-soft); }
.install-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-2);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---------- Track rows (playlist / collection) ---------- */
.track-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--navy-2);
  border: 1px solid rgba(212,175,55,0.25);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--gold);
  font-size: 13px;
  flex-shrink: 0;
}
.track-info { flex: 1; min-width: 0; }
.t-title { font-size: 14px; font-weight: 600; color: var(--cream); }
.t-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.t-listened { color: var(--done); font-size: 15px; flex-shrink: 0; }

/* ---------- Hero image / video embed (Home) ---------- */
.hero-image {
  width: 100%; border-radius: 20px; display: block; margin-bottom: 18px;
  border: 1px solid rgba(212,175,55,0.2);
}
.video-embed-wrap {
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(212,175,55,0.25);
  aspect-ratio: 9/16; max-width: 280px; margin: 0 auto 26px; background: #000;
}
.video-embed-wrap iframe { width: 100%; height: 100%; display: block; }
.video-embed-wrap.wide { aspect-ratio: 16/9; max-width: 100%; }
.placeholder-box {
  border: 1.5px dashed rgba(212,175,55,0.35);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin: 0 auto 26px;
  max-width: 320px;
}

/* ---------- Collection rows (inline audio + lyrics) ---------- */
.collection-row {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}
.collection-row.bonus-row { border-color: rgba(212,175,55,0.35); background: linear-gradient(135deg,#1c1710,var(--navy-2)); }
.cr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cr-check { margin-left: auto; color: var(--done); font-size: 15px; flex-shrink: 0; }
.cr-audio { width: 100%; height: 34px; }
.lyrics-toggle {
  margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--gold-soft);
  display: flex; align-items: center; gap: 4px;
}
.lyrics-panel {
  margin-top: 10px; font-size: 13px; color: #d8d0e8; line-height: 1.7;
  white-space: pre-line; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px;
}

/* ---------- Ebook / clip cross-sell card ---------- */
.ebook-card { display: flex; gap: 14px; align-items: center; }
.ebook-cover {
  width: 64px; height: 84px; border-radius: 8px; flex-shrink: 0;
  background: var(--navy-3); border: 1px solid rgba(212,175,55,0.3);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  object-fit: cover;
}
.ebook-info { flex: 1; min-width: 0; }
.ebook-title { font-size: 14px; font-weight: 700; color: var(--cream); line-height: 1.35; }

/* ---------- Inline author section (Home) ---------- */
.author-inline { text-align: center; }
.author-inline .autor-photo { width: 96px; height: 96px; }

/* ---------- VTurb welcome video wrapper ---------- */
.welcome-video-wrap {
  max-width: 400px;
  margin: 0 auto 26px;
}
