:root {
  --lime: #c6ff00;
  --ink: #141414;
  --rbx: #00b06f;
  --rbx-dark: #008a56;
  --mono: 'Space Mono', ui-monospace, monospace;
  --pixel: 'Press Start 2P', 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--lime);
  background-image: radial-gradient(circle, rgba(13, 13, 13, 0.05) 26%, transparent 27%);
  background-size: 56px 56px;
  color: var(--ink);
  font-family: var(--mono);
  min-height: 100vh;
}

.e-top {
  display: flex;
  justify-content: space-between;
  padding: 28px 4.5vw;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.e-back { color: var(--ink); text-decoration: none; }
.e-back:hover { text-decoration: underline; }

.e-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 20px 80px;
  position: relative;
  z-index: 2;
}

.e-top { position: relative; z-index: 2; }

/* ---- robux cash rain ---- */

.rain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.cash {
  position: absolute;
  top: -60px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 26px;
  background: var(--rbx);
  border: 2px solid var(--rbx-dark);
  border-radius: 3px;
  color: #eafff4;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  animation: cash-fall linear infinite;
}

@keyframes cash-fall {
  from { transform: translateY(-8vh) rotate(var(--rot0)); }
  to { transform: translateY(115vh) rotate(var(--rot1)); }
}

.e-title {
  font-family: var(--pixel);
  font-size: clamp(20px, 4.5vw, 32px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.rbx-hex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rbx);
  color: #fff;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.rbx-hex.big { width: 52px; height: 46px; font-size: 15px; flex: none; }

.e-sub {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.e-card {
  margin-top: 22px;
  background: #fff;
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 4px #fff, 6px 7px 0 4px rgba(0, 0, 0, 0.28);
  padding: 22px;
}

.e-rules p { margin-top: 10px; font-size: 13px; line-height: 1.55; }
.e-rules p:first-child { margin-top: 0; font-family: var(--pixel); font-size: 11px; }

.e-nerds-btn {
  margin-top: 14px;
  font-family: var(--pixel);
  font-size: 9px;
  background: none;
  border: none;
  color: var(--rbx-dark);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.e-nerds {
  margin-top: 14px;
  background: var(--ink);
  color: var(--lime);
  padding: 16px;
  font-size: 11px;
  line-height: 1.7;
}

.e-nerds p { margin-top: 8px; }
.e-nerds p:first-child { margin-top: 0; color: #fff; }

.e-formula {
  font-family: var(--pixel);
  font-size: 11px;
  background: var(--ink);
  color: var(--lime);
  padding: 10px 12px;
  display: inline-block;
}

.e-label {
  font-family: var(--pixel);
  font-size: 10px;
  display: block;
  margin-bottom: 12px;
}

.e-inputrow { display: flex; gap: 10px; }

.e-input {
  flex: 1;
  padding: 14px;
  font-family: var(--mono);
  font-size: 13px;
  border: 4px solid var(--ink);
  outline: none;
}

.e-input:focus { box-shadow: 4px 4px 0 0 var(--ink); }

.e-btn {
  font-family: var(--pixel);
  font-size: 11px;
  padding: 0 22px;
  background: var(--rbx);
  color: #fff;
  border: 4px solid var(--ink);
  cursor: pointer;
}

.e-btn:hover { background: var(--rbx-dark); }

.e-status { margin-top: 10px; font-size: 11px; min-height: 14px; letter-spacing: 0.08em; }

/* the claim hold, and anything else that has to stop someone */
.e-status.error {
  color: #d81f1f;
  font-weight: 700;
}

/* Shown across the results whenever the numbers came from the demo fallback
   instead of the chain — nobody should mistake a demo score for a real one. */
.e-demo {
  margin: -6px 0 18px;
  padding: 16px 14px;
  background: #d81f1f;
  color: #fff;
  border: 4px solid var(--ink);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.3);
  font-family: var(--pixel);
  font-size: clamp(11px, 2.6vw, 15px);
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-align: center;
  animation: demo-throb 1.4s ease-in-out infinite;
}

@keyframes demo-throb {
  0%, 100% { background: #d81f1f; }
  50% { background: #ad1414; }
}

@media (prefers-reduced-motion: reduce) {
  .e-demo { animation: none; }
}

/* ---- progress bar ---- */

.e-barwrap { padding: 26px 8px 4px; }

.e-bar {
  position: relative;
  height: 34px;
  background: #e8e8e8;
  border: 4px solid var(--ink);
}

.e-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    45deg, var(--rbx), var(--rbx) 12px, #00c67d 12px, #00c67d 24px
  );
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.e-mark {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 4px;
  background: var(--ink);
  transform: translateX(-2px);
}

.e-flag {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--pixel);
  font-size: 9px;
  background: var(--ink);
  color: var(--lime);
  padding: 4px 6px;
  white-space: nowrap;
}

.e-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.e-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
  margin-top: 22px;
}

.e-stats dt { font-size: 9px; letter-spacing: 0.25em; opacity: 0.6; }
.e-stats dd { font-size: 15px; font-weight: 700; margin-top: 5px; }

.e-next {
  margin-top: 18px;
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.8;
  color: var(--rbx-dark);
}

.e-note { margin-top: 20px; font-size: 10px; letter-spacing: 0.15em; opacity: 0.65; text-align: center; }

/* ---- claim ---- */

.e-claimbox {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 4px solid var(--ink);
}

.e-claimline { font-size: 11px; letter-spacing: 0.08em; margin-bottom: 12px; }

.e-btn:disabled,
.e-input:disabled {
  background: #b9c4bd;
  color: #6d7a72;
  cursor: not-allowed;
}

.e-btn:disabled:hover { background: #b9c4bd; }
