/* ============================================================================
   Poker Jamie — Obsidian + Emerald
   Pure black surfaces, brushed silver controls, emerald edge-glow.
   Apple-store dimensional. Premium.
   ============================================================================ */

:root {
  /* core surfaces — near-black with slight blue lift (Stake/Coinbase territory) */
  --bg:            #0B0E11;
  --bg-1:          #0F1318;
  --bg-2:          #151A20;
  --bg-3:          #1F262E;
  --bg-glass:      rgba(15, 19, 24, 0.78);

  /* text — never pure white */
  --text:          #E8ECEF;
  --text-2:        #B0B8C2;
  --text-3:        #8B95A1;
  --text-mute:     #4A535F;

  /* accent: electric money-green (Robinhood-tier discipline) */
  --green:         #00E08A;
  --green-bright:  #4DFFB0;
  --green-mid:     #00B871;
  --green-deep:    #007A4A;
  --green-soft:    rgba(0, 224, 138, 0.14);
  --green-glow:    rgba(0, 224, 138, 0.55);
  --green-glow-2:  rgba(0, 224, 138, 0.22);
  --green-line:    rgba(0, 224, 138, 0.32);

  /* silver — brushed metal face */
  --silver-1:      #E8ECEF;
  --silver-2:      #C8CED6;
  --silver-3:      #B8BFC8;
  --silver-4:      #8A929C;
  --silver-line:   rgba(255, 255, 255, 0.08);

  /* status danger ("Jamied") */
  --red:           #FF4D5E;
  --red-soft:      rgba(255, 77, 94, 0.14);

  /* type */
  --font-display:  'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-text:     'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-mono:     'SF Mono', 'JetBrains Mono', 'Menlo', 'Monaco', ui-monospace, monospace;

  /* radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* shadows / glows */
  --glow-sm:       0 0 8px var(--green-glow-2), 0 0 1px var(--green-line);
  --glow-md:       0 0 20px var(--green-glow-2), 0 0 1px var(--green-line);
  --glow-lg:       0 0 40px var(--green-glow), 0 0 60px var(--green-glow-2), inset 0 0 0 1px var(--green-line);
  --depth-1:       0 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.6);
  --depth-2:       0 2px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(0,0,0,0.7);
  --depth-3:       0 30px 80px -20px rgba(0,0,0,0.9), 0 8px 24px rgba(0,0,0,0.7);
}

/* ================= GLOBAL ================= */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  letter-spacing: -0.01em;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(0,224,138,0.05), transparent 60%),
    #0B0E11;
  background-attachment: fixed;
}

::selection { background: var(--green); color: #000; }

/* Subtle film grain to kill the AI-flat-gradient look */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' /></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.7'/></svg>");
  mix-blend-mode: overlay;
}

#root { position: relative; z-index: 2; min-height: 100vh; }

/* ================= TYPOGRAPHY ================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0;
}
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(24px, 3.5vw, 36px); line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: 20px; line-height: 1.2; }

p { color: var(--text-2); line-height: 1.55; margin: 0 0 12px; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.mono.green { color: var(--green); text-shadow: 0 0 8px var(--green-glow); }
.mono.silver {
  background: linear-gradient(180deg, var(--silver-1), var(--silver-4));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #c8c8d0 60%, #9a9aa3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.green-text {
  color: var(--green);
  text-shadow: 0 0 12px var(--green-glow);
}

/* ================= SURFACES / CARDS ================= */

.card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--depth-2);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.card-glow {
  background: var(--bg-2);
  border: 1px solid var(--green-line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow:
    0 0 0 1px var(--green-line),
    0 0 24px var(--green-glow-2),
    var(--depth-2);
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
}

/* ================= BUTTONS — SILVER + GREEN GLOW ================= */

.btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

/* Primary: brushed silver with green halo */
.btn-primary {
  color: #0a0a0a;
  background:
    linear-gradient(180deg, var(--silver-1) 0%, var(--silver-3) 50%, var(--silver-4) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 0 1px rgba(0,0,0,0.4),
    0 0 16px var(--green-glow-2),
    0 0 32px var(--green-glow-2),
    0 4px 12px rgba(0,0,0,0.6);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 0 1px rgba(0,255,136,0.4),
    0 0 24px var(--green-glow),
    0 0 56px var(--green-glow-2),
    0 6px 18px rgba(0,0,0,0.7);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary: dark glass with green hairline */
.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--green-line);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 16px var(--green-glow-2);
}

/* Ghost: text-only with green underline reveal */
.btn-ghost {
  padding: 8px 0;
  color: var(--text-2);
  background: transparent;
}
.btn-ghost:hover { color: var(--green); text-shadow: 0 0 12px var(--green-glow); }

/* Big CTA */
.btn-xl {
  padding: 20px 36px;
  font-size: 17px;
  border-radius: var(--r-lg);
}

.btn-block { display: flex; width: 100%; }

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ================= INPUTS ================= */

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  font-weight: 600;
}

.input, .textarea, .select {
  all: unset;
  display: block;
  width: 100%;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  box-sizing: border-box;
  transition: all 160ms ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--green);
  background: var(--bg-3);
  box-shadow:
    0 0 0 4px var(--green-soft),
    0 0 16px var(--green-glow-2),
    inset 0 0 0 1px var(--green-line);
}
.textarea { min-height: 100px; resize: vertical; line-height: 1.5; }

.input-xl {
  font-size: 20px;
  padding: 18px 20px;
  font-weight: 500;
}

/* Range slider */
input[type="range"].slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--green) var(--pct, 0%), rgba(255,255,255,0.08) var(--pct, 0%));
  border-radius: 2px;
  outline: none;
  margin: 16px 0 8px;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--silver-1), var(--silver-3));
  border: 1px solid rgba(0,0,0,0.4);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 0 12px var(--green-glow),
    0 2px 6px rgba(0,0,0,0.6);
}
input[type="range"].slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--silver-1), var(--silver-3));
  border: 1px solid rgba(0,0,0,0.4);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 0 12px var(--green-glow);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-2);
  cursor: pointer;
  transition: all 160ms ease;
  user-select: none;
}
.chip:hover { border-color: var(--green-line); color: var(--text); }
.chip.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 12px var(--green-glow-2), inset 0 0 0 1px var(--green-line);
}

/* ================= NAVIGATION ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a1a1f, #0a0a0c);
  border: 1px solid var(--green-line);
  box-shadow: 0 0 14px var(--green-glow-2), inset 0 0 0 1px rgba(255,255,255,0.04);
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
  text-shadow: 0 0 8px var(--green-glow);
  font-size: 14px;
}

.bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bottomnav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  text-decoration: none;
  border-radius: 10px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 160ms ease;
}
.bottomnav .nav-item.active {
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}
.bottomnav .nav-item:hover { color: var(--text); }

/* ================= QR DISPLAY (the hero moment) ================= */

.qr-frame {
  position: relative;
  margin: 32px auto;
  width: min(320px, 80vw);
  aspect-ratio: 1;
  padding: 18px;
  background: linear-gradient(180deg, #0a0a0c, #000);
  border-radius: var(--r-xl);
  border: 1px solid var(--green-line);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    0 0 0 1px rgba(0,0,0,0.6),
    0 0 40px var(--green-glow),
    0 0 80px var(--green-glow-2),
    0 30px 80px -20px rgba(0,0,0,0.9);
}
.qr-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-xl) + 2px);
  background: conic-gradient(from 0deg, var(--green-glow), transparent 30%, transparent 70%, var(--green-glow));
  z-index: -1;
  opacity: 0.6;
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qr-frame img, .qr-frame canvas {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: block;
  background: #fff;
}

.qr-caption {
  text-align: center;
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

/* ================= LOCKED STAMP ================= */

.locked-stamp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(0,255,136,0.12), rgba(0,255,136,0.04));
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow:
    0 0 20px var(--green-glow),
    inset 0 0 12px rgba(0,255,136,0.08);
}
.locked-stamp::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ================= UTILITIES ================= */

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-lg { max-width: 960px; }

.stack-2  > * + * { margin-top: 8px; }
.stack-3  > * + * { margin-top: 12px; }
.stack-4  > * + * { margin-top: 16px; }
.stack-6  > * + * { margin-top: 24px; }
.stack-8  > * + * { margin-top: 32px; }
.stack-12 > * + * { margin-top: 48px; }

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.text-center { text-align: center; }
.text-mute { color: var(--text-3); }
.text-2 { color: var(--text-2); }

.divider { height: 1px; background: rgba(255,255,255,0.06); margin: 24px 0; }

.hidden { display: none !important; }

/* AI banner (config not ready) */
.warn-banner {
  background: linear-gradient(180deg, rgba(255,170,0,0.12), rgba(255,170,0,0.04));
  border: 1px solid rgba(255,170,0,0.4);
  color: #ffcc66;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
}

/* Page padding so bottom nav doesn't cover content */
.page { padding-bottom: 100px; }

/* Hero callout */
.hero {
  padding: 56px 0 32px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--green-glow);
}
.hero .subtitle {
  margin-top: 18px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  text-wrap: balance;
}
.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* Story block (Jamie Gold paragraphs) */
.story {
  max-width: 560px;
  margin: 56px auto 32px;
  padding: 32px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  position: relative;
}
.story::before {
  content: '◆';
  position: absolute;
  top: -10px;
  left: 24px;
  background: #000;
  padding: 0 10px;
  color: var(--green);
  font-size: 14px;
  text-shadow: 0 0 8px var(--green-glow);
}
.story h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  text-shadow: 0 0 10px var(--green-glow);
}
.story p { font-size: 15px; color: var(--text-2); line-height: 1.65; }
.story p + p { margin-top: 12px; }

/* Tournament row */
.tournament-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 160ms ease;
  text-decoration: none;
  color: var(--text);
}
.tournament-row:hover {
  border-color: var(--green-line);
  background: var(--bg-3);
  box-shadow: 0 0 20px var(--green-glow-2);
}
.tournament-row .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-top: 4px;
}
.tournament-row .countdown {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
  white-space: nowrap;
}
.tournament-row .countdown.cold {
  color: var(--text-3);
  text-shadow: none;
}

/* StatRow */
.statrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.statrow:last-child { border-bottom: 0; }
.statrow .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.statrow .value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.statrow .value.green {
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

/* Footer */
.footer {
  padding: 48px 24px 120px;
  text-align: center;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Big number / KPI */
.kpi {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff, #c8c8d0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
