* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #140b2a;
  color: #fff;
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

canvas {
  display: block;
  touch-action: none;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(30, 12, 60, 0.55), rgba(10, 4, 24, 0.85));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.hidden { display: none !important; }

.logo {
  margin: 0;
  font-size: clamp(44px, 11vw, 104px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
}
.logo span {
  display: inline-block;
  background: linear-gradient(180deg, #fff3a8, #ffd84a 45%, #ff6ad5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #5a1f8a) drop-shadow(0 0 18px rgba(255, 106, 213, 0.45));
  animation: bounce 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-12px) rotate(-4deg); }
  60% { transform: translateY(2px) rotate(3deg); }
}

.tag { margin: 0; font-size: clamp(15px, 2.4vw, 20px); opacity: 0.85; max-width: 520px; }

h2 { margin: 0; font-size: clamp(32px, 7vw, 56px); color: #ffd84a; text-shadow: 0 4px 0 #5a1f8a; }

.btn {
  font: inherit;
  font-size: 24px;
  font-weight: 700;
  color: #2a0d45;
  padding: 14px 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff3a8, #ffd84a);
  box-shadow: 0 6px 0 #c48a00, 0 10px 30px rgba(255, 216, 74, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.04); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c48a00; }

.howto { display: flex; flex-direction: column; gap: 6px; font-size: 16px; opacity: 0.85; max-width: 460px; }
.small { font-size: 14px; opacity: 0.7; margin: 0; }
kbd {
  font: inherit;
  font-size: 13px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: block; } }

.best { margin: 0; opacity: 0.8; }
.best b { color: #ffd84a; }

.final { font-size: clamp(56px, 13vw, 96px); font-weight: 700; line-height: 1; text-shadow: 0 5px 0 #5a1f8a; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 22px;
  margin-bottom: 8px;
}
.stats div { display: flex; flex-direction: column; }
.stats span { font-size: 13px; opacity: 0.65; text-transform: uppercase; letter-spacing: 1px; }
.stats b { font-size: 24px; }

.badge {
  padding: 4px 14px;
  border-radius: 999px;
  background: #ff6ad5;
  color: #2a0d45;
  font-weight: 700;
  animation: pulse 0.8s ease-in-out infinite alternate;
}
@keyframes pulse { to { transform: scale(1.1); } }

.corner {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.2); }
.play-only { display: none; }
body[data-state="playing"] .play-only { display: inline-block; }
