:root {
  color-scheme: dark;
  --gold: #ffd34a;
  --orange: #ff981f;
  --cyan: #28c8ff;
  --blue: #247cf4;
  --violet: #7b44ff;
  --green: #6fdf4f;
  --panel: rgba(9, 15, 31, 0.78);
  --stroke: rgba(149, 214, 255, 0.32);
  --sprite: url("./assets/space-miner-sprites.png");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family:
    Inter, ui-rounded, "Arial Rounded MT Bold", "Microsoft YaHei", system-ui,
    sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(88, 51, 190, 0.42), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(35, 179, 255, 0.22), transparent 30rem),
    linear-gradient(180deg, #060914, #0a0e1c 42%, #050710);
  color: #fff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 68px 68px;
  opacity: 0.4;
  animation: gridDrift 10s linear infinite;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(124, 206, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(5, 9, 23, 0.15), rgba(5, 9, 23, 0.72)),
    url("./assets/hero-bg.png") center / cover no-repeat,
    #050917;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--scan-x, 68%) 54%, rgba(39, 195, 255, 0.2), transparent 13rem),
    linear-gradient(180deg, rgba(4, 7, 18, 0.16), rgba(4, 7, 18, 0.18) 48%, rgba(4, 7, 18, 0.86));
  animation: scanner 5s ease-in-out infinite alternate;
}

.nav-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1240px, calc(100% - 36px));
  min-height: 78px;
  margin: 0 auto;
}

.logo-lockup,
.wallet-button,
.secondary-cta,
.primary-cta,
.terminal-card,
.status-dock,
.ticker,
.metrics-band article,
.pool-card,
.asset-card,
.roadmap article,
.contract-strip {
  border: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(16, 27, 56, 0.78), rgba(7, 10, 26, 0.72)),
    var(--panel);
  backdrop-filter: blur(16px) saturate(1.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 18px 46px rgba(0, 0, 0, 0.34);
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  font-weight: 1000;
}

.logo-orbit {
  width: 34px;
  height: 34px;
  border: 3px solid #f8cf54;
  border-radius: 50%;
  background-image: var(--sprite);
  background-position: 0 0;
  background-size: 190px 190px;
  box-shadow: 0 0 14px rgba(255, 211, 74, 0.62);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  color: #cde7ff;
  font-size: 14px;
  font-weight: 900;
}

.nav-links a {
  text-shadow: 0 0 12px rgba(40, 200, 255, 0.2);
}

.wallet-button,
.secondary-cta,
.primary-cta {
  min-height: 46px;
  border-radius: 999px;
  color: #fff;
  font-weight: 1000;
}

.wallet-button {
  padding: 0 18px;
  color: #06101f;
  border: 0;
  background: linear-gradient(180deg, #fff1a1, #ffd34a 45%, #ff981f);
  box-shadow:
    0 -4px 0 rgba(128, 77, 0, 0.28) inset,
    0 0 22px rgba(255, 211, 74, 0.35);
}

.hero-content {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 560px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  width: min(1240px, calc(100% - 36px));
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  padding: 40px 0 120px;
}

.hero-copy {
  max-width: 680px;
}

.brand-kicker {
  display: block;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 6px;
  background: linear-gradient(180deg, #6547ff, #4022bb);
  color: white;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #1c126c;
}

h1 {
  margin: 16px 0 0;
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.88;
  letter-spacing: 0;
  color: var(--gold);
  text-shadow:
    0 7px 0 #9d4c05,
    0 0 22px rgba(255, 217, 68, 0.56),
    0 0 52px rgba(65, 157, 255, 0.42);
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.88);
}

.hero-copy p {
  max-width: 610px;
  margin: 24px 0 0;
  color: #d7ecff;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 800;
  line-height: 1.75;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 0 24px;
  border: 0;
  font-size: 17px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.primary-cta {
  background: linear-gradient(180deg, #9af05c, #48b847);
  box-shadow:
    0 -5px 0 rgba(0, 0, 0, 0.22) inset,
    0 0 28px rgba(99, 225, 72, 0.35);
}

.secondary-cta {
  background: linear-gradient(180deg, rgba(48, 94, 191, 0.85), rgba(25, 50, 135, 0.8));
}

.contract-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: fit-content;
  margin-top: 22px;
  padding: 12px 16px;
  border-radius: 8px;
}

.contract-strip span,
.contract-strip em {
  color: #92c6ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.contract-strip strong {
  color: #fff;
}

.terminal-card {
  padding: 18px;
  border-radius: 8px;
  animation: terminalGlow 2.8s ease-in-out infinite;
}

.panel-header,
.resource-row,
.button-row,
.intensity {
  display: flex;
  align-items: center;
}

.panel-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-header span,
.stat span,
.dock-label,
.intensity span,
.section-heading span,
.metrics-band span,
.pool-card span,
.asset-card span {
  display: block;
  color: #92c6ff;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0;
}

.panel-header strong {
  color: #7fffdc;
  text-shadow: 0 0 12px rgba(61, 255, 213, 0.65);
}

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

.stat {
  min-height: 84px;
  padding: 13px 14px;
  border: 1px solid rgba(149, 214, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 24, 52, 0.88), rgba(4, 8, 20, 0.85));
}

.stat strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 1000;
  text-overflow: ellipsis;
  text-shadow: 0 0 12px rgba(43, 204, 255, 0.7);
  white-space: nowrap;
}

.resource-row {
  gap: 10px;
  margin: 14px 0;
}

.resource {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 5px 13px 5px 6px;
  border: 2px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(43, 47, 65, 0.9), rgba(12, 15, 27, 0.9));
}

.resource i,
.pool-icon {
  flex: 0 0 auto;
  background-image: var(--sprite);
  background-size: 374px 374px;
}

.resource i {
  width: 34px;
  height: 34px;
}

.resource.bitcoin i {
  background-position: -164px -351px;
}

.resource.purple i {
  background-position: -220px -351px;
}

.resource.blue i {
  background-position: -274px -351px;
}

.resource span {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(15px, 1.55vw, 22px);
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource.bitcoin {
  box-shadow: 0 0 18px rgba(255, 202, 54, 0.2) inset;
}

.resource.purple {
  box-shadow: 0 0 18px rgba(145, 72, 255, 0.28) inset;
}

.resource.blue {
  box-shadow: 0 0 18px rgba(52, 207, 255, 0.25) inset;
}

.intensity {
  gap: 12px;
  margin-bottom: 12px;
}

.intensity input {
  min-width: 0;
  flex: 1;
  accent-color: var(--cyan);
}

.intensity strong {
  width: 24px;
  color: var(--cyan);
  text-align: right;
}

.energy-shell {
  height: 22px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.energy-shell span {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #f9c32b, #ffef41 24%, #6ddd4e 68%, #34b95b),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, 0.22) 22px 24px);
  box-shadow:
    0 0 16px rgba(255, 225, 54, 0.72),
    0 0 22px rgba(56, 213, 79, 0.45);
  transition: width 0.22s ease;
}

.button-row {
  gap: 12px;
  margin-top: 14px;
}

.button-row button {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 54px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 1000;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
  box-shadow:
    0 -5px 0 rgba(0, 0, 0, 0.22) inset,
    0 3px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.button-row button::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: -120% 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  animation: buttonGlint 2.7s ease-in-out infinite;
}

.button-row button span {
  position: relative;
  z-index: 1;
}

.play-button {
  background: linear-gradient(180deg, #9af05c, #48b847);
}

.shop-button {
  background: linear-gradient(180deg, #ffd845, #f29b20);
}

.upgrade-button {
  background: linear-gradient(180deg, #66bbff, #1b66d6);
}

.is-mining .play-button,
.is-mining .primary-cta {
  animation: playPulse 1.1s ease-in-out infinite;
}

.status-dock {
  position: absolute;
  left: max(18px, calc((100vw - 1240px) / 2));
  bottom: 54px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(360px, calc(100vw - 36px));
  padding: 12px;
  border-radius: 8px;
}

.avatar-sprite {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border: 3px solid #f8cf54;
  border-radius: 50%;
  background-image: var(--sprite);
  background-position: 0 0;
  background-size: 414px 414px;
  box-shadow:
    0 0 18px rgba(255, 213, 67, 0.65),
    0 0 26px rgba(37, 196, 255, 0.35) inset;
  animation: minerBreath 2.4s ease-in-out infinite;
}

.status-dock strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 23px;
  text-shadow: 0 0 16px rgba(255, 213, 70, 0.7);
}

.ticker {
  position: absolute;
  right: max(18px, calc((100vw - 1240px) / 2));
  bottom: 54px;
  z-index: 4;
  display: flex;
  width: min(520px, calc(100vw - 36px));
  gap: 18px;
  overflow: hidden;
  padding: 12px 16px;
  border-radius: 8px;
  color: #cde7ff;
  font-size: 13px;
  font-weight: 900;
}

.ticker span {
  flex: 0 0 auto;
  animation: tickerMove 8s linear infinite;
}

.metrics-band,
.content-section {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 28px 0 8px;
}

.metrics-band article {
  min-height: 118px;
  padding: 18px;
  border-radius: 8px;
}

.metrics-band strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  text-shadow: 0 0 16px rgba(40, 200, 255, 0.5);
}

.metrics-band em {
  display: block;
  margin-top: 4px;
  color: #aacceb;
  font-style: normal;
  font-weight: 800;
}

.content-section {
  padding: 72px 0 0;
}

.roadmap-section {
  padding-bottom: 80px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 0 24px rgba(40, 200, 255, 0.28);
}

.pool-grid,
.asset-grid,
.roadmap {
  display: grid;
  gap: 16px;
}

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

.pool-card {
  min-height: 210px;
  padding: 18px;
  border-radius: 8px;
}

.pool-card.active {
  border-color: rgba(255, 211, 74, 0.62);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 34px rgba(255, 211, 74, 0.18);
}

.pool-icon {
  width: 82px;
  height: 70px;
  margin-bottom: 26px;
  filter: drop-shadow(0 0 14px rgba(40, 200, 255, 0.34));
}

.gold-icon {
  background-position: -191px -282px;
}

.blue-icon {
  background-position: -267px -282px;
}

.purple-icon {
  background-position: -305px -280px;
}

.pool-card strong {
  display: block;
  margin: 8px 0 14px;
  color: var(--gold);
  font-size: 30px;
  text-shadow: 0 0 18px rgba(255, 211, 74, 0.36);
}

.pool-meter {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
}

.pool-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28c8ff, #7b44ff, #ffd34a);
  box-shadow: 0 0 18px rgba(40, 200, 255, 0.45);
  animation: meterPulse 1.8s ease-in-out infinite;
}

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

.asset-card {
  min-height: 260px;
  padding: 18px;
  border-radius: 8px;
}

.asset-image {
  width: 100%;
  height: 144px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 16px;
  border-radius: 8px;
  background-color: rgba(5, 10, 23, 0.72);
  box-shadow:
    0 0 0 1px rgba(149, 214, 255, 0.18) inset,
    0 0 28px rgba(40, 200, 255, 0.14);
}

.contain-image {
  object-fit: contain;
  padding: 12px;
}

.asset-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 22px;
}

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

.roadmap article {
  min-height: 190px;
  padding: 20px;
  border-radius: 8px;
}

.roadmap article span {
  color: var(--gold);
  font-size: 34px;
  font-weight: 1000;
  text-shadow: 0 0 16px rgba(255, 211, 74, 0.4);
}

.roadmap article strong {
  display: block;
  margin-top: 18px;
  font-size: 22px;
}

.roadmap article p {
  margin: 10px 0 0;
  color: #cde7ff;
  line-height: 1.65;
  font-weight: 700;
}

@keyframes gridDrift {
  to {
    background-position: 68px 68px;
  }
}

@keyframes scanner {
  from {
    --scan-x: 30%;
  }

  to {
    --scan-x: 78%;
  }
}

@keyframes minerBreath {
  50% {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
      0 0 25px rgba(255, 213, 67, 0.85),
      0 0 32px rgba(37, 196, 255, 0.48) inset;
  }
}

@keyframes buttonGlint {
  45%,
  100% {
    translate: 130% 0;
  }
}

@keyframes playPulse {
  50% {
    filter: saturate(1.35) brightness(1.12);
    transform: translateY(-1px);
  }
}

@keyframes tickerMove {
  to {
    transform: translateX(-240px);
  }
}

@keyframes terminalGlow {
  50% {
    border-color: rgba(149, 214, 255, 0.62);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 18px 46px rgba(0, 0, 0, 0.34),
      0 0 34px rgba(40, 200, 255, 0.2);
  }
}

@keyframes meterPulse {
  50% {
    filter: brightness(1.28) saturate(1.35);
  }
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .terminal-card {
    max-width: 720px;
  }

  .metrics-band,
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pool-grid,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .status-dock,
  .ticker {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(720px, calc(100% - 36px));
    margin: 0 auto 14px;
  }
}

@media (max-width: 760px) {
  .nav-bar {
    flex-wrap: wrap;
    padding-top: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
  }

  .hero-content {
    width: min(100% - 24px, 1240px);
    padding-bottom: 36px;
  }

  h1 {
    font-size: 54px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .terminal-card {
    padding: 12px;
  }

  .stats-grid,
  .metrics-band,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .resource-row,
  .button-row {
    flex-wrap: wrap;
  }

  .resource,
  .button-row button {
    flex-basis: calc(50% - 8px);
  }

  .button-row .play-button {
    flex-basis: 100%;
  }

  .ticker {
    display: none;
  }
}
