:root {
  --bg: #020814;
  --bg-gradient: linear-gradient(135deg, #020814, #0c0e2e);
  --surface: #0e1130;
  --accent: #60a5fa;
  --accent2: #fde047;
  --text: #f0f9ff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text);
  font-family: "Roboto Condensed", sans-serif;
  margin: 0;
}

.page-shell {
  position: relative;
  overflow-x: hidden;
}

.space-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.space-bg::before,
.space-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.space-bg::before {
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 80% 60%, #fff, transparent),
    radial-gradient(2px 2px at 60% 10%, #fff, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(2px 2px at 90% 20%, #fff, transparent);
  animation: starDrift 70s linear infinite;
  opacity: 0.45;
}

.space-bg::after {
  background:
    radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.22), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(253, 224, 71, 0.12), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(120, 80, 255, 0.12), transparent 35%);
  animation: nebulaWash 18s ease-in-out infinite alternate;
}

.meteor {
  position: fixed;
  top: -10%;
  width: 2px;
  height: 120px;
  background: linear-gradient(to bottom, rgba(253, 224, 71, 0), rgba(253, 224, 71, 0.9));
  transform: rotate(25deg);
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
  animation: meteorFall 7s linear infinite;
}

.meteor.m2 {
  left: 70%;
  animation-delay: 2.4s;
}

.meteor.m1 {
  left: 30%;
}

.meteor.m3 {
  left: 85%;
  animation-delay: 4.5s;
}

header.main-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 12, 40, 0.92);
  border-bottom: 1px solid rgba(96, 165, 250, 0.25);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Audiowide", cursive;
  font-size: 0.95rem;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(253, 224, 71, 0.5);
}

.top-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.top-nav a:hover,
.top-nav a.active {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(96, 165, 250, 0.15);
}

.hud {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  background: var(--surface);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 110px;
}

h1, h2, h3 {
  font-family: "Audiowide", cursive;
  margin: 0 0 10px;
}

.card {
  background: rgba(14, 17, 48, 0.88);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.muted {
  color: var(--text-muted);
}

.ticker {
  margin-bottom: 14px;
  border: 1px solid rgba(253, 224, 71, 0.35);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(10, 15, 50, 0.9);
}

.ticker-track {
  white-space: nowrap;
  display: inline-block;
  padding: 10px 0;
  animation: tickerMove 30s linear infinite;
}

.ticker-track span {
  margin-right: 36px;
  color: #fff7c4;
}

.hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 310px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  margin-bottom: 18px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.38;
}

.planet {
  position: absolute;
  right: -80px;
  top: 30px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #60a5fa, #1f3c8e 62%, #0a133c);
  opacity: 0.45;
  animation: planetSpin 26s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-content img {
  width: 160px;
  max-width: 40vw;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.hero-copy h1 {
  font-size: clamp(1.2rem, 2.2vw, 2rem);
}

.bonus-row,
.slot-grid,
.quest-grid,
.feature-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.slot-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.media {
  border-radius: 10px;
  overflow: hidden;
  height: 145px;
  margin-bottom: 10px;
  background: rgba(96, 165, 250, 0.12);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  background: linear-gradient(140deg, rgba(96, 165, 250, 0.35), rgba(253, 224, 71, 0.2));
  color: var(--text);
  font-family: "Audiowide", cursive;
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  background: rgba(96, 165, 250, 0.25);
  border: 1px solid rgba(96, 165, 250, 0.65);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
}

button,
.btn {
  background: linear-gradient(120deg, var(--accent), #3b82f6);
  border: 0;
  color: #001126;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 700;
  font-family: "Roboto Condensed", sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button.alt,
.btn.alt {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

button.gold {
  background: linear-gradient(120deg, var(--accent2), #facc15);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin: 6px 0;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.slot-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.slot-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bet-btns {
  display: flex;
  gap: 8px;
}

.bet-btns button.active {
  outline: 2px solid var(--accent2);
}

.grid-board {
  display: grid;
  gap: 4px;
  justify-content: center;
  align-content: start;
  padding: 12px;
  background: rgba(5, 9, 33, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.cell {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 1.2rem;
}

.age-gate,
.name-gate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(1, 2, 12, 0.85);
  z-index: 99999;
  padding: 16px;
}

.name-gate {
  z-index: 9999;
}

.modal {
  width: min(560px, 96vw);
  background: #0a0f32;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}

.chips button {
  padding: 6px 10px;
  font-size: 0.9rem;
}

input[type="text"] {
  width: 100%;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 10px;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(7, 11, 36, 0.95);
  border-top: 1px solid rgba(96, 165, 250, 0.35);
  padding: 12px 16px;
  display: none;
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

footer {
  border-top: 1px solid rgba(96, 165, 250, 0.25);
  padding: 18px 16px 90px;
  background: rgba(8, 12, 35, 0.86);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
}

.toast-wrap {
  position: fixed;
  top: 78px;
  right: 12px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast {
  background: #131a4d;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 9px;
  padding: 8px 10px;
  min-width: 220px;
}

.wheel {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.25);
  margin: 4px auto 10px;
  background: conic-gradient(
    #60a5fa 0deg 45deg,
    #1d4ed8 45deg 90deg,
    #fde047 90deg 135deg,
    #60a5fa 135deg 180deg,
    #1d4ed8 180deg 225deg,
    #fde047 225deg 270deg,
    #60a5fa 270deg 315deg,
    #1d4ed8 315deg 360deg
  );
  position: relative;
  transition: transform 3s cubic-bezier(0.18, 0.76, 0.2, 1);
}

.wheel::after {
  content: "▲";
  position: absolute;
  top: -18px;
  left: calc(50% - 8px);
  color: var(--accent2);
  font-size: 16px;
}

.leader-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  padding: 8px;
  border-radius: 9px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.leader-row.me {
  border: 1px solid rgba(253, 224, 71, 0.6);
  background: rgba(253, 224, 71, 0.1);
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.ach {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ach.locked {
  filter: grayscale(1);
  opacity: 0.65;
}

.coin-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}

.coin {
  position: absolute;
  top: -10px;
  animation: coinDrop 1.6s linear forwards;
  font-size: 1.1rem;
}

@keyframes tickerMove {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes starDrift {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(120px);
  }
}

@keyframes nebulaWash {
  from {
    opacity: 0.9;
  }
  to {
    opacity: 0.55;
  }
}

@keyframes planetSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes meteorFall {
  0% {
    transform: translate(0, 0) rotate(25deg);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  100% {
    transform: translate(-460px, 840px) rotate(25deg);
    opacity: 0;
  }
}

@keyframes coinDrop {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.2;
  }
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .hud {
    justify-content: flex-start;
  }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
