/* ======== RESET & GLOBAL STYLE ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: url('assets/BG1.png') no-repeat center center / cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

/* ======== HUD (Skor, Waktu, Nyawa) ======== */
#hud {
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 0;
  font-weight: bold;
  font-size: 1.1em;
  border-bottom: 2px solid #fff;
  z-index: 10;
}

/* ======== OVERLAY SCREENS ======== */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  padding: 20px;
}

#overlay.show {
  display: flex;
}

/* ======== CONTAINER BOX ======== */
.info-box {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  padding: 20px;
  margin: 10px auto;
  max-width: 600px;
  text-align: left;
  line-height: 1.6;
  font-size: 1em;
}

/* ======== BUTTONS ======== */
button {
  background: linear-gradient(135deg, #3a9bdc, #1976d2);
  color: white;
  border: none;
  padding: 12px 24px;
  margin: 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
}

button:hover {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  transform: scale(1.05);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ======== INPUT ======== */
input[type="text"] {
  padding: 10px;
  width: 250px;
  border-radius: 8px;
  border: none;
  outline: none;
  margin-top: 10px;
  font-size: 1em;
  text-align: center;
}

/* ======== QUESTION CONTAINER ======== */
#question-container {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  padding: 25px;
  margin-top: 60px;
  width: 90%;
  max-width: 700px;
  color: #fff;
  text-align: left;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  animation: fadeIn 0.6s ease;
}

#question-container h2 {
  text-align: center;
  margin-bottom: 20px;
}

.option {
  display: block;
  background: rgba(255, 255, 255, 0.15);
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.option:hover {
  background: rgba(255, 255, 255, 0.25);
}

.option.correct {
  background: rgba(76, 175, 80, 0.7);
}

.option.wrong {
  background: rgba(244, 67, 54, 0.7);
}

/* ======== LEADERBOARD ======== */
#leaderboard-screen ol {
  list-style: none;
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  width: 300px;
  margin: auto;
}

#leaderboard-screen li {
  margin: 8px 0;
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* ======== MUSIC BUTTON ======== */
#toggleMusic {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 12px;
  border-radius: 50%;
  font-size: 1.2em;
  z-index: 10;
}

/* ======== ANIMATIONS ======== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s;
}
