/* Shared look for the screen and the phones: playful, rounded, colourful. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');
:root {
  --bg: #1e1037; --bg2: #2d1656; --card: #ffffff; --ink: #1f1235; --muted: #6b5b86;
  --accent: #fbbf24; --accent2: #f472b6; --blue: #60a5fa; --ok: #22c55e; --bad: #ef4444;
  font-family: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: #fff; }
body { background: transparent; }   /* the animated gradient (body::before) shows through */
body::before { content: ''; position: fixed; inset: -20%; z-index: -2;
  background: radial-gradient(circle at 20% 20%, #7c3aed 0, transparent 40%), radial-gradient(circle at 80% 30%, #db2777 0, transparent 35%),
              radial-gradient(circle at 50% 90%, #2563eb 0, transparent 45%), var(--bg);
  animation: bgdrift 24s ease-in-out infinite alternate; }
@keyframes bgdrift { to { transform: translate(4%, -3%) rotate(4deg) scale(1.05); } }
button { font: inherit; cursor: pointer; border: 0; border-radius: 18px; padding: 14px 20px; font-weight: 700; background: var(--accent); color: #422006;
         box-shadow: 0 5px 0 #b45309; transition: transform .08s; }
button:active { transform: translateY(3px); box-shadow: 0 2px 0 #b45309; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
input { font: inherit; font-size: 20px; padding: 14px 16px; border-radius: 16px; border: 3px solid #e2dcf0; background: #faf8ff; width: 100%; outline: none; color: var(--ink); }
input:focus { border-color: var(--accent); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c);
          font-size: calc(var(--s) * .58); line-height: 1; flex: none; box-shadow: 0 0 0 calc(var(--s) * .06) #fff, 0 calc(var(--s) * .08) 0 calc(var(--s) * .06) rgba(0,0,0,.25); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; background: #fff; border: calc(var(--s) * .05) solid var(--c); box-sizing: border-box; }
.logo { font-weight: 700; letter-spacing: .02em; }
.logo span { color: var(--accent); }
.hide { display: none !important; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-6%); } }
@keyframes wiggle { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes float { 50% { transform: translateY(-10px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } }

/* Floating doodles in the background (index.html and play.html add <div class="doodles">). */
.doodles { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.doodles span { position: absolute; font-size: var(--z); opacity: .13; animation: drift var(--t) linear infinite; animation-delay: var(--d); }
@keyframes drift { from { transform: translateY(110vh) rotate(0deg); } to { transform: translateY(-20vh) rotate(360deg); } }
