﻿/* Theme from the "אחרית הימים" poster: night navy, halftone purple, neon green. */
:root {
  --bg: #00002b;
  --surface: #17143f;
  --surface-2: #261f5c;
  --text: #ffffff;
  --muted: #b9b0e6;
  --purple: #8f2cf5;
  --accent: #5dff3b;
  --accent-ink: #0a0926;
  --ok: #5dff3b;
  --ok-bg: #12301a;
  --no: #ff5a6e;
  --no-bg: #3d0f26;
  --line: #3a3180;
  --radius: 14px;
  --font: "Assistant", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --display: "Secular One", "Assistant", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(143, 44, 245, .22) 1px, transparent 1.6px),
    linear-gradient(180deg, var(--bg) 0%, #0e0640 60%, var(--bg) 100%);
  background-size: 7px 7px, 100% 100%;
  background-repeat: repeat, no-repeat;
  color: var(--text); font-family: var(--font);
  font-size: 18px; line-height: 1.45; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 440px; margin: 0 auto; padding: 24px 16px 40px; }
h1, h2, .count, .status, .btn { font-family: var(--display); font-weight: 400; }
h1 { font-size: 32px; line-height: 1.1; margin: 0 0 6px; text-shadow: 3px 3px 0 var(--purple); }
.eyebrow { color: var(--accent); font-family: var(--display); font-size: 16px; letter-spacing: .35em; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.hidden { display: none !important; }
.center { text-align: center; }
.partners { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.partners img { height: 34px; width: auto; opacity: .9; }
.brand { display: block; position: relative; width: 132px; height: auto; margin: 36px auto 18px;
  filter: drop-shadow(0 0 18px rgba(93, 255, 59, .35)); }
.topbar .mini { width: 34px; height: auto; vertical-align: middle; margin-inline-end: 8px; }

/* Poster artwork: full-bleed inside the 440px column */
.hero, .foot, .strip { display: block; width: calc(100% + 32px); height: auto; margin-inline: -16px; }
.hero { margin-top: -24px; margin-bottom: 32px; }
.foot { margin-top: 36px; margin-bottom: -40px; }
.strip { margin-top: -24px; margin-bottom: -28px; position: relative; z-index: 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.strip + .card { position: relative; z-index: 1; }
@media (min-width: 473px) { .hero, .strip { border-radius: 0 0 18px 18px; } }

label { display: block; font-weight: 600; margin: 0 0 6px; }
.field { margin-bottom: 18px; }
input {
  width: 100%; font: inherit; font-size: 22px; padding: 14px 16px; direction: ltr; text-align: right;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
.error { color: var(--no); font-size: 16px; margin: 6px 0 0; min-height: 1.4em; }

button { font: inherit; cursor: pointer; border: 0; border-radius: var(--radius); }
.btn {
  display: block; width: 100%; padding: 16px; font-size: 20px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.secondary { background: var(--surface-2); color: var(--text); font-weight: 600; }
.link { background: none; color: var(--muted); text-decoration: underline; padding: 8px; font-size: 15px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; text-align: center; }
.qr { background: #fff; border-radius: 12px; padding: 14px; width: min(78vw, 300px); margin: 16px auto; }
.qr svg { display: block; width: 100%; height: auto; }
.qr.spent { opacity: .25; }
.btn { box-shadow: 4px 4px 0 var(--purple); }
.btn.secondary { box-shadow: none; }
.card { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 20px 60px -20px rgba(143, 44, 245, .6); }
.count { color: var(--accent); text-shadow: 4px 4px 0 var(--purple);
  font-size: 72px; line-height: 1; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.count-label { color: var(--muted); margin: 4px 0 0; }
.note { color: var(--muted); font-size: 15px; margin: 18px 0 0; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--muted); font-size: 14px; direction: ltr; }

/* Bartender */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 15px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface); padding: 5px; border-radius: var(--radius); margin-bottom: 14px; }
.tabs button { padding: 11px; background: none; color: var(--muted); font-weight: 600; border-radius: 10px; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
#reader { border-radius: var(--radius); overflow: hidden; background: #000; min-height: 280px; }
#reader video { border-radius: var(--radius); }

.result { border-radius: 20px; padding: 22px 18px; text-align: center; border: 2px solid transparent; }
.result.ok { background: var(--ok-bg); border-color: var(--ok); }
.result.no { background: var(--no-bg); border-color: var(--no); }
.result.unknown { background: var(--surface); border-color: var(--line); }
.result h2 { margin: 0; font-size: 26px; }
.result .status { font-weight: 800; font-size: 22px; margin: 0 0 6px; }
.result.ok .status { color: var(--ok); }
.result.no .status { color: var(--no); }
.qty { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0; }
.qty button { min-width: 56px; padding: 14px 0; font-size: 22px; font-weight: 800; background: var(--surface-2); color: var(--text); }
.qty button[aria-pressed="true"] { background: var(--ok); color: #06160c; }
.actions { display: grid; gap: 10px; margin-top: 14px; }
.history { list-style: none; padding: 0; margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.list button { width: 100%; display: flex; justify-content: space-between; padding: 14px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line); text-align: right; }
.list .left { font-weight: 800; }
.toast { position: fixed; inset-inline: 16px; bottom: 18px; max-width: 408px; margin: 0 auto; background: var(--surface-2); padding: 12px 16px; border-radius: 12px; text-align: center; }
