/* -------------------- Base Styles -------------------- */
body {
  text-align: center;
  background-color: #011F3F;
  margin: 0;
  padding: 0;
}

/* -------------------- Typography -------------------- */
#level-title,
#high-score,
#reset-score,
#current-score,
#volume-control {
  font-family: 'Press Start 2P', cursive;
}

#level-title {
  font-size: 3rem;
  margin: 5%;
  color: #FEF2BF;
}

#high-score {
  font-size: 1.2rem;
  color: #FEF2BF;
  margin-bottom: 20px;
}

#current-score {
  font-size: 18px;
  color: #333333;
  margin: 10px 0 40px;
  text-align: center;
  user-select: none;
  transition: color 0.3s ease;
}

#current-score:hover {
  color: #007BFF;
}

/* -------------------- Buttons -------------------- */
#reset-score {
  font-size: 0.8rem;
  padding: 10px 20px;
  margin-bottom: 40px;
  background-color: #FEF2BF;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#reset-score:hover {
  background-color: #ffd966;
  transform: scale(1.05);
}

/* -------------------- Game Container -------------------- */
.container {
  display: none;
  width: 50%;
  margin: auto;
}

/* -------------------- Game Buttons -------------------- */
.btn {
  margin: 25px;
  display: inline-block;
  height: 200px;
  width: 200px;
  border: 10px solid black;
  border-radius: 20%;
}

.red {
  background-color: red;
}

.green {
  background-color: green;
}

.blue {
  background-color: blue;
}

.yellow {
  background-color: yellow;
}

.pressed {
  box-shadow: 0 0 20px white;
  background-color: grey;
}

/* -------------------- Special Effects -------------------- */
.game-over {
  background-color: red;
  opacity: 0.8;
}

/* -------------------- Volume Control -------------------- */
#volume-control {
  margin-bottom: 20px;
  color: #FEF2BF;
  font-size: 1rem;
}

#volumeRange {
  width: 200px;
  margin-left: 10px;
}

/* -------------------- Floating Animation -------------------- */
@keyframes floatUpDown {
  0%   { transform: translateY(-8px); opacity: 0.8; }
  50%  { transform: translateY(0px); opacity: 1; }
  100% { transform: translateY(-8px); opacity: 0.8; }
}

.floating-text {
  animation: floatUpDown 2s ease-in-out infinite;
}

/* -------------------- Hidden Elements on Load -------------------- */
.container,
#high-score,
#reset-score {
  display: none;
}

#start-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  padding: 15px 25px;
  margin: 20px auto;
  background-color: #FEF2BF;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #011F3F;
  display: block;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#start-btn:hover {
  background-color: #ffd966;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .container {
    width: 90%;
    display: flex;       /* enable flexbox */
    flex-wrap: wrap;     /* allow wrapping to next line */
    justify-content: center; /* center buttons horizontally */
  }

  .btn {
    width: 45%;          /* about half container width */
    height: 40vw;        /* keep height proportional */
    margin: 10px 2.5%;   /* add margin to create spacing */
    box-sizing: border-box; /* include border in size */
  }

  #level-title {
    display: none;
    font-size: 1.5rem;
    margin: 30px 0;
  }
}

