:root {
  --cyan: #00e5ff;
  --coral: #ff3d2e;
  --gold: #ff8a00;
  --ink: #e8ffff;
  --muted: #8aa0b0;
  --bg: #030508;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: "Jua", system-ui, sans-serif;
  background: #020406;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 0.557));
  height: min(100dvh, calc(100vw / 0.557));
  max-width: 420px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.3),
    0 22px 60px rgba(0, 0, 0, 0.7),
    0 0 48px rgba(0, 229, 255, 0.14),
    0 0 64px rgba(255, 61, 46, 0.08);
  background: #070b12;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 3;
}

.panel {
  background: rgba(6, 14, 22, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 14px;
  padding: 8px 12px;
  color: #e8ffff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  min-width: 96px;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.08);
}

.panel.right {
  align-items: flex-end;
}

.panel b {
  font-size: 16px;
  color: var(--cyan);
}

.lives {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.life {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 8px rgba(255, 61, 46, 0.7);
}

.life.empty {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.goal-meter {
  position: absolute;
  top: 72px;
  left: 12px;
  right: 12px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.goal-meter > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff3d2e, #00e5ff, #ff8a00);
  border-radius: inherit;
  transition: width 0.15s ease;
}

.combo-bar {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 61, 46, 0.95);
  color: #fff;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 14px;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(255, 61, 46, 0.55);
}

.combo-bar.hidden {
  display: none;
}

.touch-hint {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
  font-size: 11px;
  color: rgba(0, 229, 255, 0.85);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.touch-hint.hidden {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(0, 229, 255, 0.2), transparent 50%),
    radial-gradient(ellipse at 50% 85%, rgba(255, 61, 46, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(3, 5, 8, 0.97), rgba(8, 6, 14, 0.98));
}

.overlay.hidden {
  display: none;
}

.overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.35;
  z-index: 0;
}

.overlay > * {
  position: relative;
  z-index: 1;
}

.hero-art {
  width: min(42vw, 168px);
  height: min(42vw, 168px);
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 10px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(0, 229, 255, 0.55),
    0 0 32px rgba(0, 229, 255, 0.35),
    0 0 48px rgba(255, 61, 46, 0.18);
}

.badge {
  display: inline-block;
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.55);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
}

.badge.soft {
  color: #ff8a00;
  border-color: rgba(255, 138, 0, 0.55);
  text-shadow: 0 0 12px rgba(255, 138, 0, 0.45);
  box-shadow: 0 0 14px rgba(255, 138, 0, 0.22);
}

h1 {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(34px, 9vw, 46px);
  color: #e8ffff;
  text-shadow:
    0 0 8px rgba(0, 229, 255, 0.85),
    0 0 24px rgba(0, 229, 255, 0.45),
    0 0 36px rgba(255, 61, 46, 0.25),
    0 3px 0 rgba(0, 0, 0, 0.55);
}

.overlay p {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

.icons {
  font-size: 14px;
  margin-bottom: 14px;
  color: var(--muted);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 32px;
  font: inherit;
  font-size: 18px;
  color: #061018;
  background: linear-gradient(180deg, #7ad7ff, #00e5ff);
  box-shadow:
    0 7px 0 #087a8a,
    0 0 22px rgba(0, 229, 255, 0.45),
    0 0 40px rgba(255, 61, 46, 0.12);
  cursor: pointer;
}

.btn:active {
  transform: translateY(3px);
  box-shadow:
    0 4px 0 #087a8a,
    0 0 16px rgba(0, 229, 255, 0.3);
}

a {
  margin-top: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
