@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Poppins:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

:root {
  --sage: #A8B5A2;
  --sage-light: #C5D1C0;
  --sage-dark: #7A8C73;
  --pink: #F2B5D4;
  --pink-light: #FAD0E4;
  --pink-dark: #D4789C;
  --cream: #FFF8F0;
  --gold: #D4A574;
  --gold-light: #E8C9A0;
  --text-dark: #3D3D3D;
  --text-light: #6B6B6B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F2D7D9 0%, #D4E7D0 50%, #F5E6CC 100%);
  overflow: hidden;
  text-align: center;
  padding: 2rem;
}

#particles-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--pink-dark);
  text-shadow: 2px 2px 8px rgba(212,120,156,0.3);
  animation: fadeInUp 1.5s ease-out;
  margin-bottom: 0.5rem;
}

.hero-content h2 {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--sage-dark);
  animation: fadeInUp 1.5s ease-out 0.3s both;
}

.hero-content p {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--text-light);
  margin-top: 1rem;
  animation: fadeInUp 1.5s ease-out 0.6s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  z-index: 2;
  animation: bounce 2s infinite;
  color: var(--pink-dark);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== COUNTDOWN ===== */
#countdown {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--cream) 0%, #E8F0E4 100%);
  text-align: center;
}

#countdown .section-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--sage-dark);
  margin-bottom: 2rem;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
}

.countdown-item {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border: 2px solid var(--pink-light);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  min-width: 120px;
  box-shadow: 0 8px 32px rgba(242,181,212,0.15);
  transition: transform 0.3s;
}

.countdown-item:hover {
  transform: translateY(-5px) scale(1.05);
}

.countdown-item .number {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--pink-dark);
  font-family: 'Poppins', sans-serif;
}

.countdown-item .label {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===== GALLERY ===== */
#gallery {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, #E8F0E4 0%, var(--cream) 100%);
  text-align: center;
}

#gallery .section-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--pink-dark);
  margin-bottom: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.4s, box-shadow 0.4s;
  background: linear-gradient(135deg, var(--pink-light), var(--sage-light));
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-item .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: transform 0.4s;
}

.gallery-item:hover .overlay { transform: translateY(0); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
}

/* ===== LOVE LETTER ===== */
#love-letter {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--cream) 0%, #F5E6CC 100%);
  text-align: center;
}

#love-letter .section-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--sage-dark);
  margin-bottom: 2rem;
}

.envelope {
  position: relative;
  width: 320px;
  max-width: 90%;
  margin: 0 auto;
  cursor: pointer;
  perspective: 1000px;
}

.envelope-body {
  background: linear-gradient(135deg, #FAE5D3, #F5D5C8);
  border-radius: 12px;
  padding: 3rem 2rem;
  box-shadow: 0 8px 30px rgba(212,165,116,0.3);
  position: relative;
  z-index: 1;
  transition: transform 0.5s;
}

.envelope-flap {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  position: absolute;
  top: 0; left: 0;
  z-index: 2;
  transform-origin: top center;
  transition: transform 0.6s ease;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-icon {
  font-size: 3rem;
  color: var(--pink-dark);
  margin-bottom: 1rem;
}

.envelope-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Letter Modal */
.letter-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.letter-modal.active { display: flex; }

.letter-card {
  background: linear-gradient(135deg, #FFF8F0, #FAE5D3);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: scaleIn 0.5s ease;
}

.letter-card h3 {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--pink-dark);
  margin-bottom: 1rem;
}

.letter-card p {
  font-family: 'Dancing Script', cursive;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-dark);
  text-align: left;
}

.letter-card .close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--pink);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s;
}

.letter-card .close-btn:hover { background: var(--pink-dark); }

/* ===== WISHES / INTERACTIVE ===== */
#wishes {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, #F5E6CC 0%, #F2D7D9 100%);
  text-align: center;
}

#wishes .section-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--pink-dark);
  margin-bottom: 2rem;
}

.wish-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(212,120,156,0.4);
  transition: all 0.3s;
  margin: 0.5rem;
}

.wish-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(212,120,156,0.5);
}

.wish-btn.secondary {
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  box-shadow: 0 8px 25px rgba(122,140,115,0.4);
}

.wish-btn.secondary:hover {
  box-shadow: 0 12px 35px rgba(122,140,115,0.5);
}

/* Popup */
.wish-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.wish-popup.active { display: flex; }

.wish-popup-content {
  background: linear-gradient(135deg, #FFF8F0, #F2D7D9);
  border-radius: 24px;
  padding: 3rem;
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: scaleIn 0.5s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.wish-popup-content h3 {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: var(--pink-dark);
  margin-bottom: 1rem;
}

.wish-popup-content p {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.6;
}

.wish-popup-content .close-popup {
  margin-top: 1.5rem;
  padding: 0.7rem 2rem;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.wish-popup-content .close-popup:hover { background: var(--sage-dark); }

/* ===== MINI GAME ===== */
#game {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, #F2D7D9 0%, #D4E7D0 100%);
  text-align: center;
}

#game .section-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

#game .subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 10px;
  justify-content: center;
  margin: 1.5rem auto;
}

.game-card {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--pink-light), var(--sage-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.4s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  user-select: none;
}

.game-card.flipped {
  background: #fff;
  transform: rotateY(180deg);
}

.game-card.matched {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 20px rgba(212,165,116,0.4);
  pointer-events: none;
}

.game-card .card-front {
  font-size: 1.5rem;
  color: var(--pink-dark);
}

.game-card .card-back {
  display: none;
}

.game-card.flipped .card-front { display: none; }
.game-card.flipped .card-back { display: block; }

.game-info {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-light);
}

.game-info span {
  font-weight: 600;
  color: var(--pink-dark);
}

.game-reset {
  margin-top: 1rem;
  padding: 0.6rem 2rem;
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
}

.game-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122,140,115,0.4);
}

/* ===== FOOTER ===== */
footer {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--sage-dark), #5A6B54);
  text-align: center;
  color: #fff;
}

footer p {
  font-family: 'Dancing Script', cursive;
  font-size: 1.2rem;
  opacity: 0.9;
}

footer .heart { color: var(--pink); animation: pulse 1.5s infinite; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes scaleIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAV ===== */
.floating-nav {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.floating-nav a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--text-light);
  transition: all 0.3s;
}

.floating-nav a:hover {
  background: var(--pink-light);
  color: var(--pink-dark);
}

/* ===== CONFETTI ===== */
.confetti-piece {
  position: fixed;
  width: 10px; height: 10px;
  z-index: 9999;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  to { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .countdown-item { min-width: 70px; padding: 1rem; }
  .countdown-item .number { font-size: 1.8rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .game-board { grid-template-columns: repeat(4, 65px); gap: 8px; }
  .game-card { width: 65px; height: 65px; font-size: 1.6rem; }
  .letter-card { padding: 1.5rem; }
  .floating-nav { bottom: 1rem; padding: 0.4rem 0.8rem; }
  .floating-nav a { width: 36px; height: 36px; font-size: 1rem; }
}
