/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  overflow: hidden;
}

/* Animated background circles */
body::before, body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent);
  animation: float 8s ease-in-out infinite;
}

body::before {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
}

body::after {
  width: 300px;
  height: 300px;
  bottom: -80px;
  right: -80px;
  animation-duration: 10s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* Quiz Container */
.quiz-container {
  background: linear-gradient(145deg, #1d1f33, #2a2e49);
  width: 600px;
  max-width: 95vw;
  border-radius: 20px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  border: 2px solid #4f7bf9;
  min-height: 300px;
  z-index: 1;
}

.title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 10px rgba(79, 123, 249, 0.9);
  letter-spacing: 1px;
}

/* Progress bar */
.progress-bar {
  background: #3c4169;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.progress-fill {
  background: linear-gradient(90deg, #4f7bf9, #3d63d9);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 10px;
}

/* Question */
.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  min-height: 50px;
  color: #e0e6f5;
  text-shadow: 0 0 4px rgba(79, 125, 249, 0.7);
  text-align: center;
}

/* Options */
.options-list {
  list-style: none;
  margin-top: 0.5rem;
  padding: 0;
}

.options-list li {
  background: #2b2f4a;
  color: #e0e6f5;
  padding: 12px 20px;
  margin-bottom: 10px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.25s ease;
  display: flex;
  align-items: center;
  gap: 15px;
}

.options-list li:hover {
  background: #4350c7;
  transform: translateY(-2px);
}

.options-list li.selected {
  background: #4f7bf9;
  color: #fff;
  box-shadow: 0 6px 15px rgba(79, 125, 249, 0.5);
}

.option-letter {
  font-weight: 800;
  font-size: 1.1rem;
  background: #5768c1;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  text-align: center;
  color: white;
}

/* Buttons */
.btn {
  background: linear-gradient(90deg, #4f7bf9, #3d63d9);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 2rem;
  cursor: pointer;
  align-self: center;
  margin-top: 1.2rem;
  box-shadow: 0 6px 20px rgba(79, 123, 249, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 150px;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(90deg, #3d63d9, #2b48a5);
  box-shadow: 0 8px 25px rgba(41, 69, 145, 0.7);
}

.btn:disabled {
  background: #a3bed8;
  cursor: not-allowed;
  box-shadow: none;
}

#score {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.3rem;
  color: #4f7bf9;
  text-align: center;
  text-shadow: 0 0 4px rgba(79, 125, 249, 0.8);
}

#tryAgainBtn {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  margin-top: 0.8rem;
}

#tryAgainBtn:hover {
  background: linear-gradient(90deg, #c0392b, #a12a1a);
}

/* Responsive */
@media (max-width: 640px) {
  .quiz-container {
    width: 92vw;
    min-height: 280px;
    padding: 1.5rem 1.8rem;
  }
  .title {
    font-size: 1.6rem;
  }
  .question-text {
    font-size: 1rem;
  }
  .options-list li {
    font-size: 0.95rem;
    padding: 10px 16px;
  }
  .btn {
    min-width: 130px;
    font-size: 0.9rem;
  }
}
