/* ==========================================================================
   Birthday Celebration Stylesheet
   Modern, festive, responsive, and animated design
   ========================================================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #ff6b81, #ff4757, #ff7f50);
  --page-bg: linear-gradient(135deg, #0d1117 0%, #1a1a2e 50%, #16213e 100%);
  --cousin-bg: linear-gradient(180deg, #0b1021 0%, #1a153a 50%, #2a1b4e 100%);
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.18);
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --accent-gold: #ffd32a;
  --accent-pink: #ff3838;
  --font-heading: 'Outfit', sans-serif;
  --font-script: 'Pacifico', cursive;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--page-bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Background Atmosphere */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ff4757, #ff6b81);
  top: 5%;
  left: 10%;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3742fa, #70a1ff);
  bottom: 10%;
  right: 8%;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #eccc68, #ffa502);
  top: 45%;
  left: 60%;
  animation-delay: -8s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Canvas Confetti */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

/* Main Container Layout */
.container {
  width: 100%;
  max-width: 900px;
  margin: auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Glassmorphism Hero Card */
.hero-card {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 3.5rem 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(255, 107, 129, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 
              0 0 50px rgba(255, 107, 129, 0.25);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1.8rem;
  box-shadow: 0 4px 15px rgba(255, 211, 42, 0.2);
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(255, 211, 42, 0.2); }
  50% { box-shadow: 0 4px 25px rgba(255, 211, 42, 0.5); }
}

/* Animated Cake / Emblem */
.cake-wrapper {
  position: relative;
  margin: 0 auto 1.5rem;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 107, 129, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cake-wrapper:hover {
  transform: scale(1.15) rotate(5deg);
}

.cake-icon {
  font-size: 4rem;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
  animation: bounceSlow 3s ease-in-out infinite;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Typography */
.title-greeting {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #ffffff 20%, #ffeaa7 60%, #ff7675 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.subtitle-script {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: #ff9ff3;
  margin-bottom: 1.5rem;
  font-weight: 400;
  text-shadow: 0 0 12px rgba(255, 159, 243, 0.4);
}

.primary-message {
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* Action Button */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ff4757, #ff6b81, #ffa502);
  color: #ffffff;
  padding: 1rem 2.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 10px 25px -5px rgba(255, 71, 87, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px -5px rgba(255, 71, 87, 0.7);
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.95rem 1.8rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Sound / Music Toggle Button */
.audio-ctrl {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}

.audio-ctrl:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Cousin Webpage & Balloon Animations
   ========================================================================== */
.cousin-page {
  background: var(--cousin-bg);
}

/* Floating Balloons Container */
.balloon-sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: auto;
  z-index: 5;
}

/* Realistic CSS Balloon */
.balloon {
  position: absolute;
  bottom: -150px;
  width: 85px;
  height: 105px;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  cursor: pointer;
  user-select: none;
  animation: floatUpward linear infinite;
  transition: transform 0.15s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.25));
}

.balloon:hover {
  transform: scale(1.15) rotate(4deg);
}

/* Balloon Knot */
.balloon::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 9px solid inherit;
}

/* Balloon String */
.balloon::after {
  content: "";
  position: absolute;
  bottom: -85px;
  left: 50%;
  width: 2px;
  height: 80px;
  background: rgba(255, 255, 255, 0.65);
  transform-origin: top center;
  animation: stringWave 2s ease-in-out infinite alternate;
}

/* Balloon Highlight / Gloss reflection */
.balloon-shine {
  position: absolute;
  top: 15%;
  left: 18%;
  width: 20px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(-30deg);
  pointer-events: none;
}

@keyframes stringWave {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

@keyframes floatUpward {
  0% {
    bottom: -150px;
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-25px) rotate(-4deg);
  }
  50% {
    transform: translateX(20px) rotate(4deg);
  }
  75% {
    transform: translateX(-15px) rotate(-2deg);
  }
  100% {
    bottom: 110vh;
    transform: translateX(25px) rotate(5deg);
  }
}

/* Popped effect */
.popping {
  animation: popAnimation 0.2s forwards !important;
}

@keyframes popAnimation {
  0% {
    transform: scale(1.2);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Cousin Content Card */
.cousin-card {
  max-width: 780px;
  margin: auto;
  background: rgba(18, 22, 45, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  padding: 3.5rem 2.8rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55),
              0 0 50px rgba(162, 155, 254, 0.25);
  position: relative;
  z-index: 10;
  text-align: center;
}

.cousin-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, #ff9ff3, #feca57, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.heart-emoji {
  display: inline-block;
  font-size: 2.8rem;
  vertical-align: middle;
  animation: heartPulse 1.4s ease-in-out infinite alternate;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}

.cousin-quote-box {
  background: rgba(255, 255, 255, 0.06);
  border-left: 4px solid #ff6b81;
  border-radius: 16px;
  padding: 2rem 2.2rem;
  margin: 2rem 0;
  position: relative;
  text-align: left;
}

.quote-mark {
  font-family: serif;
  font-size: 4rem;
  line-height: 0;
  position: absolute;
  top: 25px;
  left: 15px;
  opacity: 0.25;
  color: #ff6b81;
}

.cousin-message-text {
  font-size: 1.38rem;
  line-height: 1.8;
  color: #f1f2f6;
  font-weight: 400;
  padding-left: 10px;
}

/* Interactive Pop Counter Status Bar */
.game-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 22px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.stats-score {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 1.2rem;
}

/* Feature tags */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.2rem;
}

.tag-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #dfe4ea;
}

/* Polaroid Memory Highlights */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 2.5rem 0 2rem;
}

.polaroid-card {
  background: #ffffff;
  color: #2f3542;
  padding: 12px 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--angle, 0deg));
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.polaroid-card:hover {
  transform: scale(1.08) rotate(0deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.polaroid-img-box {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #a8c0ff, #3f2b96);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.15rem;
  text-align: center;
  color: #333333;
}

/* Toast Pop notification */
.toast-msg {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-card, .cousin-card {
    padding: 2.5rem 1.5rem;
    border-radius: 22px;
  }
  .title-greeting {
    font-size: 2.5rem;
  }
  .subtitle-script {
    font-size: 1.7rem;
  }
  .cousin-title {
    font-size: 2.2rem;
  }
  .primary-message {
    font-size: 1.1rem;
    line-height: 1.65;
  }
  .cousin-message-text {
    font-size: 1.18rem;
    line-height: 1.65;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
