/* ETERNAL — the last buy wins.
   Hover-style: near-black with real film grain, a green vignette breathing
   behind everything, ghost messages drifting in the depth, one massive tight
   headline, one lime pill. This is the casino — it glows on purpose. */

:root {
  --bg:       #0a0b0a;
  --bg-2:     #101210;
  --ink:      #f2f4f0;
  --dim:      #8b938a;
  --dim-2:    #545b53;
  --line:     rgba(200, 220, 200, 0.10);
  --lime:     #d3f24b;
  --lime-dn:  #b8d63c;
  --red:      #f2634b;
  --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--lime); color: #101400; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* the green breath behind everything */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(60, 110, 55, 0.22), transparent 60%),
    radial-gradient(80% 60% at 50% 110%, rgba(35, 70, 35, 0.18), transparent 65%);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: 0.65; } }

/* film grain — the whole picture shot on bad stock, like the reference */
/* grain, the reference's exact recipe: a 220px turbulence tile at 5%
   opacity, normal blend, completely still. Restraint is the technique. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ghost text drifting in the depth — spawned by JS */
.drift { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ghost {
  position: absolute;
  font-family: var(--mono);
  font-weight: 700;
  color: rgba(190, 210, 185, 0.07);
  white-space: nowrap;
  animation: ghost-drift linear forwards;
}
@keyframes ghost-drift {
  from { transform: translateY(30px); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  to   { transform: translateY(-60px); opacity: 0; }
}

header.bar, main, section, footer { position: relative; z-index: 1; }

/* ============ BAR ============ */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 48px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
}
.brand-dot {
  width: 10px; height: 10px;
  background: var(--lime);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(211, 242, 75, 0.55);
}
.bar-right { display: flex; align-items: center; gap: 12px; }
.round-chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.round-chip b { color: var(--ink); }

/* ============ PILLS ============ */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: transform 120ms ease, background 140ms linear, box-shadow 140ms linear;
}
.pill:active { transform: scale(0.97); }
.pill-lime {
  background: var(--lime);
  color: #121500;
  box-shadow: 0 0 24px rgba(211, 242, 75, 0.25);
}
.pill-lime:hover { background: var(--lime-dn); box-shadow: 0 0 34px rgba(211, 242, 75, 0.4); }
.pill-ghost { border-color: var(--line); color: var(--ink); }
.pill-ghost:hover { border-color: var(--dim); }
.pill-big { padding: 15px 34px; font-size: 16px; }

/* ============ LANDING HERO ============ */

.hero {
  min-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  text-align: center;
  padding: 0 20px 60px;
}

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(10, 12, 10, 0.6);
}
.tag-dim { border: 0; background: none; }

.mega {
  font-size: clamp(56px, 11vw, 128px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.sub {
  color: var(--dim);
  font-size: clamp(15px, 1.8vw, 19px);
  max-width: 42ch;
}

.scroll-hint {
  margin-top: 26px;
  color: var(--dim-2);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

/* ============ RULES ============ */

.rules {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 110px) 24px;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 96px);
}
.rule { max-width: 560px; }
.rule:nth-child(2) { align-self: flex-end; text-align: right; }
.rule-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--lime);
}
.rule h2 {
  margin: 10px 0 12px;
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.rule p { color: var(--dim); font-size: 16px; }
.lime { color: var(--lime); font-weight: 700; }

/* ============ GAME ARENA ============ */

.arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: stretch;
  padding: clamp(12px, 3vw, 36px) clamp(20px, 4vw, 48px);
  min-height: calc(100vh - 160px);
}

.pot-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(70% 55% at 50% 30%, rgba(70, 130, 60, 0.14), transparent 70%),
    var(--bg-2);
  padding: clamp(24px, 4vw, 56px);
}

.pot {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(64px, 10vw, 132px);
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 44px rgba(211, 242, 75, 0.18);
  font-variant-numeric: tabular-nums;
  transition: text-shadow 300ms linear;
}
.pot.won { color: var(--lime); text-shadow: 0 0 60px rgba(211, 242, 75, 0.65); }
.pot-usd { font-family: var(--mono); font-size: 14px; color: var(--dim); letter-spacing: 0.08em; }

.entry-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.entry-line b { color: var(--ink); font-weight: 700; }
.entry-line b.lime { color: var(--lime); }
.entry-sep { color: var(--dim-2); }
.entry-rule { font-size: 9.5px; letter-spacing: 0.16em; color: var(--dim-2); }

.clock-wrap { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.clock {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 48px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.clock.hot { color: var(--red); animation: pulse-hot 0.8s steps(2) infinite; }
@keyframes pulse-hot { 50% { opacity: 0.55; } }
.clock-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--dim-2);
}

.crown {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 26px;
  min-width: 280px;
  background: rgba(10, 12, 10, 0.5);
}
.crown-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--dim-2); }
.crown-addr { font-family: var(--mono); font-size: 17px; font-weight: 700; }
.crown-state { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--dim); }
.crown-state.armed { color: var(--lime); }
.crown-state.arming { color: var(--ink); animation: pulse-hot 1s steps(2) infinite; }

.buy-note { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--dim-2); }

/* ---- feed ---- */

.feed-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-2);
  overflow: hidden;
  min-height: 420px;
}
.feed-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}
.feed-rules { color: var(--dim-2); }
.feed { flex: 1; overflow-y: auto; padding: 8px 0; }

.evt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 12px;
  border-bottom: 1px solid rgba(200, 220, 200, 0.05);
  animation: evt-in 240ms ease both;
}
@keyframes evt-in { from { opacity: 0; transform: translateY(-4px); } }
.evt .t { color: var(--dim-2); font-size: 10.5px; flex: none; }
.evt .who { color: var(--ink); }
.evt .what { color: var(--dim); }
.evt.buy .what { color: var(--lime); }
.evt.reject { opacity: 0.55; }
.evt.reject .what { color: var(--red); }
.evt.win {
  background: rgba(211, 242, 75, 0.07);
  border-left: 3px solid var(--lime);
}
.evt.win .what { color: var(--lime); font-weight: 700; }

/* ============ FOOT ============ */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 22px clamp(20px, 4vw, 48px) 30px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.foot-dim { color: var(--dim-2); }

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  .arena { grid-template-columns: 1fr; }
  .feed-panel { min-height: 300px; max-height: 46vh; }
  .rule:nth-child(2) { align-self: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .vignette, .ghost, .scroll-hint { animation: none; }
}
