/* Jogos rápidos: Torre de Cristais, Trio de Docinhos e Ateliê de Colorir. */

/* ---------------- Torre de Cristais ---------------- */

.blocks-controls {
  position: absolute; left: 50%; bottom: 10px; z-index: 2; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 6px; border-radius: 18px;
  background: rgba(10, 8, 30, .45); backdrop-filter: blur(6px);
}
.blocks-control {
  width: clamp(48px, 15vw, 60px); height: 48px; padding: 0;
  border: 1px solid rgba(196, 181, 253, .35); border-radius: 13px;
  color: #ede9fe; background: rgba(167, 139, 250, .14);
  font: 700 1.25rem var(--font-display, system-ui); line-height: 1;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.blocks-control:active { background: rgba(167, 139, 250, .42); transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .blocks-control { height: 42px; } }

/* ---------------- Ateliê de Colorir ---------------- */

.coloring {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: var(--stage-hud, 54px) 10px 10px;
  background: radial-gradient(circle at 50% 20%, rgba(253, 230, 138, .14), transparent 55%), #1b1438;
  overflow: hidden; color: #f5f3ff;
}
.coloring [hidden] { display: none !important; }

/* Catálogo */
.coloring-catalog { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.coloring__levels { display: flex; gap: 6px; flex: 0 0 auto; }
.coloring__level {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 6px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18);
  color: #f5f3ff; background: rgba(255, 255, 255, .07);
  font: 700 .85rem var(--font-display, system-ui);
}
.coloring__level[aria-pressed='true'] { background: #fde68a; color: #3b2300; border-color: #fde68a; }
.coloring__level-hint { margin: 0; color: rgba(244, 246, 255, .7); font: 600 .75rem var(--font-display, system-ui); text-align: center; }
.coloring-catalog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 900px) { .coloring-catalog__grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.coloring-card {
  display: flex; flex-direction: column; min-width: 0;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06);
}
.coloring-card.is-done { border-color: rgba(253, 230, 138, .6); }
.coloring-card__open {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 0;
  border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.coloring-card__thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; }
.coloring-card__thumb svg { display: block; width: 100%; height: 100%; }
.coloring-card__thumb.is-preview::after {
  content: 'Novo'; position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px;
  background: rgba(27, 20, 56, .78); color: #fde68a; font: 700 .65rem var(--font-display, system-ui);
}
.coloring-card__info { display: grid; gap: 3px; min-width: 0; }
.coloring-card__name { font: 700 .85rem/1.15 var(--font-display, system-ui); overflow-wrap: break-word; }
.coloring-card__meta, .coloring-card__state { color: rgba(244, 246, 255, .7); font-size: .7rem; }
.coloring-card.is-done .coloring-card__state { color: #fde68a; font-weight: 700; }
.coloring-card__progress { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.coloring-card__progress::after { content: ''; display: block; height: 100%; width: var(--pct, 0%); background: linear-gradient(90deg, #4ade80, #fde68a); }
.coloring-card__actions { display: flex; gap: 6px; padding: 0 8px 8px; }
.coloring-card__action {
  flex: 1 1 0; padding: 5px 6px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2);
  color: #f5f3ff; background: rgba(255, 255, 255, .08); font: 600 .72rem var(--font-display, system-ui);
}

/* Editor */
.coloring-editor { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.coloring__bar { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; }
.coloring__back {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
  color: #f5f3ff; background: rgba(255, 255, 255, .08); font: 600 .78rem var(--font-display, system-ui);
}
.coloring__title { flex: 1 1 auto; min-width: 0; display: grid; }
.coloring__name { font: 700 .88rem/1.1 var(--font-display, system-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coloring__status { margin: 0; color: rgba(244, 246, 255, .75); font: 600 .72rem var(--font-display, system-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coloring__progress {
  flex: 0 0 auto; min-width: 48px; padding: 4px 8px; border-radius: 999px; text-align: center;
  font: 700 .75rem var(--font-display, system-ui); color: #052e16;
  background: linear-gradient(90deg, #4ade80 var(--pct, 0%), rgba(255, 255, 255, .85) var(--pct, 0%));
}

.coloring__art {
  position: relative; flex: 1 1 auto; min-height: 0;
  border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .7);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.coloring__canvas { position: absolute; inset: 0; }
.coloring__canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform-origin: 0 0; }
.coloring__canvas.is-moving svg { will-change: transform; }
.coloring__key { pointer-events: none; transition: opacity .15s ease; }
.coloring__svg .cz { cursor: pointer; }
.coloring__svg .cz.is-painted { animation: coloring-pop .3s ease; }
@keyframes coloring-pop { 40% { filter: brightness(1.25); } }
.coloring__svg.show-missing .cz.is-empty { animation: coloring-missing .8s ease-in-out 3; }
.coloring__svg .cz.is-target { animation: coloring-target .55s ease-in-out 5; }
@keyframes coloring-missing { 50% { fill: #fef3c7; } }
@keyframes coloring-target { 50% { fill: #f59e0b; } }
.coloring__float { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.coloring__fab {
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(43, 33, 64, .25); background: rgba(255, 255, 255, .92); color: #2b2140;
  font: 700 1.1rem/1 var(--font-display, system-ui);
  box-shadow: 0 4px 12px rgba(27, 20, 56, .25);
  touch-action: manipulation;
}
.coloring__fab[aria-pressed='true'] { background: #fde68a; border-color: #f59e0b; }
.coloring__fab:disabled { opacity: .4; }
.coloring__zoom {
  padding: 2px 6px; border-radius: 999px; background: rgba(27, 20, 56, .75); color: #fff;
  font: 700 .65rem var(--font-display, system-ui);
}
.coloring__art:not(.is-zoomed) .coloring__fab--reset, .coloring__art:not(.is-zoomed) .coloring__zoom { display: none; }
/* Fácil: só o gabarito e a busca; o zoom aparece quando a pessoa aproxima com os dedos. */
.coloring-editor[data-level='easy'] .coloring__art:not(.is-zoomed) .coloring__fab--zoom { display: none; }
.coloring__keybar {
  position: absolute; left: 8px; right: 56px; bottom: 8px; z-index: 2;
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 12px; background: rgba(27, 20, 56, .82); color: #fff; font: 600 .75rem var(--font-display, system-ui);
}
.coloring__keybar input { flex: 1 1 auto; min-width: 0; accent-color: #fde68a; }
.coloring__keyclose { padding: 0 4px; border: 0; background: none; color: #fff; font-size: 1rem; }

.coloring__palette-row { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.coloring__palette-modes { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.coloring__palette-mode {
  width: 30px; height: 26px; padding: 0; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07); font-size: .85rem;
}
.coloring__palette-mode[aria-pressed='true'] { background: rgba(253, 230, 138, .3); border-color: #fde68a; }
.coloring__palette { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 4px 2px; }
.coloring__palette.is-scroll { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; }
.coloring__swatch {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55); background: var(--swatch);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .2);
}
.coloring__swatch.is-pet { border-style: dashed; }
.coloring__swatch[aria-pressed='true'] { outline: 3px solid #fde68a; outline-offset: 2px; transform: scale(1.1); }
.coloring__tools { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.coloring__tool {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 11px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2);
  color: #f5f3ff; background: rgba(255, 255, 255, .08);
  font: 600 .78rem var(--font-display, system-ui);
}
.coloring__tool[aria-pressed='true'] { background: rgba(253, 230, 138, .25); border-color: #fde68a; }
.coloring__tool.is-primary { background: linear-gradient(135deg, #4ade80, #16a34a); border-color: transparent; color: #052e16; }
.coloring__tool.is-danger { background: linear-gradient(135deg, #fb7185, #e11d48); border-color: transparent; color: #fff; }

/* Janelas (reiniciar, concluído, ver pintura) */
.coloring__overlay {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 8, 30, .62); backdrop-filter: blur(3px);
}
.coloring__dialog, .coloring__viewer {
  display: grid; gap: 10px; width: min(100%, 420px); padding: 16px; border-radius: 20px;
  background: #241a4a; border: 1px solid rgba(253, 230, 138, .35); box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
  text-align: center;
}
.coloring__dialog-title { margin: 0; font: 700 1.05rem var(--font-display, system-ui); color: #fde68a; }
.coloring__dialog-text { margin: 0; font-size: .85rem; color: rgba(244, 246, 255, .85); }
.coloring__dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.coloring__viewer { width: min(100%, 560px); max-height: 100%; }
.coloring__viewer-art { min-height: 0; border-radius: 14px; overflow: hidden; background: #fff; }
.coloring__viewer-art svg { display: block; width: 100%; height: auto; max-height: 58vh; }

@media (max-width: 420px) {
  .coloring { padding-inline: 8px; }
  .coloring__tool span + span { display: none; }
  .coloring__tool { padding: 7px 10px; font-size: 1rem; }
  .coloring__tool.is-primary span + span, .coloring__dialog .coloring__tool span + span { display: inline; font-size: .78rem; }
  .coloring__swatch { width: 27px; height: 27px; }
  .coloring__back span + span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .coloring__svg .cz.is-painted, .coloring__svg.show-missing .cz.is-empty, .coloring__svg .cz.is-target { animation: none; }
  .coloring__svg .cz.is-target { stroke: #f59e0b; }
}

/* ---------------- Passar de nível (Torre, Encaixe, Docinhos) ---------------- */

.level-cheer {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px;
  pointer-events: none; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(253, 230, 138, .28), rgba(10, 8, 30, .5) 70%);
  animation: level-cheer-fade var(--cheer-ms, 2400ms) ease both;
}
.level-cheer__confetti { position: absolute; inset: 0; }
.level-cheer__confetti i {
  position: absolute; top: -18px; left: var(--x); width: 9px; height: 14px; border-radius: 2px;
  animation: level-cheer-fall var(--fall) cubic-bezier(.3, .6, .5, 1) var(--delay) both;
}
.level-cheer__confetti i.is-round { width: 10px; height: 10px; border-radius: 50%; }
.level-cheer__card {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 26px; max-width: min(92%, 360px);
  border-radius: 24px; text-align: center; color: #fff;
  background: linear-gradient(160deg, #7c3aed, #4338ca);
  border: 2px solid rgba(253, 230, 138, .7);
  box-shadow: 0 18px 40px rgba(10, 8, 30, .55), 0 0 0 6px rgba(253, 230, 138, .15);
  animation: level-cheer-pop .6s cubic-bezier(.2, 1.6, .4, 1) both;
}
.level-cheer__stars { display: flex; gap: 6px; font-size: 2rem; line-height: 1; color: #fde047; text-shadow: 0 2px 0 #b45309; }
.level-cheer__stars span { animation: level-cheer-star .5s cubic-bezier(.2, 1.8, .4, 1) calc(.25s + var(--i) * .15s) both; }
.level-cheer__stars span:nth-child(2) { font-size: 2.6rem; transform-origin: 50% 70%; }
.level-cheer__title { margin: 4px 0 0; font: 700 1.45rem/1.1 var(--font-display, system-ui); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.level-cheer__next { margin: 0; font: 700 .95rem var(--font-display, system-ui); color: #fde68a; }
.level-cheer__detail { margin: 0; font: 600 .8rem var(--font-display, system-ui); color: rgba(255, 255, 255, .85); }

@keyframes level-cheer-fade { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes level-cheer-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--drift), 110vh) rotate(calc(var(--spin) * 720deg)); opacity: .9; }
}
@keyframes level-cheer-pop { 0% { transform: scale(.3) rotate(-6deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes level-cheer-star { 0% { transform: scale(0) rotate(-90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

.level-cheer__stars span.is-off { color: rgba(255, 255, 255, .22); text-shadow: none; }
.level-cheer__badge {
  margin: 2px 0; padding: 3px 12px; border-radius: 999px; font: 700 .9rem var(--font-display, system-ui);
  color: #3b0764; background: linear-gradient(90deg, #fde68a, #f9a8d4, #a5f3fc, #fde68a); background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(253, 230, 138, .6);
  animation: level-cheer-pop .5s cubic-bezier(.2, 1.8, .4, 1) .35s both, level-cheer-shine 1.6s linear infinite;
}
.level-cheer__reward {
  margin: 4px 0 0; padding: 6px 10px; border-radius: 12px; font: 700 .8rem/1.3 var(--font-display, system-ui);
  color: #fef9c3; background: rgba(10, 8, 30, .35); border: 1px dashed rgba(253, 230, 138, .6);
  animation: level-cheer-pop .5s cubic-bezier(.2, 1.6, .4, 1) .55s both;
}
/* Faixas de pontos extras: cartão com a cor da faixa e, nas maiores, raios girando. */
.level-cheer--tier-1 .level-cheer__card { background: linear-gradient(160deg, #db2777, #7c3aed); }
.level-cheer--tier-2 .level-cheer__card { background: linear-gradient(160deg, #059669, #4338ca); }
.level-cheer--tier-3 .level-cheer__card { background: linear-gradient(160deg, #0284c7, #7c3aed); box-shadow: 0 18px 40px rgba(10, 8, 30, .55), 0 0 0 6px rgba(125, 211, 252, .3), 0 0 40px rgba(125, 211, 252, .5); }
.level-cheer--tier-4 .level-cheer__card {
  background: linear-gradient(160deg, #f59e0b, #db2777 55%, #7c3aed); border-color: #fef08a;
  box-shadow: 0 18px 40px rgba(10, 8, 30, .55), 0 0 0 6px rgba(253, 224, 71, .35), 0 0 60px rgba(253, 224, 71, .6);
}
.level-cheer--tier-4 .level-cheer__title { animation: level-cheer-throb .9s ease-in-out .6s infinite; }
.level-cheer__rays {
  position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax;
  background: repeating-conic-gradient(rgba(253, 230, 138, .22) 0 8deg, transparent 8deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 45%); mask-image: radial-gradient(circle, #000 0, transparent 45%);
  animation: level-cheer-spin 9s linear infinite;
}
.level-cheer--tier-3 .level-cheer__rays { background: repeating-conic-gradient(rgba(125, 211, 252, .2) 0 8deg, transparent 8deg 22deg); }
@keyframes level-cheer-shine { to { background-position: -200% 0; } }
@keyframes level-cheer-throb { 50% { transform: scale(1.08); } }
@keyframes level-cheer-spin { to { transform: rotate(360deg); } }

.game-stage.is-paused .level-cheer, .game-stage.is-paused .level-cheer * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .level-cheer__confetti, .level-cheer__rays { display: none; }
  .level-cheer__card, .level-cheer__stars span, .level-cheer__badge, .level-cheer__reward, .level-cheer--tier-4 .level-cheer__title { animation: none; }
}

/* ---------------- Campanha: faixas de mundo, cenário e chefe ---------------- */

.stage-banner {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; pointer-events: none;
  animation: stage-banner-fade var(--banner-ms, 2200ms) ease both;
}
.stage-banner__card {
  display: grid; justify-items: center; gap: 2px; max-width: min(92%, 340px); padding: 14px 24px; border-radius: 22px;
  text-align: center; color: #fff; background: linear-gradient(160deg, rgba(30, 27, 75, .92), rgba(49, 46, 129, .92));
  border: 2px solid rgba(196, 181, 253, .6); box-shadow: 0 16px 36px rgba(10, 8, 30, .5);
  animation: stage-banner-slide var(--banner-ms, 2200ms) cubic-bezier(.2, 1.2, .4, 1) both;
}
.stage-banner__icon { font: 2.4rem/1 system-ui, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; animation: stage-banner-bob 1.2s ease-in-out infinite; }
.stage-banner__kicker { margin: 4px 0 0; font: 700 .72rem var(--font-display, system-ui); letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd; }
.stage-banner__title { margin: 0; font: 700 1.35rem/1.15 var(--font-display, system-ui); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.stage-banner__text { margin: 2px 0 0; font: 600 .82rem/1.3 var(--font-display, system-ui); color: rgba(255, 255, 255, .85); }
.stage-banner--world .stage-banner__card { background: linear-gradient(160deg, rgba(8, 145, 178, .94), rgba(67, 56, 202, .94)); border-color: rgba(165, 243, 252, .8); }
.stage-banner--world .stage-banner__kicker { color: #a5f3fc; }
.stage-banner--boss { background: radial-gradient(circle at 50% 50%, rgba(127, 29, 29, 0), rgba(127, 29, 29, .45) 75%); }
.stage-banner--boss .stage-banner__card { background: linear-gradient(160deg, rgba(153, 27, 27, .95), rgba(76, 5, 25, .95)); border-color: rgba(252, 165, 165, .85); box-shadow: 0 0 0 6px rgba(239, 68, 68, .18), 0 18px 40px rgba(10, 8, 30, .55); }
.stage-banner--boss .stage-banner__kicker { color: #fecaca; }
.stage-banner--boss .stage-banner__icon { font-size: 3rem; animation: stage-banner-roar .9s ease-in-out infinite; }

@keyframes stage-banner-fade { 0% { opacity: 0; } 12%, 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes stage-banner-slide { 0% { transform: translateY(18px) scale(.85); } 14% { transform: none; } 84% { transform: none; } 100% { transform: translateY(-14px) scale(.96); } }
@keyframes stage-banner-bob { 50% { transform: translateY(-4px) scale(1.06); } }
@keyframes stage-banner-roar { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.15); } }
.game-stage.is-paused .stage-banner, .game-stage.is-paused .stage-banner * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .stage-banner__card, .stage-banner__icon { animation: none; }
}

/* ---------------- Poderes (Torre, Encaixe, Docinhos) ---------------- */

.power-bar { position: absolute; z-index: 4; display: flex; gap: 6px; }
.power-bar.is-vertical { flex-direction: column; }
.power-slot {
  width: var(--slot, 42px); height: var(--slot, 42px); padding: 0; display: grid; place-items: center;
  border-radius: 13px; border: 2px dashed rgba(255, 255, 255, .25); background: rgba(10, 8, 30, .35);
  font: 1.3rem/1 system-ui, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; color: #fff;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: default;
}
.power-slot.is-full {
  cursor: pointer; border: 2px solid var(--glow); background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(10, 8, 30, .55));
  box-shadow: 0 0 14px var(--glow), inset 0 0 8px var(--glow);
  animation: power-pulse 1.3s ease-in-out infinite;
}
.power-slot.is-full.is-new { animation: power-arrive .6s cubic-bezier(.2, 1.8, .4, 1), power-pulse 1.3s ease-in-out .6s infinite; }
.power-slot.is-full:active { transform: scale(.9); }
@keyframes power-pulse { 50% { box-shadow: 0 0 24px var(--glow), inset 0 0 12px var(--glow); transform: scale(1.06); } }
@keyframes power-arrive { 0% { transform: scale(.2) rotate(-30deg); } 100% { transform: none; } }

.power-fly {
  position: absolute; z-index: 7; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center;
  font: 1.8rem/1 system-ui, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; pointer-events: none;
  filter: drop-shadow(0 0 10px var(--glow)) drop-shadow(0 0 4px #fff);
  animation: power-fly .9s cubic-bezier(.5, -0.4, .3, 1) forwards;
}
@keyframes power-fly {
  0% { transform: translate(0, 0) scale(.4); }
  25% { transform: translate(0, -30px) scale(1.8); }
  100% { transform: translate(var(--dx), var(--dy)) scale(.9); opacity: .9; }
}
.power-banner {
  position: absolute; z-index: 7; left: 50%; top: 24%; display: grid; justify-items: center; gap: 2px;
  padding: 10px 18px; border-radius: 18px; pointer-events: none; text-align: center; color: #fff;
  background: rgba(15, 12, 40, .82); border: 2px solid var(--glow); box-shadow: 0 0 26px var(--glow);
  animation: power-banner 1.7s cubic-bezier(.2, 1.6, .4, 1) both;
}
.power-banner__icon { font: 2.2rem/1 system-ui, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.power-banner strong { font: 700 1.2rem var(--font-display, system-ui); }
.power-banner small { font: 600 .75rem var(--font-display, system-ui); color: rgba(255, 255, 255, .8); }
@keyframes power-banner {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  82% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -70%) scale(.9); opacity: 0; }
}

.power-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; animation: power-flash .85s ease-out both; }
.power-flash--raio { background: radial-gradient(circle at 50% 30%, #fff, rgba(254, 240, 138, .7) 40%, rgba(250, 204, 21, 0) 75%); }
.power-flash--fogo { background: radial-gradient(circle at 50% 100%, rgba(254, 215, 170, .8), rgba(249, 115, 22, .5) 40%, rgba(220, 38, 38, 0) 80%); }
.power-flash--gelo { background: radial-gradient(circle at 50% 50%, rgba(240, 249, 255, .85), rgba(125, 211, 252, .45) 45%, rgba(56, 189, 248, 0) 85%); }
.power-flash--explosao { background: radial-gradient(circle at 50% 50%, #fff, rgba(254, 202, 202, .8) 25%, rgba(239, 68, 68, .35) 55%, rgba(239, 68, 68, 0) 85%); }
@keyframes power-flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.power-word {
  position: absolute; z-index: 6; left: 50%; top: 45%; pointer-events: none; white-space: nowrap;
  font: 800 2.3rem/1 var(--font-display, system-ui); color: #fff; letter-spacing: .03em;
  text-shadow: 0 0 18px var(--glow), 0 0 6px var(--glow), 0 3px 0 rgba(0, 0, 0, .35);
  animation: power-word 1.1s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes power-word {
  0% { transform: translate(-50%, -50%) scale(.2) rotate(-8deg); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(1.1); opacity: 0; }
}
.is-power-shaking { animation: power-shake .5s linear; }
@keyframes power-shake {
  10%, 50%, 90% { transform: translate(-7px, 3px); }
  30%, 70% { transform: translate(7px, -4px); }
  100% { transform: none; }
}
.power-hint {
  position: absolute; z-index: 4; left: 50%; bottom: 16%; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 14px; pointer-events: none; white-space: nowrap;
  background: rgba(15, 12, 40, .85); color: #fde68a; border: 1px solid rgba(253, 230, 138, .6);
  font: 700 .85rem var(--font-display, system-ui); animation: power-hint 1s ease-in-out infinite alternate;
}
@keyframes power-hint { to { transform: translateX(-50%) scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .power-slot.is-full, .power-slot.is-full.is-new, .power-hint { animation: none; }
  .is-power-shaking { animation: none; }
  .power-fly { animation-duration: .01s; }
}
