* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  overflow: hidden;
  background: #87CEEB;
  touch-action: none;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: relative;
}

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

#ui {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

#score, #timer {
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#score-value, #timer-value {
  color: #2196F3;
}

#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#game-over.hidden {
  display: none;
}

#game-over h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #333;
}

#game-over p {
  font-size: 24px;
  margin-bottom: 30px;
  color: #666;
}

#restart-btn {
  background: #2196F3;
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: background 0.2s;
}

#restart-btn:hover {
  background: #1976D2;
}

#restart-btn:active {
  transform: scale(0.98);
}

@media (max-width: 600px) {
  #ui {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  #score, #timer {
    padding: 8px 12px;
    font-size: 14px;
  }

  #game-over {
    padding: 30px;
    width: 90%;
  }

  #game-over h2 {
    font-size: 24px;
  }

  #game-over p {
    font-size: 18px;
  }

  #restart-btn {
    padding: 12px 30px;
    font-size: 16px;
  }
}

