:root {
  /* Pastel Cosmic Palette - Cotton Candy Universe */
  --color-bg: #1a0d28;
  --color-bg-secondary: #2a1541;
  --color-text-main: #fff5f7; /* Soft pearl white */
  --color-text-muted: #d4bfe0;

  /* Nebulae Colors - Soft sherbet tones */
  --color-pastel-pink: #ffb3d9;
  --color-pastel-rose: #ffc9e0;
  --color-pastel-lavender: #e0d4f7;
  --color-pastel-mauve: #d4b5d4;
  --color-pastel-peach: #ffd7ba;
  --color-rose-gold: #f4c2c2;
  --color-pastel-blue: #b8d4f7;
  --color-cream-pearl: #fef5f1;

  /* Glowing accents */
  --color-accent-glow: rgba(255, 179, 217, 0.8);
  --color-golden-glow: rgba(255, 215, 186, 0.7);

  /* Typography */
  --font-serif: "Cormorant Garamond", serif;
  --font-mono: "Space Mono", monospace;
  --font-display: "Shrikhand", cursive;

  /* Spacing */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(
      ellipse at 20% 30%,
      rgba(255, 179, 217, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 80% 70%,
      rgba(224, 212, 247, 0.12) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(255, 215, 186, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 10% 80%,
      rgba(184, 212, 247, 0.1) 0%,
      transparent 40%
    ),
    linear-gradient(180deg, #1a0d28 0%, #2a1541 50%, #1f1235 100%);
  color: var(--color-text-main);
  font-family: var(--font-serif);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Cosmic Grain Overlay */
.cosmic-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Stars Background */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.star {
  position: absolute;
  background: radial-gradient(circle, white 0%, transparent 70%);
  border-radius: 50%;
  animation: twinkle var(--duration, 3s) infinite ease-in-out alternate;
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.8), 0 0 4px var(--color-pastel-pink),
    0 0 6px var(--color-pastel-lavender);
  filter: blur(0.3px);
}

.star.glitter {
  background: radial-gradient(
    circle,
    var(--color-rose-gold) 0%,
    transparent 60%
  );
  box-shadow: 0 0 3px var(--color-golden-glow),
    0 0 6px var(--color-pastel-peach);
  animation: sparkle var(--duration, 2s) infinite ease-in-out;
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.5) rotate(180deg);
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  background: linear-gradient(to bottom, rgba(15, 5, 24, 0.9), transparent);
}

.marquee-container {
  background: linear-gradient(
    90deg,
    var(--color-pastel-pink) 0%,
    var(--color-pastel-rose) 50%,
    var(--color-pastel-peach) 100%
  );
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 2px solid rgba(255, 215, 186, 0.5);
  box-shadow: 0 4px 20px rgba(255, 179, 217, 0.3);
}

.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
}

.marquee-content span {
  display: inline-block;
  padding: 0 1.5rem;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333%);
  }
}

.main-nav {
  padding: var(--spacing-md);
  text-align: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 2px;
  background: linear-gradient(
    135deg,
    var(--color-pastel-pink),
    var(--color-rose-gold),
    var(--color-pastel-lavender)
  );
  -webkit-background-clip: text;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  transform-origin: center top;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 179, 217, 0.4);
  filter: drop-shadow(0 0 15px rgba(224, 212, 247, 0.3));
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  overflow: hidden;
}

.portal-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  height: 70vw;
  background: radial-gradient(
      circle at 40% 40%,
      rgba(255, 179, 217, 0.25) 0%,
      transparent 35%
    ),
    radial-gradient(
      circle at 60% 60%,
      rgba(255, 215, 186, 0.2) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(224, 212, 247, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle,
      rgba(244, 194, 194, 0.18) 0%,
      rgba(184, 212, 247, 0.1) 40%,
      transparent 70%
    );
  border-radius: 50%;
  animation: pulse-glow 10s infinite ease-in-out;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  33% {
    transform: translate(-50%, -50%) scale(1.15) rotate(10deg);
    opacity: 0.85;
  }
  66% {
    transform: translate(-50%, -50%) scale(1.25) rotate(-10deg);
    opacity: 0.75;
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  margin-bottom: var(--spacing-md);
}

.line-1 {
  font-family: var(--font-display);
  color: var(--color-pastel-pink);
  text-shadow: 3px 3px 0px var(--color-bg-secondary),
    0 0 30px var(--color-accent-glow), 0 0 50px rgba(255, 179, 217, 0.4);
  transform: rotate(-2deg);
}

.line-2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--color-rose-gold);
  text-shadow: 0 0 20px var(--color-golden-glow);
}

/* Countdown Timer */
.countdown-container {
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-pastel-pink);
  letter-spacing: 2px;
  margin-bottom: 1rem;
  animation: pulse-opacity 2s infinite;
}

@keyframes pulse-opacity {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.countdown-timer {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(42, 21, 65, 0.5);
  border: 2px solid var(--color-pastel-pink);
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 179, 217, 0.3),
    inset 0 0 20px rgba(255, 179, 217, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 209, 220, 0.5);
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-pastel-blue);
  margin-top: 0.3rem;
}

.separator {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--color-pastel-lavender);
  padding-bottom: 1rem;
}

@media (max-width: 480px) {
  .countdown-timer {
    gap: 0.5rem;
    padding: 0.8rem 1rem;
  }

  .time-value {
    font-size: 1.5rem;
  }

  .separator {
    font-size: 1.2rem;
  }
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
  color: var(--color-pastel-blue);
  text-transform: uppercase;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-description {
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
  font-size: 1.2rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 3rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-bg);
  background: linear-gradient(
    135deg,
    var(--color-pastel-pink),
    var(--color-rose-gold),
    var(--color-pastel-peach)
  );
  border-radius: 50px;
  box-shadow: 0 0 30px rgba(255, 179, 217, 0.5),
    0 4px 15px rgba(255, 215, 186, 0.3);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 40px rgba(255, 179, 217, 0.7),
    0 0 60px rgba(255, 215, 186, 0.5);
  border-color: var(--color-cream-pearl);
  color: var(--color-cream-pearl);
}

/* Narrative Section - Real Sky Background (Distinctly Different) */
.narrative-section {
  padding: var(--spacing-lg) var(--spacing-md);
  margin: 0;
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  /* Real sky photo with dreamy overlay */
  background: 
    /* Soft dreamy overlay for magical effect */ radial-gradient(
      ellipse 1000px 400px at 30% 40%,
      rgba(255, 240, 250, 0.2) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 900px 350px at 70% 60%,
      rgba(240, 230, 255, 0.15) 0%,
      transparent 55%
    ),
    /* Actual sky photo */ url("images/sky.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Sky Background - Additional animated ethereal glow layer */
.cupcake-universe-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(
      ellipse 700px 250px at 25% 35%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 600px 220px at 75% 65%,
      rgba(255, 240, 255, 0.12) 0%,
      transparent 50%
    );
  animation: ethereal-glow 25s infinite ease-in-out;
}

@keyframes ethereal-glow {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

/* Cupcake Sparkles */
.cupcake-sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cupcake-sparkle {
  position: absolute;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 240, 250, 0.9) 30%,
    transparent 70%
  );
  border-radius: 50%;
  animation: sparkle-float var(--float-duration, 4s) infinite ease-in-out;
  filter: blur(0.8px);
  box-shadow: 0 0 4px rgba(255, 255, 255, 1), 0 0 10px rgba(255, 200, 230, 0.6),
    0 0 16px rgba(200, 180, 255, 0.4);
}

@keyframes sparkle-float {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8) rotate(0deg);
  }
  25% {
    opacity: 0.9;
    transform: scale(1.4) rotate(90deg);
  }
  50% {
    opacity: 0.5;
    transform: scale(1) rotate(180deg);
  }
  75% {
    opacity: 1;
    transform: scale(1.2) rotate(270deg);
  }
}

/* Cupcake Image Containers - Left and Right */
.cupcake-image-left,
.cupcake-image-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.cupcake-image-left img,
.cupcake-image-right img {
  width: 100%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(0 0 25px rgba(255, 150, 200, 0.5))
    drop-shadow(0 0 45px rgba(180, 140, 255, 0.35))
    drop-shadow(0 0 60px rgba(255, 180, 220, 0.25));
  animation: cupcake-float 6s infinite ease-in-out;
}

.cupcake-image-left img {
  animation-delay: -3s;
}

@keyframes cupcake-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 30px rgba(255, 150, 200, 0.6))
      drop-shadow(0 0 50px rgba(180, 140, 255, 0.4))
      drop-shadow(0 0 70px rgba(255, 180, 220, 0.3));
  }
  50% {
    transform: translateY(-10px) scale(1.02);
    filter: drop-shadow(0 0 40px rgba(255, 150, 200, 0.8))
      drop-shadow(0 0 70px rgba(180, 140, 255, 0.6))
      drop-shadow(0 0 100px rgba(255, 180, 220, 0.5));
  }
}

.narrative-content {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-lg);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.narrative-text-column {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: 
    /* Paper texture noise */ repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.015) 0px,
      transparent 1px,
      transparent 2px,
      rgba(0, 0, 0, 0.015) 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.015) 0px,
      transparent 1px,
      transparent 2px,
      rgba(0, 0, 0, 0.015) 3px
    ),
    /* Slight paper color variation */
      linear-gradient(135deg, #fefefe 0%, #ffffff 50%, #fefefe 100%);
  padding: var(--spacing-lg);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 0 100px rgba(0, 0, 0, 0.02);
  position: relative;
  /* Scalloped edge effect using CSS mask */
  -webkit-mask: 
    /* Top edge scallops */ radial-gradient(
        circle at 50% 0,
        transparent 8px,
        #fff 8px
      )
      50% 0/20px 100%,
    /* Bottom edge scallops */
      radial-gradient(circle at 50% 100%, transparent 8px, #fff 8px) 50% 100%/20px
      100%,
    /* Left edge scallops */
      radial-gradient(circle at 0 50%, transparent 8px, #fff 8px) 0 50%/100%
      20px,
    /* Right edge scallops */
      radial-gradient(circle at 100% 50%, transparent 8px, #fff 8px) 100% 50%/100%
      20px,
    /* Center fill */ linear-gradient(#fff 0 0);
  -webkit-mask-composite: source-in, source-in, source-in, source-in,
    source-over;
  -webkit-mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y, no-repeat;
  mask: 
    /* Top edge scallops */ radial-gradient(
        circle at 50% 0,
        transparent 8px,
        #fff 8px
      )
      50% 0/20px 100%,
    /* Bottom edge scallops */
      radial-gradient(circle at 50% 100%, transparent 8px, #fff 8px) 50% 100%/20px
      100%,
    /* Left edge scallops */
      radial-gradient(circle at 0 50%, transparent 8px, #fff 8px) 0 50%/100%
      20px,
    /* Right edge scallops */
      radial-gradient(circle at 100% 50%, transparent 8px, #fff 8px) 100% 50%/100%
      20px,
    /* Center fill */ linear-gradient(#fff 0 0);
  mask-composite: intersect;
  mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y, no-repeat;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: #5a4a6e;
  margin-bottom: 1rem;
  transform: rotate(-1deg);
  text-align: left;
}

.narrative-text {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color: #3d2f52;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  line-height: 1.45;
  text-align: left;
  font-weight: 400;
}

.narrative-text p {
  opacity: 0.95;
}

/* Add emphasis to specific lines */
.narrative-text p:first-child {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: #6b5b8e;
  margin-bottom: 0.3rem;
}

.highlight-text {
  color: #5a4a6e;
  font-family: var(--font-display);
  font-size: 1.2em;
  line-height: 1.4;
  padding: 1rem 0;
  margin: 0.5rem 0;
  position: relative;
}

.narrative-invite {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(93, 77, 110, 0.15);
  text-align: left;
}

.narrative-invite p:first-child {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: #5a4a6e;
}

/* Quiz Section */
.quiz-section {
  padding: var(--spacing-lg) var(--spacing-md);
  margin: var(--spacing-lg) auto;
  max-width: 800px;
}

.quiz-container {
  background: linear-gradient(
    135deg,
    rgba(255, 179, 217, 0.12),
    rgba(224, 212, 247, 0.08)
  );
  border: 2px solid var(--color-pastel-pink);
  border-radius: 20px;
  padding: var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 179, 217, 0.3),
    inset 0 0 30px rgba(255, 215, 186, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.quiz-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 209, 220, 0.05) 0%,
    transparent 60%
  );
  animation: rotate-bg 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate-bg {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.quiz-content {
  position: relative;
  z-index: 1;
}

.quiz-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--color-pastel-pink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.quiz-subtitle {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-pastel-lavender);
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
}

.quiz-desc {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-muted);
}

.quiz-cta-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-main);
}

.quiz-btn {
  background: linear-gradient(
    135deg,
    var(--color-pastel-pink),
    var(--color-rose-gold)
  );
  color: var(--color-bg);
  border: 2px solid transparent;
  padding: 1rem 2.5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(255, 179, 217, 0.6),
    0 4px 15px rgba(255, 215, 186, 0.3);
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
}

.quiz-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.quiz-btn:hover::after {
  width: 300px;
  height: 300px;
}

.quiz-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(255, 179, 217, 0.9),
    0 6px 20px rgba(255, 215, 186, 0.5);
  border-color: var(--color-cream-pearl);
}

/* Marketplace Section */
.marketplace-section {
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-style: italic;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(
    to right,
    var(--color-pastel-pink),
    var(--color-pastel-blue)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mono-text {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  letter-spacing: 2px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.product-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fade-in-up 0.8s forwards ease-out;
  animation-timeline: view();
  animation-range: entry 10% cover 20%;
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-inner {
  background: linear-gradient(
      135deg,
      rgba(255, 179, 217, 0.06) 0%,
      rgba(224, 212, 247, 0.04) 100%
    ),
    rgba(42, 21, 65, 0.4);
  border: 2px solid rgba(255, 179, 217, 0.2);
  padding: 1rem;
  border-radius: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(5px);
}

.card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 215, 186, 0.1),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.card-inner:hover::before {
  transform: translateX(100%);
}

.card-inner:hover {
  transform: translateY(-10px);
  border-color: var(--color-pastel-pink);
  box-shadow: 0 15px 40px rgba(255, 179, 217, 0.3),
    0 0 60px rgba(255, 215, 186, 0.2);
}

.card-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: contrast(1.1) saturate(1.1);
}

.card-inner:hover .card-image img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 21, 65, 0.7) 0%,
    rgba(255, 179, 217, 0.1) 50%,
    transparent 100%
  );
  opacity: 0.6;
}

.card-content {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0.5rem 0.5rem;
}

.card-content h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-pastel-lavender);
}

.mono-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
}

.detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.item-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-pastel-pink);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.item-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-cream-pearl);
  line-height: 1.5;
  font-style: italic;
  font-weight: 400;
}

.card-btn {
  background: transparent;
  border: 2px solid var(--color-pastel-pink);
  color: var(--color-pastel-pink);
  padding: 0.6rem 1.8rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-top: auto;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
}

.card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--color-pastel-pink),
    var(--color-rose-gold)
  );
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  z-index: -1;
}

.card-btn:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.card-btn:hover {
  color: var(--color-bg);
  border-color: var(--color-pastel-pink);
  box-shadow: 0 0 25px rgba(255, 179, 217, 0.6),
    0 4px 15px rgba(255, 215, 186, 0.3);
}

/* Footer */
.site-footer {
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--spacing-xl);
  background: linear-gradient(to top, rgba(10, 2, 18, 1), transparent);
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.quote-author {
  display: block;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-style: normal;
  color: var(--color-pastel-pink);
  text-align: right;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Floating Planets */
.cosmic-planets {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.planet {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: float-drift 20s infinite ease-in-out;
  background-size: 200% 200%;
  box-shadow: inset -10px -10px 40px rgba(0, 0, 0, 0.2),
    0 0 60px var(--planet-glow, rgba(255, 179, 217, 0.3));
}

.planet-1 {
  width: 150px;
  height: 150px;
  top: 15%;
  right: 10%;
  background: radial-gradient(
    circle at 30% 30%,
    #fef5f1 0%,
    #ffc9e0 40%,
    #d4b5d4 100%
  );
  --planet-glow: rgba(255, 201, 224, 0.4);
  animation-duration: 25s;
  animation-delay: 0s;
}

.planet-2 {
  width: 120px;
  height: 120px;
  bottom: 20%;
  left: 8%;
  background: radial-gradient(
    circle at 40% 40%,
    #e0d4f7 0%,
    #b8d4f7 50%,
    #d4bfe0 100%
  );
  --planet-glow: rgba(224, 212, 247, 0.4);
  animation-duration: 30s;
  animation-delay: -5s;
}

.planet-3 {
  width: 100px;
  height: 100px;
  top: 60%;
  right: 15%;
  background: radial-gradient(
    circle at 35% 35%,
    #ffd7ba 0%,
    #f4c2c2 50%,
    #ffc9e0 100%
  );
  --planet-glow: rgba(255, 215, 186, 0.4);
  animation-duration: 22s;
  animation-delay: -10s;
}

.planet-4 {
  width: 80px;
  height: 80px;
  top: 40%;
  left: 5%;
  background: radial-gradient(
    circle at 30% 30%,
    #ffffff 0%,
    #ffb3d9 60%,
    #e0d4f7 100%
  );
  --planet-glow: rgba(255, 179, 217, 0.5);
  animation-duration: 28s;
  animation-delay: -15s;
}

@keyframes float-drift {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  25% {
    transform: translateY(-20px) translateX(10px) scale(1.05);
  }
  50% {
    transform: translateY(-10px) translateX(-15px) scale(0.95);
  }
  75% {
    transform: translateY(15px) translateX(5px) scale(1.02);
  }
}

/* Golden Lens Flares */
.lens-flare {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    var(--color-golden-glow) 0%,
    transparent 70%
  );
  filter: blur(20px);
  z-index: 1;
  animation: flare-pulse 6s infinite ease-in-out;
}

.flare-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.flare-2 {
  width: 150px;
  height: 150px;
  bottom: 15%;
  right: 25%;
  animation-delay: -2s;
}

@keyframes flare-pulse {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* Flowing Nebulae Clouds */
.nebula-cloud {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: nebula-drift 40s infinite ease-in-out;
}

.nebula-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(255, 179, 217, 0.3) 0%,
    transparent 70%
  );
  top: 20%;
  left: -10%;
  animation-duration: 50s;
  animation-delay: 0s;
}

.nebula-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(224, 212, 247, 0.25) 0%,
    transparent 70%
  );
  bottom: 10%;
  right: -15%;
  animation-duration: 60s;
  animation-delay: -10s;
}

.nebula-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 186, 0.2) 0%,
    transparent 70%
  );
  top: 50%;
  left: 30%;
  animation-duration: 55s;
  animation-delay: -20s;
}

@keyframes nebula-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -30px) scale(1.1);
  }
  50% {
    transform: translate(20px, 40px) scale(0.9);
  }
  75% {
    transform: translate(-40px, 20px) scale(1.05);
  }
}

/* Cosmic UFOs */
.cosmic-ufos {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ufo {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 0 10px rgba(255, 200, 255, 0.6))
    drop-shadow(0 0 20px rgba(180, 150, 255, 0.4));
}

.ufo-body {
  font-size: 3rem;
  display: block;
  transform-origin: center;
}

.ufo-beam {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-top: 60px solid rgba(200, 255, 255, 0.3);
  filter: blur(8px);
  opacity: 0;
  margin-top: -10px;
}

.ufo.active {
  animation: ufoFly var(--ufo-duration, 12s) linear forwards;
}

.ufo.active .ufo-beam {
  animation: beamFlicker 2s ease-in-out infinite;
}

@keyframes ufoFly {
  0% {
    opacity: 0;
    transform: translate(var(--start-x), var(--start-y))
      scale(var(--start-scale)) rotate(var(--start-rotate));
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(var(--mid-x), var(--mid-y)) scale(var(--mid-scale))
      rotate(var(--mid-rotate));
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--end-x), var(--end-y)) scale(var(--end-scale))
      rotate(var(--end-rotate));
  }
}

@keyframes beamFlicker {
  0%,
  100% {
    opacity: 0;
  }
  20% {
    opacity: 0.6;
  }
  40% {
    opacity: 0.3;
  }
  60% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.2;
  }
}

/* OPTION 2: Dropdown Button Styles */
.btn-dropdown-container {
  position: relative;
  margin-top: auto;
}

.dropdown-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: linear-gradient(
    135deg,
    rgba(255, 179, 217, 0.95) 0%,
    rgba(244, 194, 194, 0.95) 50%,
    rgba(255, 215, 186, 0.95) 100%
  );
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(255, 179, 217, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-dropdown-container:hover .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(-5px);
}

.btn-dropdown-container:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #2a1541;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: var(--font-serif);
  font-style: italic;
  text-align: center;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(3px);
}

/* OPTION 3: Button Group Styles */
.btn-group {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-group-item {
  flex: 1;
  min-width: 90px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* OPTION 4: Cosmic Links Styles */
.card-links {
  margin-top: 0.75rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.cosmic-link {
  color: var(--color-pastel-pink);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
}

.cosmic-link:hover {
  color: var(--color-rose-gold);
  text-shadow: 0 0 10px rgba(255, 179, 217, 0.6);
}

.cosmic-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-rose-gold);
  transition: width 0.3s ease;
}

.cosmic-link:hover::after {
  width: 100%;
}

/* Narrative Section Scrapbook Stickers */
.narrative-stickers {
  position: relative;
  width: 100%;
  height: 120px; /* Sticker height */
  z-index: 100;
  pointer-events: none;
}

.stickers-top {
  /* Pull up by half sticker height to center on hero/narrative boundary */
  margin-top: -60px;
  margin-bottom: -60px;
}

.stickers-bottom {
  /* Pull up by half sticker height to center on narrative/marketplace boundary */
  margin-top: -60px;
  margin-bottom: -60px;
}

.sticker {
  position: absolute;
  top: 50%;
  width: 120px;
  height: auto;
  transform: translateY(-50%); /* Center within container */
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.sticker:hover {
  transform: translateY(-50%) scale(1.1) rotate(0deg) !important;
}

/* Top stickers positioning - centered vertically on section boundary */
.sticker-top-1 {
  left: 15%;
  transform: translateY(-50%) rotate(-8deg);
}

.sticker-top-2 {
  left: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(5deg);
}

.sticker-top-3 {
  right: 15%;
  transform: translateY(-50%) rotate(-12deg);
}

/* Bottom stickers positioning - centered vertically on section boundary */
.sticker-bottom-1 {
  left: 20%;
  transform: translateY(-50%) rotate(10deg);
}

.sticker-bottom-2 {
  left: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(-7deg);
}

.sticker-bottom-3 {
  right: 20%;
  transform: translateY(-50%) rotate(8deg);
}

/* Responsive sticker sizing */
@media (max-width: 1200px) {
  .narrative-stickers {
    height: 100px;
  }
  
  .stickers-top,
  .stickers-bottom {
    margin-top: -50px;
    margin-bottom: -50px;
  }
  
  .sticker {
    width: 100px;
  }
}

@media (max-width: 768px) {
  .narrative-stickers {
    height: 70px;
  }
  
  .stickers-top,
  .stickers-bottom {
    margin-top: -35px;
    margin-bottom: -35px;
  }
  
  .sticker {
    width: 70px;
  }
}

/* Cupcake Cursor Trail */
.cursor-trail {
  position: absolute;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 9999;
  animation: trailFade 1s ease-out forwards;
  transform: translate(-50%, -50%);
  user-select: none;
}

@keyframes trailFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.8) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(360deg);
  }
}

/* Tablet/Medium screens - Stack cupcakes earlier to prevent text squishing */
@media (max-width: 1200px) {
  .narrative-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .narrative-text-column {
    order: 2;
    padding: var(--spacing-lg);
  }

  .cupcake-image-left {
    order: 1;
  }

  .cupcake-image-right {
    order: 3;
  }

  .cupcake-image-left img,
  .cupcake-image-right img {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .narrative-text {
    gap: 1rem;
  }

  .planet,
  .nebula-cloud,
  .lens-flare {
    display: none; /* Hide decorative elements on mobile for performance */
  }
  
  /* UFOs are visible on mobile (simplified animation in JS) */

  .portal-glow {
    width: 90vw;
    height: 90vw;
  }

  /* Cupcake section responsive */
  .narrative-section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .narrative-content {
    gap: var(--spacing-md);
    padding: 1rem 0.5rem; /* Minimal side padding so scrapbook can extend wider */
  }

  .narrative-text-column {
    padding: 1rem 0.75rem; /* Less horizontal padding for more text breathing room */
    margin: 0 -0.25rem; /* Extend scrapbook slightly beyond content padding */
  }

  .cupcake-image-left img,
  .cupcake-image-right img {
    max-width: 250px;
  }

  .section-title {
    text-align: center;
  }

  .narrative-text {
    gap: 1rem;
    text-align: center;
  }

  .narrative-invite {
    text-align: center;
  }
  
  /* Reduce quiz padding on mobile for more text space */
  .quiz-container {
    padding: 1.5rem 1rem; /* Reduced from 4rem for more breathing room */
  }
  
  .quiz-content {
    padding: 0;
  }
}

/* Performance optimization: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .cursor-trail,
  .star,
  .cupcake-sparkle,
  .ufo {
    display: none !important;
  }
}

/* Hide logo when scrolled down */
.logo.hidden {
  transform: translateY(-100%) scale(0.8);
  opacity: 0;
  pointer-events: none;
}

/* Short screens - hide logo to prevent overlap */
@media (max-height: 768px) {
  .logo {
    font-size: 1.5rem;
  }
}

@media (max-height: 600px) {
  .logo {
    display: none;
  }
}

/* Mobile compatibility - hide buggy elements */
@media (max-width: 768px) {
  /* Reduce grain intensity */
  .cosmic-grain {
    opacity: 0.02;
  }
  
  /* Hide decorative elements that cause performance issues */
  .cosmic-planets,
  .lens-flare,
  .nebula-cloud {
    display: none;
  }
  
  /* Keep UFOs visible on mobile (simplified animation in JS) */
  
  /* Reduce portal glow slightly */
  .portal-glow {
    opacity: 0.5;
  }
  
  /* Smaller stickers */
  .narrative-stickers {
    height: 80px;
  }
  
  .stickers-top,
  .stickers-bottom {
    margin-top: -40px;
    margin-bottom: -40px;
  }
  
  .sticker {
    width: 80px;
    max-width: 80px;
  }
  
  /* Hide logo to prevent overlap with title */
  .logo {
    display: none;
  }
  
  /* Remove cursor trail on mobile (no cursor on touch) */
  .cursor-trail {
    display: none;
  }
  
  /* FIX: Remove drop-shadow filters on cupcake images - causes square edges on Safari */
  .cupcake-image-left img,
  .cupcake-image-right img {
    filter: none !important; /* Remove glitchy filters */
    /* Keep the floating animation - it's fine on mobile */
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (
  (backdrop-filter: blur(5px)) or (-webkit-backdrop-filter: blur(5px))
) {
  .countdown-timer,
  .quiz-container {
    background: rgba(42, 21, 65, 0.85); /* More opaque background as fallback */
  }
}
