:root {
  --bg: #050505;
  --surface: #0c0c0c;
  --panel: #111111;
  --green: #39ff14;
  --green-dim: rgba(57, 255, 20, 0.15);
  --green-glow: rgba(57, 255, 20, 0.45);
  --text: #e8ffe8;
  --muted: #6b8f6b;
  --line: rgba(57, 255, 20, 0.35);
  --danger: #ff4444;
  --font-display: "Orbitron", sans-serif;
  --font-mono: "Share Tech Mono", monospace;
  --max: 1080px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-shadow: 0 0 8px var(--green-glow); }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 300;
  background: var(--green);
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  font-weight: 600;
}
.skip:focus { top: 0.75rem; }

.glow-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("../img/bg-texture.png") center / cover no-repeat,
    radial-gradient(ellipse 60% 40% at 50% 15%, rgba(57, 255, 20, 0.08), transparent),
    var(--bg);
}

.wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-inline: 1.2rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}
@media (min-width: 861px) {
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .brand { justify-self: start; }
  .nav-links { justify-self: center; }
  .nav-inner > #connectBtn { justify-self: end; }
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--green);
  text-shadow: 0 0 12px var(--green-glow);
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  font-size: 0.85rem;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--green); }
.x-link {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  color: var(--green);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--green);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: box-shadow 0.2s, transform 0.12s;
}
.btn-glow {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  box-shadow: 0 0 12px var(--green-dim), inset 0 0 12px var(--green-dim);
}
.btn-glow:hover {
  box-shadow: 0 0 24px var(--green-glow), inset 0 0 16px var(--green-dim);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--green); border-color: var(--green); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.arena {
  padding: 1.5rem 0 0.5rem;
  text-align: center;
}

.status-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  background: var(--surface);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.tagline {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
}
.tagline-sub {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

.hud-panel {
  position: relative;
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.95), rgba(5, 5, 5, 0.98));
  border: 1px solid var(--line);
  box-shadow:
    0 0 30px rgba(57, 255, 20, 0.08),
    inset 0 1px 0 rgba(57, 255, 20, 0.12);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 1.5rem 1.2rem 1rem;
}

.hero-panel { margin-top: 0.5rem; }

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.bomb-wrap { flex: 0 0 auto; }
.bomb-img {
  width: min(240px, 42vw);
  height: auto;
  filter: drop-shadow(0 0 28px rgba(57, 255, 20, 0.35));
  animation: bomb-float 4s ease-in-out infinite;
}
@keyframes bomb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.fuse-bridge {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fuse-arrow {
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green), var(--green));
  box-shadow: 0 0 12px var(--green-glow);
  position: relative;
}
.fuse-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--green);
  filter: drop-shadow(0 0 6px var(--green));
}

.timer-stack {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: min(320px, 50vw);
}

.mega-clock {
  text-align: center;
}

.mega-digits {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4rem, 16vw, 8rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--green);
  text-shadow:
    0 0 20px var(--green-glow),
    0 0 60px rgba(57, 255, 20, 0.3);
  font-variant-numeric: tabular-nums;
}
.mega-digits .sep {
  opacity: 0.5;
  margin: 0 0.05em;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

.mega-clock.ending .mega-digits {
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
  animation: shake 0.4s infinite;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.clock-label {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.4rem auto 0;
  padding: 1rem 0.75rem;
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.9), rgba(5, 5, 5, 0.95));
  border: 1px solid var(--line);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.06);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  overflow-x: auto;
}
.flow-step {
  flex: 1 1 140px;
  min-width: 120px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.25rem;
}
.flow-step img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.2));
}
.flow-num {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 8px var(--green-dim);
}
.flow-step b {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.flow-step span:last-child {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
}
.flow-arrow {
  flex: 0 0 28px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  position: relative;
  margin-top: 2rem;
}
.flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left: 7px solid var(--green);
}

.pot-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pot-block, .holder-block { text-align: center; }
.label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.pot-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 12px var(--green-glow);
}
.pot-value small {
  font-size: 0.35em;
  color: var(--muted);
  margin-left: 0.3em;
}
.holder-block b {
  font-size: 1rem;
  color: var(--text);
}
.holder-block.you b { color: var(--green); text-shadow: 0 0 8px var(--green-glow); }

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1.2rem auto 0;
}
.strip .cell {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.85rem 0.5rem;
  text-align: center;
}
.strip .cell b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green);
}
.strip .cell span {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel, .card {
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.95), rgba(8, 8, 8, 0.98));
  border: 1px solid var(--line);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.05);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  padding: 1.25rem 1.3rem;
}
.panel-head h2, .how h2, .card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.35rem;
}
.panel-head p, .card .sub, .how .lead { color: var(--muted); font-size: 0.85rem; }

.podium { list-style: none; }
.podium li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  background: var(--panel);
}
.podium .place { color: var(--green); font-weight: 700; }
.podium .cut { color: var(--text); }
.podium li.you { background: var(--green-dim); border-color: var(--green); }
.podium li.empty {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  margin: 1.2rem auto 2rem;
}
.card { text-align: left; }
.card .sub { margin-bottom: 1rem; }

.field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem 0.45rem 0.9rem;
}
.field input {
  flex: 1;
  background: none;
  border: none;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 1.2rem;
  outline: none;
  min-width: 0;
}
.field .unit { color: var(--muted); font-size: 0.85rem; }
.chip {
  font-size: 0.72rem;
  color: var(--green);
  border: 1px solid var(--line);
  padding: 0.25rem 0.45rem;
  background: var(--surface);
}
.chip:hover { border-color: var(--green); box-shadow: 0 0 8px var(--green-dim); }

.preview {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.4rem 0;
}
.preview b { color: var(--text); }
.big-buy { width: 100%; margin-top: 1rem; padding: 0.9rem; }

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
  gap: 1rem;
  font-size: 0.85rem;
}
.stat-row span { color: var(--muted); }
.stat-row b { color: var(--text); }
.stat-row b.green { color: var(--green); }

.status-pill {
  font-size: 0.75rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.status-pill.holder {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}

.actions { display: grid; gap: 0.5rem; margin-top: 1rem; }
.actions .btn { justify-content: center; width: 100%; }

.how { margin: 2rem auto 2.5rem; text-align: center; }
.how .lead { max-width: 560px; margin: 0 auto 1.4rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; text-align: left; }
.step {
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.95), rgba(8, 8, 8, 0.98));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  padding: 1.1rem;
}
.step img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.2));
}
.step .n {
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.step h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  margin: 0.35rem 0;
  letter-spacing: 0.06em;
}
.step p { color: var(--muted); font-size: 0.82rem; }

footer {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding: 1.4rem 0 2rem;
}
.foot-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.brand-sm {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.foot-links { display: flex; gap: 1rem; }
.addr { font-size: 0.75rem; }
.warn, .warn-buy { font-size: 0.75rem; color: var(--muted); text-align: center; }
.warn { margin-top: 1rem; }
.warn-buy { margin-top: 0.7rem; }
.badge {
  font-size: 0.62rem;
  color: var(--green);
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
}
.is-hidden { display: none !important; }
.noscript { padding: 1rem; color: var(--green); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--panel);
  color: var(--green);
  border: 1px solid var(--green);
  box-shadow: 0 0 20px var(--green-dim);
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { color: var(--danger); border-color: var(--danger); box-shadow: 0 0 20px rgba(255,68,68,0.3); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .pot-row { gap: 1.5rem; }
  .fuse-bridge { display: none; }
  .hero-visual { flex-direction: column; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0.35rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.65rem 1rem; text-align: center; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot, .mega-digits .sep, .mega-clock.ending .mega-digits, .bomb-img { animation: none; }
}
@media (min-width: 861px) {
  .foot-inner { justify-content: space-between; }
}
