/* ============================================================
   Aventura Literelor și Cifrelor — stiluri
   Desen animat: vesel, rotunjit, colorat, responsive
   ============================================================ */

:root {
  --font: 'Comic Sans MS', 'Chalkboard SE', 'Segoe Print', 'Comic Sans', cursive, sans-serif;
  --text: #4e342e;
  --card: rgba(255, 255, 255, .94);
  --shadow: 0 10px 24px rgba(74, 20, 140, .18);
  --r: 22px;
  --bg1: #7ec8ff;
  --bg2: #cdefff;
  --hill1: #8bc34a;
  --hill2: #66a93c;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg1), var(--bg2) 70%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: background 1s ease;
}
button { font-family: var(--font); color: inherit; border: none; background: none; }
input { font-family: var(--font); }
img, svg { display: block; }

/* ——— teme de fundal pe zone ——— */
body[data-theme="home"]     { --bg1: #7ec8ff; --bg2: #d8f3ff; --hill1: #8bc34a; --hill2: #66a93c; }
body[data-theme="meadow"]   { --bg1: #90d56f; --bg2: #e2f8c9; --hill1: #66bb6a; --hill2: #43a047; }
body[data-theme="sky"]      { --bg1: #64b5f6; --bg2: #e3f2fd; --hill1: #90caf9; --hill2: #64b5f6; }
body[data-theme="workshop"] { --bg1: #ffb74d; --bg2: #ffe9c7; --hill1: #ffa726; --hill2: #fb8c00; }
body[data-theme="forest"]   { --bg1: #66bb6a; --bg2: #d7f5d0; --hill1: #388e3c; --hill2: #2e7d32; }
body[data-theme="castle"]   { --bg1: #ba68c8; --bg2: #f3e5f5; --hill1: #ab47bc; --hill2: #8e24aa; }
body[data-theme="garden"]   { --bg1: #aed581; --bg2: #f1f8e9; --hill1: #9ccc65; --hill2: #7cb342; }
body[data-theme="lab"]      { --bg1: #4dd0e1; --bg2: #e0f7fa; --hill1: #26c6da; --hill2: #00acc1; }
body[data-theme="space"]    { --bg1: #283593; --bg2: #4527a0; --hill1: #311b92; --hill2: #1a237e; }
body[data-theme="arcade"]   { --bg1: #7e57c2; --bg2: #d1c4e9; --hill1: #5e35b1; --hill2: #4527a0; }
body[data-theme="space"] { color: #fff; }

/* ============ FUNDAL ANIMAT ============ */
#bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.bg-sun { position: absolute; top: 4vmin; left: 6vmin; width: 13vmin; height: 13vmin; }
.sun-core {
  position: absolute; inset: 12%;
  background: radial-gradient(circle, #fff59d, #ffd54f 60%, #ffb300);
  border-radius: 50%;
  box-shadow: 0 0 5vmin rgba(255, 213, 79, .85);
  animation: sunPulse 4s ease-in-out infinite;
}
.sun-rays {
  position: absolute; inset: -22%;
  background: conic-gradient(from 0deg, transparent 0 10deg, rgba(255, 224, 130, .55) 10deg 20deg,
    transparent 20deg 40deg, rgba(255, 224, 130, .55) 40deg 50deg, transparent 50deg 70deg,
    rgba(255, 224, 130, .55) 70deg 80deg, transparent 80deg 100deg, rgba(255, 224, 130, .55) 100deg 110deg,
    transparent 110deg 130deg, rgba(255, 224, 130, .55) 130deg 140deg, transparent 140deg 160deg,
    rgba(255, 224, 130, .55) 160deg 170deg, transparent 170deg 190deg, rgba(255, 224, 130, .55) 190deg 200deg,
    transparent 200deg 220deg, rgba(255, 224, 130, .55) 220deg 230deg, transparent 230deg 250deg,
    rgba(255, 224, 130, .55) 250deg 260deg, transparent 260deg 280deg, rgba(255, 224, 130, .55) 280deg 290deg,
    transparent 290deg 310deg, rgba(255, 224, 130, .55) 310deg 320deg, transparent 320deg 340deg,
    rgba(255, 224, 130, .55) 340deg 350deg, transparent 350deg);
  border-radius: 50%;
  animation: spinSlow 26s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes sunPulse { 50% { transform: scale(1.06); } }
body[data-theme="space"] .bg-sun { opacity: .25; }

.bg-rainbow {
  position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%);
  width: 88vmin; height: 44vmin; border-radius: 44vmin 44vmin 0 0;
  background:
    radial-gradient(closest-side at 50% 100%,
      transparent 53%, rgba(171, 71, 188, .5) 54% 58%, rgba(66, 165, 245, .5) 58% 63%,
      rgba(102, 187, 106, .5) 63% 68%, rgba(253, 216, 53, .55) 68% 73%,
      rgba(255, 167, 38, .55) 73% 78%, rgba(239, 83, 80, .55) 78% 83%, transparent 84%);
  opacity: .8;
}
body[data-theme="space"] .bg-rainbow { opacity: .15; }

.bg-cloud {
  position: absolute; width: 18vmin; height: 7vmin; background: #fff;
  border-radius: 7vmin; opacity: .9;
  box-shadow: 4vmin -2.6vmin 0 -.6vmin #fff, 9vmin -1vmin 0 -1vmin #fff, -3vmin -1.4vmin 0 -1.6vmin #fff;
  animation: cloudDrift linear infinite;
}
.bc1 { top: 9%;  animation-duration: 52s; animation-delay: -8s; }
.bc2 { top: 22%; animation-duration: 70s; animation-delay: -34s; transform: scale(.7); }
.bc3 { top: 5%;  animation-duration: 84s; animation-delay: -55s; transform: scale(1.25); }
.bc4 { top: 32%; animation-duration: 64s; animation-delay: -20s; transform: scale(.55); }
@keyframes cloudDrift {
  from { left: -25vmin; } to { left: 105vw; }
}
body[data-theme="space"] .bg-cloud { opacity: .15; }

/* sclipiri discrete care nu se confundă cu obiectele din jocuri */
.bg-spark {
  position: absolute; color: #fff; opacity: 0;
  font-size: 2.6vmin; text-shadow: 0 0 8px rgba(255, 255, 255, .9);
  animation: sparkTwinkle ease-in-out infinite;
  pointer-events: none;
}
.sp1 { left: 12%; top: 22%; animation-duration: 4.2s; }
.sp2 { left: 82%; top: 14%; animation-duration: 5.4s; animation-delay: 1.2s; font-size: 2vmin; }
.sp3 { left: 64%; top: 36%; animation-duration: 4.8s; animation-delay: 2.4s; }
.sp4 { left: 30%; top: 10%; animation-duration: 6s; animation-delay: .6s; font-size: 1.8vmin; }
.sp5 { left: 48%; top: 28%; animation-duration: 5s; animation-delay: 3.1s; font-size: 2.2vmin; }
@keyframes sparkTwinkle {
  0%, 100% { opacity: 0; scale: .6; rotate: 0deg; }
  50% { opacity: .55; scale: 1.15; rotate: 35deg; }
}

.bg-stars {
  position: absolute; inset: 0; opacity: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff, transparent),
    radial-gradient(2px 2px at 30% 8%, #fff, transparent),
    radial-gradient(3px 3px at 48% 22%, #fff9c4, transparent),
    radial-gradient(2px 2px at 66% 12%, #fff, transparent),
    radial-gradient(2px 2px at 82% 26%, #fff, transparent),
    radial-gradient(3px 3px at 91% 9%, #fff9c4, transparent),
    radial-gradient(2px 2px at 22% 38%, #fff, transparent),
    radial-gradient(2px 2px at 73% 42%, #fff, transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
  transition: opacity 1s;
}
body[data-theme="space"] .bg-stars { opacity: 1; }
@keyframes twinkle { from { filter: brightness(.7); } to { filter: brightness(1.3); } }

.bg-hills {
  position: absolute; left: 0; right: 0; bottom: -6vh; height: 26vh;
  background:
    radial-gradient(60vw 24vh at 18% 100%, var(--hill1) 60%, transparent 61%),
    radial-gradient(70vw 28vh at 85% 100%, var(--hill2) 60%, transparent 61%);
  transition: background 1s;
}

/* ============ CANVAS FX + CURSOR ============ */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 9000; }

#kid-cursor {
  position: fixed; left: 0; top: 0; width: 42px; height: 42px;
  pointer-events: none; z-index: 9500;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
#kid-cursor svg { width: 100%; height: 100%; }
/* Feedback la apăsare: doar o lumină pâlpâitoare, FĂRĂ nicio transformare
   care ar putea muta vizual vârful — vârful rămâne fix pe punctul atins.
   Cercul și dâra de steluțe de pe canvas confirmă click-ul. */
#kid-cursor.press { filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)) brightness(1.25); }
body.fine-cursor, body.fine-cursor * { cursor: none !important; }

.fx-shake { animation: shakeX .45s ease; }
@keyframes shakeX {
  20% { translate: -7px 0; } 40% { translate: 7px 0; }
  60% { translate: -5px 0; } 80% { translate: 5px 0; }
}
.fx-float {
  position: fixed; z-index: 9400; pointer-events: none;
  font-size: 1.5rem; font-weight: 700;
  animation: floatUp 1.2s ease forwards;
}
@keyframes floatUp { to { translate: 0 -70px; opacity: 0; } }

/* ============ APP / ECRANE ============ */
#app { position: fixed; inset: 0; z-index: 10; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; translate: 0 26px;
  transition: opacity .42s ease, translate .42s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.screen.enter { opacity: 1; translate: 0 0; }
.screen.leave { opacity: 0; translate: 0 -22px; pointer-events: none; }

/* ============ BUTOANE ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-size: clamp(1rem, 2.6vmin, 1.25rem); font-weight: 700;
  padding: .65em 1.3em; border-radius: 999px;
  background: linear-gradient(180deg, #fff, #ffe0b2);
  color: var(--text);
  box-shadow: 0 .28em 0 #e0a458, 0 .5em 14px rgba(0,0,0,.16);
  transition: translate .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { translate: 0 .22em; box-shadow: 0 .08em 0 #e0a458; }
.btn-go { background: linear-gradient(180deg, #b9f6ca, #69f0ae); box-shadow: 0 .28em 0 #2bbd7e, 0 .5em 14px rgba(0,0,0,.16); }
.btn-go:active { box-shadow: 0 .08em 0 #2bbd7e; }
.btn-warn { background: linear-gradient(180deg, #ffcdd2, #ef9a9a); box-shadow: 0 .28em 0 #d36a6a, 0 .5em 14px rgba(0,0,0,.14); }
.btn-warn:active { box-shadow: 0 .08em 0 #d36a6a; }
.btn-soft { background: linear-gradient(180deg, #fff, #e3f2fd); box-shadow: 0 .28em 0 #9fb6cc, 0 .5em 14px rgba(0,0,0,.12); }
.btn-soft:active { box-shadow: 0 .08em 0 #9fb6cc; }
.btn-big { font-size: clamp(1.15rem, 3.4vmin, 1.6rem); padding: .7em 1.6em; }
.btn-huge { font-size: clamp(1.3rem, 4.2vmin, 2rem); padding: .75em 1.8em; }
.btn-sm { font-size: .95rem; padding: .5em 1em; }
button:disabled { filter: grayscale(.6) opacity(.6); pointer-events: none; }

/* ============ BUFNIȚA UKI ============ */
.owl { width: clamp(84px, 16vmin, 150px); height: auto; animation: owlBob 3.2s ease-in-out infinite; }
.owl.small { width: clamp(64px, 11vmin, 100px); }
@keyframes owlBob { 50% { translate: 0 -7px; } }
.owl-wing { transform-origin: 50% 30%; animation: wingFlap 3.2s ease-in-out infinite; }
.owl-wing.wr { animation-delay: .12s; }
@keyframes wingFlap { 50% { transform: rotate(-5deg); } }
.owl-lid { transform-origin: center 30px; transform: scaleY(0); animation: owlBlink 4.6s infinite; }
@keyframes owlBlink {
  0%, 92%, 100% { transform: scaleY(0); }
  95%, 97% { transform: scaleY(1); }
}
.owl-pupil { animation: lookAround 7s ease-in-out infinite; }
@keyframes lookAround {
  0%, 55%, 100% { translate: 0 0; }
  62%, 75% { translate: 3px 1px; }
  82%, 92% { translate: -3px 0; }
}

.owl-talk { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.owl-bubble {
  position: relative; max-width: min(420px, 64vw);
  background: var(--card); border-radius: 18px; padding: 12px 16px;
  font-size: clamp(.95rem, 2.4vmin, 1.2rem); font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0; scale: .6; transform-origin: left center;
  transition: opacity .3s, scale .3s;
  color: var(--text);
}
.owl-bubble.show { opacity: 1; scale: 1; }
.owl-bubble::before {
  content: ''; position: absolute; left: -10px; top: 26px;
  border: 10px solid transparent; border-right-color: var(--card); border-left: 0;
}

/* ============ MODALE ============ */
.modal-ov {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(46, 23, 68, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; transition: opacity .26s;
}
.modal-ov.in { opacity: 1; }
.modal-ov.out { opacity: 0; }
.modal {
  background: var(--card); border-radius: var(--r); padding: clamp(16px, 3vmin, 28px);
  max-width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; width: max-content; min-width: min(320px, 90vw);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  text-align: center; color: var(--text);
  scale: .8; transition: scale .26s cubic-bezier(.34, 1.56, .64, 1);
}
.modal-ov.in .modal { scale: 1; }
.modal-title { font-size: clamp(1.2rem, 3.4vmin, 1.6rem); font-weight: 700; margin-bottom: 10px; }
.modal-text { font-size: clamp(1rem, 2.6vmin, 1.2rem); margin: 8px 0; }
.modal-big-emoji { font-size: clamp(3rem, 9vmin, 4.6rem); animation: popIn .4s cubic-bezier(.34,1.56,.64,1); }
.modal-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
@keyframes popIn { from { scale: 0; } to { scale: 1; } }

/* tastatură PIN */
.pinpad { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pin-sub { font-size: 1rem; opacity: .8; }
.pin-dots { display: flex; gap: 14px; padding: 8px; }
.pin-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid #ab47bc; background: transparent; transition: background .15s, scale .15s;
}
.pin-dot.full { background: #ab47bc; scale: 1.15; }
.pin-msg { min-height: 1.3em; color: #d32f2f; font-weight: 700; font-size: .95rem; }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-key {
  width: clamp(58px, 9vmin, 74px); height: clamp(58px, 9vmin, 74px);
  border-radius: 18px; font-size: clamp(1.3rem, 3.4vmin, 1.7rem); font-weight: 700;
  background: linear-gradient(180deg, #fff, #e1bee7);
  box-shadow: 0 3px 0 #b48ec2;
  transition: translate .07s, box-shadow .07s;
}
.pin-key:active { translate: 0 3px; box-shadow: 0 0 0 #b48ec2; }
.pin-key.ok { background: linear-gradient(180deg, #b9f6ca, #69f0ae); box-shadow: 0 3px 0 #2bbd7e; }
.pin-key.del { background: linear-gradient(180deg, #ffe0b2, #ffcc80); box-shadow: 0 3px 0 #e0a458; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); translate: -50% 130%;
  z-index: 9300; background: var(--card); color: var(--text);
  padding: 12px 22px; border-radius: 999px; font-weight: 700;
  font-size: clamp(.95rem, 2.4vmin, 1.15rem);
  box-shadow: var(--shadow); transition: translate .35s cubic-bezier(.34,1.4,.64,1);
  pointer-events: none; max-width: 92vw; text-align: center;
}
.toast.show { translate: -50% 0; }
.toast span { font-size: 1.25em; }

/* ============ SETUP ============ */
.setup-card {
  margin: auto; width: min(560px, 94vw);
  background: var(--card); border-radius: 30px; padding: clamp(18px, 4vmin, 34px);
  box-shadow: var(--shadow); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-height: 92vh; overflow-y: auto;
}
.setup-title {
  font-size: clamp(1.4rem, 4.6vmin, 2.1rem); font-weight: 700;
  background: linear-gradient(90deg, #e91e63, #ff9800, #4caf50, #2196f3, #9c27b0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.setup-q { font-size: clamp(1.15rem, 3.2vmin, 1.5rem); font-weight: 700; margin: 8px 0; }
.setup-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.setup-gbtn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: clamp(1rem, 2.8vmin, 1.3rem); font-weight: 700;
  padding: 18px 30px; border-radius: 24px;
  background: linear-gradient(180deg, #fff, #e3f2fd);
  box-shadow: 0 5px 0 #9fb6cc, 0 8px 18px rgba(0,0,0,.14);
  transition: translate .1s, scale .2s;
}
.setup-gbtn:hover { scale: 1.05; }
.setup-gbtn:active { translate: 0 5px; box-shadow: 0 0 0 #9fb6cc; }
.sg-e { font-size: clamp(2.6rem, 8vmin, 4rem); }
.setup-input {
  font-size: clamp(1.3rem, 4vmin, 1.7rem); font-weight: 700; text-align: center;
  padding: .5em .8em; border-radius: 18px; border: 3px solid #ce93d8; outline: none;
  width: min(320px, 80vw); background: #fff;
}
.setup-input:focus { border-color: #ab47bc; box-shadow: 0 0 0 4px rgba(171,71,188,.2); }
.setup-err { color: #d32f2f; font-weight: 700; min-height: 1.4em; }
.setup-hint { font-size: .95rem; opacity: .75; }
.setup-step { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }

/* ============ MENIU ============ */
.menu-wrap {
  margin: auto; display: flex; flex-direction: column; align-items: center;
  gap: clamp(10px, 2.4vmin, 22px); text-align: center; padding: 12px; width: 100%;
}
.menu-title { display: flex; flex-direction: column; line-height: 1.05; filter: drop-shadow(0 4px 0 rgba(255,255,255,.7)); }
.menu-title .mt-1 {
  font-size: clamp(2rem, 7vmin, 3.6rem); font-weight: 700; color: #ff6f00;
  text-shadow: 0 3px 0 #fff;
}
.menu-title .mt-2 {
  font-size: clamp(1.3rem, 4.6vmin, 2.4rem); font-weight: 700;
  background: linear-gradient(90deg, #e91e63, #ff9800, #43a047, #1e88e5, #8e24aa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.menu-owl { min-height: clamp(90px, 17vmin, 160px); display: flex; align-items: center; }
.menu-stats {
  display: flex; gap: 18px; font-size: clamp(1rem, 2.8vmin, 1.3rem); font-weight: 700;
  background: var(--card); padding: 8px 22px; border-radius: 999px; box-shadow: var(--shadow);
}
.menu-btns { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.menu-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.menu-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.chip {
  font-size: clamp(.85rem, 2.2vmin, 1rem); font-weight: 700;
  padding: .5em 1em; border-radius: 999px;
  background: rgba(255,255,255,.6); box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: scale .15s, background .2s;
}
.chip:active { scale: .93; }
.chip.on { background: var(--card); }
.parent-chip { background: rgba(255, 224, 178, .85); }

/* ============ PAGINI CU HEADER ============ */
.page-head {
  display: flex; align-items: center; gap: 12px;
  padding: clamp(8px, 1.8vmin, 16px) clamp(10px, 2.4vmin, 22px);
}
.page-title {
  font-size: clamp(1.15rem, 3.4vmin, 1.7rem); font-weight: 700; flex: 1;
  text-shadow: 0 2px 0 rgba(255,255,255,.6);
}
body[data-theme="space"] .page-title { text-shadow: none; }
.page-stars {
  font-weight: 700; font-size: clamp(1rem, 2.6vmin, 1.25rem);
  background: var(--card); color: var(--text); padding: 6px 16px; border-radius: 999px; box-shadow: var(--shadow);
}
.map-scroll { flex: 1; overflow-y: auto; padding: 4px clamp(10px, 2.4vmin, 22px) 26px; }

/* ============ HARTA ============ */
.map-grid {
  display: grid; gap: clamp(10px, 2vmin, 18px);
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 44vw), 1fr));
  max-width: 1100px; margin: 0 auto;
}
.map-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: clamp(14px, 2.6vmin, 24px) 12px;
  border-radius: var(--r); text-align: center;
  background: var(--card); box-shadow: var(--shadow);
  transition: scale .18s cubic-bezier(.34,1.56,.64,1), filter .2s;
  overflow: hidden; color: var(--text);
}
.map-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 8px;
  background: linear-gradient(90deg, #ef5350, #ffa726, #ffee58, #66bb6a, #42a5f5, #ab47bc);
}
.map-card:hover { scale: 1.04; }
.map-card:active { scale: .97; }
.map-card.locked { filter: grayscale(.75) opacity(.75); }
.mc-icon { font-size: clamp(2.4rem, 7vmin, 3.6rem); animation: mcBob 3s ease-in-out infinite; }
@keyframes mcBob { 50% { translate: 0 -5px; } }
.mc-title { font-size: clamp(1.05rem, 2.8vmin, 1.3rem); font-weight: 700; }
.mc-desc { font-size: clamp(.85rem, 2.1vmin, 1rem); opacity: .8; }
.mc-progress {
  font-size: clamp(.85rem, 2.1vmin, 1rem); font-weight: 700;
  background: #fff3e0; padding: 4px 14px; border-radius: 999px;
}
.mc-lock { font-size: clamp(.8rem, 2vmin, .95rem); font-weight: 700; color: #6d4c41; }
.big-card .mc-icon { animation-duration: 2.2s; }

/* niveluri */
.level-grid {
  display: grid; gap: clamp(10px, 2vmin, 16px);
  grid-template-columns: repeat(auto-fill, minmax(min(92px, 21vw), 1fr));
  max-width: 860px; margin: 0 auto;
}
.level-bubble {
  aspect-ratio: 1; border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--card); box-shadow: var(--shadow);
  transition: scale .15s cubic-bezier(.34,1.56,.64,1); color: var(--text);
}
.level-bubble:hover { scale: 1.07; }
.level-bubble:active { scale: .94; }
.level-bubble.locked { filter: grayscale(.8) opacity(.65); }
.level-bubble.done { background: linear-gradient(180deg, #fffde7, #fff59d); }
.level-bubble.small { width: clamp(64px, 13vmin, 84px); aspect-ratio: 1; flex: none; }
.lb-n { font-size: clamp(1.3rem, 3.6vmin, 1.8rem); font-weight: 700; }
.lb-stars { font-size: clamp(.8rem, 2vmin, 1rem); color: #f9a825; letter-spacing: 1px; }
.lb-stars .off { color: #d7ccc8; }

/* arcade hub */
.arcade-cat { max-width: 1200px; margin: 0 auto 6px; }
.arcade-cat-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: clamp(15px, 2.6vmin, 20px); color: var(--text);
  margin: 16px 4px 8px; padding-bottom: 6px;
  border-bottom: 3px dashed rgba(0,0,0,.12);
}
.arcade-cat-head .acc-count {
  margin-left: auto; font-size: .72em; font-weight: 700; opacity: .7;
  background: rgba(0,0,0,.08); border-radius: 999px; padding: 2px 10px;
}
.arcade-grid {
  display: grid; gap: clamp(8px, 1.8vmin, 14px);
  grid-template-columns: repeat(auto-fill, minmax(min(168px, 44vw), 1fr));
  max-width: 1200px; margin: 0 auto;
}
.arcade-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px 12px; border-radius: 20px; text-align: center;
  background: var(--card); box-shadow: var(--shadow);
  transition: scale .16s cubic-bezier(.34,1.56,.64,1); color: var(--text);
}
.arcade-card:hover { scale: 1.05; }
.arcade-card:active { scale: .95; }
.arcade-card.locked { filter: grayscale(.85) opacity(.7); }
.ac-nr {
  position: absolute; top: 8px; left: 10px;
  font-size: .8rem; font-weight: 700; opacity: .55;
}
.ac-icon { font-size: clamp(2rem, 5.6vmin, 2.8rem); }
.ac-title { font-size: clamp(.92rem, 2.3vmin, 1.05rem); font-weight: 700; line-height: 1.15; }
.ac-stars, .ac-lock { font-size: clamp(.78rem, 1.9vmin, .92rem); opacity: .85; min-height: 1.2em; }
.arc-lvl-pick { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.arc-lvl-desc { font-size: 1.05rem; }
.arc-lvl-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ============ ECRAN DE JOC (SHELL) ============ */
.game-hud {
  display: flex; align-items: center; gap: 8px;
  padding: 8px clamp(8px, 1.6vmin, 16px);
  background: rgba(255,255,255,.5); backdrop-filter: blur(4px);
}
body[data-theme="space"] .game-hud { background: rgba(255,255,255,.16); }
.hud-btn {
  width: clamp(42px, 7.4vmin, 56px); height: clamp(42px, 7.4vmin, 56px); flex: none;
  border-radius: 16px; font-size: clamp(1.2rem, 3vmin, 1.5rem);
  background: var(--card); box-shadow: 0 3px 0 rgba(0,0,0,.14);
  transition: translate .08s, box-shadow .08s;
}
.hud-btn:active { translate: 0 3px; box-shadow: 0 0 0 rgba(0,0,0,.14); }
.hud-title { display: flex; align-items: center; gap: 6px; font-weight: 700; flex: none; }
.hud-icon { font-size: clamp(1.2rem, 3vmin, 1.6rem); }
.hud-name { font-size: clamp(.8rem, 2vmin, 1.05rem); max-width: 26vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-prompt {
  flex: 1; text-align: center; font-weight: 700;
  font-size: clamp(.95rem, 2.6vmin, 1.3rem); min-height: 1.4em;
  overflow: hidden;
}
.prompt-big {
  display: inline-block; font-size: clamp(1.3rem, 4vmin, 2rem); color: #d84315;
  background: #fff; border-radius: 12px; padding: 0 .45em; margin: 0 .15em;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  animation: promptPulse 1.4s ease-in-out infinite;
}
body[data-theme="space"] .hud-prompt { color: #fff; }
@keyframes promptPulse { 50% { scale: 1.08; } }
.hud-score {
  font-weight: 700; font-size: clamp(.95rem, 2.4vmin, 1.2rem); flex: none;
  background: var(--card); color: var(--text); padding: 6px 14px; border-radius: 999px;
}
.hud-progress { height: 12px; background: rgba(255,255,255,.45); }
.hud-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffd54f, #ff9800);
  border-radius: 0 8px 8px 0;
  transition: width .4s ease;
  box-shadow: 0 0 10px rgba(255, 167, 38, .8);
}
.stage { position: relative; flex: 1; overflow: hidden; }
.game-canvas { position: absolute; inset: 0; touch-action: none; }

/* intro nivel */
.intro-ov {
  position: absolute; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(46, 23, 68, .4); backdrop-filter: blur(3px);
  transition: opacity .32s;
}
.intro-ov.out { opacity: 0; pointer-events: none; }
.intro-box {
  background: var(--card); border-radius: 30px; padding: clamp(16px, 3.4vmin, 30px);
  width: min(540px, 94vw); max-height: 90%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); color: var(--text);
  animation: introPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes introPop { from { scale: .5; opacity: 0; } }
.intro-icon { font-size: clamp(2.6rem, 8vmin, 4rem); }
.intro-title { font-size: clamp(1.3rem, 3.8vmin, 1.8rem); font-weight: 700; }
.intro-lvl {
  font-size: clamp(.95rem, 2.4vmin, 1.1rem); font-weight: 700;
  background: #ede7f6; border-radius: 999px; padding: 4px 16px;
}
.intro-text { font-size: clamp(1rem, 2.7vmin, 1.25rem); line-height: 1.4; }
.intro-goal {
  font-weight: 700; font-size: clamp(.95rem, 2.5vmin, 1.15rem);
  background: #fff3e0; border-radius: 999px; padding: 6px 18px;
}
.btn-go.btn-big { margin-top: 8px; }

/* final de nivel */
.win-ov {
  position: absolute; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(46, 23, 68, .5); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s;
}
.win-ov.in { opacity: 1; }
.win-box {
  background: var(--card); border-radius: 30px; padding: clamp(16px, 3.2vmin, 30px);
  width: min(520px, 94vw); max-height: 92%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.4); color: var(--text);
  animation: introPop .5s cubic-bezier(.34,1.56,.64,1);
}
.win-title { font-size: clamp(1.3rem, 4vmin, 1.9rem); font-weight: 700; }
.win-stars { display: flex; gap: 14px; font-size: clamp(2.6rem, 9vmin, 4.4rem); }
.win-star { color: #e0e0e0; scale: .7; transition: none; }
.win-star.on { color: #e0e0e0; }
.win-star.on.pop { color: #ffc107; animation: starPop .55s cubic-bezier(.34,1.8,.64,1) forwards; text-shadow: 0 0 24px rgba(255,193,7,.8); }
@keyframes starPop { from { scale: 0; rotate: -90deg; } to { scale: 1; rotate: 0deg; } }
.win-stats { display: flex; gap: clamp(12px, 3vmin, 28px); justify-content: center; }
.win-stats div { display: flex; flex-direction: column; }
.win-stats b { font-size: clamp(1.2rem, 3.4vmin, 1.7rem); color: #5e35b1; }
.win-stats span { font-size: clamp(.8rem, 2vmin, .95rem); opacity: .75; }
.win-rewards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.win-reward {
  display: flex; align-items: center; gap: 8px;
  background: #fff8e1; border-radius: 16px; padding: 8px 14px;
  font-weight: 700; font-size: clamp(.85rem, 2.2vmin, 1rem);
  scale: 0; transition: scale .4s cubic-bezier(.34,1.7,.64,1);
}
.win-reward.pop { scale: 1; }
.wr-e { font-size: 1.7em; }
.win-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }

/* ============ CONTROALE VIRTUALE ============ */
.vpad { position: absolute; inset: 0; pointer-events: none; z-index: 400; }
.vpad-desktop { display: none; }
.vpad-dpad {
  position: absolute; left: 14px; bottom: max(14px, env(safe-area-inset-bottom));
  display: grid; grid-template-areas: '. u .' 'l . r' '. d .';
  gap: 6px; pointer-events: none;
}
.vpad-dpad.lr-only { grid-template-areas: 'l r'; }
.vpad-btn {
  pointer-events: auto;
  width: clamp(54px, 13vmin, 76px); height: clamp(54px, 13vmin, 76px);
  border-radius: 20px; font-size: clamp(1.3rem, 4vmin, 1.8rem);
  background: rgba(255,255,255,.75); box-shadow: 0 4px 0 rgba(0,0,0,.18);
  font-weight: 700; touch-action: none;
}
.vpad-btn:active { translate: 0 4px; box-shadow: 0 0 0 rgba(0,0,0,.18); background: #fff; }
.vb-u { grid-area: u; } .vb-l { grid-area: l; } .vb-r { grid-area: r; } .vb-d { grid-area: d; }
.vpad-actions {
  position: absolute; right: 14px; bottom: max(14px, env(safe-area-inset-bottom));
  display: flex; gap: 10px; pointer-events: none;
}
.vpad-actions .vpad-btn { border-radius: 50%; }

/* ============ FLOAT (baloane, nori, pești, meteori) ============ */
.float-field { position: absolute; inset: 0; overflow: hidden; }
.fl-item {
  position: absolute; left: 0; top: 0;
  width: clamp(62px, 11vmin, 96px); height: clamp(62px, 11vmin, 96px);
  display: flex; align-items: center; justify-content: center;
  will-change: transform; touch-action: none;
  scale: 1; opacity: 1; transition: scale .26s, opacity .26s;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.18));
}
.fl-item.popping { scale: 1.5; opacity: 0; pointer-events: none; }
.fl-label {
  position: relative; z-index: 2;
  font-size: clamp(1.5rem, 4.6vmin, 2.3rem); font-weight: 700; color: #4e342e;
  text-shadow: 0 2px 0 rgba(255,255,255,.75);
}
.fl-item.bob { animation: bobScale 2.4s ease-in-out infinite; }
@keyframes bobScale { 50% { scale: 1.06; } }

/* balon */
.skin-balloon .fl-item::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 50% 50% 50% 50% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 32% 26%, hsl(var(--h), 95%, 88%), hsl(var(--h), 80%, 66%) 58%, hsl(var(--h), 72%, 56%));
}
.skin-balloon .fl-item::after {
  content: ''; position: absolute; left: 50%; bottom: -26%; translate: -50% 0;
  width: 2.5px; height: 30%;
  background: rgba(78, 52, 46, .4); border-radius: 2px;
}
/* nor */
.skin-cloud .fl-item::before {
  content: ''; position: absolute; inset: 14% 2% 20% 2%; background: #fff;
  border-radius: 50px;
}
.skin-cloud .fl-item::after {
  content: ''; position: absolute; left: 14%; top: 0;
  width: 46%; height: 52%; background: #fff; border-radius: 50%;
  box-shadow: 20px 8px 0 -2px #fff;
}
/* pește */
.skin-fish .fl-item::before {
  content: '🐠'; position: absolute; inset: 0;
  font-size: clamp(3rem, 9vmin, 4.6rem); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.skin-fish .fl-label {
  background: rgba(255,255,255,.92); border-radius: 50%;
  width: 1.55em; height: 1.55em; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.1rem, 3.2vmin, 1.6rem);
  translate: 0 -28%;
}
/* meteor */
.skin-meteor .fl-item::before {
  content: '☄️'; position: absolute; inset: 0;
  font-size: clamp(3rem, 9vmin, 4.6rem); line-height: 1;
  display: flex; align-items: center; justify-content: center;
  rotate: 18deg;
}
.skin-meteor .fl-label {
  background: rgba(255,255,255,.92); border-radius: 50%;
  width: 1.55em; height: 1.55em; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.1rem, 3.2vmin, 1.6rem);
  translate: 0 30%;
}

/* ============ QUIZ ============ */
.quiz {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(10px, 2.6vmin, 26px);
  padding: clamp(8px, 2vmin, 20px); overflow-y: auto;
}
.quiz-prompt {
  background: var(--card); color: var(--text);
  border-radius: var(--r); padding: clamp(12px, 2.6vmin, 24px) clamp(18px, 4vmin, 36px);
  font-size: clamp(1.1rem, 3vmin, 1.5rem); font-weight: 700; text-align: center;
  box-shadow: var(--shadow); max-width: min(680px, 94%);
  animation: promptIn .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes promptIn { from { scale: .7; opacity: 0; } }
.quiz-options { display: flex; flex-wrap: wrap; gap: clamp(10px, 2.4vmin, 22px); justify-content: center; max-width: 96%; }
.q-opt {
  min-width: clamp(86px, 17vmin, 140px); min-height: clamp(76px, 15vmin, 130px);
  padding: 12px 18px; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: clamp(1.4rem, 4.4vmin, 2.2rem); font-weight: 700; color: var(--text);
  background: linear-gradient(180deg, #fff, #ffe7ad);
  box-shadow: 0 6px 0 #dba94e, 0 10px 20px rgba(0,0,0,.16);
  transition: translate .09s, box-shadow .09s, scale .2s;
}
.q-opt:hover { scale: 1.05; }
.q-opt:active { translate: 0 6px; box-shadow: 0 0 0 #dba94e; }
.q-opt.q-good { background: linear-gradient(180deg, #dcedc8, #aed581); box-shadow: 0 6px 0 #7da453; animation: goodPulse .5s; }
.q-opt.q-hint { animation: hintGlow 1s ease-in-out infinite; }
@keyframes goodPulse { 50% { scale: 1.12; } }
@keyframes hintGlow { 50% { box-shadow: 0 6px 0 #dba94e, 0 0 26px 6px rgba(255, 214, 0, .85); } }
.opt-e { font-size: clamp(2rem, 5.6vmin, 2.8rem); }
.opt-w { font-size: clamp(1rem, 2.6vmin, 1.3rem); }
.opt-group { font-size: clamp(1.2rem, 3.2vmin, 1.7rem); letter-spacing: 2px; max-width: 200px; line-height: 1.3; }
.big-e { font-size: clamp(2.6rem, 8vmin, 4.4rem); line-height: 1.2; display: inline-block; }
.bounce-e { animation: bounceE 1.6s ease-in-out infinite; }
@keyframes bounceE { 50% { translate: 0 -8px; } }
.shadowed { filter: brightness(0) opacity(.82); }
.quiz-decor { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.quiz { z-index: 1; }

/* teme quiz */
.theme-chests .q-opt { background: linear-gradient(180deg, #ffe0b2, #bf8b4b); box-shadow: 0 6px 0 #8d6035, 0 10px 20px rgba(0,0,0,.2); }
.chest-icon { font-size: clamp(1.8rem, 5vmin, 2.6rem); }
.theme-buckets .quiz-options { align-items: flex-end; }
.bucket { display: flex; flex-direction: column; align-items: center; font-size: clamp(1.8rem, 5vmin, 2.6rem); line-height: 1.15; }
.bucket b { font-size: clamp(.95rem, 2.4vmin, 1.15rem); }
.bucket.paint { filter: drop-shadow(0 0 6px var(--bc)); }
.garden-bed { filter: none; }
.shelf {
  display: block; background: linear-gradient(180deg, #ffe0b2, #d7a86e);
  border-radius: 14px; border-bottom: 8px solid #a1764a;
  padding: 10px 18px; font-size: clamp(1.7rem, 5vmin, 2.6rem); letter-spacing: 4px; margin-bottom: 8px;
}
.register-key {
  display: flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; border-radius: 12px;
  background: #eceff1; box-shadow: inset 0 -3px 0 #b0bec5;
}
.count-row { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 420px; }
.count-e { font-size: clamp(1.6rem, 4.6vmin, 2.4rem); position: relative; }
.count-e.crossed { filter: grayscale(1) opacity(.45); }
.count-e.crossed::after {
  content: '✖'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #e53935; font-size: .8em; filter: none;
}
.calc-eq { font-size: clamp(1.8rem, 6vmin, 3rem); font-weight: 700; letter-spacing: 2px; }
.calc-eq.small { font-size: clamp(1.2rem, 3.4vmin, 1.7rem); }
.calc-visual { margin-top: 8px; display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.calc-visual.small .count-e { font-size: 1.3rem; }
.calc-op { font-size: clamp(1.4rem, 4vmin, 2rem); }
.calc-hole {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff59d; border-radius: 12px; min-width: 1.4em;
  animation: promptPulse 1.2s infinite;
}

/* rachetă (decor) */
.rocket-track {
  position: absolute; right: clamp(6px, 2vmin, 22px); top: 6%; bottom: 4%; width: clamp(54px, 9vmin, 84px);
  background: rgba(255,255,255,.18); border-radius: 999px;
}
.rocket-ship {
  position: absolute; left: 50%; translate: -50% 0; bottom: 8%;
  font-size: clamp(2rem, 5.4vmin, 2.8rem);
  transition: bottom .6s cubic-bezier(.34,1.3,.64,1);
}
.rocket-ship.launch { animation: launch 1.4s ease-in forwards; }
@keyframes launch { to { translate: -50% -120vh; } }
.rocket-pad { position: absolute; left: 50%; translate: -50% 0; bottom: 0; font-size: clamp(1.6rem, 4vmin, 2.2rem); }

/* curcubeu (decor) */
.rainbow-fill { position: absolute; left: 50%; top: 8px; translate: -50% 0; display: flex; gap: 6px; }
.rf-arc { width: clamp(30px, 7vmin, 54px); height: 10px; border-radius: 6px; background: var(--bc); opacity: .9; }

/* riglă / sticle / cântar */
.len-bar {
  display: inline-block; background: #fff8e1; border-radius: 10px; padding: 6px 10px;
  width: calc(var(--len) * 2.4px + 60px); max-width: 60vw; overflow: hidden; white-space: nowrap;
  font-size: 1.4rem; text-align: left;
}
.scale-vis { font-size: clamp(2rem, 6vmin, 3rem); }
.scale-arm { display: inline-block; transition: rotate .4s; }
.scale-arm.tilt-l { rotate: -8deg; } .scale-arm.tilt-r { rotate: 8deg; }
.bottle {
  position: relative; display: inline-flex; width: clamp(44px, 9vmin, 64px); height: clamp(86px, 17vmin, 120px);
  border: 4px solid #90a4ae; border-radius: 12px 12px 16px 16px;
  background: rgba(255,255,255,.6); overflow: hidden; align-items: flex-end;
}
.bottle::before {
  content: ''; position: absolute; top: -14px; left: 50%; translate: -50% 0;
  width: 40%; height: 12px; background: #90a4ae; border-radius: 6px 6px 0 0;
}
.bottle-water {
  width: 100%; background: linear-gradient(180deg, hsl(var(--wh), 80%, 72%), hsl(var(--wh), 80%, 58%));
  border-radius: 0 0 10px 10px; transition: height .4s;
}

/* ============ MEMORY ============ */
.memory { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.mem-grid {
  display: grid; gap: clamp(6px, 1.6vmin, 14px);
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  width: 100%; max-width: 720px; max-height: 100%;
}
.mem-card { aspect-ratio: 3/3.4; perspective: 600px; cursor: pointer; }
.mem-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .45s cubic-bezier(.34,1.3,.64,1);
}
.mem-card.open .mem-inner, .mem-card.done .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.4rem, 4.6vmin, 2.4rem); box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.mem-back { background: linear-gradient(135deg, #7e57c2, #5c6bc0); color: rgba(255,255,255,.85); }
.mem-front { background: var(--card); color: var(--text); transform: rotateY(180deg); padding: 4px; text-align: center; }
.mem-card.done .mem-front { background: #dcedc8; box-shadow: 0 0 14px rgba(124, 179, 66, .8); }
.mem-lt { font-size: clamp(1.8rem, 5.4vmin, 2.8rem); }
.mem-lt.low { color: #5e35b1; }
.mem-dots { font-size: clamp(.7rem, 2vmin, 1rem); letter-spacing: 1px; line-height: 1.3; max-width: 90%; word-break: break-all; }
.mem-e { font-size: clamp(1.8rem, 5.4vmin, 2.8rem); }
.mem-word { font-size: clamp(.78rem, 2.2vmin, 1.05rem); font-weight: 700; }

/* ============ ORDER (tren / pod / construcție) ============ */
.order {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(16px, 4vmin, 40px); padding: 12px;
}
.order-slots { display: flex; gap: clamp(6px, 1.4vmin, 12px); align-items: center; flex-wrap: wrap; justify-content: center; }
.order-loco { font-size: clamp(2.2rem, 6.4vmin, 3.4rem); animation: locoChug 1s ease-in-out infinite; }
@keyframes locoChug { 50% { translate: 0 -3px; } }
.order-slot {
  width: clamp(54px, 10vmin, 80px); height: clamp(54px, 10vmin, 80px);
  border-radius: 14px; border: 3px dashed rgba(255,255,255,.85);
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.4rem, 4vmin, 2rem); font-weight: 700; color: var(--text);
  position: relative;
}
.theme-train .order-slot::after {
  content: ''; position: absolute; bottom: -10px; left: 14%; right: 14%; height: 8px;
  background: radial-gradient(circle at 20% 50%, #37474f 4px, transparent 5px),
              radial-gradient(circle at 80% 50%, #37474f 4px, transparent 5px);
}
.order-slot.filled {
  border-style: solid; border-color: #aed581; background: var(--card);
  animation: goodPulse .4s;
}
.theme-bridge .order-slot { border-radius: 8px 8px 16px 16px; background: rgba(141, 110, 99, .35); }
.order-chips { display: flex; gap: clamp(8px, 2vmin, 16px); flex-wrap: wrap; justify-content: center; }
.order-chip {
  width: clamp(58px, 11vmin, 88px); height: clamp(58px, 11vmin, 88px);
  border-radius: 18px; font-size: clamp(1.5rem, 4.4vmin, 2.2rem); font-weight: 700; color: var(--text);
  background: linear-gradient(180deg, #fff, #b3e5fc);
  box-shadow: 0 5px 0 #6fa8c7, 0 9px 18px rgba(0,0,0,.16);
  transition: translate .08s, box-shadow .08s, scale .2s, opacity .3s;
}
.order-chip:hover { scale: 1.06; }
.order-chip:active { translate: 0 5px; box-shadow: 0 0 0 #6fa8c7; }
.order-chip.used { opacity: 0; scale: .3; pointer-events: none; }

/* ============ SIMON ============ */
.simon {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(16px, 4vmin, 36px);
}
.simon-pads { display: flex; gap: clamp(10px, 2.6vmin, 24px); flex-wrap: wrap; justify-content: center; }
.simon-pad {
  width: clamp(74px, 16vmin, 130px); height: clamp(74px, 16vmin, 130px);
  border-radius: 26px; font-size: clamp(1.8rem, 5.4vmin, 3rem);
  background: var(--pc, #ce93d8);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 10px 22px rgba(0,0,0,.2);
  filter: saturate(.55) brightness(.92);
  transition: filter .12s, scale .12s, translate .08s;
  color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.25);
}
.simon-pad.lit { filter: saturate(1.3) brightness(1.25); scale: 1.12; box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 0 34px var(--pc); }
.simon-pad:active { translate: 0 5px; }
.simon-digit { font-weight: 700; }
.simon-note { font-size: .5em; }
.simon-status {
  font-size: clamp(1.05rem, 2.8vmin, 1.4rem); font-weight: 700;
  background: var(--card); color: var(--text); border-radius: 999px; padding: 10px 26px;
  box-shadow: var(--shadow);
}

/* ============ CUVINTE ============ */
.wordgame {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(12px, 3vmin, 28px); padding: 10px;
}
.wg-img {
  font-size: clamp(4rem, 14vmin, 7.5rem); line-height: 1;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.2));
  animation: mcBob 3s ease-in-out infinite;
}
.wg-img.happy { animation: happyJump .7s cubic-bezier(.34,1.56,.64,1); }
@keyframes happyJump { 30% { translate: 0 -30px; scale: 1.15; rotate: -6deg; } 60% { translate: 0 0; scale: 1; rotate: 5deg; } }
.wg-slots { display: flex; gap: clamp(5px, 1.2vmin, 10px); flex-wrap: wrap; justify-content: center; }
.wg-slot {
  width: clamp(46px, 9vmin, 72px); height: clamp(54px, 10.4vmin, 84px);
  border-radius: 14px; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.6rem, 5vmin, 2.6rem); font-weight: 700; color: var(--text);
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.wg-slot.empty { background: rgba(255,255,255,.4); border: 3px dashed rgba(255,255,255,.9); box-shadow: none; }
.wg-slot.current { border-color: #ffd54f; animation: promptPulse 1.1s infinite; }
.wg-slot.hint { color: #b39ddb; background: #f3e5f5; }
.wg-slot.justfilled { animation: goodPulse .4s; }
.wg-letters { display: flex; gap: clamp(7px, 1.8vmin, 14px); flex-wrap: wrap; justify-content: center; max-width: 96%; }
.wg-letter {
  width: clamp(52px, 10vmin, 80px); height: clamp(52px, 10vmin, 80px);
  border-radius: 16px; font-size: clamp(1.4rem, 4.2vmin, 2.1rem); font-weight: 700; color: var(--text);
  background: linear-gradient(180deg, #fff, #f8bbd0);
  box-shadow: 0 5px 0 #c48ba2, 0 9px 16px rgba(0,0,0,.15);
  transition: translate .08s, box-shadow .08s, scale .18s, opacity .3s;
}
.wg-letter:hover { scale: 1.08; }
.wg-letter:active { translate: 0 5px; box-shadow: 0 0 0 #c48ba2; }
.wg-letter.used { opacity: .25; pointer-events: none; }

/* ============ FORME ============ */
.shadow-show { margin-bottom: 6px; display: flex; justify-content: center; }
.shadow-show svg { filter: brightness(.25) opacity(.85); }
.shape-count { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 6px; }
.shape-build {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; padding: clamp(8px, 2vmin, 18px);
}
.sb-board {
  position: relative; flex: 1; width: min(480px, 92%);
  background: rgba(255,255,255,.35); border-radius: var(--r); margin-bottom: 10px;
}
.sb-slot { position: absolute; transition: scale .2s; }
.sb-slot svg { width: 100%; height: auto; }
.sb-slot.current { animation: promptPulse 1.1s infinite; }
.sb-tray { display: flex; gap: clamp(10px, 2.6vmin, 22px); justify-content: center; padding-bottom: 6px; }
.sb-opt {
  border-radius: 20px; padding: 8px; background: var(--card);
  box-shadow: 0 5px 0 rgba(0,0,0,.14), 0 9px 18px rgba(0,0,0,.14);
  transition: translate .08s, box-shadow .08s, scale .18s;
}
.sb-opt:hover { scale: 1.07; }
.sb-opt:active { translate: 0 5px; box-shadow: 0 0 0 rgba(0,0,0,.14); }

/* ============ PUZZLE 3x3 ============ */
.puzzle-game {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.pz-title { font-weight: 700; font-size: clamp(1rem, 2.8vmin, 1.3rem); background: var(--card); color: var(--text); padding: 8px 20px; border-radius: 999px; box-shadow: var(--shadow); }
.pz-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  width: min(70vmin, 420px);
}
.pz-tile {
  aspect-ratio: 1; border-radius: 16px;
  background: linear-gradient(135deg, hsl(var(--hue), 75%, 78%), hsl(var(--hue), 70%, 62%));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
  transition: scale .15s, outline .15s; outline: 4px solid transparent;
  color: #fff; text-shadow: 0 2px 2px rgba(0,0,0,.3);
}
.pz-tile.sel { outline-color: #ffd54f; scale: 1.07; }
.pz-tile.ok { outline-color: rgba(174, 213, 129, .9); }
.pz-num { font-size: clamp(1.5rem, 5vmin, 2.4rem); font-weight: 700; }
.pz-mini { font-size: clamp(.9rem, 2.6vmin, 1.3rem); opacity: .85; }
.pz-reveal {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(3px); z-index: 5;
  animation: promptIn .4s;
}
.pz-big { font-size: clamp(5rem, 22vmin, 11rem); animation: happyJump .8s; }
.pz-name { font-size: clamp(1.4rem, 4.4vmin, 2.2rem); font-weight: 700; color: var(--text); }

/* ============ BINGO ============ */
.bingo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.bingo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(6px, 1.6vmin, 12px);
  width: min(76vmin, 480px);
}
.bingo-cell {
  aspect-ratio: 1; border-radius: 16px; font-size: clamp(1.3rem, 4.4vmin, 2.2rem); font-weight: 700;
  background: var(--card); color: var(--text); box-shadow: 0 4px 0 rgba(0,0,0,.14);
  transition: scale .15s, background .3s;
}
.bingo-cell:active { scale: .92; }
.bingo-cell.marked { background: linear-gradient(180deg, #fff9c4, #ffe082); }
.bingo-cell.line { background: linear-gradient(180deg, #dcedc8, #aed581); animation: goodPulse .6s; }

/* ============ ROATA ============ */
.wheel-game {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(8px, 2vmin, 18px); overflow-y: auto; padding: 8px;
}
.wheel-box { position: relative; width: min(52vmin, 300px); height: min(52vmin, 300px); }
.wheel-pointer { position: absolute; top: -16px; left: 50%; translate: -50% 0; font-size: 2rem; z-index: 3; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#ef9a9a 0 12.5%, #ffcc80 0 25%, #fff59d 0 37.5%, #a5d6a7 0 50%,
    #90caf9 0 62.5%, #ce93d8 0 75%, #f48fb1 0 87.5%, #80deea 0 100%);
  border: 8px solid #fff; box-shadow: 0 10px 26px rgba(0,0,0,.25);
  transition: transform 2.2s cubic-bezier(.18, .8, .22, 1);
}
.wheel-seg { position: absolute; inset: 0; text-align: center; }
.wheel-seg span {
  position: absolute; top: 12px; left: 50%; translate: -50% 0;
  font-size: clamp(1.2rem, 3.6vmin, 1.8rem); font-weight: 700; color: var(--text);
  text-shadow: 0 2px 0 rgba(255,255,255,.7);
}
.wheel-spin { z-index: 2; }
.wheel-q { min-height: clamp(90px, 20vmin, 150px); display: flex; align-items: center; }
.wheel-opts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============ BUCĂTĂRIE ============ */
.kitchen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(10px, 3vmin, 26px);
}
.pot { font-size: clamp(4rem, 13vmin, 7rem); line-height: 1; filter: drop-shadow(0 8px 12px rgba(0,0,0,.22)); }
.pot.stir { animation: happyJump .5s; }
.pot-count {
  font-size: clamp(1.2rem, 3.4vmin, 1.7rem); font-weight: 700;
  background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 22px; box-shadow: var(--shadow);
}
.kitchen-tray { display: flex; gap: clamp(8px, 2vmin, 16px); flex-wrap: wrap; justify-content: center; max-width: 94%; }
.kitchen-item {
  font-size: clamp(2rem, 6vmin, 3rem); width: clamp(64px, 12vmin, 92px); height: clamp(64px, 12vmin, 92px);
  border-radius: 20px; background: var(--card);
  box-shadow: 0 5px 0 rgba(0,0,0,.14);
  transition: scale .15s, opacity .3s, translate .3s;
}
.kitchen-item:hover { scale: 1.08; }
.kitchen-item.gone { opacity: 0; translate: 0 -60px; scale: .4; pointer-events: none; }

/* ============ LABIRINT FORME / DIFERENȚE / PIPE ============ */
.shape-maze { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.sm-grid { display: grid; grid-template-columns: repeat(var(--cols, 6), 1fr); gap: 6px; width: min(96%, 760px); }
.sm-cell {
  position: relative; aspect-ratio: 1; border-radius: 14px; padding: 8%;
  background: rgba(255,255,255,.55); box-shadow: 0 3px 0 rgba(0,0,0,.1);
  transition: scale .12s;
}
.sm-cell:active { scale: .93; }
.sm-cell svg { width: 100%; height: 100%; }
.sm-player, .sm-goal {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.5rem, 4.6vmin, 2.6rem); pointer-events: none;
}
.sm-player { animation: mcBob 1.6s infinite; z-index: 2; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }

.diff-game { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.diff-row { display: flex; gap: clamp(10px, 3vmin, 30px); flex-wrap: wrap; justify-content: center; }
.diff-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px;
  background: var(--card); padding: 10px; border-radius: 20px; box-shadow: var(--shadow);
  width: min(44vmin, 300px);
}
.diff-cell {
  aspect-ratio: 1; font-size: clamp(1.2rem, 4vmin, 2rem); border-radius: 10px;
  background: #f5f5f5; transition: scale .12s, background .2s, outline .2s; outline: 3px solid transparent;
}
.diff-cell:active { scale: .9; }
.diff-cell.found { background: #dcedc8; outline-color: #7cb342; }

.pipe-game { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.pipe-row { display: flex; align-items: center; gap: 8px; }
.pipe-end { font-size: clamp(1.8rem, 5.4vmin, 3rem); }
.pipe-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 6px; width: min(64vmin, 560px); }
.pipe-tile {
  aspect-ratio: 1; border-radius: 14px; padding: 4%;
  background: rgba(255,255,255,.8); box-shadow: 0 3px 0 rgba(0,0,0,.12);
  transition: scale .12s;
}
.pipe-tile:active { scale: .93; }
.pipe-tile svg { width: 100%; height: 100%; }
.pipe-tile.start { outline: 4px solid #ffb74d; }
.pipe-tile.end { outline: 4px solid #ba68c8; }

/* ============ DANS / CASTEL / VÂNĂTOARE ============ */
.dance-floor { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2.6vmin, 22px); }
.dance-tile {
  width: clamp(70px, 14vmin, 110px); height: clamp(70px, 14vmin, 110px);
  border-radius: 22px; font-size: clamp(1.7rem, 5vmin, 2.6rem); font-weight: 700;
  background: hsl(var(--hue), 70%, 78%); color: var(--text);
  box-shadow: 0 5px 0 rgba(0,0,0,.18);
  animation: danceBob 1.1s ease-in-out infinite; animation-delay: var(--dly);
  transition: filter .15s, scale .15s;
}
@keyframes danceBob { 50% { translate: 0 -9px; rotate: 3deg; } }
.dance-tile.lit {
  filter: brightness(1.25) saturate(1.4); scale: 1.16;
  box-shadow: 0 5px 0 rgba(0,0,0,.18), 0 0 32px hsl(var(--hue), 90%, 60%);
}

.castle-base {
  position: absolute; bottom: 0; left: 50%; translate: -50% 12%;
  font-size: clamp(5rem, 19vmin, 10rem); line-height: 1; z-index: 1; pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.3));
}
.castle-base.glow { animation: castleGlow 1s ease; }
@keyframes castleGlow { 50% { filter: drop-shadow(0 0 36px #ffd54f) brightness(1.2); } }
.cd-letter {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35em; padding: 0 .12em; margin: 0 2px; border-radius: 8px;
  background: rgba(255,255,255,.5); font-weight: 700;
}
.cd-letter.lit { background: #ffe082; box-shadow: 0 0 12px rgba(255, 213, 79, .9); }

.hunt-game { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; }
.hunt-scene { position: relative; width: 230%; height: 100%; min-width: 1100px; }
.hunt-decor { position: absolute; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.hunt-spark {
  position: absolute; font-size: clamp(1.9rem, 5.4vmin, 2.8rem); z-index: 3;
  background: none; animation: sparkle 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px #fff176);
  transition: scale .2s;
}
@keyframes sparkle { 50% { scale: 1.3; rotate: 18deg; } }
.hunt-spark.opened { animation: none; filter: none; }
.hunt-q { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.hunt-q-prompt { font-size: clamp(1.05rem, 3vmin, 1.4rem); font-weight: 700; }
.hunt-q-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ============ CUFĂR / ALBUM / PROGRES ============ */
.chest-wrap, .album-wrap, .progress-wrap, .parent-wrap {
  max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(12px, 2.6vmin, 22px);
}
.gift-box {
  background: var(--card); border-radius: var(--r); padding: clamp(14px, 3vmin, 26px);
  text-align: center; box-shadow: var(--shadow); color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.gift-title { font-size: clamp(1.1rem, 3vmin, 1.4rem); font-weight: 700; }
.gift-sub { opacity: .75; }
.gift-btn {
  font-size: clamp(3.4rem, 11vmin, 5.5rem); line-height: 1;
  animation: giftWiggle 1.1s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.25));
  transition: scale .15s;
}
.gift-btn:hover { scale: 1.1; }
@keyframes giftWiggle { 25% { rotate: -7deg; } 75% { rotate: 7deg; } }
.gift-open { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; animation: promptIn .5s; }
.go-e { font-size: clamp(3rem, 9vmin, 4.6rem); }

.p-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px;
}
.p-stat {
  background: var(--card); border-radius: 18px; padding: 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: var(--shadow); color: var(--text);
}
.p-stat b { font-size: clamp(1.15rem, 3.2vmin, 1.5rem); color: #5e35b1; }
.p-stat span { font-size: clamp(.78rem, 2vmin, .92rem); opacity: .75; }

.chest-puzzle, .chest-badges {
  background: var(--card); border-radius: var(--r); padding: clamp(14px, 3vmin, 24px);
  box-shadow: var(--shadow); color: var(--text);
}
.cp-title { font-weight: 700; font-size: clamp(1.05rem, 2.8vmin, 1.3rem); margin-bottom: 12px; }
.cp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 460px; }
.cp-piece {
  aspect-ratio: 1; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.4rem, 4.4vmin, 2.2rem); background: #ede7f6; filter: grayscale(1) opacity(.5);
}
.cp-piece.got { background: linear-gradient(135deg, #fff9c4, #ffe082); filter: none; animation: promptIn .4s; }
.cp-done { margin-top: 12px; font-weight: 700; color: #ef6c00; font-size: 1.1rem; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: #f5f5f5; border-radius: 16px; padding: 10px 6px; filter: grayscale(.9) opacity(.6);
}
.badge.got { background: linear-gradient(180deg, #fff8e1, #ffecb3); filter: none; }
.badge-e { font-size: clamp(1.6rem, 4.6vmin, 2.4rem); }
.badge-n { font-size: clamp(.74rem, 1.9vmin, .88rem); font-weight: 700; }

.album-sec { background: var(--card); border-radius: var(--r); padding: clamp(12px, 2.6vmin, 22px); box-shadow: var(--shadow); color: var(--text); }
.album-sec-title { font-weight: 700; font-size: clamp(1.05rem, 2.8vmin, 1.3rem); margin-bottom: 10px; }
.album-sec-title small { opacity: .6; font-size: .85em; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.sticker {
  aspect-ratio: 1; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.7rem, 5vmin, 2.6rem); background: #f1f3f4;
  filter: grayscale(1) opacity(.45); transition: scale .18s;
}
.sticker.got {
  background: radial-gradient(circle at 30% 25%, #fff, #ffe9f2);
  filter: none; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.14);
}
.sticker.got:hover { scale: 1.12; rotate: 4deg; }

.prog-zone { background: var(--card); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow); color: var(--text); }
.pz-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: clamp(.92rem, 2.4vmin, 1.1rem); flex-wrap: wrap; }
.pz-head span { opacity: .75; font-size: .9em; }
.pz-bar { height: 14px; background: #eceff1; border-radius: 8px; margin-top: 8px; overflow: hidden; }
.pz-fill { height: 100%; background: linear-gradient(90deg, #aed581, #66bb6a); border-radius: 8px; transition: width .6s; }

/* ============ PANOU PĂRINTE ============ */
.p-sec { background: var(--card); border-radius: var(--r); padding: clamp(14px, 3vmin, 24px); box-shadow: var(--shadow); color: var(--text); }
.p-sec-title { font-weight: 700; font-size: clamp(1.1rem, 2.9vmin, 1.35rem); margin-bottom: 12px; }
.p-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed #e0d6cc; flex-wrap: wrap;
}
.p-row:last-child { border-bottom: none; }
.p-label { font-weight: 700; font-size: clamp(.95rem, 2.5vmin, 1.1rem); flex: 1; min-width: 180px; }
.p-label small { display: block; font-weight: 400; opacity: .65; font-size: .82em; margin-top: 2px; }
.p-switch {
  width: 64px; height: 36px; border-radius: 999px; background: #cfd8dc; position: relative;
  transition: background .25s; flex: none;
}
.p-switch.on { background: #66bb6a; }
.p-knob {
  position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: left .25s;
}
.p-switch.on .p-knob { left: 32px; }
.p-input {
  font-size: 1.1rem; font-weight: 700; padding: .45em .8em; border-radius: 14px;
  border: 3px solid #ce93d8; outline: none; width: min(240px, 60vw); background: #fff; text-align: center;
}
.p-select { text-align: left; cursor: pointer; font-size: 1rem; }
/* avatar-buton din meniu → deschide ecranul de profiluri */
.menu-avatar { cursor: pointer; border: none; background: rgba(255,255,255,.55); font: inherit; font-weight: 700; }
.menu-avatar:active { scale: .96; }
.ma-caret { opacity: .6; font-size: .85em; }
/* ecran profiluri */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44vw), 1fr)); gap: clamp(10px, 2.4vmin, 16px); max-width: 700px; margin: 8px auto; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); color: var(--text); position: relative; transition: scale .16s cubic-bezier(.34,1.56,.64,1); }
.profile-card:active { scale: .95; }
.profile-card.active { outline: 4px solid #ffca28; }
.profile-card.add { border: 3px dashed #b39ddb; background: rgba(255,255,255,.5); }
.profile-card.add.locked { border-color: #ffd54f; background: linear-gradient(135deg,#fffdf4,#fff8e1); }
.pc-av { font-size: 2.6rem; }
.pc-name { font-weight: 800; font-size: 1.05rem; text-align: center; }
.pc-stars { font-size: .9rem; opacity: .8; }
.pc-badge { position: absolute; top: 6px; right: 6px; background: #ffca28; color: #4a3800; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.profiles-note { max-width: 560px; margin: 14px auto; text-align: center; color: #6b6690; font-size: .92rem; }
/* parent: lista copiilor */
.p-kids-info { font-size: .95rem; color: #6b6690; margin-bottom: 8px; }
.p-kid-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; margin-bottom: 6px; box-shadow: 0 1px 3px rgba(80,60,160,.08); flex-wrap: wrap; }
.p-kid-row.active { background: #fff8e1; }
.p-kid-name { font-weight: 700; font-size: .98rem; }
.p-kid-tag { background: #ffca28; color: #4a3800; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.p-kid-acts { display: flex; gap: 5px; }
.btn-xs { font-size: .82rem; padding: .3em .7em; }
.p-addkid { margin-top: 8px; }
.ac-label { font-weight: 700; margin: 8px 0 4px; }
/* bara de sus din meniu */
.menu-topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; max-width: 540px; margin: 0 auto 6px; }
.tb-right { display: flex; gap: 6px; }
.tb-chip { border: none; font: inherit; font-weight: 700; background: rgba(255,255,255,.6); border-radius: 999px; padding: 8px 15px; cursor: pointer; box-shadow: 0 1px 3px rgba(80,60,160,.12); color: var(--text); white-space: nowrap; }
.tb-chip:active { scale: .95; }
.tb-add { padding: 8px 13px; font-size: 1.05rem; }
.tb-premium { background: linear-gradient(135deg,#ffd54f,#ffb300); color: #5a3d00; box-shadow: 0 2px 0 #d99a00; }
.tb-premium.owned { background: #e8f5e9; color: #2e7d32; box-shadow: 0 1px 3px rgba(80,60,160,.12); }
/* comenzi de sunet grupate */
.snd-group { display: inline-flex; gap: 4px; background: rgba(255,255,255,.5); border-radius: 999px; padding: 4px; }
.snd-btn { border: none; background: transparent; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; opacity: .45; filter: grayscale(.6); transition: .12s; }
.snd-btn.on { opacity: 1; filter: none; background: #fff; box-shadow: 0 1px 3px rgba(80,60,160,.15); }
.snd-btn:active { scale: .9; }
.btn-store { background: linear-gradient(135deg,#ffe082,#ffca28); color: #5a3d00; box-shadow: 0 3px 0 #e0a800; font-weight: 800; margin-top: 6px; }
/* ecran magazin */
.store-wrap { max-width: 640px; margin: 0 auto; padding-bottom: 24px; }
.store-intro { text-align: center; color: #5d4b7a; margin: 6px 0 18px; font-size: .98rem; }
.store-card { background: #fff; border-radius: 20px; padding: 18px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(80,60,160,.12); position: relative; }
.store-premium { border: 3px solid #ffca28; }
.store-bundle { border: 3px solid #66bb6a; background: linear-gradient(135deg,#f1f8e9,#fff); }
.sc-badge { position: absolute; top: -11px; left: 16px; background: #ffca28; color: #5a3d00; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 3px 12px; }
.sc-badge.best { background: #66bb6a; color: #fff; }
.sc-title { font-size: 1.3rem; font-weight: 800; color: #6a4fd0; margin-bottom: 6px; }
.sc-desc { color: #6b6690; font-size: .95rem; margin-bottom: 8px; }
.sc-benefits { margin: 10px 0; }
.sc-benefit { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 9px; text-align: left; }
.sc-benefit > span { font-size: 1.5rem; flex: none; line-height: 1.2; }
.sc-benefit b { display: block; }
.sc-benefit small { color: #6b6690; }
.sc-price { font-size: 1.5rem; font-weight: 800; color: var(--text); margin: 10px 0; }
.sc-price > span { font-size: .75rem; font-weight: 600; color: #6b6690; }
.sc-price s { color: #b0a8c8; font-size: 1rem; font-weight: 600; }
.sc-owned { background: #e8f5e9; border-radius: 12px; padding: 12px; color: #2e7d32; }
.btn-lg { font-size: 1.15rem; padding: 14px 30px; width: 100%; }
.sc-havecode { width: 100%; margin-top: 10px; font-size: 1rem; padding: 11px 20px; color: #6a4fd0; }
.store-h2 { font-size: 1.15rem; font-weight: 800; color: #6a4fd0; margin: 20px 0 4px; }
.store-sub { color: #6b6690; font-size: .9rem; margin-bottom: 12px; }
.store-worksheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44vw), 1fr)); gap: 12px; }
.store-ws { padding: 14px; text-align: center; margin-bottom: 0; }
.sc-ic { font-size: 2.2rem; }
.store-ws .sc-title { font-size: 1rem; }
.store-ws .sc-desc { font-size: .82rem; min-height: 3.4em; }
.store-ws .sc-price { font-size: 1.2rem; margin: 6px 0; }
.store-free { width: 100%; margin-top: 14px; }
.store-note { text-align: center; color: #9a94b8; font-size: .85rem; margin-top: 14px; }
.p-premium { border: 3px solid #ffd54f; background: linear-gradient(135deg, #fffdf4, #fff8e1); }
.p-prem-text { font-size: .95rem; margin: 6px 0 10px; }
.p-prem-text ul { margin: 8px 0 0 20px; }
.p-prem-text li { margin-bottom: 5px; }
.p-prem-active { background: #e8f5e9; border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: .98rem; }
.p-prem-active small { color: #6b6690; }
.p-gender { display: flex; gap: 8px; }
.p-gbtn {
  font-size: 1rem; font-weight: 700; padding: .5em 1.1em; border-radius: 999px;
  background: #f5f5f5; transition: background .2s, scale .15s;
}
.p-gbtn.sel { background: linear-gradient(180deg, #e1bee7, #ce93d8); }
.p-gbtn:active { scale: .94; }
.p-zones { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.p-zone-row {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: clamp(.85rem, 2.2vmin, 1rem); background: #faf6f0; border-radius: 12px; padding: 8px 12px;
}
.p-note { margin-top: 12px; font-size: .85rem; opacity: .65; text-align: center; }
.p-danger { border: 3px dashed #ef9a9a; }

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .hud-name { display: none; }
  /* harta aventurii: exact 2 carduri pe rând, mai compacte = mai puțin scroll */
  .map-scroll { padding-left: 10px; padding-right: 10px; }
  .map-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .map-card { padding: 14px 8px; gap: 3px; }
  .mc-icon { font-size: clamp(2rem, 11vw, 2.8rem); }
  .mc-title { font-size: clamp(.95rem, 4vw, 1.15rem); }
  .mc-desc { font-size: clamp(.74rem, 3vw, .9rem); }
  .mc-progress, .mc-lock { font-size: clamp(.72rem, 2.9vw, .88rem); padding: 3px 10px; }
  .arcade-grid { grid-template-columns: repeat(auto-fill, minmax(44vw, 1fr)); }
  .diff-grid { width: min(92vw, 340px); }
  .diff-row { gap: 8px; }
  .owl-bubble { max-width: 60vw; }
  .menu-stats { gap: 12px; padding: 6px 16px; }
}
/* telefoane foarte înguste: tot 2 pe rând, dar și mai compacte */
@media (max-width: 400px) {
  .map-card { padding: 12px 6px; }
  .mc-desc { min-height: 2.2em; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .menu-title .mt-1 { font-size: 1.7rem; }
  .menu-title .mt-2 { font-size: 1.2rem; }
  .menu-owl { min-height: 70px; }
  .owl { width: 70px; }
  .wg-img { font-size: 3.4rem; }
  .intro-icon { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
}

/* ============================================================
   ACTUALIZĂRI: comutatoare HUD, jocuri arcade noi
   ============================================================ */

/* comutatoare audio în timpul jocului */
.hud-tgls { display: flex; gap: 4px; flex: none; }
.hud-tgl {
  width: clamp(30px, 5.4vmin, 38px); height: clamp(30px, 5.4vmin, 38px);
  border-radius: 10px; font-size: clamp(.85rem, 2.2vmin, 1.05rem);
  background: var(--card); box-shadow: 0 2px 0 rgba(0,0,0,.12);
  transition: filter .15s, translate .08s;
}
.hud-tgl:active { translate: 0 2px; box-shadow: 0 0 0 rgba(0,0,0,.12); }
.hud-tgl.off { filter: grayscale(1) opacity(.5); }
.menu-avatar { color: #5e35b1; }

/* ——— Fiolele cu Culori ——— */
.tubes-game { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.tubes-row { display: flex; gap: clamp(8px, 2.4vmin, 22px); align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.tube {
  display: flex; flex-direction: column-reverse; gap: 4px;
  width: clamp(46px, 9vmin, 66px); height: clamp(170px, 34vmin, 250px);
  padding: 6px; border: 4px solid #90a4ae; border-top-width: 2px;
  border-radius: 6px 6px 24px 24px; background: rgba(255,255,255,.55);
  transition: translate .15s, box-shadow .15s, border-color .15s;
}
.tube.sel { translate: 0 -12px; box-shadow: 0 10px 20px rgba(0,0,0,.22); border-color: #5c6bc0; }
.tube.done { border-color: #66bb6a; box-shadow: 0 0 18px rgba(102,187,106,.7); }
.tube-ball {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.8), transparent 42%), var(--bc, #ccc);
  box-shadow: inset 0 -3px 5px rgba(0,0,0,.18);
}
.tube.sel .tube-ball:last-child { outline: 3px solid #fff; outline-offset: 1px; }

/* ——— Prinde Extratereștrii ——— */
.whack-game { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.whack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 2.6vmin, 24px); }
.whack-cell {
  position: relative; width: clamp(78px, 17vmin, 132px); height: clamp(78px, 17vmin, 132px);
  background: none; overflow: hidden; border-radius: 16px;
}
.whack-hole {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font-size: clamp(2.4rem, 7vmin, 4rem); line-height: 1; opacity: .9;
}
.whack-mole {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  font-size: clamp(2rem, 6vmin, 3.4rem); line-height: 1.2;
  translate: 0 55%; opacity: 0; pointer-events: none;
  transition: translate .16s cubic-bezier(.34,1.4,.64,1), opacity .12s;
}
.whack-cell.up .whack-mole { translate: 0 -4%; opacity: 1; }

/* ——— Unește Punctele ——— */
.dots-game { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.dots-board {
  position: relative; width: min(72vmin, 500px); aspect-ratio: 1;
  background: rgba(255,255,255,.45); border-radius: 24px; box-shadow: var(--shadow);
}
.dots-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dots-line { fill: none; stroke: #7e57c2; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dots-fill { fill: var(--fc, #ffd54f); opacity: 0; stroke: none; transition: opacity .6s; }
.dots-fill.show { opacity: .9; }
.dot {
  position: absolute; translate: -50% -50%; z-index: 2;
  width: clamp(30px, 6.4vmin, 46px); height: clamp(30px, 6.4vmin, 46px);
  border-radius: 50%; background: var(--card); color: var(--text);
  font-weight: 700; font-size: clamp(.85rem, 2.4vmin, 1.15rem);
  box-shadow: 0 3px 0 rgba(0,0,0,.16);
  transition: background .2s, scale .15s;
}
.dot:active { scale: .88; }
.dot.done { background: #aed581; }
.dot.next { background: #ffe082; animation: promptPulse 1s infinite; }
.dots-emoji {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 3;
  font-size: clamp(3rem, 10vmin, 5.4rem); animation: happyJump .8s;
  pointer-events: none;
}

/* ——— Garderoba Veselă ——— */
.dress-game {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(8px, 2vmin, 18px); padding: 8px;
}
.dress-fig {
  display: flex; flex-direction: column; align-items: center; line-height: 1.05;
  background: var(--card); border-radius: 28px; padding: 16px 40px;
  box-shadow: var(--shadow); min-width: 150px;
}
.dress-part { font-size: clamp(1.8rem, 5.6vmin, 2.8rem); min-height: 1.1em; }
.dress-part.face { font-size: clamp(2.6rem, 8vmin, 4rem); }
.dress-part.pop { animation: goodPulse .45s; }
.dress-cat {
  font-weight: 700; font-size: clamp(1rem, 2.8vmin, 1.3rem);
  background: var(--card); color: var(--text); padding: 6px 20px;
  border-radius: 999px; box-shadow: var(--shadow);
}
.dress-opts { display: flex; gap: clamp(8px, 2vmin, 16px); flex-wrap: wrap; justify-content: center; }
.dress-opt {
  font-size: clamp(1.8rem, 5.2vmin, 2.7rem);
  width: clamp(62px, 12vmin, 92px); height: clamp(62px, 12vmin, 92px);
  border-radius: 18px; background: var(--card);
  box-shadow: 0 4px 0 rgba(0,0,0,.14);
  transition: scale .15s, translate .08s;
}
.dress-opt:hover { scale: 1.1; }
.dress-opt:active { translate: 0 4px; }

/* ——— Tunul cu Baloane de Apă — doar canvas, fără stiluri extra ——— */

/* ——— Colorează Desenul ——— */
.color-game {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(8px, 2vmin, 16px); padding: 8px;
}
.color-board {
  width: min(58vmin, 400px); aspect-ratio: 1;
  background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 3%;
}
.color-board svg { width: 100%; height: 100%; }
.color-board [data-r] { stroke: #546e7a; stroke-width: 2.2; cursor: pointer; transition: fill .2s; }
.color-board .deco { fill: none; stroke: #546e7a; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.color-board .deco-dot { fill: #37474f; pointer-events: none; }
.palette { display: flex; gap: clamp(6px, 1.6vmin, 12px); flex-wrap: wrap; justify-content: center; }
.swatch {
  width: clamp(38px, 8vmin, 56px); height: clamp(38px, 8vmin, 56px);
  border-radius: 50%; background: var(--sc, #ccc);
  border: 4px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,.2);
  transition: scale .15s, border-color .15s;
}
.swatch.sel { scale: 1.22; border-color: #5e35b1; }

/* ——— Vânătoarea de Stickere: săgeți de derulare ——— */
.hunt-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 6;
  width: clamp(46px, 9vmin, 62px); height: clamp(46px, 9vmin, 62px);
  border-radius: 50%; background: var(--card); color: var(--text);
  font-size: clamp(1.1rem, 2.8vmin, 1.4rem); box-shadow: var(--shadow);
  transition: scale .15s;
}
.hunt-arrow:active { scale: .9; }
.hunt-arrow.ha-l { left: 10px; }
.hunt-arrow.ha-r { right: 10px; }
.hunt-scene { cursor: grab; touch-action: pan-y; }

/* ——— Puzzle de Traseu: capete aliniate pe rând ——— */
.pipe-row { align-items: stretch; }
.pipe-side { display: flex; flex-direction: column; }
.pipe-side .pipe-cell {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.5rem, 4.4vmin, 2.5rem); min-width: 1.4em;
}
.pipe-tile.start { outline: 4px solid #ffb74d; background: #fff3e0; }
.pipe-tile.end { outline: 4px solid #ba68c8; background: #f3e5f5; }

/* ============================================================
   ACTUALIZĂRI v3: bara de instrucțiuni, font de joc, mânuță, X și O
   ============================================================ */

/* spațiu flexibil în header (a luat locul promptului) */
.hud-spacer { flex: 1; }

/* instrucțiunile jocului — bară proprie, vizibilă, deasupra jocului */
.game-prompt { display: none; justify-content: center; padding: 6px 10px; }
.game-prompt.show { display: flex; }
.game-prompt-inner {
  background: var(--card); color: var(--text);
  border-radius: 999px; padding: 8px 22px;
  font-weight: 700; font-size: clamp(1rem, 2.8vmin, 1.35rem);
  text-align: center; box-shadow: var(--shadow);
  max-width: 96%; animation: promptIn .35s ease;
}
.game-prompt-inner .prompt-big { font-size: clamp(1.3rem, 4vmin, 1.9rem); }

/* font simplu și clar pentru copii în CONȚINUTUL jocurilor
   (navigarea păstrează fontul jucăuș) */
.stage, .stage button, .game-prompt-inner {
  font-family: Tahoma, Verdana, Arial, sans-serif;
}

/* mânuță peste elementele apăsabile, baghetă în rest */
.kc-hand {
  display: none; position: absolute; left: -8px; top: -2px;
  font-size: 30px; line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.3));
}
#kid-cursor.hand svg { display: none; }
#kid-cursor.hand .kc-hand { display: block; }

/* ——— X și O cu Uki ——— */
.xo-game {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(10px, 2.6vmin, 22px);
}
.xo-status {
  font-weight: 700; font-size: clamp(1rem, 2.8vmin, 1.3rem);
  background: var(--card); color: var(--text);
  padding: 8px 22px; border-radius: 999px; box-shadow: var(--shadow);
}
.xo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 1.6vmin, 12px);
  width: min(64vmin, 360px);
}
.xo-cell {
  aspect-ratio: 1; border-radius: 18px;
  background: var(--card); box-shadow: 0 4px 0 rgba(0,0,0,.14);
  font-size: clamp(2rem, 8vmin, 3.4rem); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: scale .12s, background .2s;
}
.xo-cell:active { scale: .92; }
.xo-cell.win { background: linear-gradient(180deg, #dcedc8, #aed581); animation: goodPulse .6s; }
.xo-x { color: #e53935; }
.xo-o { color: #1e88e5; }

/* ============================================================
   PWA: banner „Instalează aplicația”
   ============================================================ */
.pwa-banner {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  translate: -50% 160%; z-index: 9600;
  display: flex; align-items: center; gap: 14px;
  background: var(--card); color: var(--text);
  border-radius: 24px; padding: 14px 18px;
  box-shadow: 0 16px 44px rgba(0,0,0,.32);
  max-width: min(560px, 94vw);
  transition: translate .45s cubic-bezier(.34, 1.3, .64, 1);
  font-family: var(--font);
}
.pwa-banner.in { translate: -50% 0; }
.pwa-icon {
  width: clamp(48px, 9vmin, 62px); height: clamp(48px, 9vmin, 62px);
  border-radius: 14px; flex: none;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.pwa-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pwa-text b { font-size: clamp(.92rem, 2.4vmin, 1.05rem); line-height: 1.2; }
.pwa-text span { font-size: clamp(.78rem, 2vmin, .9rem); opacity: .8; line-height: 1.3; }
.pwa-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pwa-btns .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .pwa-banner { flex-wrap: wrap; justify-content: center; text-align: center; }
  .pwa-text { width: 100%; align-items: center; }
  .pwa-btns { flex-direction: row; }
}

/* descrierea modurilor de joc în panoul de părinte */
.p-mode-desc {
  margin-top: 10px; padding: 12px 16px;
  background: #faf6f0; border-radius: 14px;
  font-size: clamp(.85rem, 2.2vmin, 1rem); line-height: 1.5; color: var(--text);
}
.p-mode-desc b { color: #5e35b1; }

/* ============================================================
   REVAMP v4: ecran de încărcare, donații, polish premium
   ============================================================ */

/* ——— Ecran de încărcare ——— */
#boot {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(180deg, #8a63ec, #4a3aa8);
  transition: opacity .55s ease, scale .55s ease;
}
#boot.out { opacity: 0; scale: 1.08; pointer-events: none; }
.boot-owl {
  width: clamp(120px, 30vmin, 200px);
  animation: bootPop .7s cubic-bezier(.34,1.56,.64,1), owlBob 3s ease-in-out .7s infinite;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.35));
}
.boot-owl svg { width: 100%; height: auto; }
@keyframes bootPop { from { scale: 0; rotate: -25deg; } }
.boot-title {
  font-family: var(--font); font-size: clamp(2.2rem, 8vmin, 3.6rem); font-weight: 700; color: #fff;
  letter-spacing: 1px; text-shadow: 0 4px 0 rgba(0,0,0,.18);
  animation: fadeUp .6s ease .3s both;
}
@keyframes fadeUp { from { opacity: 0; translate: 0 16px; } }
.boot-dots { display: flex; gap: 10px; }
.boot-dots span {
  width: 13px; height: 13px; border-radius: 50%; background: #ffd54f;
  animation: bootDot 1s ease-in-out infinite;
}
.boot-dots span:nth-child(2) { animation-delay: .16s; }
.boot-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes bootDot { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-10px); opacity: 1; } }

/* ——— Butonul de donații (meniu) ——— */
.donate-chip {
  background: linear-gradient(180deg, #fff3c4, #ffd54f) !important;
  position: relative; overflow: hidden;
}
.donate-chip::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  transform: skewX(-18deg); animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine { 0%, 65% { left: -60%; } 85%, 100% { left: 130%; } }

/* ——— Modal donații ——— */
.modal-donate .modal-title { color: #c79100; }
.donate-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.donate-emoji { font-size: clamp(3rem, 9vmin, 4.6rem); animation: owlBob 2.4s ease-in-out infinite; }
.donate-note { font-size: clamp(.85rem, 2.2vmin, 1rem); opacity: .75; }

/* ——— Secțiunea de susținere (panou părinte) ——— */
.p-support { background: linear-gradient(180deg, #fffdf5, #fff6da); border: 2px solid #ffe082; }
.p-support-text { font-size: clamp(.9rem, 2.3vmin, 1.05rem); line-height: 1.5; margin-bottom: 14px; color: var(--text); }
.p-donate-btn { width: 100%; }

/* ——— Polish premium global: butoane mari cu lucire la trecere ——— */
.btn-go, .btn-huge { position: relative; overflow: hidden; }
.btn-huge::after {
  content: ''; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); animation: shine 4.5s ease-in-out infinite;
}

/* ============================================================
   REVAMP v5: culori dinamice, particule, victorie spectaculoasă
   ============================================================ */

/* —— Fundal de joc cu culori dinamice (se aplică TUTUROR jocurilor) —— */
.stage::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 15% 0%, color-mix(in srgb, var(--bg1) 70%, #fff) 0%, transparent 55%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  opacity: .5;
  animation: stageHue 14s ease-in-out infinite;
}
@keyframes stageHue {
  0%, 100% { filter: hue-rotate(-16deg) saturate(1); }
  50% { filter: hue-rotate(16deg) saturate(1.15); }
}
/* canvas-ul și conținutul jocului stau deasupra fundalului dinamic —
   DOAR z-index (containerele sunt deja position:absolute; nu schimba poziția!) */
.game-canvas, .float-field, .quiz, .memory, .order, .simon, .wordgame,
.shape-build, .puzzle-game, .bingo, .wheel-game, .kitchen, .shape-maze,
.diff-game, .pipe-game, .dance-floor, .hunt-game, .tubes-game, .whack-game,
.dots-game, .dress-game, .color-game, .xo-game { z-index: 1; }

/* —— Bara de progres: blândă, culori complementare, mișcare lentă —— */
.hud-progress-bar {
  background: linear-gradient(90deg, #80deea, #66bb6a, #aed581, #80deea);
  background-size: 220% 100%;
  animation: progFlow 6s linear infinite;
  box-shadow: 0 0 7px rgba(102, 187, 106, .45);
}
@keyframes progFlow { to { background-position: -220% 0; } }

/* —— Bara de instrucțiuni: contur blând, fără pâlpâire agresivă —— */
.game-prompt-inner {
  border: 3px solid transparent;
  background-clip: padding-box;
  animation: promptHue 9s ease-in-out infinite;
}
@keyframes promptHue {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 3px hsl(190,70%,78%); }
  50% { box-shadow: var(--shadow), 0 0 0 3px hsl(140,60%,76%); }
}

/* —— Ecran de victorie spectaculos —— */
.win-box { position: relative; overflow: hidden; }
.win-rays {
  position: absolute; left: 50%; top: 38%; translate: -50% -50%;
  width: 160%; aspect-ratio: 1; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg,
    #ff5252 0 30deg, #ffb300 30deg 60deg, #ffee58 60deg 90deg, #66bb6a 90deg 120deg,
    #42a5f5 120deg 150deg, #ab47bc 150deg 180deg, #ff5252 180deg 210deg, #ffb300 210deg 240deg,
    #ffee58 240deg 270deg, #66bb6a 270deg 300deg, #42a5f5 300deg 330deg, #ab47bc 330deg 360deg);
  opacity: .14;
  -webkit-mask: radial-gradient(circle, transparent 24%, #000 26%);
  mask: radial-gradient(circle, transparent 24%, #000 26%);
  animation: spinRays 20s linear infinite;
}
@keyframes spinRays { to { rotate: 360deg; } }
.win-box > * { position: relative; z-index: 1; }
/* razele rămân în spate, absolute (specificitate mai mare ca regula de sus) */
.win-box > .win-rays { position: absolute; z-index: 0; }
.win-owl {
  font-size: clamp(2.6rem, 8vmin, 3.8rem); line-height: 1;
  animation: winOwl 1.2s ease-in-out infinite;
}
@keyframes winOwl { 0%,100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-8px); } }
.win-title {
  background: linear-gradient(90deg, #e91e63, #ff9800, #43a047, #1e88e5, #8e24aa, #e91e63);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleFlow 4s linear infinite;
}
@keyframes titleFlow { to { background-position: 200% 0; } }
.win-star.on.pop { animation: starPop .55s cubic-bezier(.34,1.8,.64,1) forwards, starSpark 1.4s ease-in-out .55s infinite; }
@keyframes starSpark { 0%,100% { filter: drop-shadow(0 0 8px rgba(255,193,7,.6)); } 50% { filter: drop-shadow(0 0 22px rgba(255,193,7,1)); } }

/* text „-5" la penalizare scor */
.fx-float.fx-minus { color: #e53935; font-size: 1.7rem; }

/* ============================================================
   Jocuri noi 64–67: Parcarea, Modelul, Conturează
   ============================================================ */

/* ——— Parcarea Aglomerată (Rush Hour) ——— */
.park-game { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; }
.park-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  grid-template-rows: repeat(var(--rows, 5), 1fr);
  gap: 4px; width: min(82vmin, 460px); aspect-ratio: var(--cols) / var(--rows);
  background: #455a64; padding: 8px; border-radius: 18px; box-shadow: var(--shadow);
  position: relative;
}
.park-cell {
  background: #607d8b; border-radius: 8px; min-width: 0; min-height: 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.18);
}
.park-cell.park-exit { background: #7e9aa8; box-shadow: inset 0 0 0 3px #ffd54f; }
.park-car {
  --cc: #42a5f5; background: var(--cc);
  border-radius: 12px; margin: 2px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1rem, 4vmin, 1.7rem); pointer-events: none; z-index: 2;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 2px 5px rgba(0,0,0,.25);
  transition: all .18s cubic-bezier(.34,1.3,.64,1);
}
.park-car.red { background: #ef5350; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 0 0 0 3px #fff, 0 2px 6px rgba(0,0,0,.3); }
.park-car.sel { outline: 4px solid #ffd54f; outline-offset: 1px; }

/* ——— Urmează Modelul ——— */
.pat-seq { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pat-cell { font-size: clamp(1.6rem, 5vmin, 2.4rem); }
.pat-arrow { color: #b0bec5; font-size: 1.4rem; margin: 0 2px; }
.pat-q {
  font-size: clamp(1.6rem, 5vmin, 2.4rem); font-weight: 700; color: #d84315;
  background: #fff59d; border-radius: 10px; padding: 0 .35em; animation: promptPulse 1.2s infinite;
}

/* ——— Conturează: doar canvas, fără stiluri extra ——— */

/* ============================================================
   Jocuri noi 72–73: Bucătăria Veselă, Ce s-a Schimbat?
   ============================================================ */

/* ——— Bucătăria Veselă ——— */
.cook-game { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.5vmin, 22px); padding: 10px; }
.cook-order { background: var(--card); color: var(--text); border-radius: 18px; padding: 12px 22px; box-shadow: var(--shadow); text-align: center; }
.cook-order-title { font-weight: 700; font-size: clamp(.95rem, 2.5vmin, 1.15rem); margin-bottom: 4px; }
.cook-order-items { display: flex; gap: 6px; justify-content: center; font-size: clamp(1.8rem, 5.4vmin, 2.6rem); }
.cook-plate { position: relative; min-height: clamp(90px, 20vmin, 150px); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; padding: 10px; }
.cook-plate-dish { position: absolute; font-size: clamp(4rem, 15vmin, 7rem); opacity: .5; z-index: 0; }
.cook-plate-item { position: relative; z-index: 1; font-size: clamp(1.6rem, 5vmin, 2.4rem); background: none; transition: scale .15s; }
.cook-plate-item:active { scale: .8; }
.cook-tray { display: flex; gap: clamp(8px, 2vmin, 16px); flex-wrap: wrap; justify-content: center; }
.cook-ing {
  font-size: clamp(1.8rem, 5.4vmin, 2.7rem);
  width: clamp(60px, 12vmin, 92px); height: clamp(60px, 12vmin, 92px);
  border-radius: 18px; background: var(--card); box-shadow: 0 4px 0 rgba(0,0,0,.14);
  transition: scale .15s, translate .08s;
}
.cook-ing:hover { scale: 1.08; }
.cook-ing:active { translate: 0 4px; box-shadow: 0 0 0 rgba(0,0,0,.14); }

/* ——— Ce s-a Schimbat? ——— */
.change-game { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(12px, 3vmin, 26px); }
.change-status { font-weight: 700; font-size: clamp(1rem, 2.8vmin, 1.3rem); background: var(--card); color: var(--text); padding: 8px 22px; border-radius: 999px; box-shadow: var(--shadow); }
.change-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: clamp(8px, 2vmin, 16px); }
.change-cell {
  width: clamp(66px, 15vmin, 110px); height: clamp(66px, 15vmin, 110px);
  border-radius: 20px; font-size: clamp(2rem, 6.5vmin, 3.4rem);
  background: var(--card); box-shadow: 0 4px 0 rgba(0,0,0,.14);
  transition: scale .15s, background .2s;
}
.change-cell.hidden { background: linear-gradient(135deg, #7e57c2, #5c6bc0); color: rgba(255,255,255,.85); }
.change-cell:active { scale: .93; }
.change-cell.correct { background: linear-gradient(180deg, #dcedc8, #aed581); animation: goodPulse .5s; }
.change-cell.wrong { animation: shakeX .45s; }
