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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg,
      #667eea 0%,
      #764ba2 25%,
      #f093fb 50%,
      #f5576c 75%,
      #4facfe 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Floating gifts and party items */
.heart {
  position: fixed;
  font-size: 25px;
  animation: floatGift 6s infinite ease-in-out;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  transform-origin: center;
}

@keyframes floatGift {

  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.8;
  }

  25% {
    transform: translateY(-35px) rotate(-20deg) scale(1.15);
    opacity: 1;
  }

  50% {
    transform: translateY(-55px) rotate(20deg) scale(0.85);
    opacity: 0.7;
  }

  75% {
    transform: translateY(-35px) rotate(-15deg) scale(1.1);
    opacity: 0.9;
  }
}

.sparkle {
  position: fixed;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: sparkle 3s infinite ease-in-out;
  z-index: 0;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(2) rotate(180deg);
  }
}

/* Confetti */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #ff6b9d;
  animation: confettiFall linear infinite;
  z-index: 100;
  pointer-events: none;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.page {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page.active {
  display: flex;
  opacity: 1;
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* PAGE 1 - GIFT BOX */
.page-1 {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

.intro-text {
  margin-bottom: 60px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  padding: 40px 60px;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.intro-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.5);
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 20px;
  font-family: "Dancing Script", cursive;
  animation: fadeInDown 1s ease;
}

.intro-text h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, #fff 0%, #ffd89b 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 4px;
  animation: glow 2s infinite alternate, fadeInUp 1s ease 0.3s both;
  font-family: "Dancing Script", cursive;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  }

  to {
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));
  }
}

.gift-box {
  width: 280px;
  height: 280px;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: bounce 2s infinite, rotate 20s linear infinite;
  perspective: 1000px;
}

.gift-box:hover {
  transform: scale(1.2) rotateY(10deg);
  filter: brightness(1.1);
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-30px) rotate(2deg);
  }
}

@keyframes rotate {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

.box {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff6b9d 0%, #c471f5 50%, #f093fb 100%);
  border-radius: 25px;
  position: relative;
  box-shadow: 0 25px 70px rgba(255, 107, 157, 0.6),
    0 0 50px rgba(255, 255, 255, 0.3) inset;
  overflow: hidden;
  transition: all 0.4s ease;
}

.box::before {
  content: "🎁";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
  animation: giftPulse 2s infinite;
  z-index: 2;
}

.box::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 70%);
  animation: shine 3s infinite;
}

@keyframes giftPulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.ribbon-v {
  position: absolute;
  width: 60px;
  height: 100%;
  background: linear-gradient(135deg, #ffd89b 0%, #ff6b9d 50%, #c471f5 100%);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(255, 215, 155, 0.6),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  z-index: 1;
  border-radius: 0 0 10px 10px;
}

.ribbon-h {
  position: absolute;
  width: 100%;
  height: 60px;
  background: linear-gradient(135deg, #ffd89b 0%, #ff6b9d 50%, #c471f5 100%);
  top: 30%;
  box-shadow: 0 0 20px rgba(255, 215, 155, 0.6),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  z-index: 1;
  border-radius: 10px;
}

.bow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 80px;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
  z-index: 3;
  animation: bowFloat 3s infinite ease-in-out;
}

@keyframes bowFloat {

  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateX(-50%) translateY(-10px) rotate(5deg);
  }
}

.click-hint {
  margin-top: 40px;
  color: white;
  font-size: 1.6rem;
  font-weight: 300;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 255, 255, 0.5);
  animation: pulse 2s infinite, float 3s infinite ease-in-out;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 30px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* PAGE 2 - PHOTO & MESSAGE */
.page-2 {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  z-index: 1;
  max-width: 900px;
  width: 100%;
}

.photo-container {
  width: 100%;
  max-width: 450px;
  height: 450px;
  margin: 0 auto 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(255, 107, 157, 0.7),
    0 0 0 15px rgba(255, 255, 255, 0.1),
    0 0 0 25px rgba(255, 107, 157, 0.2);
  border: 10px solid rgba(255, 255, 255, 0.9);
  animation: photoAppear 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    photoFloat 4s infinite ease-in-out;
  position: relative;
}

.photo-container::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #c471f5, #f093fb, #4facfe);
  z-index: -1;
  animation: borderRotate 3s linear infinite;
}

@keyframes photoAppear {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes photoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

@keyframes borderRotate {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

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

.photo-container:hover img {
  transform: scale(1.1);
}

.birthday-message {
  text-align: center;
  margin: 30px 0;
  padding: 40px 30px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 0 50px rgba(255, 255, 255, 0.1);
}

.birthday-message h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  margin-bottom: 30px;
  font-weight: 700;
  letter-spacing: 3px;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 255, 255, 0.5);
  animation: fadeInUp 1s ease 0.3s both;
  font-family: "Dancing Script", cursive;
}

.birthday-message p {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: #fff;
  line-height: 2.2;
  margin-bottom: 25px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 300;
  animation: fadeInUp 1s ease 0.5s both;
}

.birthday-message p:nth-child(3) {
  animation-delay: 0.7s;
}

.birthday-message p:nth-child(4) {
  animation-delay: 0.9s;
}

.verse-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.verse-text {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: #fff;
  line-height: 1.8;
  margin-bottom: 25px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 300;
  font-style: italic;
  text-align: left;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.verse-text strong {
  font-weight: 600;
  font-style: normal;
  display: block;
  margin-bottom: 10px;
  color: #ffd89b;
}

.open-slider-btn {
  background: linear-gradient(135deg, #ff6b9d 0%, #c471f5 50%, #4facfe 100%);
  background-size: 200% 200%;
  animation: gradientMove 3s ease infinite;
  color: white;
  border: none;
  padding: 22px 55px;
  font-size: 1.4rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 15px 40px rgba(255, 107, 157, 0.6),
    0 0 30px rgba(255, 255, 255, 0.3) inset;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-weight: 600;
  margin-top: 30px;
  font-family: "Poppins", sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease 1.1s both, gradientMove 3s ease infinite;
}

.open-slider-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.open-slider-btn:hover::before {
  width: 300px;
  height: 300px;
}

.open-slider-btn:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 25px 60px rgba(255, 107, 157, 0.8),
    0 0 40px rgba(255, 255, 255, 0.5) inset;
}

.open-slider-btn:active {
  transform: translateY(-5px) scale(0.98);
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* MODAL SLIDER - TRANSPARENT */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(25px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 800px;
  width: 90%;
  position: relative;
  animation: slideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-title {
  text-align: center;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 30px;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 3px;
  font-family: "Dancing Script", cursive;
  animation: titleGlow 2s infinite alternate;
}

@keyframes titleGlow {
  from {
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(255, 255, 255, 0.4);
  }

  to {
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5),
      0 0 40px rgba(255, 255, 255, 0.8);
  }
}

.close-btn {
  position: absolute;
  top: -50px;
  right: 10px;
  font-size: 3.5rem;
  cursor: pointer;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 255, 255, 0.5);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.close-btn:hover {
  transform: scale(1.3) rotate(90deg);
  color: #ff6b9d;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(255, 107, 157, 0.5);
}

.slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6),
    inset 0 0 50px rgba(255, 255, 255, 0.1);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.slider-wrapper {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.slide img:hover {
  transform: scale(1.05);
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 107, 157, 0.3);
  width: 65px;
  height: 65px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 2rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10;
  color: #ff6b9d;
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 15px 40px rgba(255, 107, 157, 0.7),
    0 0 30px rgba(255, 255, 255, 0.5) inset;
  border-color: #ff6b9d;
}

.slider-nav:active {
  transform: translateY(-50%) scale(1.1);
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.slider-dots {
  text-align: center;
  margin-top: 25px;
}

.dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  margin: 0 10px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

.dot.active {
  background: linear-gradient(135deg, #ff6b9d, #c471f5);
  transform: scale(1.5);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.9),
    0 0 40px rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  .intro-text {
    padding: 30px 30px;
  }

  .gift-box {
    width: 220px;
    height: 220px;
  }

  .box::before {
    font-size: 80px;
  }

  .bow {
    font-size: 60px;
    top: -40px;
  }

  .photo-container {
    height: 300px;
    max-width: 300px;
  }

  .birthday-message {
    padding: 30px 20px;
  }

  .open-slider-btn {
    padding: 18px 40px;
    font-size: 1.2rem;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .slider {
    height: 350px;
  }

  .slider-nav {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .prev {
    left: 10px;
  }

  .next {
    right: 10px;
  }

  .close-btn {
    top: -40px;
    right: 5px;
    width: 50px;
    height: 50px;
    font-size: 2.5rem;
  }
}