* {
  
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  animation: fadeInBody 1s ease-in-out forwards;
  color: #fff;
}

/* Simple overlay to improve contrast */
body:before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

@keyframes fadeInBody {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.app {
  background-color: rgba(40, 44, 52, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.8s ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.app h1 {
  font-size: 26px;
  color: #fff;
  font-weight: 600;
  padding-bottom: 15px;
  margin-bottom: 20px;
  animation: fadeIn 1s ease-in-out;
  text-align: center;
  border-bottom: 2px solid #4caf50;
}

.quiz {
  padding: 15px 0;
}

.quiz h2 {
  font-size: 18px;
  color: #fff;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 15px;
  animation: fadeIn 1.2s ease-in-out;
}

.btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 500;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px;
  margin: 12px 0;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeIn 1.4s ease-in-out;
}

.btn:hover:not([disabled]) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn:active:not([disabled]) {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

#progress {
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 25px;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: #4caf50;
  transition: width 0.3s;
}

#nextbtn {
  background: #4caf50;
  color: #fff;
  font-weight: 600;
  width: 100%;
  max-width: 160px;
  border: 0;
  padding: 14px;
  margin: 25px auto 0;
  border-radius: 6px;
  cursor: pointer;
  display: none;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeIn 1.6s ease-in-out;
}

#nextbtn:hover {
  background-color: #3e8e41;
  transform: translateY(-2px);
}

#nextbtn:active {
  transform: translateY(1px);
}

.correct {
  background-color: rgba(4, 111, 4, 0.8);
  color: white;
  border-color: #4caf50;
  animation: flashCorrect 0.4s ease-in-out;
}

@keyframes flashCorrect {
  0% {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  100% {
    background-color: rgba(4, 111, 4, 0.8);
    color: white;
  }
}

.incorrect {
  background-color: rgba(231, 28, 28, 0.8);
  color: white;
  border-color: #f44336;
  animation: flashIncorrect 0.4s ease-in-out;
}

@keyframes flashIncorrect {
  0% {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  100% {
    background-color: rgba(231, 28, 28, 0.8);
    color: white;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 20px;
  }

  .app h1 {
    font-size: 22px;
  }

  .quiz h2 {
    font-size: 17px;
  }

  .btn {
    font-size: 15px;
    padding: 12px;
  }

  #nextbtn {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .app h1 {
    font-size: 20px;
  }

  .quiz h2 {
    font-size: 16px;
  }

  .btn {
    font-size: 14px;
    padding: 10px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
