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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #87CEEB;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #87CEEB;
  touch-action: none;
}

#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#score-board {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.game-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 32px 24px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  text-align: center;
  pointer-events: auto;
  width: 85%;
  max-width: 360px;
  z-index: 20;
}

.game-screen.active {
  display: flex;
}

.title {
  font-size: 28px;
  color: #FF6B6B;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hint {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
}

.score-result {
  font-size: 22px;
  color: #333;
  margin-bottom: 24px;
  font-weight: bold;
}

.btn {
  border: none;
  padding: 16px 48px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  outline: none;
}

.btn.primary {
  background-color: #FF6B6B;
  color: #fff;
  box-shadow: 0 6px 0 #D94D4D;
}

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

@media (max-height: 500px) {
  .game-screen {
    padding: 20px 16px;
    width: 90%;
  }
  .title { font-size: 24px; }
  .btn { padding: 12px 36px; font-size: 18px; }
}