/* Members area. Dark "live" look shared with the Phoenix funnel; accent colours come from the product theme. */
:root {
  --bg: #07080c;
  --card: #11141c;
  --card-2: #171b25;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f4f6fb;
  --muted: #a3acbd;
  --dim: #6f7889;
  --accent: #ff3b30;
  --accent-2: #ff7a1a;
  --gold: #ffd60a;
  --money: #22c55e;
  --radius: 18px;
  --display: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg) radial-gradient(70% 420px at 50% -100px, rgba(255, 106, 40, .2), transparent 72%) no-repeat;
  color: var(--text); font: 16px/1.55 var(--ui); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 120px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(7, 8, 12, .85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--display); font-size: 20px; letter-spacing: .16em; }
.logo svg { width: 24px; height: 24px; }
.bar-stats { margin-left: auto; display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pill b { color: var(--text); }
.pill svg { width: 15px; height: 15px; fill: var(--accent-2); }
.pill-xp b { color: var(--gold); }

/* Cards and type */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
h1.display { font-family: var(--display); font-weight: 400; letter-spacing: .02em; font-size: 34px; line-height: 1.05; margin: 6px 0 8px; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 2px 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 15px 20px;
  font-weight: 800; font-size: 16px; text-decoration: none; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff;
  box-shadow: 0 8px 24px rgba(255, 59, 48, .25); width: 100%; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); box-shadow: none; font-weight: 700; }
.btn-small { padding: 10px 14px; font-size: 14px; width: auto; }
input, select { width: 100%; font: inherit; color: var(--text); background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; }
input:focus, select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 15px; }

/* Hero */
.hero { display: flex; gap: 16px; align-items: center; }
.avatar { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 70%, rgba(255, 122, 26, .35), rgba(255, 59, 48, .05) 70%); border: 1px solid var(--line-2); }
.avatar svg { transition: transform .4s; }
.hero-text { min-width: 0; }
.rank { font-family: var(--display); font-size: 26px; letter-spacing: .04em; line-height: 1.1; }
.progress { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 12px 0 6px; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold)); transition: width .6s ease; }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.progress-meta b { color: var(--text); }

/* Continue */
.continue { display: block; text-decoration: none; background: linear-gradient(135deg, rgba(255, 122, 26, .16), rgba(255, 59, 48, .06)); border-color: rgba(255, 122, 26, .35); }
.continue .title { font-size: 19px; font-weight: 800; margin: 2px 0 12px; }

/* Daily tap */
.tap { display: flex; align-items: center; gap: 18px; }
.tap-btn { position: relative; flex: 0 0 auto; width: 104px; height: 104px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 50% 35%, #ff9a3c, var(--accent) 70%); color: #fff; font-family: var(--display); font-size: 26px; letter-spacing: .08em;
  box-shadow: 0 0 0 6px rgba(255, 59, 48, .15), 0 12px 30px rgba(255, 59, 48, .35); }
.tap-btn::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255, 122, 26, .5); animation: ring 2.2s infinite; }
.tap-btn.done { background: radial-gradient(circle at 50% 35%, #3ddc84, #15a34a 70%); box-shadow: 0 0 0 6px rgba(34, 197, 94, .15); font-size: 15px; }
.tap-btn.done::after { display: none; }
@keyframes ring { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
.tap-text b { font-size: 17px; }
.signal { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border-left: 3px solid var(--gold); font-size: 15px; }

/* Level map */
.levels { position: relative; padding-left: 4px; }
.level { position: relative; display: flex; gap: 14px; padding: 0 0 18px; text-decoration: none; }
.level:not(:last-child)::before { content: ''; position: absolute; left: 21px; top: 46px; bottom: 0; width: 2px; background: var(--line-2); }
.level.complete:not(:last-child)::before { background: linear-gradient(var(--accent-2), var(--accent)); }
.node { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; z-index: 1;
  background: var(--card-2); border: 2px solid var(--line-2); color: var(--muted); }
.level.unlocked .node { border-color: var(--accent-2); color: var(--text); box-shadow: 0 0 0 5px rgba(255, 122, 26, .12); }
.level.complete .node { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: #fff; }
.node svg { width: 18px; height: 18px; fill: currentColor; }
.level-body { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.level.locked .level-body { opacity: .55; }
.level-body .name { font-weight: 800; }
.level-body .name span { color: var(--muted); font-weight: 600; }
.mini { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); margin-top: 8px; overflow: hidden; }
.mini > i { display: block; height: 100%; background: var(--accent-2); }

/* Lessons list */
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.lesson-row:first-of-type { border-top: 0; }
.check { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.check.on { background: var(--money); border-color: var(--money); }
.check svg { width: 14px; height: 14px; fill: #fff; }
.lesson-row .t { flex: 1; min-width: 0; }
.lesson-row .m { color: var(--dim); font-size: 13px; white-space: nowrap; }

/* Lesson page */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000 radial-gradient(60% 80% at 50% 40%, rgba(255, 122, 26, .25), transparent); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 18px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .vt { font-family: var(--display); font-size: 28px; letter-spacing: .03em; line-height: 1.1; }
/* Lesson video (self-hosted) */
.video video.lesson-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

/* Narrated lesson player */
.video.listen { aspect-ratio: auto; min-height: 220px; padding: 24px 18px; }
.listen-in { width: 100%; max-width: 520px; display: grid; justify-items: center; gap: 6px; }
.play { width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; margin-bottom: 6px;
  background: radial-gradient(circle at 50% 35%, #ff9a3c, var(--accent) 70%); box-shadow: 0 0 0 6px rgba(255, 59, 48, .15), 0 12px 30px rgba(255, 59, 48, .35); }
.play svg { width: 34px; height: 34px; fill: #fff; }
.scrub { width: 100%; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; cursor: pointer; margin-top: 10px; }
.scrub > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.listen-meta { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.listen-meta button { background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.script .ts[role="button"] { cursor: pointer; color: var(--accent-2); }
.script p { margin: 0 0 14px; transition: background .3s; }
.script p.hl { background: rgba(255, 214, 10, .12); border-left: 3px solid var(--gold); padding: 8px 12px; border-radius: 8px; }
.ts { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 6px; }
.todo label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 10px 0; }
.todo input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--money); margin-top: 1px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Badges, bonuses, upgrades */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge { text-align: center; font-size: 12px; color: var(--muted); }
.badge i { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.badge i svg { width: 26px; height: 26px; fill: var(--dim); }
.badge.on { color: var(--text); }
.badge.on i { background: linear-gradient(160deg, rgba(255, 214, 10, .25), rgba(255, 122, 26, .2)); border-color: rgba(255, 214, 10, .5); }
.badge.on i svg { fill: var(--gold); }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; }
.item .t { flex: 1; }
.tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.tag.on { background: rgba(34, 197, 94, .15); color: var(--money); }
.tag.off { background: rgba(255, 255, 255, .06); color: var(--muted); }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .7); display: grid; place-items: end center; padding: 12px; }
.modal { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; padding: 22px; max-height: 92vh; overflow: auto; animation: up .25s ease; }
@media (min-width: 700px) { .modal-bg { place-items: center; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.choices { display: grid; gap: 8px; }
.choice { text-align: left; padding: 13px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-2); font-weight: 600; }
.choice.on { border-color: var(--accent-2); background: rgba(255, 122, 26, .12); }
.levelup { text-align: center; }
.levelup .big { font-family: var(--display); font-size: 44px; letter-spacing: .04em; background: linear-gradient(90deg, var(--accent), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Chat */
.chat-fab { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; gap: 8px;
  padding: 13px 18px; border-radius: 999px; border: 0; background: var(--text); color: #0b0d12; font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.chat-fab svg { width: 20px; height: 20px; fill: currentColor; }
.chat { position: fixed; right: 16px; bottom: 16px; z-index: 55; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px));
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.chat-head { display: grid; grid-template-columns: 1fr auto; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-head span { grid-column: 1; font-size: 12px; color: var(--muted); }
.chat-head button { grid-row: 1 / span 2; grid-column: 2; background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); }
.chat-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 15px; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; }
.msg.bot { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); }
.src { display: inline-block; margin: 8px 6px 0 0; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; background: rgba(255, 214, 10, .14); color: var(--gold); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form button { border: 0; border-radius: 12px; padding: 0 16px; font-weight: 800; background: var(--accent); color: #fff; }

/* Toast + confetti */
.toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 70; padding: 11px 18px; border-radius: 999px;
  background: #fff; color: #0b0d12; font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: up .2s ease; white-space: nowrap; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

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