/* Base Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
  background: linear-gradient(135deg, #e1bee7, #ce93d8);
  color: #333;
}

/* Glass Navigation Bar */
#glass-bar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 15px 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
}

#player-stats span {
  margin-right: 15px;
  font-size: 1.4rem;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#controls button {
  font-size: 1.2rem;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  color: #333;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#controls button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.9);
}

#controls input[type="range"] {
  width: 100px;
  cursor: pointer;
  -webkit-appearance: none;
  background: #ccc;
  height: 5px;
  border-radius: 5px;
  outline: none;
}

/* Game Container */
#game-container {
  max-width: 900px;
  margin: 100px auto 20px; /* Leave enough space at the top for the fixed nav */
  padding: 20px;
}

/* Header */
header {
  background: #8e24aa;
  color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p {
  margin: 5px 0 0;
  font-size: 1.2rem;
}

/* Menu, Instructions, Game, and Result Areas */
#menu, #instructions-area, #game-area, #result-area {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#menu button, 
#instructions-area button, 
#game-area button, 
#result-area button {
  padding: 10px 20px;
  font-size: 1.2rem;
  margin: 10px;
  background: #ab47bc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

#menu button:hover, 
#instructions-area button:hover, 
#game-area button:hover, 
#result-area button:hover {
  background: #8e24aa;
}

/* Game Content: Enlarged Objects and Instructions */
#game-content {
  margin: 20px 0;
}

#game-content p {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

#game-content button {
  display: inline-block;
  margin: 10px;
  padding: 15px 25px;
  font-size: 2rem; /* Enlarged objects */
  background: #ffd54f;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

#game-content button:hover {
  background: #ffca28;
  transform: scale(1.1);
}

/* Footer */
footer {
  margin-top: 20px;
  font-size: 1.2rem;
}

/* Utility class to hide elements */
.hidden {
  display: none;
}

/* --- Gamification Effects --- */

/* Pop Animation for Correct Answer */
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}
.pop {
  animation: pop 0.5s ease-out;
}

/* Shake Animation for Wrong Answer */
@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.3s ease;
}

/* Pulse Animation for Global Score */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.pulse {
  animation: pulse 0.3s ease-out;
}
