/* -------- FUNKY THEME -------- */

/* Background: loud gradient */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(120deg,
      #ffe29f,
      /* warm yellow */
      #ffa99f,
      /* orange-pink */
      #ff719a,
      /* hot pink */
      #6a5af9,
      /* violet-blue */
      #4ce0b3
      /* teal-green */
    );
  background-size: 500% 500%;
  animation: bgShift 15s ease infinite;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Animate background gradient */
@keyframes bgShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Heading banner */
header {
  width: 100%;
  text-align: center;
  padding: 40px 20px 20px 20px;
}

/* Animate background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Card: bold glass with funky shadow */
.inputCard {
  background: rgba(255, 255, 255, 0.85);
  border: 3px dashed #ff6ec7;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 15px rgba(255, 110, 199, 0.6);
  backdrop-filter: blur(10px);
  padding: 30px;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: rotate(-0.5deg);
}

/* Labels: funky font and color */
.inputCard span {
  font-weight: 700;
  font-size: 15px;
  color: #6a5af9;
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.5px;
}

/* Inputs: playful rounded style */
.inputCard input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 50px;
  border: 2px solid #6a5af9;
  background: #fff;
  font-size: 14px;
  transition: all 0.25s ease;
  color: #222;
}

.inputCard input:focus {
  outline: none;
  border-color: #ff6ec7;
  box-shadow: 0 0 10px #ff6ec7;
  transform: scale(1.05) rotate(1deg);
}

/* Buttons: rainbow funky vibes */
button {
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #ff6ec7, #6a5af9, #4ce0b3, #ffcc70);
  background-size: 300% 300%;
  animation: buttonShift 6s ease infinite;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

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

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

button:hover {
  transform: scale(1.1) rotate(-2deg);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: scale(0.95);
}

/* Button group: playful spacing */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

/* Hide boring file input */
#importFile {
  display: none !important;
}

/* Extra funky animation: card wiggle on load */
@keyframes wiggle {
  0% {
    transform: rotate(-2deg);
  }

  25% {
    transform: rotate(2deg);
  }

  50% {
    transform: rotate(-1deg);
  }

  75% {
    transform: rotate(1deg);
  }

  100% {
    transform: rotate(0);
  }
}

/* Form card */
.inputCard {
  background: #fff;
  max-width: 500px;
  width: 100%;
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

/* Funky rainbow animated heading */
.funky-heading {
  font-size: 2.5rem;
  font-family: 'Fredoka One', cursive;
  background: linear-gradient(90deg, #ff6ec7, #ffcc70, #6a5af9, #4ce0b3, #ff6ec7);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowMove 6s linear infinite;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  margin: 0;
}

/* Rainbow animation for heading */
@keyframes rainbowMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Center the form */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding: 20px;
}


/* Confetti base style */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: red;
  top: -10px;
  opacity: 0.9;
  z-index: 9999;
  transform: rotate(0deg);
  animation: fall linear forwards;
}

/* Randomized falling animation */
@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ---------- Enhanced Confetti & Celebration UI ---------- */

/* confetti pieces (varied sizes & blur) */
.confetti {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 10px;
  z-index: 9999;
  opacity: 0.95;
  border-radius: 3px;
  will-change: transform, opacity;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(0.2px);
  transform-origin: center;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg) translateX(30px) skewX(10deg);
    opacity: 0;
  }
}

/* celebration banner */
.celebration-banner {
  position: fixed;
  left: 50%;
  top: 6%;
  transform: translateX(-50%) translateY(-120%);
  background: linear-gradient(90deg, #ff6ec7, #6a5af9);
  color: white;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 18px;
  z-index: 10000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 420ms cubic-bezier(.18, .84, .35, 1), opacity 420ms;
  opacity: 0;
  display: inline-block;
}

/* banner visible state */
.celebration-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* toast (saved count) */
.save-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: rgba(16, 24, 40, 0.96);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 10000;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.4);
  font-weight: 700;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

.save-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* tiny sparkle accent for banner (pseudo-element) */
.celebration-banner::after {
  content: " ✨ ";
  margin-left: 10px;
  filter: drop-shadow(0 3px 6px rgba(255, 255, 255, 0.15));
}