/* GTV Trung Thu. CSS thuan, khong framework, khong buoc build.
   Nen: troi dem cham sau. Accent duy nhat: vang den long. */

:root {
  --night-900: #0d1020;
  --night-800: #141a30;
  --night-700: #1c2440;
  --night-600: #273052;
  --line: #333d63;
  --ink: #f4f1ea;
  --body: #c3c8de;
  --muted: #8b93b5;
  --gold: #e0a92e;
  --gold-soft: rgba(224, 169, 46, 0.13);
  --gold-line: rgba(224, 169, 46, 0.38);
  --ok: #3fbf7f;
  --err: #f2685f;
  --radius: 16px;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(224, 169, 46, 0.16), transparent 62%),
    radial-gradient(760px 520px at 8% 104%, rgba(102, 74, 190, 0.14), transparent 60%),
    var(--night-900);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 18px 72px; }
@media (min-width: 900px) { .wrap { max-width: 980px; } }

h1, h2, h3 { color: var(--ink); margin: 0 0 8px; line-height: 1.18; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 8vw, 44px); font-weight: 700; }
h2 { font-size: clamp(21px, 5vw, 27px); font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: var(--mono); }

/* ---------- dau trang, mat trang lech phai ---------- */
header.top { position: relative; padding: 30px 0 18px; overflow: hidden; }
/* Mat trang phai tranh dong tieu de: o 375px chu "Trung Thu 2026" cham toi x=260,
   nen mat trang bat dau tu 268 tro di va tieu de co le phai chua no. */
.moon {
  position: absolute; top: -56px; right: -40px; width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6dd, #f0cf7c 52%, #d6a23c 100%);
  box-shadow: 0 0 74px 20px rgba(224, 169, 46, 0.28); opacity: 0.92; pointer-events: none;
}
.moon::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 66% 62%, rgba(180, 140, 60, 0.3) 0 9px, transparent 10px),
              radial-gradient(circle at 40% 70%, rgba(180, 140, 60, 0.22) 0 13px, transparent 14px),
              radial-gradient(circle at 56% 34%, rgba(180, 140, 60, 0.18) 0 7px, transparent 8px);
}
header.top .eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 9px;
}
/* Logo thay cho mat trang khi brand co logo rieng. Cung o goc phai tren,
   cung vai tro thi giac, nen tieu de van chua le phai nhu cu. */
.brand-logo {
  position: absolute; top: 14px; right: 0; width: 84px; height: 84px;
  object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--gold) 40%, transparent));
}
@media (min-width: 560px) { .brand-logo { width: 96px; height: 96px; } }
header.top h1, header.top .eyebrow { position: relative; padding-right: 86px; }
header.top p { max-width: 30ch; position: relative; padding-right: 66px; }
@media (min-width: 560px) {
  header.top h1, header.top .eyebrow, header.top p { padding-right: 0; }
}

/* ---------- man hinh ---------- */
.screen { display: none; animation: rise 0.36s ease both; }
.screen.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.steps { display: flex; gap: 6px; margin: 4px 0 22px; }
.steps i {
  height: 3px; flex: 1; border-radius: 99px; background: var(--night-600);
  transition: background 0.3s ease;
}
.steps i.done { background: var(--gold-line); }
.steps i.now { background: var(--gold); }

/* ---------- the ---------- */
.card {
  background: linear-gradient(180deg, var(--night-800), var(--night-700));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.card + .card { margin-top: 12px; }

/* ---------- truong nhap ---------- */
label { display: block; font-size: 13.5px; color: var(--body); margin: 0 0 6px; font-weight: 500; }
input[type="text"], select {
  width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px; font-family: var(--sans);
  color: var(--ink); background: var(--night-900); border: 1px solid var(--line);
  border-radius: 12px; outline: none; transition: border-color 0.2s ease;
}
input[type="text"]:focus, select:focus { border-color: var(--gold); }
input::placeholder { color: #5f678c; }
.field + .field { margin-top: 13px; }

.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.check input { width: 21px; height: 21px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.check span { font-size: 14px; color: var(--body); }

/* ---------- nut ---------- */
button {
  font-family: var(--sans); font-size: 16px; font-weight: 600; cursor: pointer;
  border-radius: 12px; border: 1px solid transparent; min-height: 52px; padding: 13px 20px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
button:active { transform: scale(0.985); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-main { width: 100%; background: var(--gold); color: #241a04; }
.btn-ghost { width: 100%; background: transparent; color: var(--body); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold-line); color: var(--ink); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.btn-row button { width: 100%; }
.stack > * + * { margin-top: 9px; }

/* ---------- luoi chon vai ---------- */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .roles { grid-template-columns: repeat(3, 1fr); } }
/* padding-top chua san cho cho .dot: khong co no thi ten vai 2 dong se troi len
   va nam duoi cham mau, vi .dot la absolute nen khong day duoc noi dung xuong. */
.role {
  position: relative; text-align: left; background: var(--night-800); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 50px 13px 14px; min-height: 124px; display: flex;
  flex-direction: column; justify-content: flex-end; overflow: hidden; color: var(--body);
  font-weight: 400; font-size: 14px;
}
.role .dot {
  position: absolute; top: 13px; left: 13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--rc, var(--gold)); opacity: 0.9;
  box-shadow: 0 0 20px 5px color-mix(in srgb, var(--rc, var(--gold)) 42%, transparent);
}
.role b { display: block; color: var(--ink); font-size: 15.5px; font-weight: 600; margin-bottom: 3px; }
.role small { color: var(--muted); font-size: 12.5px; line-height: 1.42; }
.role[aria-pressed="true"] { border-color: var(--gold); background: var(--night-600); }
.role[aria-pressed="true"]::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--gold);
}

/* ---------- anh ---------- */
.shot {
  position: relative; border: 1px dashed var(--line); border-radius: var(--radius);
  aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden;
  background: var(--night-800); text-align: center; padding: 20px;
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot.has { border-style: solid; border-color: var(--gold-line); }

/* ---------- cho ---------- */
.waiting { text-align: center; padding: 34px 0 8px; }
.lantern {
  width: 62px; height: 82px; margin: 0 auto 24px; border-radius: 34px / 26px; position: relative;
  background: linear-gradient(180deg, #f0b93f, #c9761f);
  box-shadow: 0 0 46px 12px rgba(224, 169, 46, 0.34);
  animation: sway 2.6s ease-in-out infinite;
}
.lantern::before, .lantern::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 26px; height: 6px; background: #8a5a1c; border-radius: 2px;
}
.lantern::before { top: -6px; }
.lantern::after { bottom: -6px; }
@keyframes sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.bar { height: 5px; border-radius: 99px; background: var(--night-600); overflow: hidden; margin: 20px 0 10px; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.7s ease; }

/* ---------- ket qua ---------- */
.result-img {
  width: 100%; border-radius: var(--radius); display: block; border: 1px solid var(--line);
  background: var(--night-800);
}
.result-video { width: 100%; border-radius: var(--radius); display: block; background: #000; }
.greet {
  border-left: 2px solid var(--gold); padding: 3px 0 3px 14px; margin: 16px 0 18px;
  color: var(--ink); font-size: 16.5px; line-height: 1.55;
}
.player { display: flex; align-items: center; gap: 12px; }
.player button { min-height: 46px; padding: 10px 16px; flex: none; }
.player .now { font-size: 13px; color: var(--muted); }

/* ---------- vuon trang ---------- */
.garden { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .garden { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; border-radius: 13px; overflow: hidden; border: 1px solid var(--line);
  background: var(--night-800); aspect-ratio: 9 / 16; display: block; padding: 0; min-height: 0;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 9px 8px;
  background: linear-gradient(transparent, rgba(8, 10, 22, 0.92));
  color: var(--ink); font-size: 12px; font-weight: 600; text-align: left;
}
.empty { text-align: center; padding: 42px 18px; color: var(--muted); }

/* ---------- vat ---------- */
.notice {
  border: 1px solid var(--gold-line); background: var(--gold-soft); border-radius: 13px;
  padding: 12px 14px; font-size: 13.5px; color: var(--body);
}
.notice.bad { border-color: rgba(242, 104, 95, 0.45); background: rgba(242, 104, 95, 0.1); }
.tabs { display: flex; gap: 7px; margin: 0 0 16px; }
.tabs button {
  flex: 1; min-height: 44px; padding: 10px; font-size: 14px; font-weight: 500;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.tabs button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
footer { padding: 26px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
footer a { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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