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

:root {
  --pink:       #C2698A;
  --pink-light: #F5D0DE;
  --pink-dark:  #8B3A57;
  --pink-deep:  #5C1F36;
  --white:      #FFFAF9;
  --text:       #3a1a26;
  --text-muted: #7a4d5e;
  --radius:     16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pink-deep) 0%, var(--pink-dark) 50%, var(--pink) 100%);
  text-align: center;
  overflow: hidden;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5.5vw, 4rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 14vw, 10rem);
  color: #fff;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3), 0 4px 24px rgba(91, 31, 54, 0.4);
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%       { transform: scale(1.04); }
  30%       { transform: scale(1); }
  45%       { transform: scale(1.02); }
}

.hero-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--pink-light);
  max-width: 500px;
  margin-top: 0.3rem;
}

.scroll-btn {
  margin-top: 0.8rem;
  padding: 0.75rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50px;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  transition: background 0.3s, color 0.3s;
}
.scroll-btn:hover { background: rgba(255, 255, 255, 0.2); }

section { padding: 6rem 1.5rem; }

.section-inner {
  max-width: 860px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--pink-dark);
  text-align: center;
  margin-bottom: 3rem;
}

#wishes { background: var(--white); }

.languages-list {
  max-width: 560px;
  margin: 0 auto;
}

.lang-row {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--pink-light);
}
.lang-row:last-child { border-bottom: none; }

.lang-row.fade-in:nth-child(1) { transition-delay: 0ms; }
.lang-row.fade-in:nth-child(2) { transition-delay: 90ms; }
.lang-row.fade-in:nth-child(3) { transition-delay: 180ms; }
.lang-row.fade-in:nth-child(4) { transition-delay: 270ms; }
.lang-row.fade-in:nth-child(5) { transition-delay: 360ms; }

.lang-flag {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-greeting {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--pink-dark);
  line-height: 1.3;
}

.lang-name {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

#letter {
  background: linear-gradient(135deg, var(--pink-light) 0%, #fce4ec 100%);
}

.letter-inner { display: flex; justify-content: center; }

.letter-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 3rem 3.5rem;
  max-width: 640px;
  box-shadow: 0 8px 40px rgba(194, 105, 138, 0.18);
  position: relative;
}

.letter-card::before {
  content: '❝';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-size: 4rem;
  color: var(--pink-light);
  font-family: 'Playfair Display', serif;
  line-height: 1;
}

.letter-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.letter-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--pink-dark);
  margin-bottom: 1.2rem;
}

.letter-card p {
  color: var(--text);
  line-height: 1.85;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.letter-sign {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--pink);
  text-align: right;
  margin-top: 1.5rem;
}

#cute { background: var(--white); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.cute-card {
  perspective: 1200px;
  height: 220px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.4, 0, 0.2, 1);
}

.cute-card:not(.flipped):hover .card-inner { transform: rotateY(14deg) scale(1.02); }
.cute-card.flipped .card-inner { transform: rotateY(180deg); }

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.card-front { background: var(--pink-light); }
.card-front::after {
  content: '↺';
  position: absolute;
  bottom: 0.7rem; right: 0.9rem;
  font-size: 1rem;
  color: var(--pink);
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.3s;
}
.cute-card:not(.flipped):hover .card-front::after { opacity: 1; transform: rotate(25deg); }

.cute-emoji { font-size: 3.2rem; }

.card-back {
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink-deep) 100%);
  transform: rotateY(180deg);
  box-shadow: 0 8px 28px rgba(91, 31, 54, 0.35);
}
.card-back::after {
  content: '♥';
  position: absolute;
  bottom: 0.7rem; right: 0.9rem;
  color: var(--pink-light);
  opacity: 0.5;
  font-size: 0.95rem;
}
.card-back h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.65rem;
}
.card-back p {
  color: var(--pink-light);
  font-size: 0.87rem;
  line-height: 1.65;
}

#cake { background: linear-gradient(180deg, var(--white) 0%, #fce4ec 100%); }

.cake-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.gifts-row {
  display: flex;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.gift-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 260px;
  max-width: 380px;
  gap: 2rem;
}

#gift .section-inner { max-width: 1100px; }

.cake-interactive,
.gift-interactive {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s ease;
}
.cake-interactive:not(.opened):hover,
.gift-interactive:not(.opened):hover { transform: translateY(-6px); }
.cake-interactive.opened,
.gift-interactive.opened { cursor: default; pointer-events: none; }

.candles-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 3px;
}
.candle {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flame {
  font-size: 16px;
  display: block;
  animation: flicker 0.55s ease-in-out infinite alternate;
  transform-origin: bottom center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
@keyframes flicker {
  from { transform: scaleY(1) rotate(-4deg); }
  to   { transform: scaleY(1.2) rotate(4deg); }
}
.cake-interactive.opened .flame {
  opacity: 0;
  transform: translateX(6px) scale(0);
  animation: none;
}
.candle-stick {
  width: 10px;
  height: 32px;
  background: linear-gradient(to right, rgba(255,255,255,0.5), #FFE082, rgba(255,255,255,0.3));
  border-radius: 4px;
  border: 1px solid rgba(200,160,50,0.3);
}

.cake-top-tier {
  width: 172px;
  height: 66px;
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink) 100%);
  border-radius: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(139, 58, 87, 0.35);
  z-index: 2;
}
.cake-bot-tier {
  width: 228px;
  height: 74px;
  background: linear-gradient(135deg, var(--pink) 0%, #F5D0DE 100%);
  border-radius: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(194, 105, 138, 0.3);
  z-index: 1;
  margin-top: 1px;
}
.frosting {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 16px;
  background: #fff;
  border-radius: 14px 14px 40% 40% / 14px 14px 8px 8px;
  opacity: 0.95;
}
.tier-content {
  position: relative;
  z-index: 2;
  font-size: 1rem;
  letter-spacing: 0.4rem;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(91, 31, 54, 0.3);
}
.cake-plate {
  width: 258px;
  height: 13px;
  background: linear-gradient(to right, #dda8bc, #fff8fa, #dda8bc);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(139, 58, 87, 0.15);
  margin-top: 2px;
}

.open-hint {
  margin-top: 1.3rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}
.cake-interactive.opened .open-hint,
.gift-interactive.opened .open-hint { opacity: 0; }

.cake-reveal-panel {
  width: 100%;
  max-width: 540px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1s ease, opacity 0.7s ease 0.25s;
}
.cake-reveal-panel.open { max-height: 700px; opacity: 1; }

.photo-frame {
  border: 3px dashed var(--pink);
  border-radius: var(--radius);
  min-height: 420px;
  background: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cake-photo,
.gift-photo { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 3px); }
.cake-photo.hidden,
.gift-photo.hidden { display: none; }

#gift { background: var(--white); }

.gift-lid {
  width: 222px;
  height: 66px;
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink) 100%);
  border-radius: 10px 10px 4px 4px;
  position: relative;
  z-index: 2;
  transform-origin: top center;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  box-shadow: 0 4px 18px rgba(139, 58, 87, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-lid.lifted { transform: rotate(-68deg) translateX(-26px); opacity: 0.6; }

.gift-bow {
  position: absolute;
  top: -30px; left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  filter: drop-shadow(0 2px 4px rgba(91,31,54,0.3));
}
.lid-ribbon {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%; width: 24px;
  margin-left: -12px;
  background: rgba(91, 31, 54, 0.45);
  border-radius: 2px;
}

.gift-body {
  width: 212px;
  height: 186px;
  background: linear-gradient(160deg, var(--pink) 0%, var(--pink-light) 100%);
  border-radius: 0 0 14px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(194, 105, 138, 0.28);
}
.gift-ribbon-h {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 28px; margin-top: -14px;
  background: var(--pink-deep);
  opacity: 0.55;
}
.gift-ribbon-v {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 28px; margin-left: -14px;
  background: var(--pink-deep);
  opacity: 0.55;
}

.gift-reveal-panel {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1s ease, opacity 0.7s ease 0.35s;
}
.gift-reveal-panel.open { max-height: 900px; opacity: 1; }

.ue-card {
  position: relative;
  background: #111;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.ue-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(6, 193, 103, 0.13) 0%, transparent 70%);
  pointer-events: none;
}
.ue-top-bar { height: 6px; background: #06C167; }
.ue-header {
  padding: 1.8rem 1.8rem 1rem;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ue-logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}
.ue-uber { color: #fff; }
.ue-eats { color: #06C167; }
.ue-body {
  padding: 0.5rem 1.8rem 2.4rem;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ue-label {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.2rem;
}
.ue-code-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem 1.2rem;
  min-height: 90px;
  margin-bottom: 1.6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  display: block;
}
.ue-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #06C167;
}
.ue-tagline {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  letter-spacing: 0.03em;
}

#counter {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink-deep));
  color: #fff;
  text-align: center;
}
#counter .section-title { color: #fff; }

.counter-boxes {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.counter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem 2.5rem;
  min-width: 120px;
}
.count-num {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.count-label {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--pink-light);
  margin-top: 0.4rem;
  text-transform: uppercase;
}
.counter-sub {
  color: var(--pink-light);
  font-style: italic;
  font-size: 1rem;
}

#closing-msg {
  background: linear-gradient(160deg, #2a0c1a 0%, #3d1228 55%, #1e0812 100%);
  padding: 5rem 1.5rem;
  text-align: center;
}
.closing-card {
  display: inline-block;
  max-width: 620px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(194, 105, 138, 0.35);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  position: relative;
}
.closing-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(194,105,138,0.4), transparent 50%, rgba(194,105,138,0.25));
  pointer-events: none;
}
.closing-hearts-top,
.closing-hearts-bottom {
  font-size: 1.3rem;
  letter-spacing: 0.6em;
  color: var(--pink);
  margin-bottom: 1.8rem;
}
.closing-hearts-bottom {
  margin-bottom: 0;
  margin-top: 1.8rem;
}
.closing-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.18rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 2;
  letter-spacing: 0.01em;
}
.closing-signature {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--pink-light);
  letter-spacing: 0.05em;
}

footer {
  background: var(--pink-deep);
  color: var(--pink-light);
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
  line-height: 2;
}

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .letter-card { padding: 2rem 1.5rem; }
  .counter-boxes { gap: 1rem; }
  .counter-box { padding: 1rem 1.5rem; min-width: 90px; }
  .count-num { font-size: 2.2rem; }
  .hero-name { font-size: clamp(3rem, 18vw, 5rem); }
  .cake-top-tier { width: 148px; }
  .cake-bot-tier { width: 196px; }
  .cake-plate { width: 220px; }
}
