:root {
  --sky-1: #4ec0ca;
  --sky-2: #8fe3ea;
  --text: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f1b24;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
  touch-action: none;
}

.app {
  width: 100%;
  max-width: 400px;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

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

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  pointer-events: none;
}

.score {
  font-size: 46px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 0 14px rgba(0, 0, 0, 0.15);
  line-height: 1;
}

.icon-btn {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  pointer-events: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 32, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 28px;
  color: var(--text);
}

.overlay.hidden {
  display: none;
}

.overlay h2 {
  margin: 0;
  font-size: 32px;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.overlay p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.btn {
  background: #ffd53d;
  color: #5a3d00;
  border: none;
  border-radius: 12px;
  padding: 13px 34px;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #d9ad00;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #d9ad00;
}
