:root {
  color-scheme: dark;
  --bg: #080906;
  --panel: rgba(11, 18, 14, 0.94);
  --panel-soft: rgba(16, 24, 18, 0.82);
  --line: rgba(167, 198, 81, 0.23);
  --line-bright: rgba(240, 195, 51, 0.38);
  --text: #e8e1b8;
  --muted: #95a06f;
  --amber: #f0c333;
  --green: #95d14f;
  --deep-green: #11371c;
  --danger: #ff7c37;
  --chip: #171c13;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(240, 195, 51, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(149, 209, 79, 0.05), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px),
    var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", "Courier New", monospace;
}

body {
  position: relative;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 25%, rgba(255, 255, 255, 0.02) 25% 26%, transparent 26% 74%, rgba(255, 255, 255, 0.02) 74% 75%, transparent 75%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 6px);
  mix-blend-mode: soft-light;
  opacity: 0.35;
}

.topbar,
main,
.footer {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  background: linear-gradient(180deg, rgba(8, 9, 6, 0.96), rgba(8, 9, 6, 0.78));
  backdrop-filter: blur(10px);
}

.topNoticeBar {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-bright);
  background:
    linear-gradient(180deg, rgba(240, 195, 51, 0.14), rgba(149, 209, 79, 0.05)),
    var(--panel);
}

.topNoticeBar span,
.topNoticeBar small {
  color: var(--muted);
}

.topNoticeBar strong {
  color: var(--amber);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.brand,
.topActions,
.buttonRow,
.inlineReadout,
.feeStrip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandMark,
.statusChip,
.eyebrow,
.metricCard span,
.panelHead span,
.inlineReadout span,
.statsGrid span,
.footer span {
  color: var(--muted);
}

.brand {
  gap: 16px;
}

.brandMark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(240, 195, 51, 0.18), rgba(149, 209, 79, 0.08)),
    var(--chip);
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 20px;
}

.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

button,
input,
a {
  font: inherit;
}

button,
a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line-bright);
  background:
    linear-gradient(180deg, rgba(240, 195, 51, 0.18), rgba(149, 209, 79, 0.12)),
    var(--chip);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

button:hover,
a:hover {
  transform: translateY(-1px);
  border-color: var(--amber);
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 10, 0.9);
  color: var(--text);
}

main {
  padding: 26px 0 60px;
}

.launchDeck,
.overviewGrid,
.terminalGrid,
.formGrid,
.statsGrid,
.addressGrid {
  display: grid;
}

.launchDeck {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 24px;
  margin-bottom: 26px;
}

.metricCard,
.panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(149, 209, 79, 0.06), transparent 18%),
    var(--panel);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
}

.panelMintHero {
  padding: 0;
  background:
    linear-gradient(180deg, rgba(202, 202, 202, 0.08), rgba(28, 31, 27, 0.28)),
    #b8b8b1;
  color: #141414;
  border: 2px solid #d4d4ce;
  box-shadow:
    inset 1px 1px 0 #fcfcf8,
    inset -1px -1px 0 #61615d,
    0 18px 44px rgba(0, 0, 0, 0.28);
}

.panelMintHero .eyebrow,
.panelMintHero .inlineReadout span,
.panelMintHero .statsGrid span {
  color: #404040;
}

.panelMintHero .heroLead,
.panelMintHero .inlineReadout strong,
.panelMintHero .statsGrid strong,
.panelMintHero label,
.panelMintHero .feeStrip span {
  color: #111;
}

.panelMintHero h1 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  color: #0e2c8c;
  text-shadow: 2px 2px 0 #f8f8f2;
}

.heroLead {
  margin: 22px 0 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.8;
}

.panelHeadWin98,
.panelMintHero > .eyebrow,
.panelMintHero > h1,
.panelMintHero > .heroLead,
.panelMintHero > .feeStrip,
.panelMintHero > .heroStats,
.panelMintHero > .formBlock {
  margin-left: 24px;
  margin-right: 24px;
}

.panelMintHero > .formBlock:last-child {
  margin-bottom: 24px;
}

.win98TitleBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  background: linear-gradient(90deg, #0a2a93, #2a65dd);
  color: #fff;
  border-bottom: 2px solid #d4d4ce;
}

.win98TitleText,
.win98Controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.win98TitleText strong {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  line-height: 1.4;
}

.win98Dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #f0c333;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.win98Controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 4px;
  border: 1px solid #0d1f62;
  background: #c8c8c0;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  box-shadow: inset 1px 1px 0 #fcfcf8, inset -1px -1px 0 #666;
}

.panelHeadWin98 {
  margin-top: 18px;
  margin-bottom: 16px;
}

.panelHeadWin98 h2 {
  color: #111;
}

.win98Section,
.panelMintHero .heroStats,
.panelMintHero .feeStrip span,
.panelMintHero .inlineReadout {
  border: 2px solid #b0b0aa;
  background: #d4d4ce;
  box-shadow: inset 1px 1px 0 #fcfcf8, inset -1px -1px 0 #70706c;
}

.panelMintHero .heroStats {
  padding: 10px 12px;
}

.panelMintHero .heroStats > div {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.panelMintHero .feeStrip span {
  background: #d4d4ce;
}

.panelMintHero .formBlock {
  padding-top: 16px;
  border-top: 0;
}

.panelMintHero input {
  border: 2px solid #6f6f69;
  background: #fffffb;
  color: #111;
  box-shadow: inset 1px 1px 0 #5b5b58, inset -1px -1px 0 #fcfcf8;
}

.panelMintHero button {
  border: 2px solid #7d7d77;
  background: #d4d4ce;
  color: #111;
  box-shadow: inset 1px 1px 0 #fcfcf8, inset -1px -1px 0 #5f5f5a;
}

.panelMintHero button:hover {
  transform: none;
  border-color: #5a5a55;
}

.feeStrip {
  flex-wrap: wrap;
  margin: 22px 0 0;
}

.feeStrip span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(149, 209, 79, 0.06);
}

.heroStats {
  margin-top: 18px;
}

.heroFormBlock {
  margin-top: 22px;
}

.chaosBoard {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  border: 1px solid rgba(255, 124, 55, 0.32);
  background:
    radial-gradient(circle at 18% 22%, rgba(240, 195, 51, 0.18), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(130, 96, 255, 0.15), transparent 28%),
    radial-gradient(circle at 74% 74%, rgba(149, 209, 79, 0.15), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    #080b0f;
}

.chaosBoard::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, transparent 0 35%, rgba(240, 195, 51, 0.08) 100%);
  pointer-events: none;
}

.chaosStage {
  position: relative;
  height: 100%;
  min-height: 760px;
}

.chaosShot {
  position: absolute;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  mix-blend-mode: screen;
  filter: contrast(1.1) saturate(0.9) sepia(0.18);
}

.shotA {
  top: 3%;
  left: 6%;
  width: 38%;
  aspect-ratio: 3 / 4;
  transform: rotate(-11deg);
}

.shotB {
  top: 7%;
  right: 7%;
  width: 42%;
  aspect-ratio: 5 / 4;
  transform: rotate(9deg);
}

.shotC {
  top: 33%;
  left: 25%;
  width: 46%;
  aspect-ratio: 4 / 5;
  transform: rotate(-4deg);
}

.shotD {
  bottom: 14%;
  left: 4%;
  width: 40%;
  aspect-ratio: 5 / 4;
  transform: rotate(8deg);
}

.shotE {
  bottom: 8%;
  right: 8%;
  width: 33%;
  aspect-ratio: 3 / 4;
  transform: rotate(-13deg);
  opacity: 0.86;
}

.shotF {
  top: 50%;
  right: 22%;
  width: 24%;
  aspect-ratio: 3 / 4;
  transform: rotate(14deg);
  opacity: 0.7;
}

.shotG {
  left: 36%;
  bottom: 10%;
}

.chaosCover {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: 30%;
  min-width: 180px;
  padding: 16px;
  border: 8px solid #d33131;
  background:
    linear-gradient(180deg, rgba(7, 10, 14, 0.86), rgba(31, 14, 18, 0.92)),
    url("./assets/vitalik-techcrunch.jpg") center / cover;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.44);
  transform: rotate(-7deg);
}

.coverMasthead {
  color: #fff1d0;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
}

.chaosCover strong {
  color: #fff1d0;
  font-family: "Press Start 2P", monospace;
  font-size: 22px;
  line-height: 1.45;
}

.chaosCover small {
  color: #f5d96d;
  line-height: 1.6;
}

.chaosCaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 13, 0.78);
  backdrop-filter: blur(8px);
}

.chaosCaption span {
  display: block;
  margin-bottom: 8px;
  color: #f5d96d;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
}

.chaosCaption p {
  margin: 0;
  color: #d6cfaa;
  line-height: 1.7;
}

.overviewGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metricCard,
.panel {
  padding: 18px;
}

.metricAmber {
  background:
    linear-gradient(180deg, rgba(240, 195, 51, 0.12), transparent 24%),
    var(--panel);
}

.metricRed {
  background:
    linear-gradient(180deg, rgba(255, 124, 55, 0.14), transparent 24%),
    var(--panel);
}

.metricGreen {
  background:
    linear-gradient(180deg, rgba(149, 209, 79, 0.12), transparent 24%),
    var(--panel);
}

.metricBlue {
  background:
    linear-gradient(180deg, rgba(92, 155, 255, 0.14), transparent 24%),
    var(--panel);
}

.metricCard strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--amber);
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  line-height: 1.4;
}

.metricCard small {
  color: var(--muted);
  line-height: 1.6;
}

.terminalGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-width: 0;
}

.poolPanel {
  background:
    linear-gradient(180deg, rgba(92, 155, 255, 0.12), transparent 24%),
    var(--panel);
}

.jackpotPanel {
  background:
    linear-gradient(180deg, rgba(255, 124, 55, 0.12), transparent 24%),
    var(--panel);
}

.adminPanel {
  background:
    linear-gradient(180deg, rgba(166, 166, 166, 0.1), transparent 24%),
    var(--panel);
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panelHead h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  line-height: 1.5;
}

.statsGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.statsGrid.compact {
  margin-bottom: 18px;
}

.statsGrid > div,
.inlineReadout,
.formBlock,
.configPanel,
.heroCopy,
.heroPortrait,
.metricCard,
.panel {
  overflow: hidden;
}

.statsGrid > div {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.statsGrid strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  overflow-wrap: anywhere;
}

.formBlock {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.formBlock label {
  display: grid;
  gap: 8px;
}

.inlineReadout {
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--panel-soft);
}

.inlineReadout strong {
  color: var(--amber);
  text-align: right;
}

.buttonRow {
  flex-wrap: wrap;
  margin-top: 12px;
}

.buttonRow button {
  flex: 1 1 180px;
}

.claimBlock button {
  width: 100%;
}

.controlBalances {
  margin-bottom: 18px;
}

.adminWrap[hidden] {
  display: none;
}

.formGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.addressGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.configPanel {
  margin-top: 16px;
  background:
    linear-gradient(180deg, rgba(240, 195, 51, 0.08), transparent 20%),
    var(--panel);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: 0 0 28px;
  font-size: 12px;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid var(--line-bright);
  background: rgba(11, 18, 14, 0.98);
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: 140ms ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .launchDeck,
  .overviewGrid,
  .terminalGrid,
  .addressGrid {
    grid-template-columns: 1fr;
  }

  .chaosBoard,
  .chaosStage {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .topbar,
  .topActions,
  .panelHead,
  .buttonRow,
  .feeStrip,
  .inlineReadout {
    flex-direction: column;
    align-items: stretch;
  }

  .statsGrid,
  .formGrid,
  .addressGrid {
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: flex-start;
  }

  .chaosBoard,
  .chaosStage {
    min-height: 520px;
  }

  .shotA {
    width: 46%;
    left: 2%;
  }

  .shotB {
    width: 48%;
    right: 2%;
  }

  .shotC {
    width: 56%;
    left: 20%;
  }

  .shotD {
    width: 46%;
    left: 1%;
  }

  .shotE {
    width: 40%;
    right: 4%;
  }

  .shotF {
    width: 30%;
    right: 22%;
  }

  .shotG {
    left: 30%;
    width: 38%;
  }
}
