/* Propoliz public site — modern dark theme, Prompt font, team colors.
   Mobile-first (fans register on their phones). Shared by all pages. */

:root {
  --bg: #0b1220;
  --bg2: #0f1830;
  --panel: #121c34;
  --panel2: #182446;
  --line: #24304a;
  --text: #eef2fa;
  --muted: #9aa7bd;
  --accent: #f5b820;
  --green: #22c55e;
  --green-d: #15803d;
  --pink: #ec4899;
  --pink-d: #be185d;
  --ok: #22c55e;
  --bad: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(34, 197, 94, .12), transparent 60%),
    radial-gradient(1200px 600px at 85% -10%, rgba(236, 72, 153, .12), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Prompt', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a { color: var(--accent); }
.mono { font-family: ui-monospace, 'SF Mono', 'Roboto Mono', monospace; }
.muted { color: var(--muted); }
.center { text-align: center; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 64px; }

/* ---------- top brand bar ---------- */
.brandbar {
  display: flex; align-items: center; gap: 10px;
  max-width: 560px; margin: 0 auto; padding: 16px 16px 4px;
}
.brandbar .logo { font-size: 1.5rem; }
.brandbar .titles { line-height: 1.15; }
.brandbar .t1 { font-weight: 800; font-size: 1.02rem; letter-spacing: .3px; }
.brandbar .t2 { font-size: .74rem; color: var(--muted); }
.brandbar .spacer { flex: 1; }
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; color: var(--muted); font-weight: 600;
}
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: pulse 1.6s infinite; }
.live-dot.on i { background: var(--ok); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  margin: 14px 0;
}
h1.hero { font-size: 1.7rem; font-weight: 900; margin: 6px 0 2px; letter-spacing: .3px; }
.hero-sub { color: var(--muted); font-size: .92rem; margin: 0 0 4px; }

/* ---------- VS battle meter ---------- */
.battle { padding: 18px 16px 20px; }
.battle-teams { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 8px; }
.bt { text-align: center; flex: 1; }
.bt .emoji { font-size: 1.5rem; }
.bt .name { font-weight: 700; font-size: .86rem; }
.bt.green .name { color: var(--green); }
.bt.pink .name { color: var(--pink); }
.bt .score { font-weight: 900; font-size: 1.9rem; line-height: 1; margin-top: 2px; }
.bt.green .score { color: var(--green); }
.bt.pink .score { color: var(--pink); }
.bt .fans { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.vs-chip { align-self: center; font-weight: 900; color: var(--muted); font-size: .9rem; padding: 0 8px; }

.meter {
  position: relative; height: 30px; border-radius: 999px; overflow: hidden;
  background: var(--pink-d);
  border: 1px solid var(--line);
  display: flex;
}
.meter .g {
  background: linear-gradient(90deg, var(--green-d), var(--green));
  width: 50%;
  transition: width .7s cubic-bezier(.22,.61,.36,1);
}
.meter .p { flex: 1; background: linear-gradient(90deg, var(--pink), var(--pink-d)); }
.meter .seam { position: absolute; top: -4px; bottom: -4px; width: 3px; background: #fff; box-shadow: 0 0 10px #fff; transform: translateX(-50%); transition: left .7s cubic-bezier(.22,.61,.36,1); }
.meter-pct { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 1rem;
  padding: 12px 18px; border-radius: 12px; cursor: pointer;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  text-decoration: none; transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #ffcf3a, var(--accent)); color: #241a00; border: none; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-lg { width: 100%; padding: 15px 18px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------- form ---------- */
.field { margin: 14px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.req { color: var(--accent); }
.input {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text);
  background: #0c1428; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 184, 32, .15); }
.input::placeholder { color: #5b6782; }
.hint { font-size: .78rem; margin-top: 6px; }
.ferr { color: var(--bad); font-size: .8rem; margin-top: 6px; font-weight: 600; }
.field.invalid .input { border-color: var(--bad); }

/* artist picker */
.gen-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.gen-chip {
  font-family: inherit; font-size: .82rem; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: #0c1428; color: var(--muted); border: 1px solid var(--line);
}
.gen-chip.picked { background: var(--accent); color: #241a00; border-color: var(--accent); }
.artist-list {
  max-height: 264px; overflow-y: auto; display: grid; gap: 8px;
  padding: 4px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 12px; background: #0a1122;
}
.artist-pick {
  display: flex; justify-content: space-between; align-items: center;
  font-family: inherit; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 10px;
  background: #0e1730; color: var(--text); border: 1px solid transparent;
}
.artist-pick .artist-name { font-weight: 600; }
.artist-pick .artist-gen { font-size: .74rem; color: var(--muted); }
.artist-pick.picked { border-color: var(--accent); background: #16224a; box-shadow: 0 0 0 2px rgba(245,184,32,.25) inset; }
.artist-empty { padding: 16px; text-align: center; }

.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .9rem; line-height: 1.5; }
.check-row input { margin-top: 3px; width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--accent); }

/* ---------- ticket ---------- */
.ticket-team-banner { margin: -20px -18px 14px; padding: 14px; border-radius: var(--radius) var(--radius) 0 0; text-align: center; }
.ticket-team-banner.green { background: linear-gradient(180deg, var(--green), var(--green-d)); }
.ticket-team-banner.pink { background: linear-gradient(180deg, var(--pink), var(--pink-d)); }
.ticket-team-name { font-weight: 900; font-size: 1.15rem; color: #fff; }
.ticket-lane { font-weight: 700; color: rgba(255,255,255,.9); font-size: .86rem; }
.ticket-brand { text-align: center; color: var(--accent); font-weight: 700; letter-spacing: 1px; font-size: .8rem; }
.ticket-head { text-align: center; margin: 4px 0 12px; font-size: 1.25rem; }
.ticket-qr { background: #fff; padding: 12px; border-radius: 14px; width: fit-content; margin: 0 auto 14px; }
.ticket-qr img { display: block; width: 232px; height: 232px; image-rendering: pixelated; }
.ticket-noqr { text-align: center; color: var(--muted); margin: 10px 0; }
.ticket-fanid { text-align: center; font-weight: 800; font-size: 1.5rem; color: var(--accent); letter-spacing: 1px; }
.ticket-name { text-align: center; font-weight: 700; font-size: 1.1rem; margin-top: 4px; }
.ticket-artist { text-align: center; color: var(--muted); }
.ticket-hint { text-align: center; font-size: .86rem; color: var(--muted); margin: 14px 0; }
.returning-chip {
  display: block; text-align: center; margin: 0 auto 10px; width: fit-content;
  background: rgba(34,197,94,.15); color: var(--green); border: 1px solid rgba(34,197,94,.4);
  padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: #1b2540; color: var(--text); border: 1px solid var(--line);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(34,197,94,.5); }
.toast.bad { border-color: rgba(239,68,68,.5); }
.toast.warn { border-color: rgba(245,184,32,.5); }

/* ---------- misc ---------- */
.foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 24px; line-height: 1.7; }
.foot a { color: var(--muted); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* PDPA doc */
.doc { max-width: 720px; margin: 0 auto; padding: 24px 18px 64px; line-height: 1.7; }
.doc h1 { font-size: 1.5rem; margin-bottom: 4px; }
.doc h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.doc p, .doc li { font-size: .95rem; }
.doc .contact { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.doc .backlink { display: inline-block; margin-top: 28px; }
