:root {
  --sky-top: #5fb3f5;
  --sky-bottom: #d7f1ff;
  --ink: #0f2a3d;
  --glass: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.45);
  --accent: #ff8f3f;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 480px;
  max-height: 100vh;
  background: transparent;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.ui > * { pointer-events: auto; }

.panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);
  background: rgba(15, 42, 61, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 24px;
  padding: 22px 20px 18px;
  color: white;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.title {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 38px);
  letter-spacing: -0.02em;
  text-align: center;
}
.subtitle {
  margin: 0 0 18px;
  font-weight: 400;
  font-size: 13px;
  opacity: 0.85;
  text-align: center;
}

.row { display: flex; gap: 10px; }
.col { flex: 1; }

.btn {
  appearance: none;
  border: 0;
  outline: none;
  width: 100%;
  padding: 14px 10px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  color: #0f2a3d;
  background: linear-gradient(180deg, #ffffff, #e6f3ff);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.7);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }

.btn.secondary {
  color: white;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
}

.hud {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  background: rgba(15, 42, 61, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
}
.hud .score { min-width: 28px; text-align: center; }

.footer-note {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.hidden { display: none !important; }
