* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*  Modern Animated Background */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #333;
  position: relative;
  overflow-x: hidden;
}

/* Animated Gradient Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, #000000, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

/* Floating Particles Effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 5px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 3px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 4px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  animation: floatParticles 20s linear infinite;
  z-index: -1;
  opacity: 0.3;
}

/*  Brand Header - Enhanced */
.brand-header {
  font-size: 32px;
  font-weight: bold;
  color: #ffffff;
  background: linear-gradient(90deg, #1d3557, #457b9d);
  padding: 18px 35px;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  margin-bottom: 25px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  letter-spacing: 1px;
  animation: slideDown 1s ease, glow 2s ease-in-out infinite alternate;
  position: relative;
  overflow: hidden;
}

.brand-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shine 3s infinite;
}

/* Quiz Container - Glass Morphism Effect */
.quiz-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  padding: 25px 30px;
  position: relative;
  animation: fadeUp 1s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/*  Timer - Enhanced */
.timer {
  background: linear-gradient(45deg, #007f91, #00b4d8);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.timer:hover {
  transform: scale(1.1);
  animation: none;
}

/*  Option Buttons - Enhanced */
.option-btn {
  display: block;
  width: 100%;
  padding: 12px 15px;
  margin: 10px 0;
  cursor: pointer;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #f8f9fa;
  font-size: 16px;
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease;
  position: relative;
  overflow: hidden;
}

.option-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.option-btn:hover::before {
  left: 100%;
}

.option-btn:hover {
  background: #e8f0fe;
  border-color: #90caf9;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/*  Next Button - Enhanced */
#next-btn {
  background: linear-gradient(90deg, #ff6b6b, #f16d15);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
  float: right;
  margin-top: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#next-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.1);
  transform: rotate(45deg);
  transition: all 0.6s;
}

#next-btn:hover::after {
  left: 100%;
}

#next-btn:hover {
  background: linear-gradient(90deg, #f16d15, #ff6b6b);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/*  Enhanced Animations */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatParticles {
  0% { background-position: 0 0, 40px 60px, 130px 270px; }
  100% { background-position: 550px 550px, 390px 410px, 380px 520px; }
}

@keyframes glow {
  0% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
  100% { box-shadow: 0 6px 25px rgba(66, 133, 244, 0.4); }
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

/*  Enhanced Correct/Wrong Animations */
.correct-ans {
  background: linear-gradient(45deg, #2ecc71, #27ae60) !important;
  color: #fff;
  animation: correctPulse 0.6s ease, confetti 0.5s ease 0.3s;
  position: relative;
}

.wrong-ans {
  background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
  color: #fff;
  animation: shake 0.4s ease;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes confetti {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 480px) {
  .quiz-container {
    padding: 20px;
    width: 95%;
  }

  .brand-header {
    font-size: 24px;
    padding: 12px 20px;
  }

  #next-btn {
    width: 100%;
    float: none;
  }
}
/*  Modern Footer */
footer.page-footer {
  background: linear-gradient(90deg, #000000, #16213e, #000000);
  color: #ffffff;
  text-align: center;
  padding: 18px 15px;
  margin-top: 50px;
  font-size: 15px;
  width: 100%;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #ff6b6b, #00b4d8, #2ecc71);
  border-image-slice: 1;
  animation: fadeIn 1.2s ease;
  position: relative;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

footer.page-footer b {
  color: #00b4d8;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(0, 180, 216, 0.7);
}

footer.page-footer .brand {
  color: #ff6b6b;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.6);
}