
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink: #c76b98;
  --pink-dark: #984a73;
  --pink-light: #fff0f7;
  --lilac: #eee8ff;
  --text: #503747;
  --muted: #94788b;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at 10% 10%, #ffe7f1, transparent 28rem),
    radial-gradient(circle at 90% 35%, #eee6ff, transparent 30rem),
    #fff9fc;
}

.hero {
  min-height: 55vh;
  padding: 65px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.floating-heart {
  color: #d77ca7;
  font-size: 75px;
  line-height: 1.2;
  animation: pulse 2s infinite;
}

.tag {
  color: #b45c87;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
}

.hero h1 {
  margin: 12px 0;
  color: var(--pink-dark);
  font-family: Georgia, serif;
  font-size: clamp(35px, 7vw, 60px);
  line-height: 1.2;
}

.hero > p:not(.tag) {
  margin: 10px 0 25px;
  color: var(--muted);
}

main {
  width: min(900px, 92%);
  margin: 0 auto;
}

.card {
  margin: 25px auto;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid #f2dce8;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 45px #974e7515;
}

.game {
  text-align: center;
}

.progress {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
  color: #b45c87;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
}

.bar {
  height: 7px;
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f7e4ee;
}

#progressBar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e9a0c3, #b6a0ee);
  transition: width 0.4s ease;
}

.screen {
  animation: appear 0.4s ease;
}

.hidden {
  display: none !important;
}

.emoji {
  width: 85px;
  height: 85px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe4f0, #eee5ff);
  font-size: 42px;
}

h2 {
  margin: 10px 0 15px;
  color: var(--pink-dark);
  font-family: Georgia, serif;
  font-size: clamp(27px, 4vw, 36px);
  line-height: 1.3;
}

.screen > p:not(.tag) {
  max-width: 610px;
  margin: 0 auto 22px;
  color: #765d6d;
}

.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 24px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(110deg, #cf78a2, #b39be9);
  box-shadow: 0 7px 18px #bf75a42b;
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px #bf75a43b;
}

.score {
  color: var(--pink-dark) !important;
  font-weight: bold;
}

.heart-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
  margin: 25px auto;
}

.heart {
  width: 60px;
  height: 60px;
  border: 1px solid #f0cadd;
  border-radius: 17px;
  background: #fff4f9;
  color: #cf77a2;
  font-size: 35px;
  cursor: pointer;
  transition: 0.2s;
}

.heart:hover:not(:disabled) {
  transform: translateY(-5px) rotate(-5deg);
  background: #ffe4f0;
}

.heart.collected {
  border-color: #e7caff;
  background: #f1eaff;
  color: #aa85dc;
  animation: pop 0.3s ease;
  cursor: default;
}

.feedback {
  min-height: 28px;
  margin: 18px 0 !important;
  color: #a35d83 !important;
  font-size: 14px;
}

#question {
  margin: 16px 0;
  color: #604356;
  font-size: 19px;
}

#questionNumber {
  color: var(--muted) !important;
  font-size: 13px;
}

.answers {
  display: grid;
  gap: 10px;
  max-width: 540px;
  margin: 0 auto;
}

.answer {
  padding: 13px 16px;
  border: 1px solid #edd5e3;
  border-radius: 14px;
  background: #fff9fc;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: 0.2s;
}

.answer:hover:not(:disabled) {
  border-color: #d99abd;
  background: #fff0f7;
}

.answer.correct {
  border-color: #bca8e9;
  background: #f1ecff;
  color: #745aab;
}

.answer.wrong {
  border-color: #e7a4bd;
  background: #fff0f4;
}

.letter {
  max-width: 620px;
  margin: 25px auto;
  padding: 25px clamp(18px, 5vw, 35px);
  border: 1px solid #f0d7e5;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff8fb, #f8f3ff);
  text-align: left;
}

.letter h3 {
  margin-bottom: 15px;
  color: var(--pink-dark);
  font-family: Georgia, serif;
  font-size: 23px;
}

.letter p {
  margin: 12px 0;
}

.letter .signature {
  margin-top: 22px;
  color: #b45c87;
  font-family: Georgia, serif;
  font-style: italic;
  text-align: right;
}

.album {
  text-align: center;
}

.album > p:not(.tag) {
  margin: 12px auto;
  color: #765d6d;
}

.upload {
  cursor: pointer;
}

.hint {
  color: var(--muted) !important;
  font-size: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-top: 25px;
}

.empty {
  grid-column: 1 / -1;
  padding: 35px 15px;
  border: 2px dashed #e9c3d7;
  border-radius: 18px;
  color: #b27b99;
}

.empty span {
  font-size: 40px;
}

.photo-card {
  padding: 9px 9px 0;
  overflow: hidden;
  border: 1px solid #f2e0e9;
  border-radius: 14px;
  background: white;
  box-shadow: 0 7px 20px #8c456b12;
  transition: transform 0.2s;
}

.photo-card:hover {
  transform: translateY(-4px);
}

.photo-card img {
  display: block;
  width: 100%;
  height: 235px;
  border-radius: 8px;
  object-fit: cover;
}

.photo-card p {
  padding: 10px 5px;
  color: #a65d81;
  font-family: Georgia, serif;
}

.secondary-btn {
  margin-top: 22px;
  padding: 9px 16px;
  border: 1px solid #e8bfd3;
  border-radius: 22px;
  background: transparent;
  color: #a35a7f;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.secondary-btn:hover {
  background: #fff0f7;
}

footer {
  padding: 25px 10px 35px;
  color: #a47b91;
  text-align: center;
  font-size: 13px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes pop {
  50% { transform: scale(1.15); }
}

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 540px) {
  .hero {
    min-height: 45vh;
    padding: 45px 15px;
  }

  .card {
    border-radius: 20px;
  }

  .heart {
    width: 52px;
    height: 52px;
  }

  .photo-card img {
    height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
