* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(to bottom, #8ee7ff, #0f6fd6);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: manipulation;
}

.game-shell {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.game-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

#gameContainer {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 420 / 780;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  background: #65d8ff;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(to bottom, #8fe9ff 0%, #4bc9f2 35%, #0d7bd8 100%);
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.lives {
  font-size: 28px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.score-box {
  background: rgba(6, 65, 125, 0.9);
  color: #fff;
  padding: 10px 16px;
  border-radius: 18px;
  min-width: 110px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.score-box span {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
}

.score-box strong {
  display: block;
  font-size: 28px;
  margin-top: 2px;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 31, 63, 0.72);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  text-align: center;
}

.overlay h1 {
  font-size: 34px;
  margin-bottom: 14px;
}

.overlay p {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 10px;
  max-width: 300px;
}

.overlay button {
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 700;
  background: #ffd93d;
  color: #073b63;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.overlay button:active {
  transform: scale(0.98);
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .game-title {
    font-size: 18px;
  }

  .overlay h1 {
    font-size: 28px;
  }

  .overlay p {
    font-size: 15px;
  }

  .score-box strong {
    font-size: 24px;
  }

  .lives {
    font-size: 24px;
  }
}