/* Cùng bảng màu với Bảng điều khiển của app (apps/client/src/dashboard/dashboard.css):
   nền tối trung tính, nhấn xanh chanh, đỏ cho LIVE, vàng cho quà, xanh dương cho giả lập. */
:root {
  --bg: #101114;
  --surface: #181a1f;
  --raised: #262931;
  --line: #2e323b;
  --line-hi: #4a505c;
  --text: #eceef2;
  --muted: #9aa1ad;
  --faint: #6f7682;
  --accent: #c6f24e;
  --accent-hi: #d4f96d;
  --accent-ink: #171c08;
  --live: #ff4d5e;
  --wait: #f5b83d;
  --sim: #6cb6ff;
  --gift: #ffcf5c;
  --chat: #a9d0ff;
  --radius: 10px;
  --wrap: 1120px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
b { font-weight: 600; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; padding: 8px 12px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.skip:focus { left: 8px; }

.muted { color: var(--muted); }
.fine { color: var(--faint); font-size: 13px; }
.fine b { color: var(--muted); }
.center { text-align: center; }

/* Logo giống hệt thanh trên của Bảng điều khiển */
.logo { width: 28px; height: 28px; flex: none; }
.logo rect { fill: var(--accent); }
.logo path { fill: var(--accent-ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.brand-sm { font-size: 15px; gap: 8px; }
.brand-sm .logo { width: 22px; height: 22px; }

/* Thanh trên */
.top { position: sticky; top: 0; z-index: 5; background: rgba(16, 17, 20, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.scrolled { border-color: var(--line); }
.top-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--text); background: var(--surface); }
.top .btn-sm { margin-left: auto; }
@media (min-width: 720px) { .nav { display: flex; } .top .btn-sm { margin-left: 0; } }

/* Nút: cùng dáng nút trong app, to hơn cho trang giới thiệu */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--raised); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, transform 0.15s; }
.btn:hover { border-color: var(--line-hi); }
.btn:active { transform: translateY(1px); }
.btn small { font-weight: 500; opacity: 0.7; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { padding: 12px 22px 12px 18px; text-align: left; }
.btn-lg > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.btn-lg b { font-size: 16px; }
.btn-lg small { font-size: 12.5px; }
.btn-block { width: 100%; padding: 12px 18px; }
.os-icon { display: grid; place-items: center; width: 26px; height: 26px; }
.os-icon:empty { display: none; }
.os-icon svg { width: 24px; height: 24px; fill: currentColor; }

/* Nhãn tròn (giống .dash-pill) */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-live { color: var(--muted); }
.pill-live .dot { background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
.pill-on { color: #fff; background: var(--live); border-color: var(--live); padding: 2px 10px; font-size: 12px; }
.pill-on .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Đầu trang */
.hero { position: relative; padding: 48px 0 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto 40%; height: 620px; background: radial-gradient(closest-side, rgba(198, 242, 78, 0.13), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 20% 55% auto -20%; height: 480px; background: radial-gradient(closest-side, rgba(255, 77, 94, 0.08), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero h1 { font-size: clamp(34px, 6.4vw, 58px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { max-width: 34em; color: var(--muted); font-size: 17px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 960px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}

/* Mô phỏng cửa sổ Sân khấu */
.hero-visual { position: relative; max-width: 460px; width: 100%; margin: 0 auto; }
.window { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset; overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--raised); }
.window-bar span { margin-left: 8px; color: var(--faint); font-size: 12px; }
.stage { position: relative; height: 440px; padding: 16px; background:
  radial-gradient(120% 70% at 50% 0%, rgba(108, 182, 255, 0.12), transparent 60%),
  linear-gradient(180deg, #161a24 0%, #121318 100%); overflow: hidden; }
.stage-head { display: flex; align-items: center; justify-content: space-between; }
.viewers { color: var(--muted); font-size: 12px; }
.viewers b { color: var(--text); font-variant-numeric: tabular-nums; }

.quiz { margin-top: 22px; text-align: center; }
.quiz-q { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.tiles { display: flex; justify-content: center; gap: 5px; margin-top: 14px; }
.tile { display: grid; place-items: center; width: 30px; height: 38px; border: 1px solid var(--line-hi); border-radius: 7px; background: var(--bg); color: transparent; font-weight: 700; font-size: 17px; transition: transform 0.35s, background-color 0.35s, color 0.35s, border-color 0.35s; }
.tile.hint { color: var(--muted); }
.tile.open { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); transform: rotateX(360deg); }

.feed { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; mask-image: linear-gradient(to bottom, transparent 0, #000 40%); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40%); }
.feed li { align-self: flex-start; max-width: 85%; padding: 5px 11px; border-radius: 10px; background: rgba(38, 41, 49, 0.82); animation: rise 0.35s ease-out; }
.feed li b { color: var(--chat); margin-right: 6px; }
.feed li.is-right { background: rgba(198, 242, 78, 0.16); box-shadow: 0 0 0 1px rgba(198, 242, 78, 0.45) inset; }
.feed li.is-right b { color: var(--accent); }
.feed li.is-gift { background: rgba(255, 207, 92, 0.13); color: var(--gift); }
.feed li.is-gift b { color: var(--gift); }
.feed li.is-join { background: transparent; color: var(--faint); padding: 0 4px; }
.feed li.is-join b { color: var(--muted); font-weight: 500; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.hearts { position: absolute; right: 14px; bottom: 60px; width: 40px; height: 260px; pointer-events: none; }
.heart { position: absolute; bottom: 0; left: 50%; font-size: 20px; animation: float 2.4s ease-out forwards; }
@keyframes float {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -240px) scale(1.1); }
}

.gift-toast { position: absolute; left: 50%; top: 150px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid rgba(255, 207, 92, 0.5); border-radius: 12px; background: rgba(24, 26, 31, 0.92); color: var(--gift); font-weight: 600; font-size: 14px; white-space: nowrap; opacity: 0; transform: translate(-50%, 8px) scale(0.96); transition: opacity 0.3s, transform 0.3s; pointer-events: none; box-shadow: 0 10px 40px -10px rgba(255, 207, 92, 0.35); }
.gift-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.gift-toast span { font-size: 22px; }

.float-card { position: absolute; right: -14px; top: 92px; width: 168px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(24, 26, 31, 0.94); box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7); }
.float-title { margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.board { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.board li { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.board i { width: 10px; color: var(--muted); font-size: 11px; font-style: normal; }
.board span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board b { color: var(--gift); font-variant-numeric: tabular-nums; }
@media (max-width: 559px) { .float-card { display: none; } }
/* Có thẻ Bảng Điểm thì nó nằm góc dưới phải; bình luận hẹp lại và tim bay phía trên thẻ */
@media (min-width: 560px) {
  .float-card { top: auto; bottom: 36px; }
  .feed li { max-width: 58%; }
  .hearts { bottom: 150px; height: 180px; }
}
@media (min-width: 960px) { .float-card { right: -40px; } }

/* Dải số liệu (giống .dash-stats) */
.band { border-block: 1px solid var(--line); background: var(--surface); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 20px 4px; }
.stat b { font-size: 22px; letter-spacing: -0.01em; }
.stat:first-child b { color: var(--accent); }
.stat span { color: var(--muted); font-size: 13px; }
@media (min-width: 820px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 26px 20px; border-left: 1px solid var(--line); }
  .stat:first-child { border-left: 0; padding-left: 0; }
}

/* Các phần */
.section { padding: 72px 0; scroll-margin-top: 40px; }
.section-alt { background: linear-gradient(180deg, rgba(24, 26, 31, 0.6), rgba(24, 26, 31, 0)); border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.section-lead { margin-top: 10px; }
@media (min-width: 960px) { .section { padding: 96px 0; } }

.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.card p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.card p b { color: var(--text); }

.steps { display: grid; gap: 14px; margin: 32px 0 0; padding: 0; list-style: none; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px; border-radius: 8px; background: rgba(198, 242, 78, 0.12); color: var(--accent); font-weight: 700; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.split { display: grid; gap: 32px; align-items: start; }
.split .muted { margin-top: 14px; max-width: 28em; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.15fr; gap: 64px; } }
.events { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.events li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; }
.events p { margin-top: 2px; color: var(--muted); font-size: 14.5px; }
.ev { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font-size: 18px; }
.ev-join { background: rgba(154, 161, 173, 0.12); }
.ev-chat { background: rgba(169, 208, 255, 0.12); }
.ev-heart { background: rgba(255, 77, 94, 0.13); }
.ev-gift { background: rgba(255, 207, 92, 0.13); }
.ev-share { background: rgba(108, 182, 255, 0.13); }

.scenes { display: grid; gap: 12px; margin-top: 32px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.scene { transition: border-color 0.2s, transform 0.2s; }
.scene:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.scene-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 10px; background: var(--raised); font-size: 22px; }
.scene-more { border-style: dashed; background: transparent; }

/* Tải về */
.ver { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.downloads { display: grid; gap: 16px; margin: 32px 0 20px; }
@media (min-width: 760px) { .downloads { grid-template-columns: 1fr 1fr; } }
.dl { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 28px; }
.dl .btn { margin-top: 18px; }
.dl-logo { width: 40px; height: 40px; margin-bottom: 14px; fill: var(--text); }
.dl h3 { font-size: 22px; }
.dl p.muted { margin-top: 0; font-size: 14px; }
.dl:not(.is-mine) .btn-primary { background: var(--raised); border-color: var(--line); color: var(--text); }
.dl:not(.is-mine) .btn-primary:hover { border-color: var(--line-hi); }
.dl.is-mine { border-color: rgba(198, 242, 78, 0.55); box-shadow: 0 0 0 1px rgba(198, 242, 78, 0.18), 0 24px 60px -30px rgba(198, 242, 78, 0.35); }
.dl-badge { position: absolute; top: 18px; right: 18px; display: none; padding: 3px 10px; border-radius: 99px; background: rgba(198, 242, 78, 0.13); color: var(--accent); font-size: 12px; font-weight: 600; }
.dl.is-mine .dl-badge { display: inline-block; }
.dl .btn.is-pending { pointer-events: none; opacity: 0.55; }

.note { width: 100%; margin-top: 14px; font-size: 14px; }
.note summary { color: var(--muted); cursor: pointer; }
.note summary:hover { color: var(--text); }
.note p { margin-top: 8px; font-size: 14px; }

/* Hỏi đáp */
.faq-wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: 1fr 1.6fr; gap: 64px; } }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-weight: 500; transition: transform 0.2s; }
.faq details[open] summary::after { content: "−"; color: var(--accent); border-color: rgba(198, 242, 78, 0.4); }
.faq details p { padding: 0 40px 18px 0; color: var(--muted); }
.faq details p b { color: var(--text); }

/* Ủng hộ: thông tin tài khoản bên trái, thẻ mã QR bên phải */
.donate { display: grid; gap: 40px; align-items: center; }
.donate-copy .muted { margin-top: 14px; max-width: 30em; }
@media (min-width: 900px) { .donate { grid-template-columns: 1.1fr 1fr; gap: 72px; } }

.bank { display: flex; flex-direction: column; margin: 28px 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bank > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.bank > div:first-child { border-top: 0; }
.bank dt { color: var(--muted); font-size: 14px; }
.bank dd { margin: 0; font-weight: 600; text-align: right; }
.bank-acc { display: flex; align-items: center; gap: 12px; }
.bank-acc > span { font-size: 18px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.copy:hover { color: var(--text); border-color: var(--line-hi); }
.copy svg, .qr-card figcaption svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy.done { color: var(--accent); border-color: rgba(198, 242, 78, 0.45); background: rgba(198, 242, 78, 0.1); }

.qr-card { position: relative; width: 100%; max-width: 380px; margin: 0 auto; padding: 18px; border: 1px solid rgba(198, 242, 78, 0.4); border-radius: 18px; background: radial-gradient(120% 80% at 50% 0%, rgba(198, 242, 78, 0.14), transparent 60%), var(--surface); box-shadow: 0 30px 80px -30px rgba(198, 242, 78, 0.3), 0 20px 50px -20px rgba(0, 0, 0, 0.6); }
.qr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 14px; font-size: 14px; font-weight: 600; }
.qr-tags { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.qr-tags b { color: var(--accent); font-weight: 700; }
.qr-tags i { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
/* Mã giữ nền sáng, chấm tối để app ngân hàng nào cũng quét được */
.qr-tile { padding: 18px; border-radius: 12px; background: #f6f8f1; }
.qr-svg { width: 100%; height: auto; }
.qr-dot { fill: none; stroke: #101114; stroke-width: 0.86; stroke-linecap: round; }
.qr-eye { fill: #101114; }
.qr-logo-bg { fill: #c6f24e; }
.qr-logo-play { fill: #171c08; }
.qr-card figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 4px 2px; color: var(--muted); font-size: 13px; }
.qr-card figcaption .btn { gap: 6px; padding: 6px 12px; font-size: 13px; }

/* Kêu gọi cuối trang */
.final { padding-top: 24px; }
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 48px 20px; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(80% 120% at 50% 0%, rgba(198, 242, 78, 0.12), transparent 65%), var(--surface); text-align: center; }
.final-inner h2 { max-width: 16em; }

.foot { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 13px; }
.foot .brand { color: var(--muted); }

/* Hiện dần khi cuộn tới */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
