@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Quicksand:wght@400;500;600;700&display=swap');

:root{
  --yellow: #ffd23f;
  --yellow-deep: #f5b400;
  --pink: #f9c2d1;
  --pink-deep: #e88aa3;
  --ink: #3a2b23;
  --card-bg: #fffaf0;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0; height:100%;
  font-family:'Quicksand', sans-serif;
  color: var(--ink);
  overflow:hidden;
}

body{
  background: url('images/scene.png') center bottom / cover no-repeat, #bcdcf7;
  display:flex; align-items:center; justify-content:center;
  min-height:100vh;
  position:relative;
}

.pixel{ font-family:'Press Start 2P', monospace; }

#app{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  padding: 24px;
}

.screen{
  display:none;
  width:100%;
  max-width:520px;
  animation: pop .35s ease;
}
.screen.active{ display:block; }

@keyframes pop{
  from{ transform: scale(.92); opacity:0; }
  to{ transform: scale(1); opacity:1; }
}

.card{
  background: var(--card-bg);
  border: 3px solid var(--pink-deep);
  border-radius: 18px;
  box-shadow: 0 10px 0 rgba(0,0,0,0.08), 0 18px 40px rgba(0,0,0,0.18);
  padding: 30px 26px;
  text-align:center;
  max-height: 82vh;
  overflow-y:auto;
}

.card h1, .card h2{
  font-size: 15px;
  line-height:1.7;
  margin: 0 0 14px;
  color: var(--ink);
}

.card h1{ font-size: 16px; }

.subtext{
  font-size: 13px;
  color:#a15a72;
  margin: 6px 0 18px;
}

.hearts{
  font-size: 18px;
  letter-spacing: 6px;
  margin-bottom: 14px;
}

.bouquet-emoji{ font-size: 54px; margin: 6px 0 10px; }

.btn{
  font-family:'Press Start 2P', monospace;
  font-size: 11px;
  background: var(--pink);
  border: 2px solid var(--pink-deep);
  color: #7a2f45;
  padding: 12px 18px;
  border-radius: 10px;
  cursor:pointer;
  margin-top: 10px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover{ background: var(--pink-deep); color:#fff; transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.btn.gold{
  background: var(--yellow);
  border-color: var(--yellow-deep);
  color: #6b4a00;
}
.btn.gold:hover{ background: var(--yellow-deep); color:#fff; }

.gift-row{
  display:flex; justify-content:center; gap:22px;
  margin: 18px 0 6px;
  font-size: 46px;
}
.gift-row span{
  cursor:pointer;
  transition: transform .15s ease;
  display:inline-block;
}
.gift-row span:hover{ transform: scale(1.15) rotate(-4deg); }

.hint{ font-size:11px; color:#a15a72; margin-top: 10px; }

.error-box{
  border:2px solid #999;
  background:#eee;
  color:#333;
  padding:14px;
  border-radius:8px;
  margin: 14px 0;
}
.error-title{
  background:#2b3a8f; color:#fff; font-size:12px; padding:6px 8px; margin:-14px -14px 10px;
  border-radius:6px 6px 0 0;
}

.quiz-options{
  display:flex; flex-direction:column; gap:10px; margin-top: 10px;
}
.opt{
  font-family:'Quicksand', sans-serif;
  font-weight:600;
  background:#fff;
  border:2px solid var(--pink-deep);
  border-radius:10px;
  padding: 12px;
  cursor:pointer;
  font-size:14px;
  transition: background .15s ease;
}
.opt:hover{ background: #fde8ee; }
.opt.correct{ background:#c9f0d0 !important; border-color:#4caf6a; }
.opt.wrong{ background:#f9c9c9 !important; border-color:#d9534f; }

.progress{ font-size:12px; color:#a15a72; margin-top: 14px; }

.keypad{
  display:grid; grid-template-columns: repeat(3, 56px);
  gap:10px; justify-content:center; margin: 16px 0;
}
.key{
  font-family:'Press Start 2P', monospace;
  font-size:14px;
  background:#fff; border:2px solid var(--pink-deep);
  border-radius:10px; padding:14px 0; cursor:pointer;
}
.key:hover{ background:#fde8ee; }

.pass-display{
  display:flex; justify-content:center; gap:8px; margin-bottom: 6px;
}
.pass-slot{
  width:34px; height:34px; border:2px solid var(--pink-deep); border-radius:6px;
  display:flex; align-items:center; justify-content:center;
  font-family:'Press Start 2P', monospace; font-size:14px; background:#fff;
}

.letter-box{
  background:#fffdf5;
  border:1px solid #e7cfa6;
  border-radius:8px;
  padding:16px;
  text-align:left;
  font-size:14.5px;
  line-height:1.7;
  position:relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.letter-title{ font-weight:700; margin-bottom:8px; font-size:15px; color:#a15a2c; }

.letter-flowers{ font-size:40px; text-align:center; margin: 6px 0 12px; }

.scroll-gallery-wrap{
  height: 300px;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid var(--pink-deep);
  margin: 12px 0;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
}
.scroll-gallery{
  display:flex;
  flex-direction: column;
  gap:6px;
  animation: scrollGallery linear infinite;
}
.scroll-gallery img{
  width:100%;
  height:300px;
  object-fit:cover;
  display:block;
  flex-shrink:0;
}
@keyframes scrollGallery{
  from{ transform: translateY(0); }
  to{ transform: translateY(-50%); }
}

.dict-word{ font-size:20px; font-weight:700; text-align:left; }
.dict-phon{ font-size:12px; color:#a15a72; text-align:left; margin-bottom:10px; }
.dict-def{ font-size:14px; text-align:left; line-height:1.6; }

.song-box{
  margin-top: 14px;
}

.pizza-rain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 999;
  display: none;
}
.pizza-rain.active{ display: block; }
.pizza-rain span{
  position: absolute;
  top: -60px;
  font-size: 28px;
  animation-name: pizzaFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes pizzaFall{
  from{ transform: translateY(-10vh) rotate(0deg); }
  to{ transform: translateY(110vh) rotate(360deg); }
}

.home-btn{
  margin-top: 18px;
  font-size: 10px;
  background:none; border:none; color:#a15a72; cursor:pointer; text-decoration:underline;
  font-family:'Quicksand', sans-serif; font-weight:600;
}

.video-wrap{
  margin-top:14px; border-radius:10px; overflow:hidden; border:2px solid var(--pink-deep);
}
.video-wrap video{ width:100%; display:block; }

@media (max-width:480px){
  .card{ padding:22px 16px; }
  .card h1{ font-size:14px; }
  .photo-grid img{ height:70px; }
}
