* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary-color: #2041ff;
  --secondary-color: #6ea3ff;
  --accent-color: #ffffff;
  --light-color: #aff3ff;
  --text-color: #000000;
  --white: #ffffff;
  --error-color: #fe615c;
  --success-color: #4caf50;
  --card-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Header styles */
.header-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid #fff;
  transition: all 0.3s ease;
}

.header-menu:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo {
  font-size: 28px;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.header-menu .navigation ul li {
  position: relative;
}

.header-menu .navigation ul li a {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 22px 20px;
  display: block;
  transition: all 0.3s ease;
}

.header-menu .navigation ul li a:hover {
  background-color: rgba(255, 255, 255, 0.733);
  transform: translateY(-2px);
  color: var(--primary-color);
}

#toggle,
.header-menu label {
  display: none;
  cursor: pointer;
}

.menu {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

@media (max-width: 950px) {
  .header-menu label {
    display: initial;
  }

  .header-menu {
    padding: 15px 10%;
  }

  .header-menu .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    border-radius: 0 0 12px 12px;
  }

  .header-menu .navigation ul {
    flex-direction: column;
  }

  .header-menu .navigation ul li {
    width: 100%;
  }

  .header-menu .navigation ul li a {
    padding: 12px 20px;
  }

  #toggle:checked ~ .navigation {
    display: block;
    animation: slideDown 0.4s ease-out;
  }
}

/* Body styles */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, hsl(215, 100%, 86%), #3b97ff, #5c9bee);
  margin: 0;
  padding: 0;
  padding-top: 80px;
  min-height: 100vh;
  color: var(--text-color);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main content styles */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
}

h1 {
  color: var(--white);
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.exercise {
  background-color: var(--card-bg);
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.exercise:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.completion-status {
  font-size: 14px;
  font-weight: 600;
  color: #7f8c8d;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.05);
}

.completed-section .completion-status {
  color: var(--success-color);
  background-color: rgba(76, 175, 80, 0.1);
}

.question {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s;
}

.question:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.completed {
  border-left: 4px solid var(--success-color);
  background-color: rgba(76, 175, 80, 0.1);
}

input[type="text"] {
  padding: 12px 15px;
  width: 200px;
  border: 2px solid #ddd;
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
  margin-right: 10px;
}

input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(32, 65, 255, 0.2);
}

.true-false {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
}

.true-false input[type="radio"] {
  width: auto;
  margin-right: 5px;
}

.buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

button {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  box-shadow: 0 4px 8px rgba(32, 65, 255, 0.2);
}

.check-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(32, 65, 255, 0.3);
}

.restart-btn {
  background-color: var(--error-color);
  color: white;
}

.restart-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.result {
  margin-top: 10px;
  font-weight: 500;
  padding: 10px;
  border-radius: 5px;
}

.correct {
  color: var(--success-color);
  background-color: rgba(76, 175, 80, 0.1);
}

.incorrect {
  color: var(--error-color);
  background-color: rgba(254, 97, 92, 0.1);
}

/* Celebration modal */
.celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.5s;
}

.celebration-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  animation: zoomIn 0.5s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.celebration-content::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color),
    #4caf50
  );
  z-index: -1;
  filter: blur(20px);
  opacity: 0.3;
}

.celebration-content h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 20px;
}

.celebration-content p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  line-height: 1.6;
}

.celebration-content button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
}

.celebration-content button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(32, 65, 255, 0.3);
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #f00;
  border-radius: 50%;
  animation: confettiFall 5s linear forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-container {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .exercise {
    padding: 20px;
  }

  .question {
    padding: 12px;
  }

  input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
  }

  .true-false {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .buttons {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
