/* style.css — Super Pop Bros */
:root {
  --bg: #0f0820;
  --panel: rgba(20, 12, 45, 0.92);
  --text: #f0e8ff;
  --muted: #a99bd6;
  --accent: #ffcf33;
  --accent2: #e23b3b;
  --good: #5bbf5b;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #e8e4f5;
  --panel: rgba(255, 255, 255, 0.95);
  --text: #2a1a5e;
  --muted: #6a5a9a;
  --accent: #d4a017;
  --accent2: #c0392b;
  color-scheme: light;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
#root {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}
#game {
  width: 100%;
  max-width: 900px;
  height: auto;
  aspect-ratio: 800 / 450;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  background: #1b1140;
  display: block;
}
#hud {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  padding: 8px 14px;
  background: var(--panel);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  flex-wrap: wrap;
}
.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}
.hud-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.hud-item > span:last-child {
  color: var(--accent);
  font-size: 18px;
}
#touch-controls {
  display: none;
  margin-top: 10px;
  width: 100%;
  max-width: 900px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dpad {
  display: flex;
  gap: 10px;
}
.dpad-btn, .jump-btn {
  -webkit-tap-highlight-color: transparent;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
  user-select: none;
}
.dpad-btn {
  width: 64px;
  height: 56px;
  font-size: 22px;
  background: linear-gradient(180deg, #4a3580, #2e1d5e);
  box-shadow: 0 4px 0 #1a0f3a;
}
.jump-btn {
  width: 110px;
  height: 56px;
  font-size: 16px;
  background: linear-gradient(180deg, #ffcf33, #d4a017);
  color: #2a1a00;
  box-shadow: 0 4px 0 #8a6a0a;
}
.dpad-btn:active, .jump-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1a0f3a;
}
@media (pointer: coarse) {
  #touch-controls { display: flex; }
}
#overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 4, 20, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
}
#overlay.show { display: flex; }
.overlay-card {
  background: var(--panel);
  padding: 28px 32px;
  border-radius: 16px;
  text-align: center;
  max-width: 360px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  animation: pop 0.25s ease-out;
}
@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.overlay-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.overlay-card p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.overlay-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.primary-btn {
  background: linear-gradient(180deg, var(--accent), #d4a017);
  color: #2a1a00;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #8a6a0a;
  transition: transform 0.08s, box-shadow 0.08s;
}
.primary-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #8a6a0a;
}
.primary-btn:hover { filter: brightness(1.05); }
@media (max-width: 480px) {
  .overlay-card { padding: 22px 20px; max-width: 88%; }
  .overlay-card h1 { font-size: 22px; }
  #hud { font-size: 12px; gap: 8px; padding: 6px 10px; }
  .hud-item > span:last-child { font-size: 15px; }
  .dpad-btn { width: 56px; height: 50px; }
  .jump-btn { width: 92px; height: 50px; }
}
