:root {
  --bg: #08060d;
  --panel: #120f1c;
  --panel-2: #17142450;
  --pink: #ff2a9d;
  --violet: #9b4dff;
  --grad: linear-gradient(135deg, #ff2a9d, #9b4dff);
  --text: #ece9f5;
  --muted: #9b96ad;
  --line: #2a2438;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ambient glow blobs, like the real hero */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.glow-a {
  width: 420px; height: 420px;
  background: var(--violet);
  top: -120px; left: -140px;
}
.glow-b {
  width: 480px; height: 480px;
  background: var(--pink);
  bottom: -160px; right: -160px;
  opacity: 0.35;
}

.screen {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
}

.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}

.spark { color: var(--pink); }

.brandmark {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--pink);
  text-shadow: 0 0 24px rgba(255,42,157,0.55);
}
.brandmark .dot { color: var(--pink); }

.brandsub {
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--pink);
  margin-top: 2px;
  margin-bottom: 18px;
  opacity: 0.85;
}

.title {
  font-size: clamp(34px, 10vw, 50px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 320px;
}

.btn {
  margin-top: 32px;
  background: var(--grad);
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 38px;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 28px rgba(155,77,255,0.25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,42,157,0.35); }
.btn:active { transform: translateY(0); }

.hint {
  margin-top: 16px;
  color: #5e5a70;
  font-size: 11px;
  letter-spacing: 0.3px;
}

/* ---------- game screen ---------- */
#gameScreen {
  justify-content: flex-start;
  padding: 18px;
}

.hud {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 18px;
}

.hud-item { display: flex; flex-direction: column; gap: 3px; }
.hud-center { margin: 0 auto; align-items: center; }
.hud-right { margin-left: auto; align-items: flex-end; }

.hud-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.hud-value {
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hud-value.combo { color: var(--pink); }

.board {
  margin-top: 16px;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}

.hole {
  position: relative;
  background: radial-gradient(circle at 50% 80%, #1c1730 0%, #0d0a16 70%);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hole::before {
  content: "";
  position: absolute;
  bottom: 0; left: 10%;
  width: 80%;
  height: 14px;
  background: #000;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.6;
}

.mole {
  position: absolute;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 86%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: bottom 0.18s cubic-bezier(.34,1.56,.64,1);
}

.mole.up { bottom: 6%; }
.mole.hit { transition: bottom 0.1s ease, opacity 0.15s ease; opacity: 0; bottom: -30%; }

.mole-face {
  font-size: 30px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 22px rgba(255,42,157,0.45);
}

.mole-bubble {
  margin-top: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 9px;
  border-radius: 10px;
  text-align: center;
  max-width: 110px;
}

.mole.golden .mole-face {
  background: linear-gradient(135deg, #ffd24d, #ff8a2a);
  box-shadow: 0 0 26px rgba(255,180,60,0.6);
}
.mole.golden .mole-bubble {
  border-color: #ffb43c;
  color: #ffd98a;
}

.splat {
  position: absolute;
  font-weight: 900;
  font-size: 16px;
  pointer-events: none;
  z-index: 5;
  animation: splatUp 0.6s ease forwards;
}
@keyframes splatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-36px) scale(1.25); }
}

.hole.shake { animation: holeShake 0.25s ease; }
@keyframes holeShake {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.96); }
}

/* ---------- end screen ---------- */
.stat-row {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 90px;
}

.stat-num {
  font-size: 22px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
}

.badge-end { color: var(--pink); border-color: rgba(255,42,157,0.3); }

@media (max-height: 700px) {
  .btn { margin-top: 20px; }
  .badge { margin-bottom: 14px; }
}
