/* 🌟 BODY & BACKGROUND */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  /* Background image + animated gradient overlay */
  background: 
    linear-gradient(rgba(255,154,158,0.4), rgba(161,196,253,0.4)),
    url('https://www.shutterstock.com/shutterstock/videos/1100708873/thumb/1.jpg?ip=x480') no-repeat center center fixed;
  background-size: cover, 100% 100%;
  animation: gradientBG 10s ease infinite;
  position: relative;
}



/* Optional dim overlay for readability */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: -1;
}

/* 🪄 QUIZ BOX */
.app {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 25px 30px;
  text-align: center;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  position: relative;
  animation: fadeIn 1.5s ease;
  z-index: 1;
}

/* Emojis decoration */
.app::before {
  content: "💡✨🎯";
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
}

.app::after {
  content: "📚🤖🌟";
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
}

/* Fade-in animation for quiz box */
@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* Headings */
h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 0 5px #555;
}

h2 {
  color: #333;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

/* Dropdown */
#category-select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #aaa;
  font-size: 1rem;
  margin-top: 10px;
  width: 80%;
  outline: none;
  background: #fff;
  cursor: pointer;
}

/* Buttons */
button {
  margin-top: 15px;
  padding: 10px 18px;
  background: linear-gradient(45deg, #4facfe, #00f2fe);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
  transform: scale(1.05);
  background: linear-gradient(45deg, #00f2fe, #4facfe);
}

.start-btn {
  background: linear-gradient(45deg, #ff9966, #ff5e62);
}

.start-btn:hover {
  background: linear-gradient(45deg, #ff5e62, #ff9966);
}

/* Question text */
#question {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px;
  border-radius: 10px;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* Answer buttons */
.btn-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-container button {
  background: #ffffffcc;
  color: #333;
  font-weight: 500;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.btn-container button:hover {
  background: #a1c4fd;
  color: #000;
}

/* Correct / Incorrect answers */
.correct {
  background-color: #4caf50 !important; /* Green */
  color: white !important;
}

.incorrect {
  background-color: #f44336 !important; /* Red */
  color: white !important;
}

/* Timer styling */
#timer {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #222;
}

/* Result screen */
#result-screen h2 {
  font-size: 1.5rem;
}

#score-text {
  font-size: 1.2rem;
  margin: 10px 0;
  color: #222;
  font-weight: 600;
}

#category-text {
  font-size: 1rem;
  color: #444;
  font-weight: 500;
}
