* {
  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: #66cc99;
  --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-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-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 {
  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;
  display: flex;
  justify-content: center;
  align-items: center;
}

@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: 800px;
  margin: 20px auto;
  padding: 30px;
  display: flex;
  justify-content: center;
}

.activity-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  border: 2px solid var(--primary-color);
  border-radius: 15px;
  padding: 25px;
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.activity-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.title-container {
  border: 2px solid var(--primary-color);
  display: inline-block;
  padding: 10px 30px;
  position: relative;
  background: var(--card-bg);
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.title {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  color: var(--primary-color);
}

.directions {
  text-align: center;
  margin-bottom: 20px;
  font-size: 16px;
  color: #555;
}

.character-container {
  position: relative;
  margin: 30px auto;
  width: 100%;
  height: 350px;
}

.character {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 300px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.label {
  position: absolute;
  display: flex;
  align-items: center;
}

.input-box {
  width: 100px;
  height: 30px;
  border: 2px solid var(--secondary-color);
  background-color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  border-radius: 5px;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-box:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.input-box.correct {
  background-color: #e6ffe6;
  border-color: var(--success-color);
  color: #2e7d32;
}

.input-box.incorrect {
  background-color: #ffeeee;
  border-color: var(--error-color);
  color: #c62828;
}

.dashed-line {
  width: 40px;
  border-top: 2px dashed var(--primary-color);
  display: inline-block;
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word {
  padding: 8px 15px;
  font-size: 16px;
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  background-color: #e0f7fa;
  cursor: move;
  user-select: none;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word:hover {
  background-color: #b2ebf2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.word.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.word.used {
  visibility: hidden;
}

.buttons-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

.check-btn,
.reset-btn {
  padding: 12px 25px;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.reset-btn {
  background: linear-gradient(135deg, var(--error-color), #e53935);
}

.check-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(32, 65, 255, 0.3);
}

.reset-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(229, 57, 53, 0.3);
}

.result {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: none;
}

.correct {
  color: var(--success-color);
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 4px solid var(--success-color);
}

/* 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),
    var(--success-color)
  );
  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;
  }
}

/* Precise positions for labels */
#label1 {
  left: 10%;
  top: 5%;
} /* hair */
#label2 {
  left: 10%;
  top: 25%;
} /* eye */
#label3 {
  left: 10%;
  top: 45%;
} /* ear */
#label4 {
  left: 10%;
  top: 65%;
} /* neck */
#label5 {
  right: 10%;
  top: 45%;
} /* stomach */
#label6 {
  right: 10%;
  top: 65%;
} /* knee */
#label7 {
  right: 10%;
  top: 85%;
} /* foot */

@media (max-width: 600px) {
  .activity-container {
    padding: 15px;
  }

  .input-box {
    width: 80px;
    font-size: 12px;
  }

  .title {
    font-size: 20px;
  }

  .directions {
    font-size: 14px;
  }

  .character {
    height: 250px;
  }

  .character-container {
    height: 300px;
  }

  .word {
    font-size: 14px;
    padding: 6px 12px;
  }

  .buttons-container {
    flex-direction: column;
    gap: 10px;
  }

  .check-btn,
  .reset-btn {
    width: 100%;
  }
}
