:root {
  --pink: #ff77ac;
  --pink-soft: #ffe0ed;
  --blue: #73c8ff;
  --blue-soft: #dff4ff;
  --cream: #fff8ec;
  --ink: #26324a;
  --muted: #6f7890;
  --white: rgba(255, 255, 255, 0.86);
  --shadow: 0 28px 80px rgba(80, 93, 138, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff3fa 0%, #eff9ff 45%, #fff9ee 100%);
  overflow-x: hidden;
}

.background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 360px; height: 360px; border-radius: 999px; filter: blur(6px); opacity: .55; animation: float 9s ease-in-out infinite; }
.blob.pink { background: var(--pink-soft); top: -80px; left: -70px; }
.blob.blue { background: var(--blue-soft); right: -100px; top: 20%; animation-delay: -3s; }
.blob.cream { background: #fff1bd; bottom: -130px; left: 28%; animation-delay: -6s; }

.confetti::before, .confetti::after {
  content: "♡  ✦  ●  ★  ♡  ✧  ●  ✦  ♡";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 7%;
  color: rgba(255, 119, 172, .35);
  font-size: clamp(28px, 6vw, 78px);
  letter-spacing: .55em;
  transform: rotate(-8deg);
}
.confetti::after { top: 76%; color: rgba(115, 200, 255, .38); transform: rotate(7deg); }

.app-shell {
  width: min(960px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 42px 0;
}

.card {
  width: min(760px, 100%);
  display: none;
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 36px;
  background: var(--white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.card.active { display: block; animation: pop .38s ease both; }
.card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(255, 119, 172, .26);
  border-radius: 28px;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,119,172,.18), rgba(115,200,255,.18));
  color: #8f4a78;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
}
.badge.small { font-size: 11px; padding: 7px 12px; }

.hero-icon {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  margin: 26px auto 8px;
  border-radius: 32px;
  font-size: 56px;
  background: linear-gradient(145deg, #ffe3ef, #e1f5ff);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.55), 0 18px 34px rgba(255, 119, 172, .18);
}

h1, h2, h3 { font-family: "Baloo 2", Inter, sans-serif; margin: 0; line-height: 1.02; }
h1 { text-align: center; font-size: clamp(48px, 9vw, 86px); background: linear-gradient(90deg, #ff5fa3, #58bdfd); -webkit-background-clip: text; color: transparent; }
h2 { font-size: clamp(36px, 6vw, 58px); }
h3 { font-size: clamp(28px, 5vw, 44px); }
.subtitle { max-width: 560px; margin: 14px auto 28px; text-align: center; color: var(--muted); font-size: 18px; line-height: 1.6; }

.password-form { max-width: 540px; margin: 0 auto; }
.password-form label { display: block; margin: 0 0 10px 4px; font-weight: 800; color: #566079; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
input, button { font: inherit; }
input {
  width: 100%;
  border: 2px solid rgba(115, 200, 255, .38);
  border-radius: 18px;
  padding: 16px 18px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 17px;
}
input:focus { border-color: var(--pink); box-shadow: 0 0 0 5px rgba(255,119,172,.15); }
button {
  border: 0;
  border-radius: 18px;
  padding: 16px 22px;
  color: white;
  background: linear-gradient(135deg, var(--pink), #65c7ff);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(255, 119, 172, .26);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
button:hover:not(:disabled) { transform: translateY(-2px); filter: saturate(1.1); }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.error { min-height: 22px; color: #d84274; font-weight: 800; }
.tiny-note { text-align: center; color: var(--muted); margin-bottom: 0; }

.game-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 24px; }
.score-pill {
  min-width: 92px;
  padding: 14px 18px;
  border-radius: 22px;
  text-align: center;
  background: #fff;
  color: #ff5fa3;
  font-family: "Baloo 2";
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(80,93,138,.12);
}
.progress-wrap { height: 12px; border-radius: 999px; background: rgba(115,200,255,.16); overflow: hidden; margin-bottom: 24px; }
.progress { height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--blue)); transition: width .3s ease; }
.question-panel { padding: 26px; border-radius: 28px; background: rgba(255,255,255,.62); }
.question-count { color: #ff5fa3; font-weight: 900; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.answer-btn { color: var(--ink); background: white; box-shadow: 0 10px 24px rgba(80,93,138,.10); border: 2px solid transparent; text-align: left; }
.answer-btn.correct { border-color: #6fd690; background: #eefff3; }
.answer-btn.wrong { border-color: #ff8bb6; background: #fff0f6; }
.feedback { min-height: 50px; padding: 18px 4px 4px; font-weight: 800; color: #566079; }
.next-btn { float: right; }

.reveal-card { text-align: center; }
.reveal-ribbon { display: inline-block; margin-bottom: 18px; color: #58aeea; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.reveal-card p { color: var(--muted); font-size: 18px; line-height: 1.6; }
.reveal-btn { margin: 14px auto 18px; font-size: 20px; padding: 18px 28px; }
.reveal-result {
  margin: 22px auto;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,119,172,.16), rgba(115,200,255,.18));
}
.clue-panel { padding: clamp(18px, 4vw, 30px); }
.sparkle { font-size: 42px; animation: spin 1.8s linear infinite; }
.big-answer { font-family: "Baloo 2"; font-size: clamp(54px, 10vw, 100px); font-weight: 900; background: linear-gradient(90deg, #ff5fa3, #58bdfd); -webkit-background-clip: text; color: transparent; }
.clue-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(42vh, 460px);
  object-fit: contain;
  margin: 18px auto 0;
  border-radius: 24px;
  border: 8px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.82);
  box-shadow: 0 18px 44px rgba(38, 50, 74, .20);
}
.mock-note { margin-bottom: 0; font-size: 14px !important; }
.ghost-btn { color: #6a6f82; background: rgba(255,255,255,.82); box-shadow: none; }

@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes float { 50% { transform: translateY(28px) translateX(12px) scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .input-row, .answers { grid-template-columns: 1fr; }
  .game-header { flex-direction: column; }
  .score-pill { align-self: flex-start; }
  .card { border-radius: 26px; }
  .card::before { border-radius: 20px; }
  .clue-image { width: 100%; max-height: none; }
}
