
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&family=Poppins:wght@300;400;600&family=Caveat:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

:root {
  --primary-gradient: linear-gradient(135deg, #ff6b9d, #c44569, #f8b500, #ff9ff3);
  --secondary-gradient: linear-gradient(45deg, #ff69b4, #ff1493, #da70d6);
  --glass-bg: rgba(255,255,255,0.15);
  --glass-border: rgba(255,255,255,0.2);
  --text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
  --box-shadow-light: 0 25px 50px rgba(0,0,0,0.1);
  --box-shadow-heavy: 0 30px 60px rgba(0,0,0,0.25);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--primary-gradient);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Enhanced gradient animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

/* Floating background elements */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: floatingBg 20s ease-in-out infinite;
}

@keyframes floatingBg {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.hero {
  text-align: center;
  padding: 80px 20px;
  position: relative;
  z-index: 2;
}

.hero-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.profile-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(255,255,255,0.3);
  box-shadow: var(--box-shadow-heavy);
  transition: var(--transition-smooth);
  filter: brightness(1.1) contrast(1.1);
}

.profile-circle:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 40px 80px rgba(255,105,180,0.4);
  border-color: rgba(255,255,255,0.6);
}

.main-title {
  font-family: 'Great Vibes', cursive;
  font-size: 5.5rem;
  font-weight: 400;
  color: white;
  text-shadow: var(--text-shadow);
  margin-bottom: 20px;
  animation: bounceIn 1.5s ease-out, textGlow 3s ease-in-out infinite alternate;
  background: linear-gradient(45deg, #ffffff, #ffb3de, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes textGlow {
  0% { filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); }
  100% { filter: drop-shadow(0 0 20px rgba(255,105,180,0.6)); }
}

.subtitle {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.95);
  margin-bottom: 50px;
  font-weight: 300;
  animation: fadeInUp 1.5s ease-out 0.7s both;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}

@keyframes bounceIn {
  0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  50% { transform: scale(1.05) rotate(2deg); }
  70% { transform: scale(0.95) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced birthday card */
.birthday-card {
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  border-radius: 35px;
  padding: 70px;
  margin: 50px auto;
  max-width: 1100px;
  width: calc(100% - 160px);
  box-shadow: var(--box-shadow-light);
  border: 2px solid var(--glass-border);
  animation: slideInUp 1.2s ease-out 1.2s both;
  position: relative;
  overflow: hidden;
}

.birthday-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(60px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message {
  font-size: 1.3rem;
  line-height: 1.9;
  color: white;
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* Enhanced heart container */
.heart-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 50px 0;
  flex-wrap: wrap;
}

.heart {
  width: 70px;
  height: 70px;
  position: relative;
  cursor: pointer;
  animation: heartbeat 2.5s ease-in-out infinite;
  transition: var(--transition-smooth);
}

.heart:before,
.heart:after {
  content: '';
  width: 36px;
  height: 54px;
  position: absolute;
  left: 35px;
  transform: rotate(-45deg);
  background: linear-gradient(45deg, #ff69b4, #ff1493, #da70d6);
  border-radius: 36px 36px 0 0;
  transform-origin: 0 100%;
  box-shadow: 0 5px 15px rgba(255,20,147,0.4);
}

.heart:after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.heart:hover {
  transform: scale(1.3) rotate(10deg);
  animation: none;
}

.heart:hover:before,
.heart:hover:after {
  background: linear-gradient(45deg, #ff1493, #ff69b4, #ff4500);
  box-shadow: 0 8px 25px rgba(255,20,147,0.6);
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}

/* Enhanced interactive buttons */
.interactive-btn {
  background: var(--secondary-gradient);
  color: white;
  border: none;
  padding: 18px 45px;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 60px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 12px 35px rgba(255,20,147,0.35);
  margin: 12px;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.interactive-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.interactive-btn:hover::before {
  left: 100%;
}

.interactive-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 50px rgba(255,20,147,0.5);
  background: linear-gradient(45deg, #ff1493, #ff69b4, #da70d6);
}

.interactive-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* Enhanced floating elements */
.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-heart {
  position: absolute;
  font-size: 24px;
  animation: floatUp 5s linear infinite;
  opacity: 0.8;
  filter: drop-shadow(0 0 5px rgba(255,105,180,0.6));
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) rotate(36deg) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateY(-10vh) rotate(324deg) scale(1);
  }
  100% {
    transform: translateY(-20vh) rotate(360deg) scale(0);
    opacity: 0;
  }
}

.sparkles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sparkle {
  position: absolute;
  color: #fff;
  animation: sparkleAnim 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

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

/* Enhanced surprise message */
.surprise-message {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 25px;
  margin: 40px auto;
  max-width: 700px;
  text-align: center;
  color: white;
  font-size: 1.2rem;
  line-height: 1.7;
  border: 2px solid rgba(255,255,255,0.3);
  display: none;
  animation: fadeInScale 0.8s ease-out;
  box-shadow: var(--box-shadow-light);
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Enhanced cake container */
.cake-container {
  text-align: center;
  margin: 50px 0;
  font-size: 5rem;
  animation: bounce 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(2deg); }
}

/* Enhanced wishes list */
.wishes-list {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 25px;
  margin: 40px auto;
  max-width: 800px;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: var(--box-shadow-light);
}

.wish-item {
  color: white;
  font-size: 1.2rem;
  margin: 20px 0;
  padding: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 18px;
  border-left: 5px solid #ff69b4;
  animation: slideInLeft 0.8s ease-out forwards;
  opacity: 0;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.wish-item:hover {
  transform: translateX(10px);
  background: rgba(255,255,255,0.25);
  box-shadow: 0 5px 20px rgba(255,105,180,0.3);
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Enhanced footer */
.footer {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff69b4, transparent);
  border-radius: 2px;
}

/* Particle system background */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Loading animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-heart {
  font-size: 4rem;
  animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .main-title {
    font-size: 3.5rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .birthday-card {
    padding: 40px 25px;
    margin: 30px 15px;
    width: auto;
  }

  .message {
    font-size: 1.1rem;
  }

  .hero-flex {
    flex-direction: column;
    gap: 20px;
  }

  .profile-circle {
    width: 100px;
    height: 100px;
  }

  .heart-container {
    gap: 20px;
  }

  .heart {
    width: 50px;
    height: 50px;
  }

  .heart:before,
  .heart:after {
    width: 26px;
    height: 39px;
    left: 25px;
  }

  .heart:after {
    left: 0;
  }

  .interactive-btn {
    padding: 15px 35px;
    font-size: 1rem;
    margin: 8px;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2.8rem;
  }

  .cake-container {
    font-size: 3.5rem;
  }

  .birthday-card {
    padding: 30px 20px;
    margin: 20px 10px;
  }

  .message {
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* Additional animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

/* Gallery item loading states to avoid blank tiles */
.gallery-item { opacity: 0; transform: translateY(8px); transition: all 0.35s ease; }
.gallery-item.loaded { opacity: 1; transform: translateY(0); }
.gallery-item img, .gallery-item video { display: block; width: 100%; border-radius: 10px; }

/* Reel-style video grid (Instagram-like) */
.reel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.reel-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  padding: 6px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.reel-card:hover { transform: translateY(-6px); box-shadow: 0 18px 48px rgba(0,0,0,0.2); }

.reel-card video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.reel-play {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: transform 0.18s ease, background 0.18s ease;
}

.reel-play svg { width: 20px; height: 20px; fill: #fff; }

.reel-card:hover .reel-play { transform: scale(1.06); background: rgba(0,0,0,0.75); }

/* Small caption overlay at bottom-left */
.reel-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: rgba(255,255,255,0.95);
  font-size: 0.9rem;
  text-shadow: 0 4px 18px rgba(0,0,0,0.5);
  z-index: 3;
}

/* Lightbox for playing a single video */
.video-lightbox {
  position: fixed;
  inset: 0;
  /* softer, slightly gradient overlay so video edges blend */
  background: radial-gradient(circle at center, rgba(0,0,0,0.7), rgba(0,0,0,0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

.video-lightbox video { max-width: 92%; max-height: 92%; border-radius: 10px; background: transparent; }

.video-lightbox .close-btn {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 21000;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

/* Carousel queue (horizontal thumbnails) inside lightbox */
.video-lightbox {
  /* remove any default padding so player area sits flush */
  padding: 0 !important;
}

.video-lightbox .player-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: transparent !important;
  padding: 0 !important;
}

.video-lightbox .player-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-lightbox .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 21000;
}

.video-lightbox .nav-btn.prev { left: 8px; }
.video-lightbox .nav-btn.next { right: 8px; }

.video-queue {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 12px;
  width: 92%;
  box-sizing: border-box;
}

.queue-thumb {
  width: 110px;
  height: 180px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  opacity: 0.75;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  border: 3px solid transparent;
}

.queue-thumb.active { opacity: 1; transform: scale(1.02); border-color: rgba(255,255,255,0.9); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.queue-thumb video { width: 100%; height: 100%; object-fit: cover; display:block; }

@media (max-width: 900px) {
  .video-lightbox .nav-btn.prev { left: 8px; }
  .video-lightbox .nav-btn.next { right: 8px; }
  .queue-thumb { width: 88px; height: 150px; }
}

/* Surprise modal styling when shown as overlay */
.surprise-message {
  background: rgba(255,255,255,0.15);
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  position: relative;
}
.surprise-message button#surpriseCloseBtn { color: #fff; }

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #ff1493, #ff69b4);
}
