:root {
  --baby-blue: #89cff0;
  --baby-blue-dark: #5fa8cc;
  --soft-white: #fdfbf7;
  --gold-accent: #e6c200;
  --text-color: #546e7a;
  --card-bg: rgba(255, 255, 255, 0.9);
}

body {
  background: linear-gradient(180deg, #e0f7fa 0%, #ffffff 100%);
  font-family: "Quicksand", sans-serif;
  overflow-x: hidden;
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

.rotate-mobile {
  transform: rotate(90deg);
  width: 100vh !important;
  height: 100vw !important;
  max-width: 100vh !important;
  max-height: 100vw !important;
  object-fit: contain;
}

.pointer-events-auto {
  pointer-events: auto;
}

#lightbox-modal {
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s;
}

@keyframes ghostSwipe {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  30% {
    transform: translate(40px, 0);
    opacity: 0;
  }
  40% {
    transform: translate(0, 0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  70% {
    transform: translate(0, 40px);
    opacity: 0;
  }
  100% {
    transform: translate(0, 0);
    opacity: 0;
  }
}

.animate-ghost-swipe {
  animation: ghostSwipe 2.5s infinite ease-out;
}

#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #e0f7fa;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.8s ease-in-out,
    visibility 0.8s;
}

.envelope-container {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.envelope-container:hover {
  transform: scale(1.02);
}

.envelope-open-anim {
  animation: openEnvelopeAnim 1.5s forwards cubic-bezier(0.645, 0.045, 0.355, 1);
}

@keyframes openEnvelopeAnim {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.envelope {
  width: 320px;
  height: 220px;
  background: var(--baby-blue);
  position: relative;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(137, 207, 240, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.envelope::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #a2dbf5;
  z-index: 1;
  clip-path: polygon(10% 10%, 90% 10%, 50% 50%);
  opacity: 0;
  transition: opacity 0.5s;
}

.envelope-opened::after {
  opacity: 1;
}

.envelope::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 160px solid #7cb9d8;
  border-right: 160px solid #7cb9d8;
  border-bottom: 110px solid #a2dbf5;
  border-top: 110px solid transparent;
  z-index: 5;
  pointer-events: none;
  border-radius: 0 0 10px 10px;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-top: 120px solid #89cff0;
  transform-origin: top;
  transition:
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    z-index 0.8s;
  z-index: 6;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.flap-open {
  transform: rotateX(180deg);
  z-index: 0;
}

.wax-seal {
  width: 60px;
  height: 60px;
  background: var(--gold-accent);
  border-radius: 50%;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 7;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fdfbf7;
  font-family: "Pacifico", cursive;
  font-size: 30px;
  color: #fff;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.seal-broken {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.5);
}

.recipient {
  position: absolute;
  bottom: 30px;
  width: 100%;
  text-align: center;
  font-family: "Quicksand", sans-serif;
  color: #fff;
  z-index: 12;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.main-content-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease-in;
}

.reveal-content {
  opacity: 1;
  pointer-events: auto;
}

.clouds-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(#ffffff 20%, transparent 20%),
    radial-gradient(#ffffff 20%, transparent 20%);
  background-color: #e0f7fa;
  background-position:
    0 0,
    50px 50px;
  background-size: 100px 100px;
  opacity: 0.3;
  z-index: -3;
}

.floating-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.moving-clouds-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.balloon {
  position: absolute;
  width: 40px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.05);
  opacity: 0.9;
}

.balloon::before {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 15px;
  background: rgba(0, 0, 0, 0.2);
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-110vh) scale(1) rotate(5deg);
    opacity: 0;
  }
}

.cloud-svg {
  position: absolute;
  fill: white;
  opacity: 0.7;
  filter: drop-shadow(0 4px 6px rgba(137, 207, 240, 0.2));
}

@keyframes drift {
  from {
    transform: translateX(-150px);
  }
  to {
    transform: translateX(100vw);
  }
}

@keyframes magicFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.paper-card {
  background-color: var(--soft-white);
  box-shadow: 0 10px 30px rgba(137, 207, 240, 0.2);
  border: 4px solid white;
  border-radius: 20px;
  color: var(--text-color);
  position: relative;
}

.paper-card::before {
  content: "★";
  position: absolute;
  top: 10px;
  left: 10px;
  color: var(--baby-blue);
  font-size: 20px;
}
.paper-card::after {
  content: "★";
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: var(--baby-blue);
  font-size: 20px;
}

.title-font {
  font-family: "Pacifico", cursive;
}

.btn-custom {
  background: var(--baby-blue);
  border: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(137, 207, 240, 0.3);
}

.btn-custom:hover {
  background: var(--baby-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(137, 207, 240, 0.4);
}

.music-playing {
  animation: spinSlow 4s linear infinite;
  box-shadow: 0 0 15px var(--baby-blue);
  background: white;
  color: var(--baby-blue);
  border-color: var(--baby-blue);
}

.countdown-box {
  background: white;
  border: 2px solid var(--baby-blue);
  padding: 10px;
  border-radius: 15px;
  min-width: 70px;
  color: var(--baby-blue-dark);
  box-shadow: 0 4px 0 rgba(137, 207, 240, 0.2);
}

.photo-frame {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transform: rotate(-2deg);
  transition: transform 0.5s ease;
}

.photo-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--baby-blue);
  border-radius: 5px;
}
