/* 全体 */
body {
  font-family: "Arial", "Hiragino Kaku Gothic ProN", sans-serif;
  background: linear-gradient(to bottom, #f0f8ff, #e6f7ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 20px;
}

/* ゲームエリア */
#game-area {
  position: relative;
  width: 400px;
  height: 500px;
  border: 3px solid #007acc;
  border-radius: 15px;
  background: #ffffffaa;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  overflow: hidden;
  margin-bottom: 20px;
}

/* 落ちるボール */
#ball {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffcc66, #ff9933);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-shadow: 1px 1px 0 #fff;
}

/* 箱 */
/* 箱（共通デザイン） */
.box {
  position: absolute;
  bottom: 0;
  width: 100px;
  height: 80px;
  border-radius: 12px;
  background: #d9f0ff;
  border: 2px solid #007acc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: #005b99;
  transition: all 0.3s ease;
}

/* 4つの箱の位置 */
.box:nth-child(1) { left: 0; }
.box:nth-child(2) { left: 100px; }
.box:nth-child(3) { left: 200px; }
.box:nth-child(4) { left: 300px; }


.box:hover {
  background: #b3e5ff;
  transform: scale(1.05);
}

.correct {
  background: #90ee90 !important;
  box-shadow: 0 0 20px #00ff00;
}

.wrong {
  background: #cccccc !important;
  box-shadow: 0 0 10px #666 inset;
}

/* スコア表示 */
#score-board {
  font-size: 22px;
  font-weight: bold;
  margin: 15px 0;
  color: #004466;
}

/* 終了メッセージ */
#message {
  font-size: 26px;
  font-weight: bold;
  text-align: center;
  margin-top: 15px;
  color: #333;
  text-shadow: 1px 1px 0 #fff;
}

/* ボタン */
button {
  font-size: 18px;
  padding: 10px 20px;
  margin: 8px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #007acc;
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

button:hover {
  background: #005b99;
  transform: translateY(-2px);
}

button:active {
  background: #004466;
  transform: translateY(1px);
}
