@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400&display=swap');

* {
  box-sizing: border-box;
}

body {
  background-color: #f0f4f8;
  background-image: linear-gradient(120deg, #9165f6 0%, #da5807 100%);
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  padding: 20px;
  animation: gradientAnimation 5s ease infinite;
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.quiz-container {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-container:hover {
  transform: translateY(-5px);
  box-shadow: 12px 12px 24px #c7c7c7, -12px -12px 24px #ffffff;
}

.quiz-header {
  margin-bottom: 30px;
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #8e44ad;
  text-align: center;
  margin-bottom: 20px;
  animation: countUp 1.5s ease;
}

@keyframes countUp {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

ul {
  list-style-type: none;
  padding: 0;
}

ul li {
  font-size: 1.2rem;
  margin: 15px 0;
  display: flex;
  align-items: center;
  transition: background-color 0.3s, transform 0.3s;
}

ul li:hover {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 10px;
  transform: translateY(-2px);
}

ul li label {
  cursor: pointer;
  flex-grow: 1;
  padding-left: 10px;
}

button {
  background-color: lightseagreen;
  color: #fff;
  border: none;
  display: block;
  width: 100%;
  cursor: pointer;
  font-size: 1.1rem;
  font-family: inherit;
  padding: 1.3rem;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

button:hover {
  background-color: #732d91;
  transform: translateY(-3px);
}

button:focus {
  outline: none;
  background-color: #5e3370;
}

#timer {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 25px;
  color: #732d91;
}

#timer #time {
  font-weight: bold;
  color: lightseagreen;
}

.switch {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #8e44ad;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

body.dark-mode {
  background-color: #2c3e50;
  color: #ecf0f1;
}

.quiz-container.dark-mode {
  background-color: black;
  color: lightseagreen;
}

button.dark-mode {
  background: linear-gradient(145deg, #1abc9c, #16a085);
}

input[type="radio"] + label:before.dark-mode {
  border-color: #1abc9c;
}

input[type="radio"]:checked + label:before.dark-mode {
  background-color: #1abc9c;
}

.developer-credit {
  position: fixed;
  right: 20px;
  bottom: 20px;
  font-size: 0.7rem;
  color: white;
  font-family: Arial, sans-serif;
}

/* Dark Mode for Developer Credit */
.developer-credit.dark-mode {
  background-color: black;
  color: #ecf0f1;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .quiz-container {
    width: 90%;
    padding: 15px;
  }

  h2 {
    font-size: 1.6rem;
  }

  ul li {
    font-size: 1.1rem;
  }

  button {
    font-size: 1rem;
    padding: 1rem;
  }

  #timer {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .quiz-container {
    width: 100%;
    padding: 10px;
  }

  h2 {
    font-size: 1.4rem;
  }

  ul li {
    font-size: 1rem;
  }

  button {
    font-size: 0.9rem;
    padding: 0.8rem;
  }

  #timer {
    font-size: 1rem;
  }
}
