/* 全体リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* html, body：全画面にフィットさせ、スクロールを無効化 */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 全体を中央に配置するラッパー */
#scale-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ゲーム全体のコンテナ（デザインサイズ：幅600px） */
#game-container {
  width: 600px;
  background-color: #fdf6e3;
  padding: 20px;
  text-align: center;
  font-family: Arial, sans-serif;
  /* スケールはscript.jsで動的に設定 */
}

/* ゲーム中のコンテンツは初期状態では非表示 */
.hidden {
  display: none;
}

/* ヘッダー：タイマーとスコア */
#header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 1.2em;
}

#bamboo-container {
  width: 240px;
  height: 640px;
  background: url("bamboo.jpg") no-repeat center;
  background-size: cover;
  border: 2px solid #8b4513;
  padding: 20px;
  margin: 0 auto 20px;
}

/* 竹の緑枠 */
#bamboo {
  background-color: #c8e6c9;
  padding: 10px;
  border: 3px solid #4caf50;
  border-radius: 5px;
  position: relative;
  height: 100%;
  overflow: hidden;
}

/* harvest-error クラス時のアニメーション（背景が赤くフラッシュ） */
#bamboo.harvest-error {
  animation: harvest-error-animation 0.5s;
}
@keyframes harvest-error-animation {
  0% {
    background-color: #c8e6c9;
  }
  50% {
    background-color: rgba(255, 0, 0, 0.6);
  }
  100% {
    background-color: #c8e6c9;
  }
}

/* キャンバスのスタイル（縦長に表示） */
canvas {
  border: 1px solid #ccc;
  display: block;
  margin: 0 auto;
}

/* ゲーム開始・再挑戦ボタン、収穫ボタン */
#start-button,
#restart-button,
#harvest-button {
  padding: 10px 20px;
  font-size: 1.2em;
  cursor: pointer;
  background-color: #4caf50;
  border: none;
  color: white;
  border-radius: 5px;
  margin: 10px;
}

/* ゲーム開始画面のスタイル */
#start-screen {
  width: 100%;
  margin: 100px auto;
  text-align: center;
  font-family: Arial, sans-serif;
  background-color: #fdf6e3;
  padding: 40px;
  border: 2px solid #8b4513;
  border-radius: 10px;
}
