/* styles.css */

body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  height: 100vh; /* ビューポートの高さを指定 */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* 縦に配置 */
}

#game-container {
  margin-bottom: 20px; /* ゲーム画面とボタンの間に余白を追加 */
}

canvas {
  border: 1px solid #000;
  background-color: #000;
}

#startButton,
#restartButton {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border: 4px solid #f1eaea; /* 白色の縁取り */
  border-radius: 10px; /* 角を丸く */
  border-radius: 5px;
  background-color: #005f87;
  color: white;
  transition: background-color 0.3s ease, transform 0.2s;
}

#startButton:hover,
#restartButton:hover {
  background-color: #007bb5;
  transform: scale(1.1);
}

#startButton:active,
#restartButton:active {
  transform: scale(0.95); /* ボタンが押されるように見せる */
}


#gameOverMessage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.8); /* 背景の色 */
  color: #f60505; /* テキストカラーを目立たせる */
  padding: 30px;
  border-radius: 15px;
  display: none;
  z-index: 9999;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


#gameOverMessage p {
  font-size: 28px;
  font-weight: bold;
}

#gameOverMessage button {
  margin-top: 30px;
  padding: 15px 30px;
  font-size: 18px;
  cursor: pointer;
  background-color: #007bb5;
  color: white;
  border-radius: 8px;
  border: none;
  transition: background-color 0.3s ease;
}

#gameOverMessage button:hover {
  background-color: #005f87;
}

#scoreBoard {
  font-size: 20px;
  color: #ffffff;
  background-color: #222;
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

#livesContainer {
  font-size: 18px;
  margin: 10px;
}

.heart {
  color: red;
  font-size: 20px;
  margin-right: 5px;
}

/* ゲーム開始ボタンの中央配置 */
#startButtonContainer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 画面中央に配置 */
  z-index: 10; /* 他の要素より上に表示 */
}
