/* ── tokens ─────────────────────────────────────────────── */
:root {
  --green-deep:  #0D1F0F;
  --green-mid:   #152A17;
  --green-felt:  #1A3320;
  --green-light: #254D2B;
  --gold:        #C9A84C;
  --gold-dim:    #8C6E2A;
  --white:       #F0EDE6;
  --grey-1:      #B8B4AE;
  --grey-2:      #6B6760;
  --grey-3:      #3A3733;
  --red-num:     #C0392B;
  --black-num:   #1A1A1A;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:   6px;
  --radius-lg: 12px;
  --shadow:   0 2px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);

  --max-w: 1100px;
}

/* ── reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--green-deep);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,31,15,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--green-light);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 32px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  flex-shrink: 0;
}
.logo span { color: var(--gold); }

.header-nav { display: flex; gap: 24px; flex: 1; }
.header-nav a {
  color: var(--grey-1);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s;
}
.header-nav a:hover { color: var(--white); }

.header-auth { display: flex; gap: 10px; align-items: center; }

/* ── buttons ─────────────────────────────────────────────── */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--green-light);
  color: var(--grey-1);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: .875rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--white); }

.btn-primary {
  background: var(--gold);
  border: none;
  color: var(--green-deep);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: #D4B05A; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-outline:hover { background: rgba(201,168,76,.1); }

/* ── hero ───────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: 72px 24px 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  color: var(--white);
  max-width: 580px;
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--grey-1);
  font-size: 1.05rem;
  max-width: 460px;
}

/* ── wheel ──────────────────────────────────────────────── */
.wheel-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  flex-shrink: 0;
}
#wheelCanvas { border-radius: 50%; display: block; }

.spin-btn {
  background: var(--green-felt);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 9px 28px;
  border-radius: 24px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .04em;
  transition: background .15s;
}
.spin-btn:hover { background: var(--green-light); }
.spin-btn:disabled { opacity: .5; cursor: default; }

.spin-result {
  font-size: 1rem;
  font-weight: 600;
  min-height: 24px;
  text-align: center;
}
.spin-result.red  { color: #E74C3C; }
.spin-result.black { color: var(--grey-1); }
.spin-result.green { color: #2ECC71; }

/* ── sections ───────────────────────────────────────────── */
.section { padding: 64px 24px; }
.section-dark { background: var(--green-mid); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }

.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 36px; flex-wrap: wrap; gap: 16px;
}
.section-header h2, .section-inner > h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--white);
}
.section-intro {
  color: var(--grey-1);
  margin-bottom: 32px;
  font-size: .95rem;
}

/* ── filter tabs ────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 6px; }
.tab {
  background: transparent;
  border: 1px solid var(--grey-3);
  color: var(--grey-2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.tab.active, .tab:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(201,168,76,.08);
}

/* ── systems grid ───────────────────────────────────────── */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.system-card {
  background: var(--green-mid);
  border: 1px solid var(--green-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.system-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}
.system-card.locked { cursor: default; }
.system-card.locked:hover { transform: none; border-color: var(--green-light); }

.card-tier {
  position: absolute; top: 16px; right: 16px;
  font-size: .7rem; font-weight: 600;
  padding: 3px 9px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: .06em;
}
.card-tier.free { background: rgba(46,204,113,.12); color: #2ECC71; }
.card-tier.paid { background: rgba(201,168,76,.12); color: var(--gold); }

.card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 4px;
  padding-right: 60px;
}
.card-subtitle {
  font-size: .8rem;
  color: var(--grey-2);
  margin-bottom: 20px;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--green-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.stat-cell {
  background: var(--green-deep);
  padding: 12px 10px;
  text-align: center;
}
.stat-label {
  font-size: .68rem;
  color: var(--grey-2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}
.stat-value.good { color: #2ECC71; }
.stat-value.bad  { color: #E74C3C; }

.card-target-selector {
  display: flex; gap: 6px; margin-bottom: 14px;
}
.target-btn {
  flex: 1;
  background: var(--green-deep);
  border: 1px solid var(--grey-3);
  color: var(--grey-2);
  padding: 5px 0;
  border-radius: var(--radius);
  font-size: .8rem;
  cursor: pointer;
  transition: all .12s;
}
.target-btn.active {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(201,168,76,.08);
}

.card-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.card-bankroll {
  font-size: .8rem;
  color: var(--grey-2);
}
.card-bankroll span { color: var(--grey-1); font-weight: 500; }

.card-btn {
  background: transparent;
  border: 1px solid var(--green-light);
  color: var(--grey-1);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: .8rem;
  cursor: pointer;
  transition: all .12s;
}
.card-btn:hover { border-color: var(--gold-dim); color: var(--gold); }

.locked-overlay {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 24px 0 8px;
  text-align: center;
  gap: 10px;
}
.locked-icon { font-size: 1.6rem; opacity: .5; }
.locked-text { font-size: .85rem; color: var(--grey-2); }

/* ── compare table ──────────────────────────────────────── */
.compare-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.compare-table th {
  text-align: left;
  padding: 10px 16px;
  color: var(--grey-2);
  font-weight: 500;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--green-light);
}
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--grey-1);
}
.compare-table tr:hover td { background: rgba(255,255,255,.02); }
.compare-table .sys-name { color: var(--white); font-weight: 500; }
.compare-table .pct-good { color: #2ECC71; font-weight: 600; }
.compare-table .pct-mid  { color: var(--gold); font-weight: 600; }
.compare-table .pct-bad  { color: #E74C3C; font-weight: 600; }

.compare-target-tabs {
  display: flex; gap: 8px; margin-bottom: 24px;
}

/* ── modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  overflow-y: auto;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--green-mid);
  border: 1px solid var(--green-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  position: relative;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 420px; padding: 32px; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: none;
  color: var(--grey-2); font-size: 1.1rem;
  cursor: pointer; width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--white); background: var(--green-light); }

/* ── modal body — system detail ─────────────────────────── */
.modal-yt-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--gold);
  text-decoration: none; margin-bottom: 24px;
  border: 1px solid var(--gold-dim);
  padding: 6px 14px; border-radius: 20px;
  transition: background .15s;
}
.modal-yt-link:hover { background: rgba(201,168,76,.1); }

.modal-section { margin-bottom: 28px; }
.modal-section h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--green-light);
}
.modal-desc { color: var(--grey-1); line-height: 1.7; font-size: .95rem; }

.how-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.how-item {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  align-items: start;
}
.how-step-num {
  background: var(--green-light);
  color: var(--gold);
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.how-step-title { font-weight: 600; color: var(--white); font-size: .9rem; }
.how-step-detail { color: var(--grey-1); font-size: .9rem; margin-top: 2px; line-height: 1.6; }

/* progression table */
.prog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.prog-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--grey-2);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--green-light);
}
.prog-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--grey-1);
}
.prog-table tr:first-child td { color: var(--white); }
.prog-table .level-label { color: var(--white); font-weight: 500; }
.prog-table .total-col { color: var(--gold); font-weight: 600; }

/* simulation result panels */
.sim-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sim-panel {
  background: var(--green-deep);
  border: 1px solid var(--green-light);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.sim-target {
  font-size: .75rem;
  color: var(--grey-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.sim-big {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.sim-big.good { color: #2ECC71; }
.sim-big.mid  { color: var(--gold); }
.sim-big.bad  { color: #E74C3C; }
.sim-sub { font-size: .78rem; color: var(--grey-2); margin-bottom: 8px; }
.sim-meta { font-size: .78rem; color: var(--grey-2); }
.sim-meta span { color: var(--grey-1); }

.assumptions-box {
  background: rgba(201,168,76,.06);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .82rem;
  color: var(--grey-1);
  line-height: 1.6;
}
.assumptions-box strong { color: var(--gold); }

/* ── auth modal ──────────────────────────────────────────── */
.auth-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 6px;
}
.auth-sub { color: var(--grey-2); font-size: .9rem; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-input {
  background: var(--green-deep);
  border: 1px solid var(--green-light);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: var(--font-body);
  transition: border-color .15s;
  width: 100%;
}
.auth-input:focus { outline: none; border-color: var(--gold-dim); }
.auth-input::placeholder { color: var(--grey-2); }
.auth-error { color: #E74C3C; font-size: .85rem; min-height: 18px; }
.auth-switch {
  text-align: center;
  font-size: .85rem;
  color: var(--grey-2);
  margin-top: 8px;
}
.auth-switch a { color: var(--gold); cursor: pointer; text-decoration: underline; }

/* logged-in header state */
.user-pill {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; color: var(--grey-1);
}
.user-pill .tier-badge {
  background: rgba(201,168,76,.15);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}
.user-pill .tier-badge.free-badge {
  background: rgba(46,204,113,.1);
  color: #2ECC71;
}
.btn-logout {
  background: transparent; border: none;
  color: var(--grey-2); font-size: .8rem;
  cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius);
  transition: color .15s;
}
.btn-logout:hover { color: var(--white); }

/* ── loading / empty ─────────────────────────────────────── */
.loading-state {
  color: var(--grey-2);
  text-align: center;
  padding: 48px;
  font-size: .9rem;
}

/* ── footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--green-deep);
  border-top: 1px solid var(--green-light);
  padding: 40px 24px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem; color: var(--grey-2);
}
.footer-logo span { color: var(--gold); }
.footer-note { color: var(--grey-3); font-size: .82rem; max-width: 500px; line-height: 1.6; }
.footer-copy { color: var(--grey-3); font-size: .78rem; }

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; }
  .wheel-wrap { order: -1; }
  #wheelCanvas { width: 180px; height: 180px; }
  .sim-panels { grid-template-columns: 1fr; }
  .modal { padding: 24px 16px; }
  .header-nav { display: none; }
}

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

/* ── wheel badge on cards ───────────────────────────────── */
.card-wheel-badge {
  font-size: .72rem;
  color: var(--grey-2);
  margin-top: 6px;
  margin-bottom: 12px;
}

/* ── sim wheel rows in modal ─────────────────────────────── */
.sim-wheel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.sim-wheel-label {
  font-size: .78rem;
  color: var(--grey-2);
}
.sim-big-inline {
  font-size: 1.4rem;
  font-weight: 700;
}
.sim-big-inline.good { color: #2ECC71; }
.sim-big-inline.mid  { color: var(--gold); }
.sim-big-inline.bad  { color: #E74C3C; }

/* ── how we test ─────────────────────────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.method-card {
  background: var(--green-deep);
  border: 1px solid var(--green-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.method-card-warning {
  border-color: var(--gold-dim);
  background: rgba(201,168,76,.04);
}

.method-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.method-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 10px;
}

.method-card p {
  font-size: .88rem;
  color: var(--grey-1);
  line-height: 1.7;
}

.method-card p strong { color: var(--white); }
.method-card p em { color: var(--gold); font-style: normal; }

.method-card-warning p strong { color: var(--gold); }

/* ── roulette demo layout ────────────────────────────────── */
.roulette-demo {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.roulette-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.wheel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.roulette-right {
  flex: 1;
  min-width: 0;
}

/* ── felt table ──────────────────────────────────────────── */
.felt-table {
  background: #1A5C2A;
  border: 3px solid #8C6E2A;
  border-radius: 8px;
  padding: 6px;
  user-select: none;
}

.felt-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.felt-zero {
  background: #1A6B2A;
  border: 1px solid #C9A84C;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
  padding: 6px 0;
  border-radius: 3px;
  cursor: default;
  transition: background .15s;
}
.felt-zero.hit { background: #FFD700; color: #000; }

.felt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.felt-num {
  text-align: center;
  font-weight: 700;
  font-size: .78rem;
  padding: 5px 2px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,.15);
  cursor: default;
  transition: background .15s, transform .1s;
  color: #fff;
}
.felt-num.red   { background: #C0392B; }
.felt-num.black { background: #1A1A1A; }
.felt-num.hit   { background: #FFD700 !important; color: #000; transform: scale(1.1); z-index: 1; position: relative; }

.felt-col-bets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.felt-col-bet {
  background: #155224;
  border: 1px solid rgba(201,168,76,.4);
  color: var(--gold);
  text-align: center;
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 0;
  border-radius: 3px;
}

.felt-dozens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.felt-dozen {
  background: #155224;
  border: 1px solid rgba(201,168,76,.4);
  color: #fff;
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  padding: 5px 0;
  border-radius: 3px;
}

.felt-evens {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.felt-even {
  background: #155224;
  border: 1px solid rgba(201,168,76,.4);
  color: #fff;
  text-align: center;
  font-size: .68rem;
  font-weight: 600;
  padding: 5px 2px;
  border-radius: 3px;
}
.felt-even.red-bet { background: #8B1A1A; }

@media (max-width: 700px) {
  .roulette-demo { flex-direction: column; align-items: center; }
  .roulette-right { width: 100%; }
  #wheelCanvas { width: 180px; height: 180px; }
}

/* ── avg net explainer ───────────────────────────────────── */
.sim-net-explain {
  font-size: .68rem;
  color: var(--grey-2);
  line-height: 1.5;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.avg-net-box {
  background: rgba(201,168,76,.05);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avg-net-title {
  font-weight: 600;
  color: var(--gold);
  font-size: .92rem;
  margin-bottom: 2px;
}

.avg-net-box p {
  font-size: .85rem;
  color: var(--grey-1);
  line-height: 1.7;
  margin: 0;
}

.avg-net-box strong { color: var(--white); }

.anb-win  { color: #2ECC71; font-weight: 600; }
.anb-loss { color: #E74C3C; font-weight: 600; }
