:root {
  --pink: #ffbad9;
  --pink-dark: #ff84b3;
  --blue: #cbe7ff;
  --blue-dark: #88c6ff;
  --white: #ffffff;
  --text: #3f2a45;
  --shadow: rgba(131, 68, 112, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top left, rgba(255, 196, 224, 0.9), transparent 24%),
    radial-gradient(circle at bottom right, rgba(195, 235, 255, 0.95), transparent 28%),
    linear-gradient(180deg, #ffe8f2 0%, #e7f4ff 100%);
  color: var(--text);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--pink-dark);
  color: white;
}

main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 80px var(--shadow);
  margin-bottom: 2rem;
  animation: floatIn 0.9s ease both;
}

.hero-secondary {
  background: linear-gradient(135deg, rgba(255, 204, 233, 0.95), rgba(207, 233, 255, 0.95));
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  color: #9f6a8b;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 3.5vw, 4.5rem);
  margin: 0;
  line-height: 1;
}

.hero-copy {
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 1rem 0 1.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 118, 168, 0.24);
}

.button-primary {
  background: linear-gradient(135deg, var(--pink-dark), #ff90cb);
  color: white;
}

.button-secondary {
  background: linear-gradient(135deg, #9bb8ff, var(--blue-dark));
  color: white;
}

.hero-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-graphic svg {
  width: 100%;
  max-width: 240px;
  height: auto;
}

.hero-graphic .heart-bloom {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 228, 242, 0.95), rgba(255, 128, 173, 0.18));
  box-shadow: 0 30px 90px rgba(255, 128, 173, 0.22);
  font-size: 4rem;
  animation: bloomGlow 3s ease-in-out infinite;
}

@keyframes bloomGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 28px 90px rgba(255, 128, 173, 0.22); }
  50% { transform: scale(1.04); box-shadow: 0 32px 110px rgba(255, 128, 173, 0.35); }
}

.cat-face {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.magic-card p {
  margin: 0;
  font-size: 1rem;
  color: #5a3e5f;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.game-hub {
  margin-top: 2rem;
}

.game-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.game-card.preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.game-card.preview h2 {
  margin-top: 0;
}

.feature-card {
  background: white;
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: 0 18px 40px rgba(91, 58, 98, 0.12);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h2 {
  margin: 0 0 0.75rem;
}

.feature-card p {
  margin: 0;
  line-height: 1.75;
}

.letter-section {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}

.letter-card {
  width: min(760px, 100%);
  background: linear-gradient(180deg, rgba(255, 232, 243, 0.95), rgba(221, 242, 255, 0.95));
  padding: 2rem;
  border-radius: 32px;
  box-shadow: 0 18px 48px rgba(82, 62, 102, 0.14);
}

.letter-card h2 {
  margin-top: 0;
}

.letter-card p {
  line-height: 1.9;
  margin: 1rem 0;
}

.letter-signature {
  margin-top: 1.5rem;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.timeline-card {
  background: white;
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: 0 16px 40px rgba(102, 74, 112, 0.12);
}

.timeline-date {
  display: inline-block;
  background: var(--pink);
  color: #7b3e6b;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.love-reasons {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  padding: 2rem;
  box-shadow: 0 16px 40px rgba(101, 74, 112, 0.1);
}

.love-reasons h2 {
  margin-top: 0;
}

.love-reasons ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.love-reasons li {
  margin: 0.9rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 1rem;
  line-height: 1.8;
}

.love-reasons li::before {
  content: '💗';
  position: absolute;
  left: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  border-radius: 28px;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(107, 82, 118, 0.12);
}

.gallery-emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.gallery-card h3 {
  margin: 0 0 0.75rem;
}

.gallery-card p {
  margin: 0;
  line-height: 1.8;
}

.game-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.game-card {
  background: white;
  border-radius: 32px;
  padding: 1.8rem;
  box-shadow: 0 18px 48px rgba(112, 69, 105, 0.12);
}

.playground {
  position: relative;
  min-height: 260px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 213, 226, 0.95), rgba(206, 238, 255, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.target-cat {
  position: absolute;
  padding: 0.85rem;
  font-size: 1.8rem;
  border-radius: 50%;
  border: none;
  background: #ffd7eb;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 103, 163, 0.25);
  animation: floatBunny 2.6s ease-in-out infinite;
}

.balloon-stage {
  position: relative;
  min-height: 260px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 229, 242, 0.95), rgba(207, 235, 255, 0.95));
  overflow: hidden;
  margin: 1rem 0;
}

.balloon {
  position: absolute;
  width: 56px;
  height: 72px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at top, #ffdaec, #ff8ec9);
  color: #70335f;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  animation: floatBalloon 4s ease-in infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(255, 109, 167, 0.22);
}

.balloon.pop {
  transform: scale(1.2);
  opacity: 0;
}

.wish-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  margin: 1rem 0;
}

.wish-box input {
  border-radius: 20px;
  border: 1px solid rgba(145, 88, 124, 0.2);
  padding: 0.95rem 1rem;
  font-size: 1rem;
  width: 100%;
}

.wish-cloud {
  min-height: 200px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 244, 249, 0.95), rgba(223, 239, 255, 0.95));
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.wish-star {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wish-star.float-up {
  opacity: 1;
  transform: translateY(-180px);
  transition: transform 4s ease-in, opacity 0.8s ease-in;
}

.wish-help {
  margin: 0.9rem 0 0;
  color: #7a417f;
}

.code-box {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.code-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.code-bubble {
  border: none;
  background: linear-gradient(135deg, #ffd7ec, #ff87c4);
  color: #5a2a52;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(255, 97, 158, 0.22);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.code-bubble:hover,
.code-bubble.selected {
  transform: translateY(-2px);
  opacity: 0.92;
}

.code-bubble.selected {
  background: linear-gradient(135deg, #ff90c7, #b29cff);
  color: #fff;
  box-shadow: 0 18px 32px rgba(255, 113, 194, 0.26);
}

.scoreboard-section {
  margin-top: 30px;
}

.scoreboard-card {
  background: rgba(255,255,255,0.92);
  border: var(--border);
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: 0 18px 48px rgba(112, 69, 105, 0.12);
}

.scoreboard-summary {
  margin: 0.75rem 0 1rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.scoreboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.scoreboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.scoreboard-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.75);
}

.scoreboard-item strong {
  font-size: 1rem;
  color: var(--text);
}

.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff91c9, #9fb5ff);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
}

.scoreboard-empty {
  color: var(--text-soft);
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.75);
}

.code-screen {
  background: #fdf5ff;
  border: 1px solid rgba(173, 121, 160, 0.22);
  border-radius: 24px;
  padding: 1rem;
  min-height: 160px;
  font-family: 'Courier New', Courier, monospace;
  color: #5a2a52;
  overflow-wrap: anywhere;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.quiz-card {
  background: linear-gradient(180deg, rgba(255, 244, 249, 0.95), rgba(223, 239, 255, 0.95));
  border-radius: 28px;
  padding: 1.5rem;
}

.quiz-question {
  font-weight: 700;
  margin-bottom: 1rem;
}

.quiz-answers {
  display: grid;
  gap: 0.9rem;
}

.quiz-answers button {
  border: 2px solid transparent;
  background: white;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.quiz-answers button:hover {
  transform: translateY(-1px);
  border-color: var(--pink-dark);
}

.quiz-result {
  margin-top: 1rem;
  font-weight: 700;
}

.site-footer {
  text-align: center;
  padding: 2rem;
  color: #755a78;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.mobile-overlay.visible {
  display: flex;
}

.mobile-overlay-card {
  max-width: 420px;
  width: 100%;
  border-radius: 32px;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(255, 242, 250, 0.98), rgba(222, 240, 255, 0.98));
  box-shadow: 0 28px 80px rgba(138, 80, 136, 0.16);
  text-align: center;
}

.mobile-overlay-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 2.5vw, 2.4rem);
}

.mobile-overlay-card p {
  margin: 0 0 1.5rem;
  line-height: 1.8;
  color: #6a3f67;
}

.mobile-overlay-card .button {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.mobile-overlay-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

body.mobile-overlay-open {
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}

.mobile-overlay {
  overflow-y: hidden;
}

.mobile-overlay.visible {
  overflow-y: auto;
}

.mobile-overlay-card {
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-overlay-card::-webkit-scrollbar {
  width: 8px;
}

.mobile-overlay-card::-webkit-scrollbar-thumb {
  background: rgba(161, 90, 143, 0.35);
  border-radius: 999px;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 20px 60px rgba(255, 133, 178, 0.25); }
  50% { transform: scale(1.03); box-shadow: 0 26px 70px rgba(255, 133, 178, 0.35); }
}

@keyframes floatBunny {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes floatBalloon {
  0% { transform: translateY(0); }
  100% { transform: translateY(-280px); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .game-card.preview {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .hero {
    padding: 1.5rem;
  }

  .hero-copy,
  .feature-card p,
  .gallery-card p,
  .letter-card p,
  .timeline-card p,
  .wish-help {
    font-size: 1rem;
  }

  .game-card,
  .letter-card,
  .gallery-card,
  .timeline-card,
  .love-reasons,
  .quiz-card,
  .code-box,
  .wish-cloud,
  .balloon-stage,
  .playground {
    padding: 1.35rem;
  }

  .wish-box {
    grid-template-columns: 1fr;
  }

  .hero-graphic .heart-bloom {
    width: 180px;
    height: 180px;
    font-size: 3.4rem;
  }

  .target-cat,
  .balloon {
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
  }

  main {
    padding: 1.2rem;
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}
