/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  min-height: 100svh;
  width: 100%;
  background: radial-gradient(circle at center, #3a000f 0%, #000 100%);
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* ================= PARTICLES ================= */
.particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.6;
  background-image:
    radial-gradient(#ff0040 1px, transparent 1px),
    radial-gradient(#ff0040 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  animation: particleMove 25s linear infinite;
}

@keyframes particleMove {
  from {
    transform: translateY(0)
  }

  to {
    transform: translateY(120px)
  }
}

/* ================= PAGES ================= */
.page {
  width: 90%;
  max-width: 650px;
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  animation: popIn .8s cubic-bezier(.68, -0.55, .27, 1.55);
}

.active-page {
  display: flex
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(.85)
  }

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

/* ================= TEXT ================= */
h1 {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  background: linear-gradient(to right, #ff99aa, #ff0040);
  background-clip: text;
  color: transparent;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 10px rgba(255, 0, 64, .5));
}

p {
  font-size: 1.1rem;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* ================= BUTTON ================= */
.btn {
  padding: 15px 40px;
  font-size: 1.2rem;
  font-family: 'Cinzel', serif;
  color: #fff;
  background: transparent;
  border: 2px solid #ff0040;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: .3s;
}

.btn:hover {
  background: #ff0040;
  box-shadow: 0 0 30px rgba(255, 0, 64, .8);
  transform: scale(1.05);
}

/* ================= PAGE 1 ================= */
.hero-rose {
  width: 220px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 4px solid #ff0040;
  box-shadow: 0 0 40px rgba(255, 0, 64, .4);
  object-fit: cover;
  animation: heartbeat 3s infinite;
  margin-bottom: 25px;
}

@keyframes heartbeat {
  50% {
    transform: scale(1.05)
  }
}

/* ================= PAGE 2 CARDS ================= */
.card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 15px;
  width: 100%;
}

.card {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: 28px 15px;
  border-radius: 18px;
  cursor: pointer;
  transition: .3s;
 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card:hover {
  background: rgba(255, 0, 64, .25);
  border-color: #ff0040;
  transform: translateY(-6px);
}

.card-emoji {
  font-size: 3.2rem;
  margin-bottom: 10px;
}

.card-text {
  font-size: 1rem;
  font-weight: 600;
}

/* ================= PAGE 3 LETTER ================= */
.letter-container {
  background: rgba(0, 0, 0, .7);
  border: 1px solid #ffd700;
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .8);
}

.letter-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  color: #ffd700;
  text-align: left;
  min-height: 120px;
}

/* ================= PAGE 4 CANVAS ================= */
#celebration-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ================= PAGE 5 PHOTOS ================= */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

.photo-frame {
  background: white;
  padding: 8px 8px 25px 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
  width: 130px;
  /* Thoda chota kiya taki fit ho */
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(var(--r));
  flex-shrink: 0;
}

.photo-frame:hover {
  transform: scale(1.2) rotate(0deg) !important;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #eee;
}

/* ================= MOBILE ================= */
@media(max-width:420px) {
  .card-grid {
    grid-template-columns: 1fr
  }

  .btn {
    font-size: 1rem;
    padding: 12px 30px
  }
}