@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Playfair+Display:wght@600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --pink: #ff4f9a;
  --rose: #ff77b7;
  --purple: #8c5cff;
  --cream: #fff8fc;
  --text: #fff;
}
html, body { width: 100%; min-height: 100%; }
body {
  overflow: hidden;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(255,79,154,.20), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(140,92,255,.22), transparent 32%),
    linear-gradient(135deg, #090512, #16091e 50%, #090512);
}
body:before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
}
#particles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #fff; opacity: .5; animation: drift linear infinite;
}
@keyframes drift { from { transform: translateY(105vh) translateX(0); } to { transform: translateY(-10vh) translateX(70px); } }

.screen {
  position: fixed; inset: 0; display: none; place-items: center;
  padding: 28px; opacity: 0; transform: scale(.97);
}
.screen.active { display: grid; animation: enter .8s ease forwards; }
@keyframes enter { to { opacity: 1; transform: scale(1); } }

.glass {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 25px 80px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.intro-card {
  width: min(680px, 100%); padding: 65px 45px; border-radius: 32px;
  text-align: center;
}
.mini-heart { font-size: 58px; color: var(--rose); animation: beat 1.3s infinite; }
@keyframes beat { 50% { transform: scale(1.18); } }
.eyebrow { color: #ffc3df; text-transform: uppercase; letter-spacing: 3px; font-size: 11px; font-weight: 700; }
h1, h2 { font-family: "Playfair Display", serif; }
h1 { font-size: clamp(48px, 8vw, 82px); margin: 15px 0; line-height: .95; }
h1 span, h2 span { color: #ff82bb; }
.intro-text { color: #ddd2df; font-size: 18px; margin-bottom: 32px; }
.hint { color: #988ca0; font-size: 12px; margin-top: 18px; }
.glow-btn, .outline-btn, .cake-btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.glow-btn {
  color: white; padding: 16px 25px; border-radius: 999px;
  background: linear-gradient(90deg, #ff438f, #9a62ff);
  box-shadow: 0 10px 35px rgba(255,79,154,.28);
  transition: .25s;
}
.glow-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 45px rgba(255,79,154,.45); }

.top-tag { position: absolute; top: 34px; color: #ffb9d8; letter-spacing: 3px; font-size: 11px; }
.birthday-layout {
  width: min(1050px, 100%); display: grid; grid-template-columns: .9fr 1.1fr;
  gap: 60px; align-items: center;
}
.photo-wrap { width: min(440px, 80vw); aspect-ratio: 4/5; position: relative; justify-self: center; }
.photo-wrap img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  border-radius: 35px; border: 5px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  position: relative; z-index: 2;
}
.photo-ring { position: absolute; inset: -13px; border: 1px solid rgba(255,119,183,.5); border-radius: 45px; transform: rotate(4deg); }
.spark { position: absolute; z-index: 4; color: #ffd0e5; font-size: 28px; animation: twinkle 1.6s infinite alternate; }
.s1 { top: -25px; left: 15%; } .s2 { top: 15%; right: -24px; animation-delay: .3s; }
.s3 { bottom: 13%; left: -25px; animation-delay: .7s; } .s4 { bottom: -20px; right: 20%; animation-delay: 1s; }
@keyframes twinkle { to { transform: scale(1.4) rotate(20deg); opacity: .45; } }

.message-card { padding: 48px; border-radius: 30px; }
.message-card h2 { font-size: clamp(42px, 6vw, 66px); margin: 10px 0 20px; }
#typedMessage { color: #ded4e2; line-height: 1.9; min-height: 170px; margin-bottom: 18px; }

.gift-content { text-align: center; }
.gift-content h2 { font-size: clamp(42px, 6vw, 70px); margin: 25px 0 10px; }
.gift-content p { color: #c8bdcd; margin-bottom: 28px; }
.cake-btn { font-size: 75px; background: transparent; transition: .25s; filter: drop-shadow(0 10px 20px rgba(255,79,154,.25)); }
.cake-btn:hover { transform: scale(1.12) rotate(-3deg); }
.cake { width: 220px; height: 170px; position: relative; margin: auto; }
.cake-body { position: absolute; bottom: 5px; left: 10px; width: 200px; height: 95px; border-radius: 12px 12px 28px 28px;
  background: linear-gradient(180deg, #ff8fbd, #c83f79); box-shadow: 0 20px 50px rgba(255,79,154,.25); }
.cake-body:before { content:""; position:absolute; top:-14px; left:0; width:100%; height:28px; border-radius:50%; background:#ffe0ed; }
.cake-body span { position: relative; top: 30px; margin: 0 18px; color: white; font-size: 18px; }
.icing { position:absolute; z-index:2; top:72px; left:18px; width:184px; height:25px; border-radius: 50%; background:#fff0f7; }
.candle { position:absolute; z-index:3; width:12px; height:55px; background: repeating-linear-gradient(45deg,#fff 0 7px,#ff65a6 7px 14px); left:104px; top:25px; border-radius: 5px; }
.flame { position:absolute; z-index:4; width:18px; height:27px; background:#ffd166; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); left:101px; top:2px; box-shadow:0 0 25px #ffcc5c; animation: flame .8s infinite alternate; }
@keyframes flame { to { transform: rotate(-45deg) scale(1.1); } }

.final-card { width:min(700px,100%); text-align:center; padding:42px; border-radius:32px; }
.final-photo { width:150px; height:150px; margin:0 auto 20px; border-radius:50%; padding:5px; background:linear-gradient(135deg,#ff66a9,#8c5cff); }
.final-photo img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.final-card h2 { font-size:clamp(38px,5vw,58px); margin:10px 0 18px; }
.final-card > p:not(.eyebrow) { color:#d9cedd; line-height:1.8; }
.signature { margin:25px 0; color:#ffb9d8; font-family:"Playfair Display",serif; font-size:21px; }
.outline-btn { background:transparent; border:1px solid rgba(255,255,255,.25); color:white; border-radius:999px; padding:12px 20px; }

#confetti { position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:20; }
.confetti-piece { position:absolute; top:-20px; width:9px; height:18px; animation: fall 3s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity:.9; } }

@media (max-width: 800px) {
  .birthday-layout { grid-template-columns:1fr; gap:25px; overflow:auto; max-height:90vh; padding:25px 0; }
  .photo-wrap { width:min(300px,72vw); }
  .message-card { padding:28px; }
  #typedMessage { min-height:0; }
  .intro-card { padding:45px 25px; }
  .final-card { padding:30px 22px; }
}
