:root {
  --topbar-h: 133px;
  --bg: #12040a;
  --bg-2: #1d0710;
  --surface: rgba(255, 240, 220, 0.05);
  --surface-2: rgba(255, 240, 220, 0.09);
  --border: rgba(242, 196, 109, 0.18);
  --border-strong: rgba(242, 196, 109, 0.45);
  --red: #a3121f;
  --red-2: #d42a3a;
  --gold: #f2c46d;
  --gold-2: #ffe7ad;
  --gold-3: #c98f2c;
  --cream: #fbf3e4;
  --text: #fbefe0;
  --muted: #c9ab9a;
  --green: #3ddc84;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(196, 31, 47, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(201, 143, 44, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
  background-color: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  /* Space for the fixed header at its full (unscrolled) height */
  padding-top: var(--topbar-h);
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#bg-fx, #confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#bg-fx { z-index: 0; opacity: 0.85; }
#confetti { z-index: 100; }
.glow { position: fixed; border-radius: 50%; filter: blur(80px); z-index: 0; pointer-events: none; }
.glow-1 { width: 420px; height: 420px; background: rgba(212, 42, 58, 0.25); top: 40%; right: -120px; animation: drift 14s ease-in-out infinite alternate; }
.glow-2 { width: 360px; height: 360px; background: rgba(242, 196, 109, 0.12); bottom: -120px; left: 10%; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-60px, -40px) scale(1.15); } }

.view, .footer { position: relative; z-index: 1; }

.gold-text {
  background: linear-gradient(180deg, var(--gold-2) 10%, var(--gold) 55%, var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--muted); }

/* ---------- Topbar ---------- */
/* Fixed, full-width bar; content stays aligned with the 1200px page column.
   Fixed (not sticky) so shrinking it on scroll never shifts the page — that shift made the logos jitter. */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px max(20px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid transparent;
  transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.topbar.is-scrolled {
  padding-top: 8px; padding-bottom: 8px;
  background-color: rgba(18, 4, 10, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logos { display: flex; align-items: center; gap: 14px; }
.brand-logos img { display: block; width: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px rgba(242, 196, 109, 0.22)); }
.logo-bayar, .logo-modal { transition: height 0.3s ease; }
.logo-bayar { height: 96px; }
.logo-modal { height: 76px; }
.is-scrolled .logo-bayar { height: 62px; }
.is-scrolled .logo-modal { height: 49px; }
.brand .x { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--gold); text-shadow: 0 0 16px rgba(242, 196, 109, 0.55); }
.brand-text { padding-left: 16px; border-left: 1px solid var(--border-strong); }
.brand strong { display: block; font-family: var(--font-display); letter-spacing: 0.08em; font-size: 17px; color: var(--gold-2); text-transform: uppercase; }
.brand small { color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--green);
  background: rgba(61, 220, 132, 0.1); border: 1px solid rgba(61, 220, 132, 0.35);
}
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7); } 100% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  color: #3a0b0b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, var(--gold-3));
  box-shadow: 0 10px 30px rgba(242, 196, 109, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(242, 196, 109, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--gold-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-sm { padding: 8px 14px; border-radius: 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(58, 11, 11, 0.3); border-top-color: #3a0b0b; animation: spin 0.7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading { pointer-events: none; opacity: 0.9; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero / login ---------- */
.view { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center;
  padding: 40px 0 56px;
}
.eyebrow {
  display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--gold-2); background: rgba(163, 18, 31, 0.45); border: 1px solid var(--border-strong);
}
.hero h1, .dash-title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; line-height: 1.02;
  font-size: clamp(40px, 5.2vw, 68px); margin: 18px 0 14px; letter-spacing: 0.01em;
  text-shadow: 0 6px 30px rgba(212, 42, 58, 0.35);
}

.lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 480px; margin: 0 0 26px; }

.login-card {
  max-width: 460px; padding: 24px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 240, 220, 0.09), rgba(255, 240, 220, 0.03));
  border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.login-card label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--gold-2); }
.phone-field {
  display: flex; align-items: center; border-radius: 14px; overflow: hidden;
  background: rgba(0, 0, 0, 0.35); border: 1.5px solid var(--border); transition: border-color 0.2s, box-shadow 0.2s;
}
.phone-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 196, 109, 0.15); }
.phone-field .prefix { padding: 0 14px; font-weight: 700; color: var(--gold-2); border-right: 1px solid var(--border); white-space: nowrap; }
.phone-field input {
  flex: 1; min-width: 0; padding: 15px 14px; border: 0; outline: 0; background: transparent;
  font-size: 18px; font-weight: 600; letter-spacing: 0.04em;
}
.phone-field input::placeholder { color: rgba(201, 171, 154, 0.5); }
.form-error { min-height: 20px; margin: 10px 2px; font-size: 14px; color: #ff8a8a; font-weight: 600; }
.login-card.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

.stats-strip {
  position: relative; display: flex; align-items: center; gap: 18px; max-width: 460px; margin-top: 18px;
  padding: 18px 20px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, rgba(212, 42, 58, 0.55), rgba(110, 10, 20, 0.45) 55%, rgba(242, 196, 109, 0.12));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.stats-strip::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 231, 173, 0.16) 48%, transparent 60%);
  transform: translateX(-100%); animation: shine 5s ease-in-out infinite;
}
.stat-ico {
  flex: none; display: grid; place-items: center; width: 62px; height: 62px; font-size: 32px; border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 231, 173, 0.35), rgba(163, 18, 31, 0.6));
  border: 1px solid var(--border-strong); transform: rotate(-8deg);
  animation: wiggle 3.5s ease-in-out infinite;
}
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(6deg) scale(1.06); } }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); opacity: 0.85; }
.stats-strip strong {
  font-family: var(--font-display); font-size: 46px; line-height: 1.05; letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff6dc 10%, var(--gold) 60%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-sub { font-size: 12.5px; color: #ecd9c8; opacity: 0.8; }
.stat-live {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--green); opacity: 1;
  background: rgba(61, 220, 132, 0.12); border: 1px solid rgba(61, 220, 132, 0.35);
}
.stat-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }

.hero-visual { position: relative; perspective: 1400px; }
.ticket-float { animation: float 6s ease-in-out infinite; transform-style: preserve-3d; }
.ticket-float .ticket { transform: rotateY(-12deg) rotateX(6deg) rotateZ(-2deg); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 30px rgba(212, 42, 58, 0.3)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-badge {
  position: absolute; left: -14px; bottom: -26px; padding: 12px 16px; border-radius: 16px; font-size: 13px;
  background: linear-gradient(145deg, var(--red-2), var(--red)); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); line-height: 1.35; animation: float 6s ease-in-out infinite reverse;
}
.hero-badge span { font-size: 22px; float: left; margin-right: 10px; }
.hero-badge b { white-space: nowrap; font-family: var(--font-display); font-size: 18px; color: var(--gold-2); letter-spacing: 0.04em; }

/* ---------- Ticket component ---------- */
.ticket {
  position: relative; container-type: inline-size; aspect-ratio: 1868 / 768;
  overflow: hidden; user-select: none;
}
.ticket img { display: block; width: 100%; height: 100%; }
/* Positions of the white ID / NO. TIKET boxes on the 1868×768 template */
.t-id, .t-no {
  position: absolute; left: 83.62%; width: 13.76%; display: flex; align-items: center; justify-content: center;
  white-space: nowrap; overflow: hidden; color: #2a0a0a;
}
.t-id { top: 37.11%; height: 8.2%; font-family: 'Roboto Slab', Georgia, serif; font-weight: 800; font-size: calc(var(--fs, 2.14) * 1cqw); }
.t-no { top: 53.78%; height: 8.33%; font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 600; font-size: 2.46cqw; letter-spacing: 0.06em; }
/* Shine is masked by the ticket artwork so it never lights up the transparent notches */
.t-shine {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  -webkit-mask: url(assets/ticket.webp) center / 100% 100% no-repeat;
  mask: url(assets/ticket.webp) center / 100% 100% no-repeat;
}
.t-shine::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 48%, transparent 60%);
  transform: translateX(-100%); animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }

/* ---------- Prizes ---------- */
.prizes { padding: 30px 0 10px; }
.prizes h2, .section-title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; }
.prizes-head { text-align: center; margin-bottom: 28px; }
.prizes h2 { font-size: clamp(32px, 4.5vw, 48px); margin: 14px 0 0; }

/* Grand prize on the left spanning two rows, four prizes in a 2×2 grid on the right */
.prize-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
.prize {
  position: relative; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  border-radius: 22px; border: 1px solid var(--border);
  /* Same dark-red tone as the ticket artwork so the cut-out images blend in */
  background: radial-gradient(circle at 50% 38%, #74101b 0%, #3d0710 55%, #1a050a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 231, 173, 0.08);
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}
.prize::before {
  content: ''; position: absolute; left: 50%; top: 42%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); border: 1px solid rgba(242, 196, 109, 0.22);
  box-shadow: 0 0 0 18px rgba(242, 196, 109, 0.03), 0 0 60px rgba(212, 42, 58, 0.35);
  pointer-events: none;
}
.prize:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(212, 42, 58, 0.25); }
.prize-img { position: relative; flex: 1; display: grid; place-items: center; padding: 18px 18px 0; min-height: 170px; }
.prize-img img {
  display: block; max-width: 100%; max-height: 190px; width: auto; height: auto; object-fit: contain;
  /* Fade all four edges so the rectangular crop melts into the card */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 82%, transparent);
  mask-composite: intersect;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
  transition: transform 0.4s cubic-bezier(.2, 1, .3, 1);
}
.prize:hover .prize-img img { transform: scale(1.06) translateY(-4px); }
.prize-info {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px 18px; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(10, 2, 5, 0.65) 45%);
}
.prize b { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.05em; color: var(--gold); text-transform: uppercase; line-height: 1.1; }
.prize small { color: #ecd9c8; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; }

.prize-grand { grid-row: span 2; border-color: var(--border-strong); }
.prize-grand::before { width: 80%; top: 44%; }
.prize-grand .prize-img { padding-top: 50px; }
/* Grand image carries the "GRAND PRIZE" heading on its left edge, so fade it more gently */
.prize-grand .prize-img img {
  max-height: 420px; width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 4%, #000 84%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 4%, #000 84%, transparent);
}
.prize-grand .prize-info { padding: 18px 24px 26px; }
.prize-grand b { font-size: clamp(30px, 3.4vw, 42px); }
.prize-grand small { font-size: 13.5px; }
.prize-qty {
  position: absolute; z-index: 2; top: 14px; right: 14px; padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.06em; color: #3a0b0b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.prize-grand .prize-qty { top: 18px; right: 18px; font-size: 18px; padding: 6px 14px; }
.prize-ribbon {
  position: absolute; z-index: 2; top: 18px; left: 18px; padding: 8px 16px 8px 14px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%);
  padding-right: 26px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.perks {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-radius: 18px; overflow: hidden;
  background: rgba(10, 2, 5, 0.55); border: 1px solid var(--border);
}
.perks div { display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.perks div + div { border-left: 1px solid var(--border); }
.perks span { font-size: 22px; }
.perks b { color: var(--text); }

/* ---------- Dashboard ---------- */
.dash-head { padding: 26px 0 8px; }
.dash-title { font-size: clamp(36px, 5vw, 58px); margin: 14px 0 8px; }
.id-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border);
}
.chip small { color: var(--gold); font-weight: 800; }

.summary { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 14px; margin: 22px 0 34px; }
.sum-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); min-width: 0;
}
.sum-label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sum-card strong { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--gold-2); }
.sum-card .sum-text { font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.sum-main {
  background: linear-gradient(140deg, rgba(212, 42, 58, 0.55), rgba(110, 10, 20, 0.5));
  border-color: var(--border-strong); position: relative; overflow: hidden;
}
.sum-main::after {
  content: '🎟️'; position: absolute; right: 14px; bottom: -14px; font-size: 96px; opacity: 0.18; transform: rotate(-14deg);
}
.sum-main strong { font-size: 64px; }
.sum-foot { font-size: 13px; color: var(--gold-2); opacity: 0.85; }

.section-title { font-size: 24px; margin: 0 0 14px; }
.web-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 36px; }
.web-card {
  text-align: left; padding: 16px; border-radius: 16px; cursor: pointer; background: var(--surface);
  border: 1px solid var(--border); transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.web-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.web-card.active { border-color: var(--gold); background: rgba(242, 196, 109, 0.1); }
.web-card .wc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.web-card .wc-name { font-family: var(--font-display); font-size: 19px; letter-spacing: 0.05em; color: var(--gold-2); }
.web-card .wc-count { font-family: var(--font-display); font-size: 28px; }
.web-card .wc-ids { margin-top: 6px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; max-width: 100%; }
.tab {
  flex: none; padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: all 0.2s;
}
.tab small { opacity: 0.7; margin-left: 4px; }
.tab:hover { border-color: var(--border-strong); }
.tab.active { color: #3a0b0b; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; }
.toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border);
}
.search:focus-within { border-color: var(--gold); }
.search svg { width: 18px; height: 18px; fill: var(--muted); flex: none; }
.search input { width: 220px; max-width: 52vw; padding: 10px 0; border: 0; outline: 0; background: transparent; font-size: 14px; }
.view-toggle { display: flex; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.view-toggle button { padding: 9px 13px; border: 0; background: var(--surface); cursor: pointer; font-size: 15px; }
.view-toggle button.active { background: var(--gold); color: #3a0b0b; }
.ticket-section { scroll-margin-top: 110px; }
.result-info { font-size: 13px; color: var(--muted); margin: 6px 0 16px; }

.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 20px; }
.tcard {
  border-radius: 18px; padding: 10px; background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s; animation: rise 0.45s ease both;
}
.tcard:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.tcard .ticket { cursor: zoom-in; }
.tcard.is-new { box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(242, 196, 109, 0.4); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.tcard-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 4px 2px; font-size: 13px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap;
}
.badge-web { background: rgba(212, 42, 58, 0.3); border: 1px solid rgba(212, 42, 58, 0.6); color: #ffd3d3; }
.tcard-foot .date { color: var(--muted); }
.tcard-foot .dl {
  margin-left: auto; padding: 6px 12px; border-radius: 10px; cursor: pointer; font-size: 12.5px; font-weight: 800;
  background: transparent; border: 1px solid var(--border-strong); color: var(--gold-2);
}
.tcard-foot .dl:hover { background: rgba(242, 196, 109, 0.12); }

.ticket-list { border-radius: var(--radius); border: 1px solid var(--border); overflow: auto; background: var(--surface); }
.ticket-list table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.ticket-list th, .ticket-list td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(242, 196, 109, 0.1); }
.ticket-list th { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, 0.25); position: sticky; top: 0; }
.ticket-list tbody tr { cursor: pointer; transition: background 0.15s; }
.ticket-list tbody tr:hover { background: rgba(242, 196, 109, 0.06); }
.ticket-list .no { font-family: var(--font-display); font-size: 17px; color: var(--gold-2); letter-spacing: 0.03em; }

.empty { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.more-wrap { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(8, 2, 4, 0.82); backdrop-filter: blur(6px); animation: fade 0.2s; }
.lb-body { position: relative; width: min(1100px, 100%); animation: pop 0.3s cubic-bezier(.2, 1.4, .4, 1); }
.lb-body .ticket { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7)); }
.lb-close {
  position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border-strong); background: rgba(0, 0, 0, 0.5); font-size: 16px;
}
.lb-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; font-size: 13px; }
.lb-actions { display: flex; justify-content: center; margin-top: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.9); } }

/* ---------- Toast & footer ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 140%);
  padding: 14px 20px; border-radius: 14px; font-weight: 700; max-width: calc(100% - 32px);
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #3a0b0b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden;
  transition: transform 0.4s cubic-bezier(.2, 1.3, .4, 1), opacity 0.3s, visibility 0.4s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.footer { text-align: center; padding: 30px 16px 40px; color: var(--muted); font-size: 14px; }

/* ---------- Stage curtain (splash + page transition) ---------- */
.curtain { position: fixed; inset: 0; z-index: 200; overflow: hidden; background: transparent; }
.curtain.is-done { visibility: hidden; pointer-events: none; }
/* If the script never runs, don't keep the page hidden forever */
.curtain.failsafe { animation: curtain-failsafe 0s linear 8s forwards; }
@keyframes curtain-failsafe { to { visibility: hidden; pointer-events: none; } }

.curtain-panel {
  position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 1;
  /* Velvet: vertical folds + top/bottom shading */
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 22%, transparent 70%, rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(90deg, #3d040c 0, #7d0d19 18px, #c21f2e 30px, #e0394a 34px, #a3121f 42px, #5a0712 60px, #3d040c 72px);
  transition: transform 1.3s cubic-bezier(0.76, 0, 0.18, 1);
  will-change: transform;
}
.curtain-left { left: 0; transform-origin: left center; box-shadow: inset -30px 0 40px rgba(0, 0, 0, 0.55); }
.curtain-right { right: 0; transform-origin: right center; box-shadow: inset 30px 0 40px rgba(0, 0, 0, 0.55); }
/* Gold trim along the meeting edge */
.curtain-panel::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 12px;
  background: linear-gradient(90deg, #8a5a14, #ffe7ad 45%, #f2c46d 60%, #8a5a14);
  box-shadow: 0 0 18px rgba(242, 196, 109, 0.45);
}
.curtain-left::after { right: 0; }
.curtain-right::after { left: 0; }
/* Gold tassel fringe along the bottom */
.curtain-panel::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background:
    linear-gradient(180deg, #f2c46d 0 6px, transparent 6px),
    repeating-linear-gradient(90deg, #c98f2c 0 3px, #ffe7ad 3px 5px, transparent 5px 9px);
  -webkit-mask: linear-gradient(180deg, #000 60%, transparent);
  mask: linear-gradient(180deg, #000 60%, transparent);
}

/* Wrapper carries the gold edge + shadow so they follow the masked swag shape */
.curtain-valance-wrap {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  filter: drop-shadow(0 4px 0 #f2c46d) drop-shadow(0 2px 0 #8a5a14) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.8s cubic-bezier(0.7, 0, 0.2, 1) 0.45s;
}
.curtain-valance {
  height: 78px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 55%, rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(90deg, #6e0b17 0, #b71b2a 40px, #d42a3a 50px, #8e0f1d 70px, #6e0b17 100px);
  /* Straight top band + hanging swags along the bottom */
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 22px) no-repeat, radial-gradient(50px 22px at 50% 0, #000 98%, transparent) bottom / 100px 22px repeat-x;
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 22px) no-repeat, radial-gradient(50px 22px at 50% 0, #000 98%, transparent) bottom / 100px 22px repeat-x;
}

.curtain-center {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  /* Spotlight on the closed curtain */
  background: radial-gradient(ellipse 45% 55% at 50% 45%, rgba(255, 231, 173, 0.22), rgba(255, 231, 173, 0.06) 55%, transparent 75%);
  transition: opacity 0.4s ease, transform 0.6s ease;
}
.curtain-logos { display: flex; align-items: center; justify-content: center; gap: 18px; animation: curtain-pop 0.8s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.curtain-logos img { display: block; width: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 26px rgba(242, 196, 109, 0.3)); }
.curtain-logos img:first-child { height: 120px; }
.curtain-logos img:last-child { height: 96px; }
.curtain-x { font-family: var(--font-display); font-weight: 700; font-size: 44px; color: var(--gold); text-shadow: 0 0 18px rgba(242, 196, 109, 0.7); }
.curtain-title {
  margin-top: 14px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(44px, 8vw, 84px); line-height: 1; letter-spacing: 0.06em;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.6));
  animation: curtain-pop 0.8s cubic-bezier(0.2, 1.3, 0.4, 1) 0.12s both;
}
.curtain-sub {
  margin-top: 6px; font-size: 13px; font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}
.curtain-bar {
  width: min(240px, 60vw); height: 4px; margin-top: 22px; border-radius: 99px; overflow: hidden;
  background: rgba(0, 0, 0, 0.45); box-shadow: 0 0 0 1px rgba(242, 196, 109, 0.3);
}
.curtain-bar span {
  display: block; width: 40%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--gold-2), var(--gold), transparent);
  animation: curtain-load 1.1s ease-in-out infinite;
}
.curtain-caption { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--gold-2); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); min-height: 1.4em; }
@keyframes curtain-load { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes curtain-pop { from { opacity: 0; transform: scale(0.8) translateY(10px); } }

/* Open: panels slide out and bunch up, valance lifts, center fades */
.curtain.is-open .curtain-left { transform: translateX(-100%) scaleX(0.55); }
.curtain.is-open .curtain-right { transform: translateX(100%) scaleX(0.55); }
.curtain.is-open .curtain-valance-wrap { transform: translateY(-130%); }
.curtain.is-open .curtain-center { opacity: 0; transform: scale(1.08); pointer-events: none; }
/* Closing (page change): a bit quicker, and center shows once the panels meet */
.curtain:not(.is-open) .curtain-panel { transition-duration: 0.85s; }
.curtain:not(.is-open) .curtain-valance-wrap { transition-delay: 0s; transition-duration: 0.5s; }
.curtain:not(.is-open) .curtain-center { transition-delay: 0.45s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 50px; padding-top: 20px; }
  .hero-visual { order: -1; max-width: 640px; margin: 0 auto; width: 100%; }
  .prize-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .prize-grand { grid-column: span 2; grid-row: auto; }
  .prize-grand .prize-img img { max-height: 340px; }
  .summary { grid-template-columns: repeat(3, 1fr); }
  .sum-main { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  :root { --topbar-h: 91px; }
  .topbar { padding: 14px 16px; }
  .topbar.is-scrolled { padding-top: 6px; padding-bottom: 6px; }
  .brand-text { display: none; }
  .brand-logos { gap: 8px; }
  .logo-bayar { height: 62px; }
  .logo-modal { height: 48px; }
  .is-scrolled .logo-bayar { height: 44px; }
  .is-scrolled .logo-modal { height: 34px; }
  .brand .x { font-size: 22px; }
  /* Mobile: logos centered, logout button pinned to the right without shifting them */
  .topbar { justify-content: center; }
  .topbar-right { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
  /* Make room for the bigger logos; the "otomatis sinkron" line under the title already shows live status */
  .live-pill { display: none !important; }
  .prize-qty { top: 10px; right: 10px; font-size: 12px; padding: 4px 9px; }
  .curtain-logos { gap: 10px; }
  .curtain-logos img:first-child { height: 82px; }
  .curtain-logos img:last-child { height: 64px; }
  .curtain-x { font-size: 30px; }
  .curtain-valance { height: 58px; }
  .curtain-sub { font-size: 11px; letter-spacing: 0.26em; }
  .view { padding: 0 16px 32px; }
  .hero-badge { display: none; }
  .ticket-float .ticket { transform: rotateZ(-2deg); }
  .login-card { padding: 18px; }
  .stats-strip { gap: 14px; padding: 16px; }
  .stat-ico { width: 52px; height: 52px; font-size: 26px; }
  .stats-strip strong { font-size: 38px; }
  .stat-sub { font-size: 11.5px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary .sum-card:last-child { grid-column: 1 / -1; }
  .sum-card { padding: 16px; }
  .sum-card strong { font-size: 32px; }
  .sum-main strong { font-size: 52px; }
  .toolbar-right { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; max-width: none; }
  .ticket-grid { gap: 14px; }
  .prize-grid { gap: 12px; }
  .prize-img { min-height: 130px; padding: 12px 10px 0; }
  .prize-img img { max-height: 130px; }
  .prize-info { padding: 10px 10px 14px; }
  .prize b { font-size: 19px; }
  .prize small { font-size: 10.5px; }
  .prize-grand .prize-img { padding-top: 44px; }
  .prize-grand .prize-img img { max-height: 260px; }
  .prize-ribbon { top: 12px; left: 12px; font-size: 13px; }
  .perks { grid-template-columns: 1fr; }
  .perks div + div { border-left: 0; border-top: 1px solid var(--border); }
  .perks div { padding: 12px 16px; font-size: 13px; }
  .lb-close { top: -46px; }
}

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