/* ==========================================================================
   Aaistha (Runchi) Birthday Website - Stylesheet
   Modern Glassmorphism, Vibrantly Cute Pastels, Micro-animations & Responsive Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 35%, #a1c4fd 70%, #c2e9fb 100%);
  --bg-dark-accent: #2c3e50;
  
  --primary-pink: #ff477e;
  --primary-purple: #7000ff;
  --accent-gold: #ffb703;
  --accent-cyan: #00f5d4;
  
  --text-dark: #2b2d42;
  --text-muted: #5c677d;
  --text-light: #ffffff;
  
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-bg-hover: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 15px 35px rgba(31, 38, 135, 0.12);
  
  --card-radius: 24px;
  --btn-radius: 50px;
  
  /* Fonts */
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* --------------------------------------------------------------------------
   2. Reset & Base Setup
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Particle Canvas Overlay */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.hidden {
  display: none !important;
}

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

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
  position: relative;
  z-index: 2;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  box-shadow: var(--glass-shadow);
  padding: 2.5rem;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

/* --------------------------------------------------------------------------
   3. Typography & Section Titles
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.25;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  font-weight: 500;
}

.highlight-text {
  background: linear-gradient(135deg, #ff007f, #7928ca);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   4. Buttons & Interactive Elements
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.2rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 10px 25px rgba(255, 71, 126, 0.3);
  user-select: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
  color: #ffffff;
}

.primary-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 30px rgba(255, 71, 126, 0.45);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-dark);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.secondary-btn:hover {
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.mega-btn {
  font-size: 1.4rem;
  padding: 1.2rem 3rem;
  background: linear-gradient(135deg, #ff007f, #ffb703);
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 12px 35px rgba(255, 0, 127, 0.4);
}

.mega-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 18px 45px rgba(255, 0, 127, 0.55);
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 71, 126, 0.4); }
  50% { box-shadow: 0 0 35px rgba(255, 71, 126, 0.8); }
}

/* --------------------------------------------------------------------------
   5. Floating Decorative Animations (Balloons & Sparkles)
   -------------------------------------------------------------------------- */
.decorations-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.floating-balloon {
  position: absolute;
  font-size: 3.5rem;
  animation: floatUpSlow 14s infinite linear;
  opacity: 0.85;
}

.balloon-1 { left: 5%; animation-duration: 16s; animation-delay: 0s; }
.balloon-2 { left: 25%; animation-duration: 12s; animation-delay: 3s; }
.balloon-3 { left: 70%; animation-duration: 18s; animation-delay: 1s; }
.balloon-4 { left: 88%; animation-duration: 14s; animation-delay: 5s; }

@keyframes floatUpSlow {
  0% { transform: translateY(105vh) rotate(0deg); }
  50% { transform: translateY(50vh) rotate(15deg); }
  100% { transform: translateY(-20vh) rotate(-15deg); }
}

.floating-sparkle {
  position: absolute;
  font-size: 2.2rem;
  animation: sparkleTwinkle 4s infinite ease-in-out;
}

.sparkle-1 { top: 15%; left: 12%; animation-delay: 0s; }
.sparkle-2 { top: 40%; right: 10%; animation-delay: 1.5s; }
.sparkle-3 { top: 75%; left: 18%; animation-delay: 2.5s; }

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(180deg); }
}

/* --------------------------------------------------------------------------
   6. SECTION 1 — WELCOME SCREEN
   -------------------------------------------------------------------------- */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.welcome-card {
  max-width: 500px;
  width: 100%;
  text-align: center;
  border-radius: 32px;
  padding: 3.5rem 2rem;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.welcome-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: linear-gradient(135deg, #ff477e, #7000ff);
  color: #ffffff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.welcome-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.welcome-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

/* Screen transition effect when starting */
.welcome-screen.fade-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. SECTION 2 — HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.hero-container {
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-pink);
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-subheading {
  font-size: 1.8rem;
  font-family: var(--font-hand);
  color: var(--primary-purple);
  margin-bottom: 2rem;
  font-weight: 700;
}

.hero-quote {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.2rem;
  font-style: italic;
}

.hero-wishes {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}

/* --------------------------------------------------------------------------
   8. SECTION 3 — FRIENDSHIP MESSAGE (Typewriter)
   -------------------------------------------------------------------------- */
.note-card {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.note-header {
  border-bottom: 2px dashed rgba(255, 71, 126, 0.25);
  padding-bottom: 1rem;
  margin-bottom: 1.8rem;
}

.note-header h2 {
  font-size: 2rem;
  color: var(--primary-pink);
}

.typewriter-box {
  min-height: 160px;
}

.typewriter-text {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-dark);
  font-weight: 500;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   9. SECTION 4 — "THINGS ABOUT RUNCHI" CARDS
   -------------------------------------------------------------------------- */
.traits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.trait-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.trait-card:hover {
  transform: translateY(-8px);
  background: var(--glass-bg-hover);
  box-shadow: 0 20px 40px rgba(31, 38, 135, 0.18);
}

.trait-icon {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform var(--transition-bounce);
}

.trait-card:hover .trait-icon {
  transform: scale(1.25) rotate(8deg);
}

.trait-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
}

.trait-card p {
  font-size: 0.98rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   10. SECTION 5 — MEMORY PHOTO GALLERY & LIGHTBOX
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.gallery-card {
  padding: 1.2rem;
  cursor: pointer;
  text-align: center;
}

.gallery-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  background: var(--glass-bg-hover);
}

.img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.3);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-overlay span {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 71, 126, 0.85);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.gallery-card:hover .img-overlay {
  opacity: 1;
}

.photo-title {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.05rem;
}

/* Modal / Lightbox */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  max-width: 650px;
  width: 100%;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 24px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: rgba(0,0,0,0.1);
  border: none;
  font-size: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: var(--primary-pink);
  color: #fff;
}

#modal-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.modal-caption {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   11. SECTION 6 — BIRTHDAY CHECKLIST
   -------------------------------------------------------------------------- */
.checklist-card {
  max-width: 750px;
  margin: 0 auto;
}

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;

}

.checklist-item {
  background: rgba(255, 255, 255, 0.6);
  padding: 1rem 1.5rem;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transform: translateX(-20px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.checklist-item.visible {
  transform: translateX(0);
  opacity: 1;
}

.check-icon {
  color: #10b981;
  font-size: 1.4rem;
}

.highlight-item {
  background: linear-gradient(135deg, rgba(255, 71, 126, 0.15), rgba(112, 0, 255, 0.15));
  border: 1px solid rgba(255, 71, 126, 0.3);
}

/* --------------------------------------------------------------------------
   12. SECTION 7 — INTERACTIVE 3D GIFT BOX
   -------------------------------------------------------------------------- */
.gift-card {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2rem;
}

.gift-teaser {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.gift-heading {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
}

.gift-box-wrapper {
  display: inline-block;
  cursor: pointer;
  margin-bottom: 2rem;
  perspective: 1000px;
}

.gift-box {
  width: 140px;
  height: 140px;
  position: relative;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.gift-box:hover {
  transform: scale(1.08) rotate(3deg);
}

.gift-lid {
  width: 150px;
  height: 40px;
  background: linear-gradient(135deg, #ff477e, #ff0055);
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: -5px;
  z-index: 3;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: top left;
}

.gift-bow {
  font-size: 2.2rem;
  margin-top: -15px;
}

.gift-body {
  width: 140px;
  height: 100px;
  background: linear-gradient(135deg, #7000ff, #9d4edd);
  border-radius: 0 0 16px 16px;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 25px rgba(112, 0, 255, 0.3);
}

.tap-hint {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Open Animation State */
.gift-box-wrapper.opened .gift-lid {
  transform: rotate(-110deg) translateY(-30px);
}

.gift-message {
  margin-top: 2rem;
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  animation: fadeInUp 0.6s ease;
}

.gift-message-primary {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
}

.gift-message-secondary {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-pink);
}

/* --------------------------------------------------------------------------
   13. SECTION 8 — SURPRISE BUTTON & NOISE CELEBRATION
   -------------------------------------------------------------------------- */
.surprise-card {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.surprise-card h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.surprise-card p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.noise-display {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 71, 126, 0.2), rgba(255, 183, 3, 0.2));
  border-radius: 24px;
  border: 2px dashed var(--primary-pink);
}

.noise-title {
  font-size: 2.5rem;
  color: var(--primary-pink);
  margin-bottom: 0.5rem;
}

.noise-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.animate-bounce {
  animation: bounceText 0.8s infinite alternate ease-in-out;
}

@keyframes bounceText {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* --------------------------------------------------------------------------
   14. SECTION 10 — FINAL MESSAGE & FOOTER
   -------------------------------------------------------------------------- */
.final-section {
  padding-bottom: 6rem;
}

.final-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.final-heading {
  font-size: 1.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.final-name {
  font-size: 3rem;
  margin-bottom: 1.8rem;
  background: linear-gradient(135deg, #ff007f, #7000ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.final-body {
  font-size: 1.35rem;
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
  font-weight: 500;
}

.final-sub {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-pink);
  margin-bottom: 3rem;
}

.footer-note p {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   15. SECTION 9 — FLOATING MUSIC PLAYER
   -------------------------------------------------------------------------- */
.music-control {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
}

.music-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1.4rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.music-btn:hover {
  transform: scale(1.05);
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}

.music-btn.playing #music-icon {
  animation: spinMusic 3s infinite linear;
}

@keyframes spinMusic {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   16. Keyframe Utilities & Responsive Styles
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .section {
    padding: 3rem 0;
  }

  .glass-card {
    padding: 1.8rem 1.2rem;
    border-radius: 20px;
  }

  .welcome-title {
    font-size: 2.3rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-subheading {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .mega-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 1.1rem 1.5rem;
  }

  .music-control {
    bottom: 1.2rem;
    right: 1.2rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
