:root {
  --bg-top: #05070e;
  --bg-mid: #101a2b;
  --bg-bottom: #1d3557;
  --panel: rgba(0, 8, 24, 0.6);
  --panel-border: rgba(150, 210, 255, 0.5);
  --text: #e7f4ff;
  --accent: #72f2ff;
  --button: #2f9ff7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, var(--bg-top), var(--bg-mid), var(--bg-bottom));
  color: var(--text);
  font-family: "Comic Sans MS", "Trebuchet MS", "Gill Sans", "Arial", sans-serif;
}

body {
  display: grid;
  place-items: center;
  padding: 12px;
}

.game-shell {
  width: min(960px, 96vw);
}

.frame {
  position: relative;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 6px;
  background: var(--panel);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

#gameCanvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 8px;
  background: #090b17;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.overlay.hidden {
  display: none;
}

.hero-btn {
  padding: 14px 26px;
  border: 2px solid #fff;
  border-radius: 12px;
  background: linear-gradient(180deg, #4dd2ff, #2c8ef7);
  color: #001018;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none;
}

.touch-controls {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-group,
.action-group {
  display: flex;
  gap: 10px;
}

.touch-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #b9ecff;
  background: rgba(36, 150, 252, 0.8);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.jump-btn {
  width: 88px;
  height: 88px;
}

.footnote {
  margin-top: 6px;
  text-align: center;
  color: #cde7ff;
  opacity: 0.9;
  font-size: 12px;
}

@media (max-width: 760px) {
  .touch-btn {
    width: 72px;
    height: 72px;
    font-size: 24px;
  }

  .jump-btn {
    width: 82px;
    height: 82px;
  }

  .hero-btn {
    padding: 12px 20px;
    font-size: 18px;
  }
}
