/* Reset and General */
body {
  margin: 0;
  overflow: hidden;
  background: black;
  color: white;
  font-family: 'Arial', sans-serif;
}

canvas {
  display: block;
  margin: 0 auto;
  background: linear-gradient(to bottom, #000020, #001040);
}

/* 全画面共通スタイル */
#startScreen, #gameOverScreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1;
  text-align: center;
  color: white;
}

button {
  padding: 10px 20px;
  margin: 10px;
  font-size: 18px;
  background-color: #007bff;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* タイトル画面スタイル */
/* Reset and General */
body {
  margin: 0;
  overflow: hidden;
  background: black;
  color: white;
  font-family: 'Arial', sans-serif;
}

/* タイトル画面の背景キャンバス */
#starCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#startScreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1;
}

.title h1 {
  font-size: 50px;
  margin: 0;
  color: yellow;
  text-shadow: 2px 2px 4px #fff;
}

.title h2 {
  font-size: 24px;
  margin: 0;
  color: white;
}

/* ゲームオーバー画面スタイル */
.gameOverTitle h1 {
  font-size: 50px;
  color: red;
  text-shadow: 2px 2px 8px #f00;
}

.scoreDisplay p {
  font-size: 20px;
  margin: 10px 0;
  color: #ddd;
}

.scoreDisplay h2 {
  font-size: 60px;
  color: cyan;
  text-shadow: 2px 2px 6px #00ffff;
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
}

.gameOverButtons button {
  width: 200px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .title h1, .gameOverTitle h1 {
    font-size: 40px;
  }

  button {
    font-size: 16px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .title h1, .gameOverTitle h1 {
    font-size: 30px;
  }

  button {
    font-size: 14px;
    padding: 6px 12px;
  }
}
