/* ============================================================
   Mariel's World — shared styles for every room
   Bright, friendly, BIG targets, no small text anywhere.
   ============================================================ */

* { box-sizing: border-box; -webkit-user-select: none; user-select: none; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Fredoka', 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
  background: #7ec8ff;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'><circle cx='18' cy='18' r='14' fill='%23ffdd33' stroke='%23ff7b00' stroke-width='4'/><circle cx='18' cy='18' r='5' fill='%23ff7b00'/></svg>") 18 18, auto;
}

/* Anything interactive gets a chunky pointer + glow */
.hot, button, a {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56'><circle cx='22' cy='22' r='17' fill='%23ff5daa' stroke='%23ffffff' stroke-width='5'/><circle cx='22' cy='22' r='6' fill='%23ffffff'/></svg>") 22 22, pointer;
}

/* ---- Hover feedback: everything clickable wiggles & glows ---- */
.hot { transition: transform .18s ease, filter .18s ease; transform-origin: center; }
.hot:hover {
  filter: drop-shadow(0 0 14px #fff37e) drop-shadow(0 0 26px #ffd23e) brightness(1.12);
  animation: mw-wiggle .5s ease infinite;
}
@keyframes mw-wiggle {
  0%,100% { transform: rotate(-2deg) scale(1.06); }
  50%     { transform: rotate(2.5deg) scale(1.09); }
}

/* ---- Big friendly buttons ---- */
.mw-btn {
  font-family: inherit;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #ff8bd0, #ff4fa8);
  border: 6px solid #fff;
  border-radius: 999px;
  padding: .5em 1.3em;
  box-shadow: 0 8px 0 rgba(0,0,0,.18), 0 12px 24px rgba(0,0,0,.25);
  text-shadow: 0 3px 0 rgba(0,0,0,.2);
}
.mw-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(0,0,0,.18); }

/* ---- Home (back to World) button, injected by engine ---- */
#mw-home {
  position: fixed; left: 22px; bottom: 22px; z-index: 9000;
  width: 120px; height: 120px;
  border: none; border-radius: 32px;
  background: linear-gradient(180deg,#ffe66d,#ffb703);
  box-shadow: 0 8px 0 #c98a00, 0 14px 24px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}
#mw-home:active { transform: translateY(6px); box-shadow: 0 2px 0 #c98a00; }

/* ---- The big START splash (unlocks sound) ---- */
#mw-splash {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #b3e5ff 0%, #6db9ff 55%, #4a86e8 100%);
  gap: 4vh;
}
#mw-splash h1 {
  font-size: clamp(44px, 8vw, 110px);
  color: #fff; margin: 0;
  text-shadow: 0 5px 0 #e0529c, 0 10px 0 rgba(0,0,0,.15);
  letter-spacing: .02em;
  animation: mw-title-bob 2.4s ease-in-out infinite;
}
@keyframes mw-title-bob { 0%,100% {transform: translateY(0) rotate(-1.5deg);} 50% {transform: translateY(-16px) rotate(1.5deg);} }
#mw-splash .star {
  font-size: clamp(120px, 22vw, 260px);
  line-height: 1;
  animation: mw-spin-pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px #fff59a);
  border: none; background: none; padding: 0;
}
@keyframes mw-spin-pulse { 0%,100% {transform: scale(1) rotate(-8deg);} 50% {transform: scale(1.18) rotate(8deg);} }

/* ---- WORD learning card ---- */
#mw-word {
  position: fixed; left: 50%; top: 14%; transform: translateX(-50%);
  z-index: 9500; pointer-events: none;
  background: #fff;
  border: 8px solid #ffb703;
  border-radius: 36px;
  padding: 18px 44px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  display: flex; gap: 6px;
  opacity: 0;
}
#mw-word.show { animation: mw-word-in 3.4s ease forwards; }
@keyframes mw-word-in {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(.6); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.08); }
  16%  { transform: translateX(-50%) scale(1); }
  84%  { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-28px) scale(.8); }
}
#mw-word span {
  font-size: clamp(64px, 9vw, 130px);
  font-weight: 700;
  color: #ff4fa8;
  display: inline-block;
  animation: mw-letter-bounce .6s ease backwards;
}
#mw-word span:nth-child(odd) { color: #4a86e8; }
@keyframes mw-letter-bounce {
  0% { transform: translateY(-60px) scale(0); opacity: 0; }
  60% { transform: translateY(10px) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

/* ---- Sparkles ---- */
.mw-spark {
  position: fixed; z-index: 9990; pointer-events: none;
  font-size: 26px;
  animation: mw-spark-fly .9s ease-out forwards;
}
@keyframes mw-spark-fly {
  0%   { opacity: 1; transform: translate(0,0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2) rotate(220deg); }
}

/* ---- Room fade transition ---- */
#mw-fader {
  position: fixed; inset: 0; z-index: 11000; pointer-events: none;
  background: #ffdd57; opacity: 0; transition: opacity .45s ease;
}
#mw-fader.on { opacity: 1; pointer-events: all; }

/* ---- Character speech bubble ---- */
.mw-bubble {
  position: absolute; z-index: 8000;
  background: #fff; border: 6px solid #4a86e8; border-radius: 28px;
  padding: 14px 26px;
  font-size: clamp(24px, 2.6vw, 38px); font-weight: 700; color: #234;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  animation: mw-bubble-pop .35s ease backwards;
}
.mw-bubble::after {
  content: ""; position: absolute; bottom: -22px; left: 40px;
  border: 12px solid transparent; border-top-color: #4a86e8;
}
@keyframes mw-bubble-pop { 0% {transform: scale(0);} 70% {transform: scale(1.1);} 100% {transform: scale(1);} }
