@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Pacifico&display=swap");

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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #ffe6fa 0%, #e3fdf5 100%);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff9a9e' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  font-family: "Nunito", sans-serif;
  overflow: hidden;
}

/* Overlay for 'Click to Start' */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffe6fa 0%, #e3fdf5 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.overlay-content {
  text-align: center;
  cursor: pointer;
  animation: pulse 2s infinite;
}

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

.start-btn {
  font-size: 80px;
  background: none;
  border: none;
  cursor: pointer;
  filter: drop-shadow(0 5px 5px rgba(255, 77, 109, 0.3));
  transition: transform 0.3s;
}

.start-btn:hover {
  transform: scale(1.1);
}

.overlay h2 {
  font-family: "Pacifico", cursive;
  color: #ff4d6d;
  margin-top: 20px;
  font-size: 2rem;
}

.overlay-content p {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.login-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

#password-input {
  padding: 12px 20px;
  font-size: 1.2rem;
  border-radius: 25px;
  border: 2px solid white;
  background: rgba(255, 255, 255, 0.2);
  color: black;
  outline: none;
  text-align: center;
  width: 200px;
  transition: all 0.3s ease;
}

#password-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#password-input:focus {
  background: rgba(255, 255, 255, 0.3);
  width: 220px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.enter-btn {
  padding: 10px 30px;
  font-size: 1.2rem;
  background: white;
  color: #ff4d6d;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s;
}

.enter-btn:hover {
  transform: scale(1.05);
}

.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

/* Main Carousel Container */
#carousel {
  display: none;
  width: 100%;
  height: 100vh;
  position: relative;
  z-index: 10;
  perspective: 1500px;
  overflow: hidden;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 500px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
}

.carousel-track:active {
  cursor: grabbing;
}

/* 3D Carousel Cards */
.carousel-card {
  position: absolute;
  width: 350px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  
  /* Reflection effect */
  -webkit-box-reflect: below 10px linear-gradient(transparent, transparent 40%, rgba(255, 255, 255, 0.1));
}

/* Active (center) card */
.carousel-card.active {
  transform: translateX(0) scale(1) rotateY(0deg) translateZ(0);
  opacity: 1;
  z-index: 10;
  pointer-events: auto;
}

/* Previous card (left) */
.carousel-card.prev {
  transform: translateX(-280px) scale(0.85) rotateY(15deg) translateZ(-100px);
  opacity: 0.6;
  z-index: 5;
  pointer-events: auto;
}

/* Next card (right) */
.carousel-card.next {
  transform: translateX(280px) scale(0.85) rotateY(-15deg) translateZ(-100px);
  opacity: 0.6;
  z-index: 5;
  pointer-events: auto;
}

/* Far left card */
.carousel-card.far-prev {
  transform: translateX(-520px) scale(0.7) rotateY(25deg) translateZ(-200px);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

/* Far right card */
.carousel-card.far-next {
  transform: translateX(520px) scale(0.7) rotateY(-25deg) translateZ(-200px);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

/* Hidden cards */
.carousel-card.hidden {
  transform: translateX(0) scale(0.5) translateZ(-300px);
  opacity: 0;
  pointer-events: none;
}

.carousel-card:hover {
  box-shadow: 0 25px 70px rgba(255, 77, 109, 0.4);
}

/* Chapter Intro Cards */
.chapter-intro-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 240, 245, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.chapter-intro-content {
  padding: 2rem;
}

.chapter-number {
  font-size: 0.9rem;
  color: #ff4d6d;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.chapter-title {
  font-family: "Pacifico", cursive;
  font-size: 3rem;
  color: #ff4d6d;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.chapter-subtitle {
  font-size: 1.3rem;
  color: #666;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.chapter-divider {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff4d6d, transparent);
  margin: 1.5rem auto;
}

.chapter-description {
  font-size: 1.1rem;
  color: #777;
  font-style: italic;
  line-height: 1.6;
}

/* Finale Card */
.finale-card {
  background: linear-gradient(135deg, #FF1493, #FF69B4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.finale-content {
  padding: 2rem;
}

.finale-title {
  font-family: "Pacifico", cursive;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

.finale-message {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.replay-btn {
  padding: 15px 40px;
  font-size: 1.2rem;
  font-family: "Pacifico", cursive;
  background: white;
  color: #FF1493;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  font-weight: 700;
}

.replay-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Chapter Progress Indicator */
.chapter-progress {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 1000;
}

.progress-dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 3px solid rgba(255, 77, 109, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.progress-dot .dot-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #999;
  transition: color 0.3s;
}

.progress-dot.active {
  background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
  border-color: #ff4d6d;
  transform: scale(1.3);
  box-shadow: 0 5px 20px rgba(255, 77, 109, 0.5);
}

.progress-dot.active .dot-label {
  color: white;
}

.progress-dot.completed {
  background: rgba(255, 107, 157, 0.5);
  border-color: #ff6b9d;
}

.progress-dot.completed .dot-label {
  color: white;
}

.progress-dot:hover {
  transform: scale(1.2);
}

/* Voice Message Indicator */
.voice-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(255, 77, 109, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  animation: pulse 2s infinite;
  cursor: pointer;
  z-index: 10;
}

.carousel-image-container {
  margin-bottom: 30px;
}

.carousel-image {
  border-radius: 20px;
  width: 100%;
  max-width: 350px;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.carousel-image:hover {
  transform: scale(1.05);
}

.slide-content {
  margin-top: 20px;
}

.birthday-title {
  font-family: "Pacifico", cursive;
  color: #ff4d6d;
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 0px white;
  line-height: 1.3;
}

.birthday-message {
  font-family: 'Nunito', sans-serif;
  font-style: italic;
  font-size: 1.3rem;
  color: #555;
  line-height: 1.6;
  padding: 0 10px;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Emoji Animation Styles */
.emoji-particle {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  user-select: none;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.5) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
    transform: translateY(-30px) scale(1.2) rotate(20deg);
  }
  100% {
    transform: translateY(-100vh) scale(1) rotate(360deg);
    opacity: 0;
  }
}

/* Heart Particle Trail */
.heart-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  user-select: none;
  will-change: transform, opacity;
  animation: heartFloat 2s ease-out forwards;
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-30px) scale(1.2) rotate(15deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-80px) scale(0.5) rotate(30deg);
    opacity: 0;
  }
}

/* Floating Background Photos */
.floating-photos-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.floating-photo {
  position: absolute;
  opacity: 0.12;
  border-radius: 15px;
  pointer-events: auto;
  will-change: transform;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-photo:hover {
  opacity: 0.8;
  transform: scale(1.8) translateZ(0) !important;
  box-shadow: 0 15px 40px rgba(255, 77, 109, 0.4);
  z-index: 100;
}

/* Gentle water-like floating animations */
@keyframes floatOnWater1 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(15px, 10px) rotate(3deg) scale(1.02);
  }
  50% {
    transform: translate(30px, -5px) rotate(-2deg) scale(0.98);
  }
  75% {
    transform: translate(10px, 15px) rotate(4deg) scale(1.01);
  }
}

@keyframes floatOnWater2 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(-20px, 12px) rotate(-3deg) scale(1.01);
  }
  50% {
    transform: translate(-10px, -8px) rotate(4deg) scale(0.99);
  }
  75% {
    transform: translate(-25px, 5px) rotate(-2deg) scale(1.02);
  }
}

@keyframes floatOnWater3 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(12px, -15px) rotate(2deg) scale(0.98);
  }
  50% {
    transform: translate(-8px, 10px) rotate(-3deg) scale(1.02);
  }
  75% {
    transform: translate(18px, -5px) rotate(3deg) scale(0.99);
  }
}

/* Thank You Button */
.thank-you-btn {
  margin-top: 30px;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-family: "Pacifico", cursive;
  background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 700;
}

.thank-you-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(255, 77, 109, 0.6);
  background: linear-gradient(135deg, #ff5a8f 0%, #b05c74 100%);
}

.thank-you-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* Navigation Arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 107, 157, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
  background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
}

.carousel-nav:hover::before {
  color: white;
}

.carousel-nav.prev {
  left: 50px;
}

.carousel-nav.next {
  right: 50px;
}

.carousel-nav::before {
  content: '';
  width: 12px;
  height: 12px;
  border-top: 3px solid #ff4d6d;
  border-right: 3px solid #ff4d6d;
  transition: border-color 0.3s;
}

.carousel-nav.prev::before {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.carousel-nav.next::before {
  transform: rotate(45deg);
  margin-right: 4px;
}


/* Responsive Design */
@media (max-width: 768px) {
  #carousel {
    max-width: 90%;
  }
  
  .slide {
    padding: 1.5rem;
  }
  
  .birthday-title {
    font-size: 2rem;
  }
  
  .birthday-message {
    font-size: 1.1rem;
  }
  
  .carousel-image {
    max-width: 280px;
    max-height: 280px;
  }
}

@media (max-width: 480px) {
  .birthday-title {
    font-size: 1.6rem;
  }
  
  .birthday-message {
    font-size: 1rem;
  }
  
  .overlay h2 {
    font-size: 1.5rem;
  }
  
  .start-btn {
    font-size: 60px;
  }
}
