:root {
  --bg: #081223;
  --bg2: #0f1f38;
  --panel: #152847;
  --panel2: #1e3760;
  --border: #2e4d7d;
  --text: #f2f6ff;
  --muted: #98b0d4;
  --gold: #ffcc33;
  --gold-dark: #c98a00;
  --red: #ff5252;
  --red-dark: #b32424;
  --green: #2ed573;
  --green-dark: #169649;
  --blue: #3b82f6;
  --blue-dark: #1d4ed8;
  --font-ui: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Fredoka', 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; }
body {
  font-family: var(--font-ui);
  background: radial-gradient(1300px 800px at 50% -10%, #1d3b6b 0%, var(--bg) 65%);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.txt-green { color: #57f287; }

/* ================= BOTÕES TÁTEIS 3D (ESTILO BUSINESS TOUR) ================= */
.btn {
  font-family: var(--font-display);
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, #274472 0%, #1a3054 100%);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 3px 0 #0d1a30, 0 6px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .12s cubic-bezier(.34, 1.56, .64, 1), filter .15s, box-shadow .12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  filter: brightness(1.14);
  transform: translateY(-1px);
}
.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0d1a30, 0 2px 6px rgba(0, 0, 0, .3);
}
.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  filter: saturate(.5);
}
.btn.primary {
  background: linear-gradient(180deg, #4da3ff 0%, #2563eb 100%);
  border-color: #7cc0ff;
  box-shadow: 0 3px 0 #153e99, 0 6px 16px rgba(37, 99, 235, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.success {
  background: linear-gradient(180deg, #3ae374 0%, #1ea84f 100%);
  border-color: #7bed9f;
  color: #062812;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  box-shadow: 0 3px 0 #106930, 0 6px 16px rgba(46, 213, 115, .4), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn.gold {
  background: linear-gradient(180deg, #ffdd59 0%, #f59e0b 100%);
  border-color: #fff2a6;
  color: #2b1800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
  box-shadow: 0 3px 0 #b45309, 0 6px 18px rgba(245, 158, 11, .42), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.btn.danger {
  background: linear-gradient(180deg, #ff6b6b 0%, #dc2626 100%);
  border-color: #ffa8a8;
  box-shadow: 0 3px 0 #991b1b, 0 6px 16px rgba(220, 38, 38, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn.danger-ghost {
  background: rgba(220, 38, 38, .2);
  border-color: rgba(255, 107, 107, .55);
  color: #ffc9c9;
  box-shadow: none;
}
.btn.rm-btn {
  background: linear-gradient(180deg, rgba(220, 38, 38, .42), rgba(153, 27, 27, .55));
  border-color: rgba(255, 120, 120, .65);
  color: #ffd6d6;
  min-width: 40px;
}
.btn.ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .15);
  box-shadow: none;
}
.btn.glass {
  background: rgba(14, 26, 48, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(120, 165, 235, .32);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.big { padding: 14px 36px; font-size: 18px; border-radius: 16px; }
.btn.big-cta { padding: 12px 20px; font-size: 16px; border-radius: 14px; margin-top: 4px; }

.pulse-cta {
  animation: pulseBtn 1.8s infinite ease-in-out;
}
@keyframes pulseBtn {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.15); transform: scale(1.03); }
}

input {
  width: 100%;
  font-family: var(--font-ui);
  background: rgba(9, 18, 34, .85);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .25);
}
.error { color: #ff7b7b; min-height: 20px; margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }
.mini { color: var(--muted); font-size: 12px; }

.badge {
  font-family: var(--font-display);
  background: rgba(14, 26, 48, .82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(120, 165, 235, .35);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.user-pill {
  background: linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(15, 31, 56, .85));
  border-color: rgba(96, 165, 250, .45);
  color: #dbeafe;
}

/* ================= LOGIN SCREEN ================= */
.screen { height: 100vh; display: flex; flex-direction: column; position: relative; }
#screen-login { align-items: center; justify-content: center; overflow: hidden; }

.bg-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(75px); opacity: .45;
  animation: floatOrb 12s infinite alternate ease-in-out;
}
.orb-1 { width: 420px; height: 420px; background: #2563eb; top: -120px; left: -100px; }
.orb-2 { width: 360px; height: 360px; background: #f59e0b; bottom: -110px; right: -80px; animation-delay: -4s; }
.orb-3 { width: 280px; height: 280px; background: #10b981; top: 40%; left: 65%; animation-delay: -8s; opacity: .28; }
@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -25px) scale(1.1); }
}

.login-box {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(25, 45, 78, .92) 0%, rgba(16, 30, 54, .95) 100%);
  backdrop-filter: blur(18px);
  border: 2px solid rgba(110, 160, 235, .35);
  border-radius: 26px;
  padding: 36px 38px 30px;
  width: min(410px, calc(100vw - 28px));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .2);
  text-align: center;
}
.brand-emblem {
  width: 64px; height: 64px; margin: 0 auto 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffdd59, #f59e0b);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, .45), inset 0 2px 0 rgba(255, 255, 255, .6);
}
.logo {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #fff5c0 0%, #ffca3a 55%, #e08e00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .45));
}
.logo span {
  font-size: .52em;
  letter-spacing: 2px;
  display: inline-block;
  vertical-align: middle;
  background: linear-gradient(180deg, #93c5fd, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo.small { font-size: 22px; letter-spacing: 1.5px; }
.tagline { color: var(--muted); margin: 6px 0 22px; font-size: 14px; line-height: 1.4; }
.tabs {
  display: flex; gap: 6px; margin-bottom: 18px;
  background: rgba(8, 16, 30, .65);
  padding: 5px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.tab {
  flex: 1; padding: 9px 6px; background: transparent; border: none;
  color: var(--muted); border-radius: 10px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  transition: background .15s, color .15s;
}
.tab.active {
  background: linear-gradient(180deg, #2b4c7e, #1d3559);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.tabpane { display: flex; flex-direction: column; gap: 11px; }

/* ================= LOBBY & SALA DE ESPERA ================= */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(100, 150, 225, .22);
  background: rgba(10, 19, 36, .88);
  backdrop-filter: blur(12px);
}
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-mini-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #ffdd59, #f59e0b);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 3px 10px rgba(245, 158, 11, .35);
}

.lobby-main, .room-main {
  flex: 1; display: grid; gap: 22px; padding: 26px; overflow: auto;
  max-width: 1240px; width: 100%; margin: 0 auto;
}
.lobby-main { grid-template-columns: 1fr 360px; align-content: start; }

.panel {
  background: linear-gradient(180deg, rgba(23, 42, 74, .92) 0%, rgba(15, 29, 52, .94) 100%);
  border: 1.5px solid rgba(95, 145, 220, .32);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.panel h2 {
  font-family: var(--font-display);
  margin-bottom: 14px; font-size: 18px; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.create-room-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.howto-box {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 16px;
}
.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(11, 22, 42, .85);
  border: 1.5px solid rgba(85, 130, 200, .3);
  border-radius: 16px;
  padding: 14px 18px;
  transition: transform .15s, border-color .15s;
}
.room-item:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 175, 255, .55);
}
.room-item-info { display: flex; flex-direction: column; gap: 4px; }
.room-item .rname { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: #fff; }
.room-item .rplayers { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rstatus-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rstatus-dot.open { background: #2ed573; box-shadow: 0 0 8px #2ed573; }
.rstatus-dot.playing { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.room-item-actions { display: flex; align-items: center; gap: 8px; }

.empty {
  color: var(--muted); padding: 36px 20px; text-align: center;
  background: rgba(9, 18, 34, .45); border-radius: 16px;
  border: 1px dashed rgba(120, 165, 235, .25);
}
.empty-icon { font-size: 36px; margin-bottom: 8px; }
.rules-mini { color: #bdd0ee; font-size: 13.5px; padding-left: 18px; display: grid; gap: 8px; line-height: 1.4; }

/* ---------- Sala de espera estilo Business Tour ---------- */
.room-main { justify-items: center; align-content: center; }
.room-stage {
  background: linear-gradient(180deg, rgba(23, 42, 74, .92), rgba(14, 26, 48, .95));
  border: 2px solid rgba(105, 155, 230, .35);
  border-radius: 26px;
  padding: 28px 32px;
  width: min(820px, 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  text-align: center;
}
.stage-title {
  font-family: var(--font-display);
  font-size: 22px; margin-bottom: 20px; color: var(--gold);
}
.room-slots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.slot {
  border: 2px solid rgba(90, 135, 205, .32);
  border-radius: 18px;
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  background: rgba(10, 20, 38, .85);
  text-align: left;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.slot.occupied {
  border-color: var(--slot-color, var(--border));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
.slot.empty-slot { opacity: .62; border-style: dashed; }
.slot-avatar {
  position: relative;
  width: 48px; height: 48px; border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  flex: 0 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}
.slot-crown {
  position: absolute; top: -10px; right: -8px;
  font-size: 16px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}
.slot .sname { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: #fff; }
.slot .scolor { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.swatch-inline { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.5); }
.room-actions { margin-top: 26px; text-align: center; display: grid; gap: 14px; justify-items: center; }

/* =============== TELA DO JOGO (TABULEIRO INTERATIVO) =============== */
.game-screen { position: relative; }
.map-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% 42%, #1d4978 0%, transparent 65%),
    linear-gradient(165deg, #0d223d 0%, #071324 100%);
}
#map {
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#map.panning { cursor: grabbing; }

/* Territórios no Tabuleiro */
.terr {
  stroke: #061326;
  stroke-width: 1.25;
  stroke-linejoin: round;
  cursor: pointer;
  transition: filter .15s ease, opacity .15s ease, stroke-width .15s ease;
}
.terr:hover { filter: brightness(1.2) saturate(1.1); }
.terr.dim { filter: brightness(.72) saturate(.68); }
.terr.cont-hi {
  stroke: #ffe57f;
  stroke-width: 1.8;
  filter: brightness(1.14) drop-shadow(0 0 5px rgba(255, 229, 127, .45));
}
.terr.sel {
  stroke: #ffffff;
  stroke-width: 2.6;
  filter: brightness(1.16) drop-shadow(0 0 8px rgba(255, 255, 255, .75));
}
.terr.placed-hi {
  stroke: #4cd137;
  stroke-width: 2;
}
.terr.target {
  stroke: #ff4757;
  stroke-width: 2.6;
  filter: brightness(1.15) drop-shadow(0 0 9px rgba(255, 71, 87, .85));
}
.terr.oktarget {
  stroke: #ffd32a;
  stroke-width: 2;
  stroke-dasharray: 4 2;
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(255, 211, 42, .65));
}

.tlabel {
  font-size: 9.8px;
  font-family: var(--font-ui);
  font-weight: 700;
  fill: rgba(255, 255, 255, .95);
  paint-order: stroke;
  stroke: rgba(4, 10, 22, .92);
  stroke-width: 2.8px;
  stroke-linejoin: round;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
  transition: opacity .15s;
}
.tlabel.dim { opacity: .6; }

/* Bolinhas de Exércitos no Mapa */
.army {
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .65));
  transition: opacity .15s, transform .15s;
}
.army.interactive { pointer-events: auto; cursor: pointer; }
.army.dim { opacity: .68; }
.army circle.big {
  fill: rgba(6, 14, 28, .68);
  stroke: rgba(255, 255, 255, .65);
  stroke-width: 1;
}
.army.has-placed circle.big {
  stroke: #4cd137;
  stroke-width: 1.8;
  fill: rgba(20, 82, 42, .78);
}
.army circle.core {
  stroke: rgba(255, 255, 255, .32);
  stroke-width: .9;
}
.army text.army-num {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, .55);
  stroke-width: 1.4px;
}
.army .bolinha-side { transition: filter .12s, opacity .12s, transform .12s; }
.army .bolinha-side:hover { filter: brightness(1.3); }
.army .bolinha-side text {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.army .bolinha-add circle { fill: #20bf6b; stroke: #a5ffd6; stroke-width: 1; }
.army .bolinha-add.inactive { opacity: .24; }
.army .bolinha-rm circle { fill: #eb3b5a; stroke: #ff9ff3; stroke-width: 1; }
.army .bolinha-rm.inactive { opacity: .2; }

/* Setas Curvas Animadas de Ataque / Deslocamento no Mapa */
.map-arrow-glow {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  opacity: .35;
  filter: blur(2px);
}
.map-arrow-glow.atk { stroke: #ff4757; }
.map-arrow-glow.move { stroke: #2ed573; }

.map-arrow {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 6 4;
  animation: arrowDash .6s linear infinite;
}
.map-arrow.atk { stroke: #ff5e57; }
.map-arrow.move { stroke: #38ef7d; }
@keyframes arrowDash {
  to { stroke-dashoffset: -10; }
}

/* Textos Flutuantes de +N / -N Tropas no Mapa */
.army-delta {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(4, 10, 20, .92);
  stroke-width: 3px;
  animation: floatDelta 1.05s cubic-bezier(.16, 1, .3, 1) forwards;
}
.army-delta.plus { fill: #57f287; }
.army-delta.minus { fill: #ff6b81; }
@keyframes floatDelta {
  0% { opacity: 0; transform: translateY(4px) scale(.7); }
  25% { opacity: 1; transform: translateY(-4px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-18px) scale(1); }
}

.tooltip {
  position: absolute;
  background: rgba(10, 19, 36, .95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(110, 160, 235, .45);
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 12.5px;
  pointer-events: none;
  z-index: 35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
}

/* ================= HUD SUPERIOR (AVATARES ESTILO BUSINESS TOUR) ================= */
.hud-top {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  z-index: 25;
  pointer-events: none;
}
.hud-left-meta, .hud-players, .hud-right-actions {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
}
.round-badge {
  background: linear-gradient(180deg, rgba(25, 45, 78, .9), rgba(14, 26, 48, .92));
  border-color: rgba(255, 204, 51, .45);
  color: var(--gold);
  font-size: 13.5px;
}

.hud-players {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto;
  max-width: calc(100vw - 380px);
  padding: 2px 4px;
  scrollbar-width: none;
}
.hud-players::-webkit-scrollbar { display: none; }

.pcard {
  display: flex; align-items: center; gap: 9px;
  background: rgba(12, 23, 43, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(90, 135, 205, .35);
  border-radius: 16px;
  padding: 5px 11px 5px 6px;
  min-width: 142px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.pcard.turn {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(45, 68, 110, .92), rgba(20, 35, 62, .94));
  box-shadow: 0 0 0 2px rgba(255, 204, 51, .35), 0 8px 22px rgba(0, 0, 0, .55);
  transform: translateY(1px);
}
.pcard.dead {
  opacity: .42;
  filter: grayscale(.7);
}
.pcard-avatar {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 11px;
  border: 2px solid rgba(255, 255, 255, .45);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 13.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.pcard-turn-badge {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); color: #1a1000;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
  animation: pulseTurn 1.2s infinite ease-in-out;
}
@keyframes pulseTurn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
.pcard-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pcard-name-row { display: flex; align-items: center; gap: 5px; }
.pcard .pname {
  font-family: var(--font-display);
  font-weight: 600; font-size: 13px; color: #fff;
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pme-tag {
  background: rgba(59, 130, 246, .35);
  border: 1px solid rgba(147, 197, 253, .6);
  color: #dbeafe;
  font-size: 9px; font-weight: 800;
  padding: 1px 5px; border-radius: 999px;
}
.poff-tag {
  background: rgba(239, 68, 68, .3);
  color: #fca5a5;
  font-size: 9px; font-weight: 800;
  padding: 1px 5px; border-radius: 999px;
}
.pcard-stats {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--muted);
}
.pcard-stats b { color: #e2ecff; font-weight: 700; }
.pdead-label { color: #ff8787; font-weight: 600; font-size: 11px; }

.hud-btn { position: relative; }
.hud-Notification {
  background: rgba(255, 255, 255, .15);
  color: var(--text);
  font-size: 11px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px;
}
.hud-Notification.has-cards {
  background: var(--gold);
  color: #1f1200;
}
.hud-btn.ready-trade {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 204, 51, .55);
  animation: pulseBtn 1.5s infinite;
}

/* ================= GAVETA LATERAL (CARTAS & HISTÓRICO) ================= */
.side {
  position: absolute; top: 68px; right: 12px;
  width: 280px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 30;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.side.hidden-side {
  opacity: 0;
  transform: translateX(24px) scale(.97);
  pointer-events: none !important;
}
.side .panel {
  pointer-events: auto;
  background: rgba(12, 23, 43, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(100, 150, 225, .45);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.side h3 {
  font-family: var(--font-display);
  font-size: 14px; color: var(--gold); letter-spacing: .4px; margin: 0;
}
.cards { display: flex; flex-wrap: wrap; gap: 7px; max-height: 150px; overflow: auto; }
.cards-empty { font-size: 12px; color: var(--muted); line-height: 1.4; padding: 6px 0; }
.card {
  width: 74px; height: 58px;
  background: linear-gradient(180deg, #fff8e7, #e6d5b8);
  color: #2c1e0a;
  border-radius: 10px;
  padding: 5px 6px;
  font-size: 10px; font-weight: 700;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 2px solid rgba(0, 0, 0, .15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  user-select: none;
  transition: transform .12s, border-color .12s;
}
.card:hover { transform: translateY(-2px); }
.card .sym { font-size: 16px; line-height: 1; }
.card.sel {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px var(--gold), 0 6px 14px rgba(245, 158, 11, .5);
  transform: translateY(-2px);
}
.card.joker {
  background: linear-gradient(180deg, #9b59b6, #6c3483);
  color: #fff;
}
.card .cname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.trade-row .btn { margin-left: auto; }
.trade-row .mini { font-size: 11px; line-height: 1.25; }

.side-log-panel h3 { margin-bottom: 8px; }
.action-log {
  color: #c5d6f0; font-size: 12px;
  max-height: 120px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
}
.log-line {
  padding: 4px 7px;
  background: rgba(255, 255, 255, .04);
  border-radius: 7px;
  line-height: 1.3;
}

/* ================= LEGENDA DE CONTINENTES & CONTROLES DE ZOOM ================= */
.cont-legend {
  position: absolute; left: 12px; top: 68px;
  display: flex; flex-direction: column; gap: 5px;
  background: rgba(11, 21, 40, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(90, 135, 205, .4);
  border-radius: 16px;
  padding: 9px;
  z-index: 20;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.cont-legend h4 {
  font-family: var(--font-display);
  font-size: 10px; color: var(--muted); letter-spacing: 1.2px; margin: 0 4px 2px;
}
.cont-btn {
  font-family: var(--font-ui);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 146px;
  border: 1.5px solid rgba(85, 130, 200, .32);
  border-radius: 10px;
  background: rgba(17, 31, 56, .88);
  color: var(--text);
  padding: 6px 9px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: transform .12s, filter .12s, border-color .12s, box-shadow .12s;
}
.cont-btn:hover { filter: brightness(1.2); transform: translateX(2px); }
.cont-btn .cbtn-meta { display: inline-flex; align-items: center; gap: 5px; }
.cont-btn .cbtn-own { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.cont-btn .cbtn-own.has-mine { color: #7dd3fc; font-weight: 700; }
.cont-btn .cbtn-bonus {
  font-family: var(--font-display);
  color: var(--gold); font-size: 11px;
  background: rgba(255, 204, 51, .12);
  padding: 1px 5px; border-radius: 6px;
}
.cont-btn.has-pool {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(255, 204, 51, .35);
}
.cont-btn.active {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(45, 76, 128, .95), rgba(28, 50, 88, .95));
  box-shadow: 0 0 12px rgba(255, 204, 51, .45);
}

.map-controls {
  position: absolute; left: 12px; bottom: 14px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 25;
}
.map-controls .btn {
  width: 40px; height: 40px; padding: 0; font-size: 17px; border-radius: 12px;
}

/* ================= BARRA DE COMANDO INFERIOR (ENXUTA E FOCADA) ================= */
.actionbar {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 12px;
  display: flex; flex-direction: column; align-items: stretch; gap: 7px;
  width: min(860px, calc(100vw - 120px));
  background: linear-gradient(180deg, rgba(16, 30, 56, .92), rgba(10, 20, 38, .95));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(105, 155, 230, .48);
  border-radius: 20px;
  padding: 10px 16px;
  z-index: 25;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.action-info { font-size: 13.5px; font-weight: 500; width: 100%; }
.action-controls { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.action-controls:empty { display: none; }

/* Indicador Visual de Fases (1. Reforçar -> 2. Atacar -> 3. Deslocar) */
.phase-stepper {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(7, 14, 28, .75);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 3px 5px;
  border-radius: 999px;
}
.pstep {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.pstep.done { color: #7bed9f; }
.pstep.active {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .45);
}

.ab-wait {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 4px 0; font-size: 14px;
}
.wait-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .18);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ab-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.ab-status {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px; line-height: 1.35;
}
.ab-head-btns { display: flex; align-items: center; gap: 7px; margin-left: auto; }

.troop-counter-badge {
  font-family: var(--font-display);
  background: linear-gradient(180deg, #ffdd59, #f59e0b);
  color: #241400;
  font-weight: 700; font-size: 13px;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, .4);
}
.troop-counter-badge.done {
  background: linear-gradient(180deg, #3ae374, #1ea84f);
  color: #052610;
  box-shadow: 0 2px 8px rgba(46, 213, 115, .35);
}

.pool-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(25, 44, 76, .85);
  border: 1px solid rgba(110, 160, 235, .35);
  border-radius: 999px;
  padding: 3px 10px; font-size: 12px; color: var(--text);
}
.pool-pill.bonus {
  border-color: var(--gold); color: var(--gold);
  background: rgba(255, 204, 51, .14);
  font-family: var(--font-ui);
}
.pool-pill.clickable { cursor: pointer; transition: filter .12s, transform .12s; }
.pool-pill.clickable:hover { filter: brightness(1.2); transform: translateY(-1px); }

.ab-row {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.ab-hint-row {
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 5px;
}
.ab-terrs {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.ab-terrs > * { flex: 0 0 auto; }

.ab-alloc {
  background: rgba(22, 40, 72, .82);
  border: 1px solid rgba(96, 165, 250, .4);
  border-radius: 14px;
  padding: 7px 12px;
}
.ab-label {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; color: #b8cff2;
  margin-right: 2px; white-space: nowrap;
}
.alloc-target { font-size: 13.5px; margin-right: 4px; }
.alloc-btn { min-width: 44px; }
.alloc-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.alloc-group.rm-group {
  border-left: 1px solid rgba(255, 255, 255, .16);
  padding-left: 8px;
  margin-left: 2px;
}

/* Pílulas de Território (quando um continente ou ataque é selecionado) */
.terr-pill {
  font-family: var(--font-ui);
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid rgba(95, 145, 220, .38);
  border-radius: 12px;
  background: rgba(16, 29, 52, .94);
  color: var(--text);
  padding: 5px 11px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  transition: filter .12s, border-color .12s, box-shadow .12s, transform .08s;
}
.terr-pill:hover { filter: brightness(1.18); border-color: #7cc0ff; }
.terr-pill:active { transform: translateY(1px); }
.terr-pill.has-placed { border-color: rgba(76, 209, 55, .75); }
.terr-pill.active {
  border-color: #fff;
  background: rgba(37, 99, 235, .38);
  box-shadow: 0 0 12px rgba(59, 130, 246, .55);
}
.terr-pill.target-pill.active {
  border-color: #ff6b6b;
  background: rgba(220, 38, 38, .35);
  box-shadow: 0 0 12px rgba(239, 68, 68, .55);
}
.terr-pill .tp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  flex: 0 0 auto;
}
.terr-pill .tp-armies {
  font-family: var(--font-display);
  background: rgba(0, 0, 0, .48);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px; font-weight: 700; color: var(--gold);
}
.terr-pill .tp-added {
  font-family: var(--font-display);
  background: rgba(46, 213, 115, .28);
  border: 1px solid rgba(87, 242, 135, .65);
  border-radius: 999px;
  padding: 0 5px;
  font-size: 10.5px; font-weight: 700; color: #7bed9f;
}
.terr-pill.split-pill {
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.terr-pill.split-pill .tp-mid {
  font-family: var(--font-ui);
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; color: var(--text);
  padding: 5px 9px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.terr-pill.split-pill .tp-side {
  font-family: var(--font-display);
  border: none;
  padding: 5px 9px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: filter .12s, opacity .12s;
  align-self: stretch;
  display: inline-flex; align-items: center; justify-content: center;
}
.terr-pill.split-pill .tp-side:hover { filter: brightness(1.25); }
.terr-pill.split-pill .tp-add {
  background: rgba(32, 191, 107, .62);
  border-right: 1px solid rgba(255, 255, 255, .15);
  color: #c4ffdf;
}
.terr-pill.split-pill .tp-rm {
  background: rgba(235, 59, 90, .62);
  border-left: 1px solid rgba(255, 255, 255, .15);
  color: #ffd1d8;
}
.terr-pill.split-pill .tp-side.disabled {
  opacity: .22;
  cursor: not-allowed;
}

/* =============== DADOS 3D ANIMADOS =============== */
.dice-overlay {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 40;
  pointer-events: none;
  animation: diceIn .32s cubic-bezier(.16, 1, .3, 1);
}
.dice-overlay.fading { opacity: 0; transition: opacity .45s; }
@keyframes diceIn { from { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(.92); } }
.dice-box {
  background: linear-gradient(180deg, rgba(16, 30, 56, .95), rgba(10, 19, 36, .96));
  backdrop-filter: blur(14px);
  border: 2px solid rgba(110, 160, 235, .55);
  border-radius: 22px;
  padding: 14px 26px 16px;
  text-align: center;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .65);
}
.dice-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; margin-bottom: 10px; color: #dbeafe; }
.dice-title b { color: #fff; }
.dice-row { display: flex; align-items: center; gap: 18px; justify-content: center; }
.dice-group { display: flex; gap: 10px; min-height: 60px; align-items: center; }
.dice-vs { font-size: 20px; filter: drop-shadow(0 0 8px rgba(255, 204, 51, .6)); }
.dice-result { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-top: 8px; min-height: 18px; }
.dice-result.win { color: var(--gold); }
.dice-result.loss { color: #ff8787; }
.dice-result.neutral { color: var(--muted); }

.die3d { width: 46px; height: 46px; perspective: 260px; }
.die3d .cube {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(-23px);
}
.die3d .face {
  position: absolute; inset: 0;
  border-radius: 10px;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 15%;
  backface-visibility: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.die3d.red .face { background: linear-gradient(145deg, #ff6b6b, #c92a2a); border: 1.5px solid #8a1515; }
.die3d.yellow .face { background: linear-gradient(145deg, #ffe066, #e69900); border: 1.5px solid #996300; }
.die3d.red .pip { background: #fff; }
.die3d.yellow .pip { background: #261900; }
.pip { border-radius: 50%; align-self: center; justify-self: center; width: 8px; height: 8px; }
.pip.p1 { grid-area: 1 / 1; } .pip.p2 { grid-area: 1 / 3; }
.pip.p3 { grid-area: 2 / 2; }
.pip.p4 { grid-area: 3 / 1; } .pip.p5 { grid-area: 3 / 3; }
.pip.p6 { grid-area: 2 / 1; } .pip.p7 { grid-area: 2 / 3; }
.die3d .cube.rolling { animation: tumble .52s linear infinite; }
@keyframes tumble {
  0% { transform: translateZ(-23px) rotateX(0deg) rotateY(0deg); }
  100% { transform: translateZ(-23px) rotateX(360deg) rotateY(360deg); }
}
.die3d.dead { opacity: .26; filter: grayscale(.7); transform: scale(.9); transition: all .25s; }

/* =============== VITÓRIA / OBJETIVO / TOAST =============== */
.win-overlay {
  position: absolute; inset: 0;
  background: rgba(5, 10, 22, .85);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
}
.win-box {
  text-align: center;
  background: linear-gradient(180deg, #1b335c, #10203b);
  border: 2px solid var(--gold);
  padding: 36px 44px;
  border-radius: 26px;
  max-width: min(460px, calc(100vw - 28px));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
.win-trophy { font-size: 62px; margin-bottom: 10px; filter: drop-shadow(0 6px 18px rgba(255, 204, 51, .5)); }
.win-box h1 { font-family: var(--font-display); font-size: 34px; margin-bottom: 10px; color: var(--gold); }
.win-box p { color: #d0e1fd; margin-bottom: 22px; font-size: 15px; }
.win-commander {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(10, 20, 38, .65);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 16px; font-size: 14px;
}
.win-obj-card {
  background: linear-gradient(180deg, #fff9eb, #e6d5b5);
  color: #2c1d08;
  border: 2.5px solid #d4a338;
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.win-obj-label {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .8px; color: #8c5800;
  margin-bottom: 6px;
}
.win-obj-body {
  font-size: 15.5px; font-weight: 700; line-height: 1.45;
}

.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display);
  background: rgba(16, 32, 60, .95);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(120, 175, 255, .55);
  padding: 10px 22px; border-radius: 999px; z-index: 80;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  font-size: 14px; color: #fff;
  animation: toastPop .22s cubic-bezier(.16, 1, .3, 1);
}
.toast.err {
  background: rgba(75, 16, 24, .95);
  border-color: #ff6b6b;
  color: #ffd6d6;
}
@keyframes toastPop {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.92); }
}

.obj-modal {
  position: fixed; inset: 0;
  background: rgba(4, 10, 22, .72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 70;
}
.obj-card {
  width: min(360px, calc(100vw - 32px));
  background: linear-gradient(180deg, #fff9eb, #e6d5b5);
  color: #2c1d08;
  border-radius: 22px;
  padding: 30px 28px;
  text-align: center;
  border: 3px solid #d4a338;
  box-shadow: 0 24px 65px rgba(0, 0, 0, .7);
}
.obj-card h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: .8px; margin-bottom: 14px; color: #8c5800; }
.obj-card p { font-size: 16px; line-height: 1.5; font-weight: 700; }

/* ================= RESPONSIVIDADE MOBILE & TABLET ================= */
@media (max-width: 960px) {
  .lobby-main { grid-template-columns: 1fr; padding: 16px; }
  .room-slots { grid-template-columns: repeat(2, 1fr); }
  .room-stage { padding: 20px 18px; }

  .hud-top {
    top: 6px; left: 6px; right: 6px;
    flex-wrap: wrap; gap: 6px;
  }
  .hud-players {
    order: 3;
    max-width: 100%;
    width: 100%;
    padding-bottom: 2px;
  }
  .pcard {
    min-width: 126px;
    padding: 4px 9px 4px 5px;
    border-radius: 13px;
  }
  .pcard-avatar { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
  .pcard .pname { font-size: 12px; max-width: 76px; }
  .pcard-stats { font-size: 10px; gap: 5px; }
  .hb-text { display: none; }

  .cont-legend {
    top: 94px; left: 6px; right: 6px;
    flex-direction: row;
    overflow-x: auto;
    padding: 5px 7px;
    border-radius: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cont-legend::-webkit-scrollbar { display: none; }
  .cont-legend h4 { display: none; }
  .cont-btn { width: auto; flex: 0 0 auto; padding: 5px 9px; font-size: 11.5px; }

  .map-controls {
    left: auto; right: 8px; bottom: auto; top: 140px;
  }
  .map-controls .btn { width: 36px; height: 36px; font-size: 15px; }

  .side:not(.mobile-open) { display: none; }
  .side.mobile-open {
    top: 94px; right: 8px; left: 8px; width: auto;
    max-height: 62vh; z-index: 45;
    opacity: 1; transform: none;
  }

  .actionbar {
    left: 6px; right: 6px; bottom: 6px;
    transform: none;
    width: auto;
    max-height: 40vh;
    overflow-y: auto;
    padding: 9px 12px;
    border-radius: 16px;
    gap: 6px;
  }
  .phase-stepper { display: none; }
  .ab-status { font-size: 12.5px; }
}

@media (max-width: 520px) {
  .room-slots { grid-template-columns: 1fr; }
  .login-box { padding: 28px 22px 24px; }
  .logo { font-size: 34px; }
}

/* ================= SELETOR DE CORES (LOBBY E SALA) ================= */
.color-picker-wrap {
  display: flex; flex-direction: column; gap: 7px;
  background: rgba(9, 18, 34, .65);
  border: 1px solid rgba(110, 160, 235, .25);
  border-radius: 14px;
  padding: 10px 12px;
}
.cp-label {
  font-size: 12.5px; font-weight: 700; color: #c5d8f6;
}
.color-picker {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.cp-swatch {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
  transition: transform .14s cubic-bezier(.34, 1.56, .64, 1), box-shadow .14s, border-color .14s;
}
.cp-swatch:hover {
  transform: translateY(-2px) scale(1.06);
}
.cp-swatch.active {
  transform: scale(1.12);
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(255, 204, 51, .45), 0 6px 14px rgba(0, 0, 0, .55);
}

.stage-sub {
  color: #b8cff2; font-size: 13.5px; margin: -12px 0 18px;
}
.slot.selectable-slot {
  cursor: pointer;
  opacity: .84;
}
.slot.selectable-slot:hover {
  opacity: 1;
  transform: translateY(-3px);
  border-color: var(--slot-color, var(--gold));
  border-style: solid;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.slot.my-slot {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(35, 62, 108, .92), rgba(14, 28, 52, .94));
  box-shadow: 0 0 0 2px rgba(255, 204, 51, .28), 0 10px 26px rgba(0, 0, 0, .5);
}
.slot-you-tag {
  background: var(--gold);
  color: #1f1200;
  font-size: 9.5px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px;
  margin-left: 5px; vertical-align: middle;
}
.slot-pick-hint {
  font-size: 11px; font-weight: 700; color: #7dd3fc; margin-top: 3px;
}

/* ================= EFEITOS DE BATALHA E CONQUISTA NO TABULEIRO ================= */
.terr.conquered-flash {
  animation: terrConqFlash 1.05s ease-out;
}
@keyframes terrConqFlash {
  0% { filter: brightness(2.2) saturate(1.4) drop-shadow(0 0 14px #fff); stroke: #fff; stroke-width: 3.2; }
  50% { filter: brightness(1.45) drop-shadow(0 0 10px var(--gold)); stroke: var(--gold); stroke-width: 2.4; }
  100% { filter: brightness(1); }
}

.conquest-ring {
  fill: none;
  stroke-width: 3.2;
  opacity: .9;
  transform-box: fill-box;
  transform-origin: center;
  animation: conqWave 1.1s cubic-bezier(.16, 1, .3, 1) forwards;
}
.conquest-ring.delay {
  animation-delay: .18s;
  stroke-width: 2.2;
}
@keyframes conqWave {
  0% { transform: scale(.5); opacity: .95; stroke-width: 3.5; }
  100% { transform: scale(4.2); opacity: 0; stroke-width: .4; }
}

.conquest-float-txt {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  fill: #ffe066;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(4, 10, 22, .95);
  stroke-width: 3.2px;
  animation: floatConqTxt 1.3s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes floatConqTxt {
  0% { opacity: 0; transform: translateY(6px) scale(.7); }
  22% { opacity: 1; transform: translateY(-3px) scale(1.12); }
  80% { opacity: 1; transform: translateY(-14px) scale(1); }
  100% { opacity: 0; transform: translateY(-22px) scale(.95); }
}

.spark-line {
  stroke: #ff9f43;
  stroke-width: 2.2;
  stroke-linecap: round;
  animation: sparkFly .75s cubic-bezier(.16, 1, .3, 1) forwards;
}
.spark-line.gold {
  stroke: #ffe066;
  stroke-width: 2.6;
}
@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, 12px), var(--ty, 12px)) scale(.3); }
}

.clash-icon {
  font-size: 15px;
  text-anchor: middle;
  dominant-baseline: central;
  animation: clashPop .75s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes clashPop {
  0% { opacity: 0; transform: scale(.4); }
  35% { opacity: 1; transform: scale(1.35); }
  100% { opacity: 0; transform: scale(.9); }
}

/* ================= BANNER ANIMADO "SUA VEZ!" ================= */
.turn-banner {
  position: absolute;
  top: 76px; left: 50%;
  transform: translateX(-50%);
  z-index: 42;
  cursor: pointer;
  animation: bannerIn .42s cubic-bezier(.16, 1, .3, 1) forwards;
}
.turn-banner.out {
  animation: bannerOut .3s ease-in forwards;
}
@keyframes bannerIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-26px) scale(.88); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes bannerOut {
  0% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(.92); }
}
.turn-banner-inner {
  background: linear-gradient(135deg, rgba(28, 56, 102, .96), rgba(14, 28, 54, .97));
  backdrop-filter: blur(14px);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 12px 28px;
  text-align: center;
  box-shadow: 0 0 28px rgba(255, 204, 51, .38), 0 18px 45px rgba(0, 0, 0, .65);
}
.tb-title {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}
.tb-sub {
  font-size: 13.5px; color: #e2eeff;
  margin-top: 3px;
}

/* ================= PROGRESSO DO OBJETIVO SECRETO AO VIVO ================= */
.obj-prog-section {
  margin-top: 16px;
  background: rgba(44, 29, 8, .08);
  border: 1.5px solid rgba(140, 88, 0, .25);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
}
.obj-prog-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display);
  font-size: 11.5px; color: #7a4b00;
  letter-spacing: .6px;
  margin-bottom: 8px;
}
.obj-prog-head b {
  font-size: 13.5px; color: #1f5c2e;
}
.obj-bar-item {
  margin-top: 8px;
}
.obj-bar-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 600; color: #3b260a;
  margin-bottom: 4px;
}
.obj-bar-track {
  height: 9px;
  background: rgba(44, 29, 8, .16);
  border-radius: 999px;
  overflow: hidden;
}
.obj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 999px;
  transition: width .35s ease;
}
.obj-bar-fill.done {
  background: linear-gradient(90deg, #2ed573, #1ea84f);
}
.obj-note {
  margin-top: 8px;
  font-size: 11.5px;
  color: #6b4c1b;
  font-style: italic;
}

/* ================= BOTS NA SALA ================= */
.slot { position: relative; }
.slot.bot-slot {
  background: linear-gradient(135deg, rgba(28, 40, 70, .92), rgba(12, 22, 42, .94));
}
.slot-bot-tag, .pbot-tag {
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
  color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px;
  margin-left: 5px; vertical-align: middle;
  letter-spacing: .4px;
}
.pbot-tag { margin-left: 0; }
.slot-bot-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 5px 9px !important;
  font-size: 11.5px !important;
}
.slot-bot-btn:hover:not(:disabled) { transform: translateY(-50%) scale(1.05); }
.slot-bot-btn:active:not(:disabled) { transform: translateY(-50%) scale(.97); }
.empty-slot .slot-meta { padding-right: 78px; }
#btn-fill-bots {
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
  border-color: #c4b5fd;
  box-shadow: 0 3px 0 #4c1d95, 0 6px 16px rgba(124, 58, 237, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ================= CRONÔMETRO DE TURNO ================= */
.pcard { position: relative; overflow: hidden; }
.pcard-timer {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, .1);
}
.pcard-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2ed573, #7bed9f);
  transition: width .25s linear, background .3s;
}
.pcard-timer-fill.warn { background: linear-gradient(90deg, #f59e0b, #ffdd59); }
.pcard-timer-fill.danger {
  background: linear-gradient(90deg, #dc2626, #ff6b6b);
  animation: timerBlink .5s infinite alternate;
}
@keyframes timerBlink { from { opacity: 1; } to { opacity: .45; } }

.timer-badge {
  font-variant-numeric: tabular-nums;
  min-width: 74px;
  text-align: center;
  transition: background .2s, border-color .2s, color .2s;
}
.timer-badge.mine {
  border-color: rgba(46, 213, 115, .6);
  color: #7bed9f;
}
.timer-badge.danger {
  border-color: #ff6b6b;
  color: #ffd1d1;
  background: rgba(127, 29, 29, .85);
  animation: timerPulse .6s infinite alternate;
}
@keyframes timerPulse { from { transform: scale(1); } to { transform: scale(1.07); } }

@media (max-width: 960px) {
  .slot-bot-btn { right: 8px; }
  .timer-badge { min-width: 64px; font-size: 11.5px; }
}
