:root {
  --bg: #07060f; --panel: rgba(18, 14, 38, .72); --line: rgba(160, 130, 255, .35);
  --txt: #eef0ff; --dim: #a9a6cf; --accent: #b44cff; --accent2: #4cc9ff; --gold: #ffb81f;
  --good: #3ddc5a; --bad: #ff3d4f;
  --font: 'Trebuchet MS', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: Impact, 'Arial Black', 'Trebuchet MS', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--txt); font-family: var(--font); user-select: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; }
#fx-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
#screen { position: absolute; inset: 0; z-index: 2; }
#mute { position: absolute; z-index: 30; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 18px; backdrop-filter: blur(8px); }
#mute:hover { transform: scale(1.1); }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px; overflow: hidden; }
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }

/* ---------- cenários ---------- */
.scene::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('assets/bg_cave.jpg') center/cover no-repeat; }
.scene::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(5, 3, 15, .15), rgba(5, 3, 15, .8)); }
.c-title::before { filter: saturate(1.2) brightness(.7); }
.c1::before { filter: saturate(1.1) brightness(.75); }
.c2::before { filter: hue-rotate(75deg) saturate(1.3) brightness(.7); }
.c3::before { filter: hue-rotate(-35deg) saturate(1.4) brightness(.7); }
.c4::before { filter: grayscale(.8) brightness(.45) contrast(1.3); }
.c5::before { filter: hue-rotate(150deg) saturate(1.6) brightness(.5) contrast(1.2); }

/* ---------- botões / vidro ---------- */
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn { padding: 11px 22px; border-radius: 12px; border: 1px solid var(--line); background: rgba(40, 30, 80, .75); font-weight: 700; letter-spacing: .5px; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(180, 76, 255, .5); background: rgba(70, 50, 130, .9); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, #b44cff, #4c6bff); border-color: #d9a6ff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.btn.big { font-size: 1.15rem; padding: 14px 34px; min-width: 220px; }
.btn.small { padding: 6px 14px; font-size: .85rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }

/* ---------- título ---------- */
.title, .ending { align-items: center; justify-content: center; gap: 2.2vh; text-align: center; }
.logo-text { font-family: var(--display); font-size: clamp(2.6rem, 9vw, 6.4rem); letter-spacing: 6px; line-height: 1; background: linear-gradient(180deg, #fff3b0, #ffb81f 45%, #b36b00); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #3b1d00) drop-shadow(0 0 22px rgba(255, 184, 31, .55)); animation: glow 3s ease-in-out infinite; }
.logo-sub { font-size: clamp(1rem, 2.4vw, 1.7rem); letter-spacing: 8px; text-transform: uppercase; color: #cfe8ff; text-shadow: 0 0 14px #4cc9ff; }
@keyframes glow { 50% { filter: drop-shadow(0 4px 0 #3b1d00) drop-shadow(0 0 38px rgba(255, 184, 31, .95)); } }
.title-heroes { display: flex; justify-content: center; gap: 1vw; flex-wrap: wrap; }
.title-hero { width: clamp(60px, 11vw, 130px); animation: bob 2.2s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
@keyframes bob { 50% { transform: translateY(-10px); } }
.menu { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tagline { color: var(--dim); font-size: .95rem; }
svg.sprite { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- cabeçalhos ---------- */
.screen-head { text-align: center; margin-bottom: 10px; }
.screen-head h2 { font-family: var(--display); letter-spacing: 3px; font-size: clamp(1.5rem, 3.6vw, 2.5rem); color: #ffe38a; text-shadow: 0 0 18px rgba(255, 184, 31, .6); }
.screen-head p { color: var(--dim); margin-top: 4px; }

/* ---------- seleção de equipe ---------- */
.team-body { flex: 1; display: flex; gap: 16px; min-height: 0; }
.hero-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; align-content: center; }
.hero-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .12); background: linear-gradient(180deg, rgba(30, 24, 60, .8), rgba(12, 10, 28, .85)); transition: transform .2s, box-shadow .2s, border-color .2s; }
.hero-card svg { width: 80%; filter: drop-shadow(0 0 10px var(--c)); transition: transform .25s; }
.hero-card b { color: var(--g); font-size: 1.05rem; }
.hero-card small { color: var(--dim); }
.hero-card:hover:not(.locked) { transform: translateY(-6px); border-color: var(--c); box-shadow: 0 10px 28px var(--c); }
.hero-card:hover svg { transform: scale(1.08); }
.hero-card.selected { border-color: var(--g); box-shadow: 0 0 26px var(--c), inset 0 0 22px rgba(255, 255, 255, .08); transform: translateY(-4px); }
.hero-card.locked { opacity: .45; }
.order { position: absolute; top: 6px; left: 6px; min-width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #111; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.order:empty { display: none; }
.detail { width: clamp(250px, 30vw, 360px); padding: 14px; overflow-y: auto; }
.detail h3 { color: #ffe38a; margin-top: 4px; }
.dportrait { width: 40%; margin: 0 auto; filter: drop-shadow(0 0 16px rgba(180, 76, 255, .6)); }
.role { color: var(--accent2); font-weight: 700; font-size: .9rem; }
.bio { color: var(--dim); font-size: .85rem; margin: 6px 0 10px; }
.stat { display: grid; grid-template-columns: 34px 1fr 28px; gap: 6px; align-items: center; font-size: .75rem; margin: 3px 0; }
.sb { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.sf { height: 100%; border-radius: 4px; } .sf.hp { background: #3ddc5a; } .sf.sh { background: #4cc9ff; } .sf.sp { background: #ffb81f; } .sf.cr { background: #ff3d4f; }
.dcards { margin-top: 10px; display: grid; gap: 6px; }
.dcard { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .06); border-left: 3px solid var(--accent); font-size: .78rem; }
.dcard.type-def { border-color: var(--accent2); } .dcard.type-buff { border-color: var(--gold); }
.dcard small { display: block; color: var(--dim); }
.dcost { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #4c6bff; font-weight: 800; }
.team-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.slots { display: flex; gap: 10px; }
.slot { width: 74px; height: 80px; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .3); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: .65rem; color: var(--dim); position: relative; padding-bottom: 2px; }
.slot.filled { border: 2px solid var(--accent); background: rgba(180, 76, 255, .15); }
.slot svg { width: 90%; position: absolute; top: 2px; }
.slot .plus { font-size: 1.8rem; position: absolute; top: 12px; }

/* ---------- diálogo ---------- */
.dialogue { justify-content: flex-end; cursor: pointer; }
.dbox { position: relative; z-index: 3; padding: 20px 26px; min-height: 150px; max-width: 980px; width: 100%; margin: 0 auto 4vh; }
.speaker { font-family: var(--display); letter-spacing: 2px; color: #ffe38a; font-size: 1.3rem; margin-bottom: 8px; }
.dtext { font-size: clamp(1rem, 1.9vw, 1.25rem); line-height: 1.55; min-height: 4.6em; }
.dtext.narr { font-style: italic; color: #d6dcff; }
.dhint { position: absolute; right: 18px; bottom: 10px; color: var(--accent2); font-size: .8rem; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.dportrait-big { position: absolute; bottom: 20vh; width: clamp(160px, 24vw, 300px); z-index: 2; filter: drop-shadow(0 0 28px rgba(180, 76, 255, .7)); }
.dportrait-big.left { left: 10%; animation: slideL .5s both; } .dportrait-big.right { right: 10%; animation: slideR .5s both; } .dportrait-big.none { display: none; }
@keyframes slideL { from { transform: translateX(-60px); opacity: 0; } } @keyframes slideR { from { transform: translateX(60px); opacity: 0; } }
.skip { position: absolute; top: 14px; right: 14px; z-index: 5; }
.chapter-card { align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.cc small { letter-spacing: 6px; color: var(--accent2); text-transform: uppercase; }
.cc h2 { font-family: var(--display); font-size: clamp(2rem, 6vw, 4.4rem); letter-spacing: 4px; color: #fff3b0; text-shadow: 0 0 30px var(--gold); animation: glow2 2s infinite; margin: 8px 0; }
.cc p { color: var(--dim); font-size: .85rem; }
@keyframes glow2 { 50% { text-shadow: 0 0 55px #ffb81f, 0 0 12px #fff; } }

/* ---------- batalha ---------- */
.battle { padding: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 10px 0; padding: 8px 16px; border-radius: 12px; }
.tb-title b { display: block; letter-spacing: 1px; } .tb-title small { color: var(--dim); }
.round { font-family: var(--display); letter-spacing: 3px; font-size: 1.4rem; color: #ffe38a; }
.field { flex: 1; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 3vw 2vh; min-height: 0; position: relative; }
.row { display: flex; align-items: flex-end; gap: clamp(4px, 1.5vw, 24px); width: 46%; }
.row.heroes { flex-direction: row-reverse; justify-content: flex-start; margin-right: auto; }
.row.enemies { justify-content: flex-start; flex-direction: row; margin-left: auto; padding-left: 4%; }
.row.heroes { justify-content: flex-end; width: 46%; }
.row.enemies { justify-content: flex-start; }
.unit { position: relative; width: clamp(96px, 15vw, 190px); display: flex; flex-direction: column; align-items: center; transition: filter .3s, opacity .5s; }
.unit.boss { width: clamp(160px, 25vw, 330px); }
.row.heroes .unit:nth-child(2) { transform: translateY(-5vh); } .row.heroes .unit:nth-child(3) { transform: translateY(-1vh); }
/* Sombra de chão dinâmica de contato */
.ground-shadow {
  width: 70%;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 75%);
  border-radius: 50%;
  margin-top: -6px;
  margin-bottom: 4px;
  transform-origin: center center;
  animation: shadowPulse 2s ease-in-out infinite;
  pointer-events: none;
}
.unit.boss .ground-shadow {
  width: 85%;
  height: 18px;
}
@keyframes shadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  35% { transform: scale(0.85); opacity: 0.5; }
  65% { transform: scale(1.05); opacity: 0.9; }
}

.sprite-wrap {
  width: 100%;
  transform-origin: bottom center;
  transition: transform .2s ease;
}

/* 1. Heróis Pepitos: respiração viva tática com squash & stretch */
.sprite-wrap.anim-hero {
  animation: heroBreathe 2s ease-in-out infinite;
}
@keyframes heroBreathe {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  35% { transform: translateY(-8px) scale(0.97, 1.045) rotate(0.8deg); }
  65% { transform: translateY(-3px) scale(1.02, 0.985) rotate(-0.5deg); }
}

/* 2. Bestas (Rã e Escorpião): movimento predador orgânico */
.sprite-wrap.anim-beast {
  animation: beastCreep 2.4s ease-in-out infinite;
}
@keyframes beastCreep {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  25% { transform: translateY(3px) scale(1.04, 0.96) rotate(1.2deg); }
  50% { transform: translateY(-11px) scale(0.96, 1.06) rotate(-1.5deg); }
  75% { transform: translateY(-2px) scale(1.02, 0.99) rotate(0.6deg); }
}

/* 3. Voadores (Drone, Espectro): flutuação gravitacional suave */
.sprite-wrap.anim-drone,
.sprite-wrap.anim-wraith {
  animation: droneHover 2.2s ease-in-out infinite;
}
@keyframes droneHover {
  0%, 100% { transform: translateY(-6px) rotate(-2deg); }
  50% { transform: translateY(-22px) rotate(2.5deg); }
}

/* 4. Robôs e Mecânicos (Titan, Sentinela, Volta): pistões hidráulicos */
.sprite-wrap.anim-titan,
.sprite-wrap.anim-bot {
  animation: mechRumble 2.3s ease-in-out infinite;
}
@keyframes mechRumble {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  30% { transform: translateY(-5px) scale(0.98, 1.025); }
  55% { transform: translateY(-1px) scale(1.015, 0.99); }
  80% { transform: translateY(-8px) scale(0.99, 1.03); }
}

/* 5. Chefe Final Voidfang: pulso abissal com aura */
.sprite-wrap.anim-voidfang {
  animation: voidSurge 2.8s ease-in-out infinite;
}
@keyframes voidSurge {
  0%, 100% {
    transform: translateY(-4px) scale(1) rotate(0deg);
    filter: drop-shadow(0 0 16px rgba(160, 40, 255, 0.6));
  }
  50% {
    transform: translateY(-18px) scale(1.04) rotate(-1.5deg);
    filter: drop-shadow(0 0 32px rgba(220, 60, 255, 0.95));
  }
}

/* Ataques especiais */
.sprite-wrap.recoil-fire-hero {
  animation: recoilFireHero 0.42s cubic-bezier(0.2, 0.8, 0.3, 1) !important;
}
@keyframes recoilFireHero {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(26px) scale(1.1) translateY(-4px); }
  50% { transform: translateX(-16px) scale(0.96) rotate(-2.5deg); }
  75% { transform: translateX(8px) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}

.sprite-wrap.recoil-fire-enemy {
  animation: recoilFireEnemy 0.42s cubic-bezier(0.2, 0.8, 0.3, 1) !important;
}
@keyframes recoilFireEnemy {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-26px) scale(1.1) translateY(-4px); }
  50% { transform: translateX(16px) scale(0.96) rotate(2.5deg); }
  75% { transform: translateX(-8px) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}

.sprite-wrap.dash-strike-hero {
  animation: dashStrikeHero 0.48s cubic-bezier(0.2, 0.8, 0.3, 1) !important;
}
@keyframes dashStrikeHero {
  0% { transform: translateX(0); }
  40% { transform: translateX(14vw) scale(1.18) rotate(4deg); }
  70% { transform: translateX(8vw) scale(1.05); }
  100% { transform: translateX(0); }
}

.sprite-wrap.dash-strike-enemy {
  animation: dashStrikeEnemy 0.48s cubic-bezier(0.2, 0.8, 0.3, 1) !important;
}
@keyframes dashStrikeEnemy {
  0% { transform: translateX(0); }
  40% { transform: translateX(-14vw) scale(1.18) rotate(-4deg); }
  70% { transform: translateX(-8vw) scale(1.05); }
  100% { transform: translateX(0); }
}

/* Reação a dano: Knockback elástico */
.sprite-wrap.hit-knockback-hero {
  animation: hitKnockbackHero 0.4s ease-out !important;
}
@keyframes hitKnockbackHero {
  0% { transform: translateX(0); filter: brightness(2.8) saturate(0.2); }
  30% { transform: translateX(-24px) rotate(-5deg); filter: brightness(2) saturate(0.4); }
  60% { transform: translateX(10px) rotate(2deg); }
  85% { transform: translateX(-4px); }
  100% { transform: translateX(0); filter: none; }
}

.sprite-wrap.hit-knockback-enemy {
  animation: hitKnockbackEnemy 0.4s ease-out !important;
}
@keyframes hitKnockbackEnemy {
  0% { transform: translateX(0); filter: brightness(2.8) saturate(0.2); }
  30% { transform: translateX(24px) rotate(5deg); filter: brightness(2) saturate(0.4); }
  60% { transform: translateX(-10px) rotate(-2deg); }
  85% { transform: translateX(4px); }
  100% { transform: translateX(0); filter: none; }
}

/* Comemoração de vitória */
.sprite-wrap.victory-bounce {
  animation: victoryBounce 0.75s ease-in-out infinite alternate !important;
}
@keyframes victoryBounce {
  0% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-32px) scale(0.95, 1.12) rotate(3deg); }
  100% { transform: translateY(0) scale(1.06, 0.94); }
}

/* Tremer a tela */
.screen-shake {
  animation: screenShake 0.45s ease-out;
}
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 6px); }
  40% { transform: translate(7px, -6px); }
  60% { transform: translate(-5px, 4px); }
  80% { transform: translate(4px, -2px); }
}

/* Efeitos de status vivos */
.sprite-wrap.st-poison {
  animation: stPoison 1.4s ease-in-out infinite alternate !important;
  filter: drop-shadow(0 0 16px #39ff14) !important;
}
@keyframes stPoison {
  0% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-4px) rotate(1.5deg) scale(1.02); }
  100% { transform: translateY(0) rotate(0deg); }
}

.sprite-wrap.st-burn {
  animation: stBurn 0.8s ease-in-out infinite alternate !important;
  filter: drop-shadow(0 0 18px #ff6600) !important;
}
@keyframes stBurn {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.03) rotate(2deg); }
  100% { transform: translateY(-1px) scale(0.99) rotate(-1deg); }
}

.sprite-wrap.st-slow {
  animation-duration: 4.8s !important;
  filter: drop-shadow(0 0 14px #00d4ff) !important;
}

.sprite-wrap.st-stun {
  animation: stStun 1s ease-in-out infinite !important;
}
@keyframes stStun {
  0% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-5px); }
  100% { transform: rotate(-6deg) translateY(0); }
}

.sprite-wrap.st-lowhp {
  animation: stExhausted 1.2s ease-in-out infinite !important;
}
@keyframes stExhausted {
  0%, 100% { transform: translateY(0) scale(1, 0.95) rotate(-2deg); }
  50% { transform: translateY(-3px) scale(0.97, 1.03) rotate(-3.5deg); }
}

.unit.enemy svg, .unit.enemy img { filter: drop-shadow(0 0 14px rgba(255, 60, 90, .35)); }
.unit.hero svg, .unit.hero img { filter: drop-shadow(0 0 12px rgba(120, 200, 255, .3)); }
.unit.acting { z-index: 5; } .unit.dead { filter: grayscale(1) brightness(.4); opacity: .4; }
.unit.dying .sprite-wrap { animation: die .6s forwards; } @keyframes die { to { transform: translateY(20px) rotate(-12deg); opacity: .3; } }
.unit.targetable { cursor: crosshair; } .unit.targetable .sprite-wrap { animation: pulseT .8s infinite; } .unit.targetable::after { content: '◎'; position: absolute; top: 20%; font-size: 3rem; color: #ff3d4f; text-shadow: 0 0 14px #ff3d4f; animation: spin 3s linear infinite; pointer-events: none; }
@keyframes pulseT { 50% { transform: scale(1.07); filter: drop-shadow(0 0 20px #ff3d4f); } } @keyframes spin { to { transform: rotate(360deg); } }
.uname { font-size: .8rem; font-weight: 700; margin-top: 2px; text-shadow: 0 2px 4px #000; }
.bar { position: relative; width: 90%; height: 14px; border-radius: 8px; background: rgba(0, 0, 0, .65); border: 1px solid rgba(255, 255, 255, .25); overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, #1fa83a, #7dff6b); transition: width .35s; }
.bar .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: .65rem; font-weight: 800; text-shadow: 0 1px 2px #000; }
.shield-badge { display: none; margin-top: 3px; padding: 1px 8px; border-radius: 10px; background: rgba(76, 201, 255, .25); border: 1px solid var(--accent2); font-size: .72rem; font-weight: 800; color: #bdeeff; }
.shield-badge.on { display: block; }
.statuses { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; min-height: 18px; font-size: .75rem; }
.statuses span { background: rgba(0, 0, 0, .55); border-radius: 8px; padding: 0 5px; }
.intent { margin-bottom: 4px; padding: 4px 10px; border-radius: 10px; background: rgba(120, 10, 30, .85); border: 1px solid #ff6b7d; font-size: .72rem; font-weight: 700; text-align: center; max-width: 140%; box-shadow: 0 0 12px rgba(255, 61, 79, .5); animation: intentPulse 1.6s infinite; }
.intent.shielding { background: rgba(10, 60, 110, .85); border-color: var(--accent2); box-shadow: 0 0 12px rgba(76, 201, 255, .5); } .intent.hidden { visibility: hidden; }
@keyframes intentPulse { 50% { transform: translateY(-3px); } }
.floater { position: absolute; top: 20%; z-index: 20; font-weight: 900; font-size: 1.5rem; text-shadow: 0 2px 0 #000, 0 0 10px #000; pointer-events: none; animation: floatUp 1.2s ease-out forwards; white-space: nowrap; }
.floater.dmg { color: #ff5566; } .floater.crit { color: #ffd23a; font-size: 2.1rem; } .floater.poison { color: #9dff5a; } .floater.burn { color: #ff9a2a; }
.floater.heal { color: #5dff8a; } .floater.shield { color: #9be4ff; } .floater.status { color: #ffe38a; font-size: 1rem; } .floater.buff { color: #ffd23a; font-size: 1rem; } .floater.call { color: #fff; font-size: .95rem; background: rgba(0, 0, 0, .7); padding: 2px 10px; border-radius: 10px; top: -4%; }
@keyframes floatUp { 0% { transform: translateY(10px) scale(.6); opacity: 0; } 15% { transform: translateY(-4px) scale(1.2); opacity: 1; } 100% { transform: translateY(-70px) scale(1); opacity: 0; } }
.proj { position: fixed; width: 18px; height: 18px; border-radius: 50%; z-index: 40; pointer-events: none; transition: transform .3s cubic-bezier(.3, 0, .8, 1); }
.banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; z-index: 25; font-family: var(--display); font-size: clamp(2rem, 7vw, 5rem); letter-spacing: 6px; color: #fff3b0; text-shadow: 0 0 30px #ffb81f, 0 4px 0 #3b1d00; opacity: 0; pointer-events: none; }
.banner.on { animation: bannerIn 1.3s ease both; } @keyframes bannerIn { 0% { opacity: 0; transform: scale(2); } 20% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.95); } }
.hint { position: absolute; top: 12%; left: 0; right: 0; text-align: center; opacity: 0; z-index: 6; transition: opacity .2s; font-weight: 700; color: #ff9aa4; text-shadow: 0 0 10px #000; pointer-events: none; } .hint.on { opacity: 1; }

.bottom { display: grid; grid-template-columns: 110px 1fr 170px; align-items: end; gap: 10px; padding: 8px 12px 12px; background: linear-gradient(0deg, rgba(5, 3, 15, .92), rgba(5, 3, 15, 0)); }
.left-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.energy { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 2px; background: radial-gradient(circle at 35% 30%, #8ae0ff, #1b6fa8 70%); border: 3px solid #d9f6ff; box-shadow: 0 0 24px #4cc9ff; font-size: 1.8rem; }
.energy b { font-size: 2rem; } .energy small { font-size: .8rem; align-self: flex-end; margin-bottom: 20px; } .ebolt { font-size: 1.2rem; }
.piles { font-size: .65rem; color: var(--dim); text-align: center; }
.center-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.queue { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 28px; }
.qempty { color: var(--dim); font-size: .8rem; align-self: center; }
.chip { padding: 3px 10px; border-radius: 14px; font-size: .75rem; border: 1px solid var(--c); background: rgba(0, 0, 0, .6); } .chip:hover { background: rgba(255, 61, 79, .4); } .chip b { color: var(--c); }
.hand { display: flex; justify-content: center; gap: clamp(3px, .6vw, 10px); }
.card { position: relative; width: clamp(104px, 11.4vw, 150px); height: clamp(150px, 27vh, 212px); padding: 6px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; background: linear-gradient(180deg, rgba(60, 30, 110, .96), rgba(18, 12, 44, .98)); border: 2px solid var(--c); box-shadow: 0 4px 16px rgba(0, 0, 0, .6); transition: transform .18s, box-shadow .18s; }
.card.type-def { background: linear-gradient(180deg, rgba(20, 70, 110, .96), rgba(10, 18, 44, .98)); } .card.type-buff { background: linear-gradient(180deg, rgba(110, 80, 10, .96), rgba(34, 22, 8, .98)); }
.card:hover:not(.disabled) { transform: translateY(-22px) scale(1.12); z-index: 10; box-shadow: 0 0 26px var(--c); }
.card.pending { transform: translateY(-26px) scale(1.14); box-shadow: 0 0 30px #ff3d4f; border-color: #ff3d4f; z-index: 10; }
.card.disabled { opacity: .45; filter: grayscale(.7); cursor: not-allowed; }
.card .cost { position: absolute; top: -9px; left: -9px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: radial-gradient(circle at 35% 30%, #8ae0ff, #1b6fa8); border: 2px solid #fff; }
.cart { width: 52%; margin-top: 2px; filter: drop-shadow(0 0 8px var(--c)); } .cname { font-size: .78rem; margin-top: 2px; color: var(--g); line-height: 1.1; } .cdesc { font-size: .64rem; color: #d8d6ff; line-height: 1.2; margin-top: 3px; flex: 1; overflow: hidden; } .cown { font-size: .6rem; color: var(--dim); }

/* ---------- recompensa / fim ---------- */
.reward, .gameover { align-items: center; justify-content: center; gap: 2vh; }
.party { display: flex; gap: 16px; }
.pm { width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; } .pm .bar { width: 100%; }
.perks { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.perk { width: 220px; padding: 20px 16px; border-radius: 16px; border: 2px solid var(--line); background: linear-gradient(180deg, rgba(60, 30, 110, .9), rgba(18, 12, 44, .95)); display: flex; flex-direction: column; gap: 8px; text-align: center; transition: transform .2s, box-shadow .2s; }
.perk:hover { transform: translateY(-8px) scale(1.04); box-shadow: 0 0 30px var(--accent); border-color: var(--gold); }
.perk b { color: #ffe38a; font-size: 1.1rem; } .perk p { color: #d8d6ff; font-size: .9rem; } .perk small { color: var(--accent2); }
.go { padding: 32px 40px; text-align: center; display: flex; flex-direction: column; gap: 14px; } .go h2 { font-family: var(--display); font-size: 2.4rem; color: #ff6b7d; letter-spacing: 3px; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(3, 2, 10, .75); display: grid; place-items: center; padding: 16px; }
.modal { max-width: 560px; width: 100%; padding: 24px; display: flex; flex-direction: column; gap: 14px; } .modal h2 { color: #ffe38a; font-family: var(--display); letter-spacing: 2px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.howto { padding-left: 20px; display: grid; gap: 8px; color: #dcd9ff; line-height: 1.4; font-size: .92rem; }

/* ---------- imagens e sprites ---------- */
.pepito-img, .enemy-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6));
  transition: transform .25s ease, filter .25s ease;
}
.unit.hero .pepito-img { filter: drop-shadow(0 0 16px rgba(120, 200, 255, .45)) drop-shadow(0 6px 12px rgba(0,0,0,.7)); }
.unit.enemy .enemy-img { filter: drop-shadow(0 0 16px rgba(255, 60, 90, .45)) drop-shadow(0 6px 12px rgba(0,0,0,.7)); }

/* Placas militares de nome estilo "Os Pepitos" */
.plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
  line-height: 1.1;
  text-align: center;
}
.plate small {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--c, #ffd76a);
  text-shadow: 0 0 8px var(--c, rgba(255, 215, 106, 0.6));
  font-weight: 800;
}
.plate b {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  color: #fff;
  text-shadow: 0 2px 4px #000, 0 0 12px var(--g, #fff);
}
.hrole {
  color: var(--dim);
  font-size: 0.72rem;
  margin-top: 2px;
}

/* Retratos recortados redondos */
.portrait {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, rgba(50, 40, 90, 0.9), rgba(15, 12, 30, 0.95));
  border: 2px solid var(--c, var(--line));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0,0,0,.5);
}
.portrait img, .portrait svg {
  width: 125%;
  height: 125%;
  object-fit: cover;
  transform: translateY(10%);
}
.portrait.enemy {
  border-color: #ff4c68;
}

/* Ordem de ação por velocidade */
.order-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(10, 8, 24, 0.65);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ord {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ord .portrait {
  width: 32px;
  height: 32px;
  border-width: 1.5px;
}
.ord small {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.6rem;
  font-weight: 800;
  background: #111;
  color: #ffd76a;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.3);
}

/* Indicadores de dano e atalhos de carta */
.cdmg {
  font-size: 0.75rem;
  font-weight: 900;
  color: #ff6b7d;
  background: rgba(40, 10, 20, 0.7);
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 125, 0.4);
  margin-top: 2px;
}
.cdmg.sh {
  color: #5be0ff;
  background: rgba(10, 30, 50, 0.7);
  border-color: rgba(91, 224, 255, 0.4);
}
.key {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(15, 12, 35, 0.95);
  border: 1px solid var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* Botão finalizar turno quando a energia acabou */
.btn.endturn.ready {
  animation: pulseReady 1.2s infinite alternate;
  box-shadow: 0 0 25px rgba(180, 76, 255, 0.8), 0 0 8px #fff;
}
@keyframes pulseReady {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.05); filter: brightness(1.25); }
}

.tb-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.speed-btn {
  background: rgba(255, 184, 31, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}
.speed-btn:hover {
  background: rgba(255, 184, 31, 0.4);
}

@media (max-width: 760px) {
  .team-body { flex-direction: column; overflow-y: auto; } .detail { width: 100%; }
  .bottom { grid-template-columns: 70px 1fr; } .right-col { grid-column: 1 / -1; display: flex; justify-content: center; }
  .energy { width: 60px; height: 60px; font-size: 1.2rem; } .energy b { font-size: 1.4rem; }
  .hand { overflow-x: auto; justify-content: flex-start; padding-top: 24px; }
  .order-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
