:root {
  --cyan: #67f4ff;
  --pink: #ff57b8;
  --white-soft: rgba(255, 255, 255, 0.84);
  --panel: rgba(10, 14, 28, 0.72);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Rajdhani', sans-serif;
}

body {
  min-height: 100vh;
  color: white;
  background: radial-gradient(circle at top, #142655 0%, #050816 44%, #020307 100%);
}

.galaxy {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.stars {
  position: absolute;
  width: 200%;
  height: 200%;
  background-repeat: repeat;
  animation: drift linear infinite;
}

.stars.small {
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 22%, #cad7ff, transparent),
    radial-gradient(1px 1px at 48% 72%, #fff, transparent);
  animation-duration: 130s;
  opacity: 0.45;
}

.stars.medium {
  background-image:
    radial-gradient(2px 2px at 14% 54%, #fff, transparent),
    radial-gradient(2px 2px at 80% 18%, #e0ecff, transparent);
  animation-duration: 78s;
  opacity: 0.7;
}

.stars.big {
  background-image:
    radial-gradient(3px 3px at 34% 26%, #fff, transparent),
    radial-gradient(2px 2px at 74% 66%, #fff, transparent);
  animation-duration: 46s;
  opacity: 0.86;
}

.nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 28%, rgba(0, 196, 255, 0.18), transparent 34%),
    radial-gradient(circle at 76% 22%, rgba(255, 87, 184, 0.16), transparent 28%),
    radial-gradient(circle at 56% 76%, rgba(88, 255, 182, 0.08), transparent 32%);
  filter: blur(92px);
}

.shooting-star {
  position: absolute;
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 1), transparent);
  transform: rotate(25deg);
  animation: shoot 6s linear infinite;
  opacity: 0;
}

.shooting-star:nth-child(1) {
  top: 18%;
  left: -10%;
}

.shooting-star:nth-child(2) {
  top: 58%;
  left: -20%;
  animation-delay: 2.6s;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-540px, -980px); }
}

@keyframes shoot {
  0% {
    transform: translate(0, 0) rotate(25deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(1360px, 340px) rotate(25deg);
    opacity: 0;
  }
}

.mobile-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.top-icons {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 5;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.corner-badge {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  z-index: 5;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 12, 24, 0.68);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn .material-symbols-rounded {
  font-size: 1.15rem;
  line-height: 1;
}

.coin-total-badge {
  min-width: 52px;
  min-height: 52px;
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 20px;
  background: rgba(8, 12, 24, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.coin-total-badge-wide {
  grid-template-columns: auto auto;
  gap: 10px;
  min-width: 132px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 18px;
  justify-items: start;
}

.coin-total-badge .material-symbols-rounded {
  font-size: 1rem;
  color: #ffd76f;
}

.coin-total-badge strong {
  font-family: 'Audiowide', sans-serif;
  font-size: 0.78rem;
  color: #ffd76f;
}

.coin-total-copy {
  display: grid;
  gap: 2px;
}

.coin-total-copy span {
  font-size: 0.58rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: rgba(255, 244, 214, 0.66);
  font-weight: 700;
}

.coin-total-copy strong {
  font-size: 1rem;
}

.launch-panel {
  width: min(100%, 460px);
  min-height: min(100svh - 36px, 820px);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-items: center;
  justify-items: center;
  text-align: center;
  gap: 18px;
}

.eyebrow {
  letter-spacing: 0.34rem;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--cyan);
  font-weight: 700;
}

.title {
  font-family: 'Audiowide', sans-serif;
  font-size: clamp(2.7rem, 14vw, 4.8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.12rem;
  background: linear-gradient(90deg, #ebfdff 0%, #69e9ff 36%, #89a6ff 74%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stage {
  position: relative;
  width: min(80vw, 320px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.space-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.space-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 16px rgba(103, 244, 255, 0.42);
  animation: orbitParticle linear infinite;
}

.space-particles span:nth-child(1) { top: 14%; left: 10%; animation-duration: 10s; }
.space-particles span:nth-child(2) { top: 24%; left: 78%; animation-duration: 14s; width: 3px; height: 3px; }
.space-particles span:nth-child(3) { top: 36%; left: 28%; animation-duration: 12s; }
.space-particles span:nth-child(4) { top: 48%; left: 88%; animation-duration: 16s; width: 5px; height: 5px; }
.space-particles span:nth-child(5) { top: 58%; left: 16%; animation-duration: 11s; }
.space-particles span:nth-child(6) { top: 70%; left: 72%; animation-duration: 13s; width: 3px; height: 3px; }
.space-particles span:nth-child(7) { top: 78%; left: 38%; animation-duration: 15s; }
.space-particles span:nth-child(8) { top: 18%; left: 56%; animation-duration: 9s; width: 5px; height: 5px; }
.space-particles span:nth-child(9) { top: 30%; left: 46%; animation-duration: 17s; }
.space-particles span:nth-child(10) { top: 54%; left: 60%; animation-duration: 12s; width: 3px; height: 3px; }
.space-particles span:nth-child(11) { top: 66%; left: 84%; animation-duration: 11s; }
.space-particles span:nth-child(12) { top: 82%; left: 20%; animation-duration: 14s; width: 5px; height: 5px; }

@keyframes orbitParticle {
  0% {
    transform: translate3d(0, 0, 0) scale(0.85);
    opacity: 0.35;
  }
  50% {
    transform: translate3d(10px, -18px, 0) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate3d(-8px, -36px, 0) scale(0.8);
    opacity: 0.2;
  }
}

.energy-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ring-a {
  inset: 10%;
  box-shadow: 0 0 40px rgba(103, 244, 255, 0.12);
}

.ring-b {
  inset: 22%;
  border-color: rgba(255, 87, 184, 0.22);
  transform: rotate(18deg);
}

.player-showcase {
  position: relative;
  width: 112px;
  height: 182px;
  border-radius: 42px 42px 22px 22px;
  background: linear-gradient(180deg, #f7ffff 0%, #90eaff 20%, #0d92ff 58%, #031f55 100%);
  box-shadow:
    0 0 36px rgba(103, 244, 255, 0.42),
    0 24px 54px rgba(0, 0, 0, 0.34),
    inset 0 0 18px rgba(255, 255, 255, 0.34);
  transform-style: preserve-3d;
  animation: spinShip 7s ease-in-out infinite;
}

.showcase-cockpit {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 52px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(144, 234, 255, 0.56));
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.28);
}

.showcase-boost {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 36px;
  height: 36px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #67f4ff 42%, rgba(103, 244, 255, 0) 76%);
  filter: blur(1px);
}

@keyframes spinShip {
  0%, 100% {
    transform: rotateY(-24deg) rotateX(10deg) translateY(0);
  }
  50% {
    transform: rotateY(24deg) rotateX(-8deg) translateY(-8px);
  }
}

.launch-actions {
  width: 100%;
  display: grid;
  gap: 12px;
  align-self: start;
  margin-top: -8px;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  font-size: 1rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  color: #081423;
  background: linear-gradient(135deg, #b6ffff, #4ce6ff 56%, #6b91ff);
  box-shadow: 0 16px 40px rgba(76, 230, 255, 0.28);
}

.tertiary {
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border: none;
  padding-top: 6px;
  padding-bottom: 4px;
  font-size: 0.88rem;
  letter-spacing: 0.2rem;
}

.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  align-items: end;
  background: rgba(2, 4, 10, 0.46);
  backdrop-filter: blur(10px);
}

.sheet-backdrop[hidden] {
  display: none;
}

.howto-sheet {
  width: 100%;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(16, 21, 42, 0.96), rgba(7, 10, 20, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.3);
}

.sheet-handle {
  width: 54px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.howto-sheet h2 {
  margin-top: 8px;
  font-size: 1.8rem;
  font-family: 'Audiowide', sans-serif;
  font-weight: 400;
}

.howto-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
  list-style: none;
}

.howto-list li {
  padding: 14px 14px 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white-soft);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
}

.full {
  width: 100%;
}

.score-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.stats-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.stats-panel {
  width: min(100%, 520px);
  display: grid;
  gap: 18px;
  padding: 24px 18px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16, 21, 42, 0.9), rgba(7, 10, 20, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.32),
    inset 0 0 30px rgba(103, 244, 255, 0.04);
}

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

.stats-columns {
  display: grid;
  gap: 12px;
}

.stats-list-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-list-card h2 {
  font-family: 'Audiowide', sans-serif;
  font-size: 1rem;
  font-weight: 400;
}

.stats-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.stats-row {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
}

.stats-row.empty {
  color: rgba(255, 255, 255, 0.58);
}

.score-panel {
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
  padding: 24px 18px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16, 21, 42, 0.9), rgba(7, 10, 20, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.32),
    inset 0 0 30px rgba(103, 244, 255, 0.04);
}

.score-title {
  font-family: 'Audiowide', sans-serif;
  font-size: clamp(1.9rem, 10vw, 2.8rem);
  font-weight: 400;
  line-height: 0.98;
  background: linear-gradient(90deg, #ebfdff 0%, #69e9ff 36%, #89a6ff 74%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-cosmos {
  position: relative;
  height: 150px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 36%, rgba(103, 244, 255, 0.22), transparent 24%),
    radial-gradient(circle at 74% 24%, rgba(255, 87, 184, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.score-planet {
  position: relative;
  position: absolute;
  left: 22px;
  top: 32px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ebfdff, #6de8ff 38%, #0a4e85 100%);
  box-shadow: 0 0 30px rgba(103, 244, 255, 0.24);
}

.score-ring {
  position: absolute;
  left: 14px;
  top: 48px;
  width: 96px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.42);
  transform: rotate(-16deg);
}

.score-ship {
  position: absolute;
  right: 42px;
  top: 34px;
  width: 48px;
  height: 82px;
  border-radius: 18px 18px 12px 12px;
  background: linear-gradient(180deg, #f8ffff 0%, #8feaff 22%, #0b93ff 58%, #032156 100%);
  box-shadow: 0 0 24px rgba(103, 244, 255, 0.36);
  transform: rotate(18deg);
}

.score-ship::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 22px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
}

.score-trail {
  position: absolute;
  right: 82px;
  top: 76px;
  width: 150px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 87, 184, 0), rgba(255, 87, 184, 0.38), rgba(103, 244, 255, 0.78));
  filter: blur(4px);
}

.score-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 12px 4px;
}

.score-label {
  font-size: 0.78rem;
  letter-spacing: 0.22rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.score-current {
  font-family: 'Audiowide', sans-serif;
  font-size: clamp(3rem, 16vw, 4.8rem);
  line-height: 0.92;
  background: linear-gradient(180deg, #ffffff 0%, #7ff4ff 42%, #7c9fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 26px rgba(103, 244, 255, 0.16);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.score-badge.is-record {
  background: linear-gradient(135deg, rgba(255, 215, 111, 0.2), rgba(255, 87, 184, 0.14));
  border-color: rgba(255, 215, 111, 0.42);
  color: #ffd76f;
  box-shadow: 0 0 22px rgba(255, 215, 111, 0.18);
}

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

.score-stat-card {
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
}

.score-stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

.score-stat-value {
  display: block;
  margin-top: 8px;
  font-size: 1.36rem;
  font-weight: 700;
  color: white;
}

.score-stat-card-accent {
  background:
    linear-gradient(180deg, rgba(103, 244, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(103, 244, 255, 0.08);
}

.score-actions {
  display: grid;
  gap: 12px;
}

.score-back {
  margin-top: 0;
}

.confetti-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -14px;
  width: 10px;
  height: 18px;
  border-radius: 999px;
  background: var(--confetti-color);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  animation: confettiDrop 1.8s ease-in forwards;
}

@keyframes confettiDrop {
  0% {
    transform: translateY(0) rotate(var(--spin));
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translateY(var(--fall)) rotate(calc(var(--spin) + 160deg));
    opacity: 0;
  }
}
