/* Universal hidden class */
.hidden {
  display: none !important;
}

/* Basic styles and retro pixel font */
body {
  font-family: 'Press Start 2P', cursive;
  background-color: #222;
  color: #fff;
  margin: 0;
  padding: 20px;
  text-align: center;
}

.game-container {
  max-width: 600px;
  margin: auto;
}

/* Menu Overlays */
.menuOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}
.menuOverlay button {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  margin: 10px;
  padding: 10px 20px;
  cursor: pointer;
}

/* Header / Scoreboard: Score (left), Pause (center), Level (right) */
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* Word Display and English Translation */
.word-display {
  font-size: 24px;
  margin-bottom: 5px;
  color: #fffa65;
  text-shadow: 0 0 4px #ffb600;
}
.english-display {
  font-size: 14px;
  margin-bottom: 10px;
  color: #aaa;
}

/* Game Area */
.game-area {
  position: relative;
  height: 400px;
  background-color: black;
  border: 4px solid #ffd700;
  overflow: hidden;
  display: flex;
}
.game-area.paused .falling-article {
  animation-play-state: paused;
}

/* Article Columns */
.article-column {
  position: relative;
  width: 33.33%;
}

/* Axolotl Player */
#player {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  transition: left 0.2s;
}

/* Falling Articles */
.falling-article {
  position: absolute;
  top: -20px;
  width: 50%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes fall {
  to {
    top: calc(100% - 70px);
  }
}

/* Love Hearts GIF */
#loveHearts {
  position: absolute;
  width: 60px;
  height: 60px;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}

/* Level-up Animation Text */
.level-up {
  position: absolute;
  width: 100%;
  top: 40%;
  left: 0;
  text-align: center;
  font-size: 32px;
  opacity: 0;
  color: #fffa65;
  text-shadow: 0 0 6px #ffb600;
  pointer-events: none;
}
@keyframes levelUpZoom {
  0% { transform: scale(0.1); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* HP Hearts Container at Top Right */
#hpContainer {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 24px;
  z-index: 6;
}

/* Flash Feedback */
.flash-correct {
  animation: screenCorrect 0.5s ease-in-out;
}
.flash-wrong {
  animation: screenWrong 0.5s ease-in-out;
}
@keyframes screenCorrect {
  0% { background-color: transparent; }
  50% { background-color: rgba(0,255,0,0.3); }
  100% { background-color: transparent; }
}
@keyframes screenWrong {
  0% { background-color: transparent; }
  50% { background-color: rgba(255,0,0,0.3); }
  100% { background-color: transparent; }
}

.game-over {
  margin-top: 20px;
  font-size: 20px;
}

/* Responsive Scaling for Mobile */
@media (max-width: 600px) {
  .game-container {
    width: 100%;
    padding: 10px;
  }
  .word-display {
    font-size: 32px;
  }
  .english-display {
    font-size: 20px;
  }
  .scoreboard span,
  .scoreboard button {
    font-size: 20px;
  }
  #player {
    width: 70px;
    height: 70px;
  }
  .falling-article {
    font-size: 24px;
  }
  .level-up {
    font-size: 40px;
  }
}
