:root {
  --bg1: #3a0ca3; --bg2: #7209b7; --bg3: #f72585;
  --ink: #2b0a3d; --white: #fff;
  --a0: #ff5d73; --a1: #4cc9f0; --a2: #ffd23f; --a3: #3ddc97;
  --a0d: #c9304a; --a1d: #1f8fb8; --a2d: #d1a300; --a3d: #1fa56b;
  --radius: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
  color: var(--white);
  background: linear-gradient(135deg, var(--bg1), var(--bg2) 55%, var(--bg3));
  background-attachment: fixed;
  overflow-x: hidden;
}
.blobs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blobs span {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .25;
  animation: float 14s ease-in-out infinite;
}
.blobs span:nth-child(1) { width: 260px; height: 260px; background: var(--a2); top: -60px; left: -60px; }
.blobs span:nth-child(2) { width: 180px; height: 180px; background: var(--a1); bottom: 10%; right: -40px; animation-delay: -4s; }
.blobs span:nth-child(3) { width: 120px; height: 120px; background: var(--a3); top: 40%; left: 8%; animation-delay: -8s; }
.blobs span:nth-child(4) { width: 90px; height: 90px; background: var(--a0); top: 12%; right: 20%; animation-delay: -2s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-40px) scale(1.15); } }

.app { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; }
.logo { font-weight: 700; letter-spacing: .5px; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.logo b { color: var(--a2); }
.card {
  background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.25);
  border-radius: var(--radius); backdrop-filter: blur(8px); padding: 20px;
}
.btn {
  font: inherit; font-weight: 700; border: 0; cursor: pointer; color: var(--ink);
  background: var(--a2); border-radius: 18px; padding: 16px 28px; font-size: 1.3rem;
  box-shadow: 0 6px 0 var(--a2d); transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--a2d); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.green { background: var(--a3); box-shadow: 0 6px 0 var(--a3d); }
.btn.ghost { background: rgba(255,255,255,.2); color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
input.field {
  font: inherit; font-size: 1.4rem; width: 100%; padding: 14px 18px; border-radius: 16px;
  border: 3px solid transparent; outline: none; color: var(--ink); background: #fff; text-align: center; font-weight: 600;
}
input.field:focus { border-color: var(--a2); }

.answer { position: relative; border: 0; font: inherit; color: #fff; font-weight: 700; border-radius: var(--radius);
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; text-align: left; cursor: pointer;
  text-shadow: 0 2px 0 rgba(0,0,0,.2); transition: transform .1s, opacity .3s, filter .3s; }
.answer .ico { font-size: 1.8em; flex: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.2)); }
.answer.c0 { background: var(--a0); box-shadow: 0 7px 0 var(--a0d); }
.answer.c1 { background: var(--a1); box-shadow: 0 7px 0 var(--a1d); }
.answer.c2 { background: var(--a2); box-shadow: 0 7px 0 var(--a2d); color: var(--ink); text-shadow: none; }
.answer.c3 { background: var(--a3); box-shadow: 0 7px 0 var(--a3d); }
.answer:active { transform: translateY(4px); }
.answer.dim { opacity: .55; filter: grayscale(.5); }
.answer.good { outline: 6px solid #fff; outline-offset: -6px; transform: scale(1.02); }
.answer.good .ico::after { content: ' ✅'; font-size: .7em; }

.theme-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 6px 16px; font-weight: 700; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.pop { animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wiggle { animation: wiggle 1.6s ease-in-out infinite; display: inline-block; }
@keyframes wiggle { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.hidden { display: none !important; }

.confetti { position: fixed; top: -20px; width: 12px; height: 18px; z-index: 50; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
