* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url(./images/watercolor-abstract-floral-background_52683-134424.avif);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #222;
  transition: background-color 0.3s, color 0.3s;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.8s ease-out;
}

/* Navbar Styles */
.navbar {
  width: 100%;
  background-color: rgba(11, 11, 76, 0.9);
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo i {
  margin-right: 10px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: skyblue;
}

/* Main Content */
.main-content {
  margin-top: 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

body.dark {
  color: #000;
}

#container {
  width: 600px;
  max-width: 100%;
  background: transparent;
  padding: 50px 70px;
  border-radius: 8px;
  box-shadow: 3px 3px 30px rgb(0 0 0 / 0.15);
  transition: background-color 0.3s, color 0.3s;
  animation: fadeIn 0.8s ease-out;
  margin: 20px 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark #container {
  background: url(./images/watercolor-abstract-floral-background_52683-134424.avif);
}

h1 {
  text-align: center;
  font-weight: bolder;
  font-style: italic;
  font-size: 42px;
}

h2 {
  align-items: center;
}

label {
  display: block;
  margin: 12px 0px;
  font-weight: bold;
  font-style: italic;
}

input[type=text],
select {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  border: 3px solid skyblue;
  border-radius: 4px;
}

button {
  margin-top: 20px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  background: rgb(11, 11, 76);
  border: none;
  outline: none;
  color: #fff;
  font-size: 20px;
  font-style: italic;
  font-weight: bold;
  transform: scale(1.0);
  transition: 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.86, 0, 0.07, 1);
  border-radius: 4px;
}

button:hover {
  background-color: skyblue;
  color: navy;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

button::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

button:hover::after {
  transform: translateX(100%);
}

.option {
  margin: 8px 0;
  color: #000;
}

#timer {
  font-weight: bold;
  font-size: 18px;
  text-align: right;
}

#result-screen {
  width: 100%;
  height: auto;
  padding: 30px;
}

#result,
#leaderboard {
  margin-top: 30px;
  text-align: center;
}

#fireworks,
#sad-animation {
  display: none;
  margin: 15px auto;
  max-width: 400px;
  width: 100%;
  border-radius: 30px;
  border: 3px solid skyblue;
}

#dark-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 50%;
  z-index: 1001;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#options label {
  display: block;
  padding: 12px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

#options label:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#options input[type="radio"] {
  margin-right: 10px;
}

#options label.correct-answer {
  background-color: #d4edda;
  border-left: 5px solid #28a745;
}

#options label.wrong-answer {
  background-color: #f8d7da;
  border-left: 5px solid #dc3545;
}

/* Infinite Animation for Correct/Wrong */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.correct-answer {
  animation: pulse 1s infinite, flashGreen 0.5s;
}

.wrong-answer {
  animation: pulse 1s infinite, flashRed 0.5s;
}

@keyframes flashGreen {
  from {
    background: rgba(46, 204, 113, 0.5);
  }

  to {
    background: #d4edda;
  }
}

@keyframes flashRed {
  from {
    background: rgba(231, 76, 60, 0.5);
  }

  to {
    background: #f8d7da;
  }
}

/* Fireworks Animation */
#fireworks {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Footer */
footer {
  width: 100%;
  background-color: rgba(11, 11, 76, 0.9);
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: auto;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  #container {
    padding: 20px;
    width: 95%;
  }

  h1 {
    font-size: 1.8rem;
  }

  #options label {
    padding: 12px 8px;
  }

  .navbar-container {
    flex-direction: column;
  }

  .nav-links {
    margin-top: 15px;
  }

  .nav-links li {
    margin: 0 10px;
  }
}

@media (max-width: 480px) {
  #timer {
    font-size: 1rem;
  }

  button {
    padding: 10px;
    font-size: 0.9rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links li {
    margin: 5px 10px;
  }
}