/* 🌸 General Page Setup */
body {
  margin: 0;
  padding: 0;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(135deg, #fff0f8, #ffe6f9, #e6f7ff);
  text-align: center;
  overflow-x: hidden;
}

/* 🧚 Fairy Intro */
.fairy-intro {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #fff5fa, #ffd6f9);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  animation: fadeOut 2s ease 4s forwards;
  z-index: 100;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.fairy {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle at top left, #fff, #ffb6f9);
  border-radius: 50%;
  box-shadow: 0 0 25px #ff99e6, 0 0 40px #fff0fa;
  position: absolute;
  animation: flyAcross 4s ease-in-out forwards;
}

@keyframes flyAcross {
  0% {
    top: 60%;
    left: -80px;
  }
  50% {
    top: 30%;
    left: 50%;
    transform: scale(1.2);
  }
  100% {
    top: 10%;
    left: 110%;
    opacity: 0;
  }
}

/* ✨ Fairy Seeds */
.seed-trail {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.seed {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #ffb6f9, #ffd9ff);
  border-radius: 50%;
  opacity: 0;
  animation: dropSeeds 4s ease-in-out infinite;
}

.seed:nth-child(1) { animation-delay: 0.3s; left: 20%; top: 50%; }
.seed:nth-child(2) { animation-delay: 0.6s; left: 40%; top: 40%; }
.seed:nth-child(3) { animation-delay: 0.9s; left: 60%; top: 45%; }
.seed:nth-child(4) { animation-delay: 1.2s; left: 70%; top: 35%; }
.seed:nth-child(5) { animation-delay: 1.5s; left: 80%; top: 25%; }

@keyframes dropSeeds {
  0% { transform: scale(0); opacity: 0; }
  20% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

/* 💖 Header */
header {
  background-color: #fff7fd;
  padding: 20px;
  border-bottom: 2px solid #ffd6f6;
}

header h1 {
  font-family: 'Brush Script MT', cursive;
  color: #e052c7;
  font-size: 40px;
  margin: 0;
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #d64abf;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* 🍬 Gumball Machine */
.gumball-section {
  padding: 50px 10px;
  background: linear-gradient(180deg, #ffe6f9, #fff);
}

.gumball-machine {
  position: relative;
  display: inline-block;
  margin: 20px auto;
}

.gumball-glass {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff, #ffe6fa);
  border: 5px solid #ffb6f9;
  box-shadow: 0 0 20px #ffc8f9;
  overflow: hidden;
  position: relative;
}

.gumball-ball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #ff66cc, #ff99ff);
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -40px); }
}

.gumball-base {
  width: 140px;
  height: 60px;
  background: linear-gradient(to bottom, #ff66cc, #ff33aa);
  border-radius: 15px;
  margin: 0 auto;
  margin-top: -10px;
  box-shadow: 0 4px 10px #ffb6f9;
}

/* 🎀 Magic Button */
.sparkle-btn {
  background: linear-gradient(145deg, #ffb6f9, #ff80e6);
  color: white;
  font-size: 20px;
  border: none;
  border-radius: 40px;
  padding: 15px 40px;
  margin-top: 20px;
  box-shadow: 0 0 20px #ffb6f9;
  cursor: pointer;
  transition: transform 0.2s;
  font-family: 'Brush Script MT', cursive;
}

.sparkle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #ff99e6;
}



/* 💫 Footer */
footer {
  
  
  
  
  background-color: #fff8fc;
  padding: 15px;
  border-top: 2px solid #ffd6f9;
}




/* 🍬 Dreamy Vending Machine */
.vending-section {
  text-align: center;
  padding: 3em 1em;
  background: linear-gradient(180deg, #fff9f9, #fff0f5, #fef9e6);
  border-top: 3px solid #ffc8f9;
  box-shadow: 0 0 30px #ffe0f9 inset;
}

.vending-section h2 {
  font-family: 'Brush Script MT', cursive;
  font-size: 2.5em;
  color: #ff66cc;
  margin-bottom: 0.2em;
}

.vending-section p {
  font-size: 1.2em;
  color: #d64abf;
  margin-bottom: 1em;
}

.vending-machine {
  background: #ffffff;
  border: 4px solid #ffb6f9;
  border-radius: 20px;
  box-shadow: 0 0 25px #ffccff;
  padding: 20px;
  display: inline-block;
  position: relative;
}

.vm-window {
  width: 200px;
  height: 160px;
  margin: 0 auto 1em;
  background: radial-gradient(circle at center, #fff, #ffe6f9);
  border-radius: 12px;
  border: 3px solid #ffb6f9;
  overflow: hidden;
  position: relative;
}

.vm-bubble {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #ff99ff, #ff66cc);
  border-radius: 50%;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes bubblePop {
  0% { transform: translate(-50%, 0) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -60px) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -120px) scale(0); opacity: 0; }
}

.vm-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8em;
  justify-items: center;
}

.vm-buttons button {
  background: linear-gradient(145deg, #ffb6f9, #ff80e6);
  border: none;
  color: white;
  font-size: 1.1em;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.vm-buttons button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px #ffb6f9;
}

.vm-result {
  font-size: 1.3em;
  color: #ff1493;
  font-weight: bold;
  margin-top: 1em;
  min-height: 1.5em;
}

/* ✨ Sparkles */
.sparkle-container {
  position: relative;
  width: 100%;
  


/* 🎡 Carnival Vending Machine Styling */
.carnival-header {
  text-align: center;
  background: linear-gradient(90deg, #ffe6f9, #ffb6f9, #fff9c4);
  border-bottom: 5px dotted #ff66cc;
  padding: 1em;
}

.carnival-header h1 {
  font-family: 'Brush Script MT', cursive;
  color: #ff1493;
  text-shadow: 0 0 8px #ffb6c1;
  font-size: 2.5em;
  margin-bottom: 0.3em;
}

.vending-section {
  background: linear-gradient(180deg, #fff9f9, #fef9e6);
  border: 5px solid #ffc0ff;
  border-radius: 20px;
  margin: 2em auto;
  padding: 2em;
  max-width: 900px;
  box-shadow: 0 0 30px #ffd6f9 inset;
}

.vending-machine {
  background: #fff;
  border: 4px solid #ffb6f9;
  border-radius: 20px;
  box-shadow: 0 0 25px #ffccff;
  padding: 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  justify-items: center;
}

.product {
  background: #fff0fa;
  border: 3px dashed #ffb6c1;
  border-radius: 10px;
  padding: 8px;
  width: 120px;
  box-shadow: 0 0 15px rgba(255, 182, 238, 0.6);
  transition: transform 0.3s;
}
.product:hover {
  transform: rotate(-3deg) scale(1.1);
}
.product img {
  border-radius: 8px;
  width: 100%;
}
.product-name {
  font-size: 0.9em;
  font-weight: bold;
  color: #ff1493;
}
.product-code {
  font-size: 0.8em;
  color: #ff69b4;
}

.vm-buttons {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.vm-buttons button {
  background: radial-gradient(circle at center, #ff99e6, #ff69b4);
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vm-buttons button:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px #ffb6f9;
}

.vm-result {
  margin-top: 20px;
  font-size: 1.3em;
  font-weight: bold;
  color: #ff1493;
  text-shadow: 0 0 8px #ffc8f9;
}

.sparkle {
  animation: sparkleFlash 0.8s ease-in-out;
}
@keyframes sparkleFlash {
  0%,100% { color: #ff1493; text-shadow: 0 0 8px #ffc8f9; }
  50% { color: #ff66cc; text-shadow: 0 0 20px #fff; }
}

/* 🪡 Coraline-Inspired Stitched Seams */
body {
  position: relative;
  background: linear-gradient(180deg, #fff9fc, #fff8f0);
  overflow-x: hidden;
}

/* Stitch border around main content */
main, .vending-section, .content-box {
  position: relative;
  border: 4px dashed #ffb6c1;
  border-radius: 20px;
  padding: 20px;
  box-shadow: inset 0 0 20px rgba(255, 182, 238, 0.3);
}

/* Moving stitched thread animation */
@keyframes stitchWiggle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(1px) rotate(0.3deg); }
  50% { transform: translateY(-1px) rotate(-0.3deg); }
  75% { transform: translateY(0.5px) rotate(0.1deg); }
}

/* Apply the "alive" seam motion */
main::before, .vending-section::before, .content-box::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 2px dotted #ff69b4;
  border-radius: 24px;
  pointer-events: none;
  animation: stitchWiggle 6s ease-in-out infinite;
  opacity: 0.9;
}

/* Tiny needle icon at one corner */
main::after, .vending-section::after, .content-box::after {
  content: '🪡';
  position: absolute;
  bottom: -20px;
  right: 10px;
  font-size: 1.4em;
  animation: stitchWiggle 8s ease-in-out infinite;
}






















