/* ==========================================================================
   Super Trunfo Político - Design System & Estilos das Cartas Colecionáveis
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Tipografia */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Paleta Base (Dark Theme Republicano) */
  --bg-app: #080d1a;
  --bg-gradient: radial-gradient(circle at 50% 0%, #172847 0%, #0c1424 50%, #060913 100%);
  --bg-surface: #10192e;
  --bg-surface-elevated: #16223d;
  --bg-surface-glass: rgba(16, 25, 46, 0.85);

  /* Acentos Oficiais */
  --gold-primary: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #b45309 100%);
  --gold-foil: linear-gradient(120deg, #f59e0b 0%, #fef08a 25%, #d97706 50%, #fef08a 75%, #b45309 100%);

  --emerald-primary: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  --emerald-gradient: linear-gradient(135deg, #34d399 0%, #10b981 100%);

  --blue-primary: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.35);

  --red-primary: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.35);

  --amber-primary: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.35);

  /* Texto */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0f172a;

  /* Bordas & Efeitos */
  --border-subtle: rgba(148, 163, 184, 0.15);
  --border-card: rgba(245, 158, 11, 0.3);
  --border-gold-solid: #d97706;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 16px 36px -4px rgba(0, 0, 0, 0.65), 0 4px 14px -2px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 20px 48px -4px rgba(0, 0, 0, 0.8), 0 0 24px var(--gold-glow);
  --shadow-glow-gold: 0 0 28px rgba(245, 158, 11, 0.4);
  --shadow-glow-green: 0 0 28px rgba(16, 185, 129, 0.4);
  --shadow-glow-red: 0 0 28px rgba(239, 68, 68, 0.4);

  /* Dimensões do Card */
  --card-width: 324px;
  --card-height: 560px;
  --card-radius: 18px;

  /* Animação */
  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Estrutura Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-app);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.game-container {
  width: 100%;
  max-width: 1280px;
  min-height: 100vh;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   3. Cabeçalho Principal (Header)
   -------------------------------------------------------------------------- */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-crest {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
}

.crest-svg {
  width: 100%;
  height: 100%;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}

.highlight-title {
  background: linear-gradient(135deg, #10b981 10%, #f59e0b 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   4. Placar & Status da Mesa (Scoreboard HUD)
   -------------------------------------------------------------------------- */
.scoreboard {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 16px;
  align-items: center;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
}

.player-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: var(--transition-normal);
}

.player-panel.active-turn {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.player-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.player-avatar-badge.cpu-avatar {
  background: linear-gradient(135deg, #15803d, #0f172a);
  border-color: var(--emerald-primary);
}

.player-info {
  display: flex;
  flex-direction: column;
}

.player-role {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.player-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.text-right {
  text-align: right;
  margin-left: auto;
}

.deck-counter-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  margin-left: auto;
}

.player-panel-cpu .deck-counter-badge {
  margin-left: 0;
  margin-right: auto;
}

.deck-count-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.deck-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Centro do Placar: Pote e Rodada */
.arena-center-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.round-tracker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tracker-round-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.tracker-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 700;
}

.tracker-max {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.tied-pot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.8rem;
  color: var(--gold-primary);
  transition: var(--transition-normal);
}

.tied-pot-badge.has-tied-cards {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  animation: pulsePot 1.6s infinite ease-in-out;
}

.pot-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-primary);
}

.pot-count {
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.turn-status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-primary);
  box-shadow: 0 0 8px var(--emerald-primary);
  animation: pulseIndicator 2s infinite ease-in-out;
}

@keyframes pulseIndicator {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.turn-status-banner.pulse-banner {
  animation: bannerGlow 0.6s ease-out;
}

@keyframes bannerGlow {
  0% { transform: scale(0.97); box-shadow: 0 0 16px rgba(245, 158, 11, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); box-shadow: none; }
}

@keyframes pulsePot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* --------------------------------------------------------------------------
   5. Arena de Confronto & Slots de Cartas
   -------------------------------------------------------------------------- */
.game-arena {
  display: grid;
  grid-template-columns: minmax(300px, var(--card-width)) 1fr minmax(300px, var(--card-width));
  gap: 24px;
  align-items: center;
  justify-content: center;
  margin: auto 0;
  padding: 10px 0;
  min-height: 560px;
}

.card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: var(--card-width);
  margin: 0 auto;
}

.slot-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.slot-card-id {
  font-family: var(--font-display);
  color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* --------------------------------------------------------------------------
   6. Design da Carta Colecionável (Super Trunfo Card)
   -------------------------------------------------------------------------- */
.card-collectible {
  width: 100%;
  height: var(--card-height);
  background: linear-gradient(160deg, #18243c 0%, #10192e 60%, #0a0f1d 100%);
  border-radius: var(--card-radius);
  border: 2px solid var(--border-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 14px;
  box-sizing: border-box;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  user-select: none;
}

.card-collectible::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: calc(var(--card-radius) - 4px);
  border: 1px solid rgba(245, 158, 11, 0.2);
  pointer-events: none;
  z-index: 2;
}

/* Efeito Holográfico / Foil para Super Trunfo */
.card-super-trunfo.has-foil {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow-gold);
}

.card-trunfo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--gold-foil);
  color: #1e1b4b;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  z-index: 5;
  animation: foilShimmer 3s infinite linear;
}

@keyframes foilShimmer {
  0% { filter: brightness(1) drop-shadow(0 0 2px rgba(245, 158, 11, 0.4)); }
  50% { filter: brightness(1.25) drop-shadow(0 0 8px rgba(245, 158, 11, 0.8)); }
  100% { filter: brightness(1) drop-shadow(0 0 2px rgba(245, 158, 11, 0.4)); }
}

.card-trunfo-badge .badge-code {
  background: #1e1b4b;
  color: #fef08a;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  margin-left: 2px;
}

/* Cabeçalho do Card */
.card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  z-index: 3;
}

.head-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.party-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #b91c1c;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Badges de partidos específicos */
.party-badge[data-party="PT"] { background: #b91c1c; }
.party-badge[data-party="PL"] { background: #1d4ed8; }
.party-badge[data-party="PSDB"] { background: #0284c7; }
.party-badge[data-party="NOVO"] { background: #ea580c; }
.party-badge[data-party="MDB"] { background: #059669; }
.party-badge[data-party="PDT"] { background: #dc2626; }
.party-badge[data-party="PSB"] { background: #e11d48; }
.party-badge[data-party="UNIÃO"],
.party-badge[data-party="UNIÃO BRASIL"],
.party-badge[data-party="UNIAO BRASIL"] { background: #4338ca; }
.party-badge[data-party="REPUBLICANOS"] { background: #1e40af; }
.party-badge[data-party="PSD"] { background: #0891b2; }
.party-badge[data-party="REDE"] { background: #0d9488; }
.party-badge[data-party="PP"] { background: #4f46e5; }
.party-badge[data-party="PRTB"] { background: #d97706; }
.party-badge[data-party="PSOL"] { background: #eab308; color: #1e1b4b; }

/* Badge de Lado Político (Esquerda, Direita, Centro) */
.spectrum-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

.spectrum-badge[data-spectrum="esquerda"] {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.spectrum-badge[data-spectrum="centro"] {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(168, 85, 247, 0.6);
  color: #d8b4fe;
}

.spectrum-badge[data-spectrum="direita"] {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  color: #93c5fd;
}

.candidate-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
}

.candidate-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.candidate-role-pill {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--emerald-primary);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Moldura Visual e Dados Biográficos */
.card-visual {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  z-index: 3;
}

.portrait-frame {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portrait-placeholder {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #0f172a;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.portrait-placeholder.is-trunfo {
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
}

.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.card-collectible:hover .portrait-photo,
.portrait-placeholder:hover .portrait-photo {
  transform: scale(1.08);
}

.portrait-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.portrait-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.history-snippet {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badges-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.info-chip {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

/* Lista de Atributos Interativos */
.card-attributes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  z-index: 3;
  overflow-y: auto;
  max-height: 315px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.4) transparent;
}

.card-attributes::-webkit-scrollbar {
  width: 4px;
}

.card-attributes::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.card-attributes::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 4px;
}

.attr-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  position: relative;
  min-height: 34px;
  flex-shrink: 0;
}

.player-card .attr-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateX(3px);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.player-card .attr-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.attr-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.cpu-attr-row {
  cursor: default;
  pointer-events: none;
}

.attr-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  padding-right: 6px;
}

.attr-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attr-rule {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 3px;
}

.rule-higher {
  color: var(--emerald-primary);
}

.rule-lower {
  color: var(--gold-primary);
}

/* Destaque especial para indicador invertido (Menor Vence) */
.attr-btn.attr-inverted {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.18);
}

.attr-btn.attr-inverted .attr-rule {
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
}

.attr-data {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
}

.attr-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.attr-unit {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Estados de Destaque Pós-Comparação */
.attr-btn.is-selected {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.attr-btn.is-winner {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--emerald-primary);
  box-shadow: 0 0 14px var(--emerald-glow);
  animation: winnerPulse 1s ease-in-out infinite alternate;
}

.attr-btn.is-loser {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  opacity: 0.6;
}

.attr-btn.is-tied {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
}

@keyframes winnerPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

/* Rodapé do Card */
.card-footer {
  margin-top: 8px;
  text-align: center;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  z-index: 3;
}

.official-stamp {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   7. Zona Central de Confronto (Clash Zone / VS)
   -------------------------------------------------------------------------- */
.clash-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 10px;
}

.clash-badge {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e2c4a, #0b1120);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.vs-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-primary);
  letter-spacing: -0.05em;
  z-index: 2;
}

.clash-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.4);
  animation: rotateRing 12s linear infinite;
}

@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dispute-box {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 180px;
}

.dispute-cargo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-primary);
  border: 1px solid rgba(16, 185, 129, 0.35);
  transition: all var(--transition-fast);
}

.dispute-cargo-tag.tag-governador {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.dispute-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}

.dispute-attr-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.dispute-comparison {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.comp-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.player-comp-val { color: var(--blue-primary); }
.cpu-comp-val { color: var(--emerald-primary); }
.comp-op { font-size: 0.75rem; color: var(--text-dim); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #1e1b4b;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-next-round {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   8. Efeito 3D de Virada de Carta (Card Flip Effect)
   -------------------------------------------------------------------------- */
.card-flip-container {
  width: 100%;
  height: var(--card-height);
  perspective: 1400px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Quando virada, revela a frente */
.card-flip-container.flipped .card-flip-inner {
  transform: rotateY(180deg);
}

.card-side {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--card-radius);
}

/* Verso da Carta (Card Back) */
.card-back {
  background: radial-gradient(circle at 50% 50%, #172a4d 0%, #0d172b 60%, #060b14 100%);
  border: 2px solid var(--border-gold-solid);
  box-shadow: var(--shadow-card);
  padding: 12px;
  transform: rotateY(0deg);
  display: flex;
}

.card-back-frame {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: calc(var(--card-radius) - 6px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Padrão Guilloché Geométrico no Verso */
.card-back-guilloche {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: 
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(245, 158, 11, 0.3) 21%, transparent 22%),
    radial-gradient(circle at 50% 50%, transparent 35%, rgba(16, 185, 129, 0.3) 36%, transparent 37%),
    repeating-linear-gradient(45deg, rgba(245, 158, 11, 0.08) 0px, rgba(245, 158, 11, 0.08) 2px, transparent 2px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(245, 158, 11, 0.08) 0px, rgba(245, 158, 11, 0.08) 2px, transparent 2px, transparent 10px);
}

.card-back-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.card-back-stars {
  color: var(--gold-primary);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.back-coat-emblem {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.35));
}

.coat-svg {
  width: 100%;
  height: 100%;
}

.card-back-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.card-back-subtitle {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--emerald-primary);
}

.card-back-seal {
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Frente da Carta da CPU (Oculta até o flip) */
.card-front {
  transform: rotateY(180deg);
}

/* --------------------------------------------------------------------------
   9. Modais (Regras e Game Over)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: #10192e;
  border: 2px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8), 0 0 32px var(--gold-glow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.rule-section h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.rule-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.tag-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-primary);
}

.tag-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* Modal Game Over Especial */
.modal-gameover {
  text-align: center;
  align-items: center;
}

.gameover-trophy {
  font-size: 3.5rem;
  animation: bounceTrophy 1.5s infinite ease-in-out;
}

@keyframes bounceTrophy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gameover-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.gameover-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.gameover-reason {
  display: inline-block;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--gold-light);
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin: 6px 0;
}

.gameover-stats {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
  margin: 10px 0;
}

.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.btn-large {
  padding: 14px 36px;
  font-size: 1.1rem;
}

.btn-sound-replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 6px;
}

.btn-sound-replay:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 0 14px var(--gold-glow);
}

/* --------------------------------------------------------------------------
   10. Rodapé
   -------------------------------------------------------------------------- */
.game-footer {
  margin-top: auto;
  padding-top: 16px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 820px;
  margin: 0 auto;
}

.sources-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.disclaimer-note {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   10.5. Comparador de Candidatos Lado a Lado
   -------------------------------------------------------------------------- */
.btn-compare-header {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold-light);
}

.btn-compare-header:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
}

.modal-comparator {
  max-width: 1040px;
  width: 95vw;
  max-height: 92vh;
  padding: 24px;
}

.comparator-modal-header {
  align-items: flex-start;
}

.comparator-header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comparator-header-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.comparator-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Barra de Seleção e Ações */
.comparator-toolbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  background: rgba(16, 25, 46, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 16px;
}

.selector-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.selector-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.label-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-c1 {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-c2 {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.candidate-dropdown {
  width: 100%;
  background: #0c1424;
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.candidate-dropdown:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.candidate-dropdown optgroup {
  background: #10192e;
  color: var(--gold-primary);
  font-weight: 700;
}

.candidate-dropdown option {
  background: #0c1424;
  color: var(--text-main);
  font-weight: 500;
  padding: 6px;
}

.toolbar-center-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-tool-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-tool-action:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 0 10px var(--gold-glow);
}

.action-icon {
  font-size: 1rem;
  line-height: 1;
}

.cargo-filter-dropdown {
  background: #0c1424;
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.cargo-filter-dropdown:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Placar Resumo da Comparação */
.comparator-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(16, 25, 46, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.score-card.is-leader {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}

.score-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-primary);
  line-height: 1.1;
}

.score-unit {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.score-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.score-ties-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
  padding: 3px 12px;
}

.ties-num {
  font-weight: 800;
  color: var(--gold-primary);
  font-size: 0.95rem;
}

.ties-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.score-verdict {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 340px;
  line-height: 1.35;
}

/* Perfil dos Candidatos Lado a Lado */
.comparator-candidates-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}

.comparator-candidate-profile {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.comp-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.comp-portrait-wrap {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #0f172a;
}

.comp-portrait-wrap .portrait-svg,
.comp-portrait-wrap .portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.comp-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.comp-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.comp-role-tag {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.comp-candidate-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  word-break: break-word;
}

.comp-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.25);
  padding: 9px 12px;
  border-radius: 10px;
  border-left: 3px solid var(--gold-primary);
}

.comp-details-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comp-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.detail-icon {
  font-size: 0.9rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.detail-text {
  line-height: 1.35;
  color: #cbd5e1;
}

.comparator-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #10192e;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--gold-primary);
  box-shadow: 0 0 16px var(--gold-glow);
}

/* Grid dos Indicadores Lado a Lado */
.comparator-indicators-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.indicators-section-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.indicators-section-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.indicators-section-header p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.comp-category-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 4px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--gold-primary);
  border-radius: 0 8px 8px 0;
}

.comp-category-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-light);
}

.comp-category-badge {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.comparator-indicators-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-indicator-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 12px;
  align-items: stretch;
  background: rgba(16, 25, 46, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all var(--transition-fast);
}

.comp-indicator-row:hover {
  background: rgba(22, 34, 61, 0.85);
  border-color: rgba(245, 158, 11, 0.3);
}

.comp-ind-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.comp-cell-c1 {
  align-items: flex-end;
  text-align: right;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-cell-c2 {
  align-items: flex-start;
  text-align: left;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-cell-center {
  align-items: center;
  text-align: center;
  padding: 0 8px;
}

.cell-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.comp-val {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.comp-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.comp-subrotulo {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-secondary);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  margin-top: 4px;
  display: inline-block;
  letter-spacing: 0.02em;
}

.comp-win-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 9999px;
  padding: 2px 7px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.comp-tie-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 9999px;
  padding: 2px 7px;
}

.comp-ind-cell.is-winner .comp-val {
  color: #34d399;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.comp-ind-cell.is-loser .comp-val {
  color: var(--text-dim);
  opacity: 0.85;
}

.cell-na-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.na-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 6px;
}

.no-cargo-pill {
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.no-cargo-text {
  font-size: 0.68rem !important;
  color: #f59e0b !important;
  line-height: 1.1;
  text-align: right;
  font-weight: 700;
}

.na-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.ind-center-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ind-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.ind-rule-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.ind-desc {
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.3;
}

.ind-diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 2px 7px;
  margin-top: 3px;
}

.comparator-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.comparator-footer-note {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.ind-source {
  font-size: 0.68rem;
  color: #38bdf8;
  margin-top: 3px;
  line-height: 1.25;
}

.ind-source .source-tag {
  color: var(--gold-light);
  font-weight: 700;
  margin-right: 3px;
}

/* --------------------------------------------------------------------------
   11. Utilitários
   -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   12. Responsividade Mobile & Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .scoreboard {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .player-panel {
    justify-content: space-between;
  }

  .player-panel-cpu .deck-counter-badge {
    margin-left: 0;
    margin-right: 0;
  }

  .text-right {
    text-align: left;
    margin-left: 0;
  }

  .game-arena {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .clash-zone {
    order: 2;
  }

  .card-slot-player {
    order: 1;
  }

  .card-slot-cpu {
    order: 3;
  }

  .comparator-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .toolbar-center-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .comparator-candidates-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .comparator-vs-divider {
    order: 2;
  }

  .comparator-candidates-row .comparator-candidate-profile:first-child {
    order: 1;
  }

  .comparator-candidates-row .comparator-candidate-profile:last-child {
    order: 3;
  }
}

@media (max-width: 680px) {
  .comparator-scoreboard {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .comp-indicator-row {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .comp-cell-c1,
  .comp-cell-c2 {
    align-items: center;
    text-align: center;
    padding: 6px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .comp-cell-center {
    order: -1;
  }

  .comparator-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }

  .comparator-footer button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --card-width: 100%;
    --card-height: 490px;
  }

  .game-container {
    padding: 12px 10px 18px;
    gap: 12px;
  }

  .game-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-secondary {
    flex: 1;
    min-width: 90px;
    justify-content: center;
  }

  .candidate-name {
    font-size: 1rem;
  }

  .attr-name {
    font-size: 0.72rem;
  }

  .attr-value {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Indicador Geopolítico: Países que Apoiam (Democracias − Ditaduras) & Bandeiras
   ========================================================================== */

.attr-btn.attr-geopolitics {
  padding: 5px 8px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.14) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: rgba(59, 130, 246, 0.28);
  min-height: 48px;
}

.attr-btn.attr-geopolitics:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-color: rgba(59, 130, 246, 0.55);
}

.attr-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.attr-formula-tag {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.attr-flags-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin: 2px 0;
  width: 100%;
}

.flags-democracies,
.flags-dictatorships {
  display: flex;
  align-items: center;
  gap: 2px;
}

.flag-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  padding: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  line-height: 1;
  transition: transform 0.15s ease;
  vertical-align: middle;
}

.flag-icon-badge:hover {
  transform: scale(1.25);
  z-index: 5;
}

.flag-icon-badge.flag-dem {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.flag-icon-badge.flag-dit {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.14);
}

.flag-img-tag {
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: inline-block;
  vertical-align: middle;
}

.flag-emoji {
  display: none;
}

.flag-img-tag[style*="display: none"] + .flag-emoji {
  display: inline-block;
}

.flags-more-badge {
  font-size: 0.58rem;
  font-weight: 700;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.2;
}

.flags-more-badge.dit-more {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.flags-minus-sign {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ef4444;
  margin: 0 2px;
}

/* Estilos no Comparador */
.comp-formula-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.comp-geopolitics-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
  text-align: left;
}

.comp-flags-group {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 8px;
}

.group-title-dem {
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  display: block;
  margin-bottom: 4px;
}

.group-title-dit {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f87171;
  display: block;
  margin-bottom: 4px;
}

.comp-flags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.comp-flag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  transition: all 0.15s ease;
}

.comp-flag-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.comp-flag-item.dem-item {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.comp-flag-item.dit-item {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.comp-flag-item .country-code {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.zero-dit-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Destaques de Persona Non Grata */
.flag-icon-badge.flag-non-grata {
  border-color: rgba(244, 63, 94, 0.65);
  background: rgba(244, 63, 94, 0.18);
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.35);
}

.non-grata-icon {
  font-size: 0.6rem;
  margin-right: 2px;
  vertical-align: middle;
}

.flags-minus-sign.non-grata-sign {
  color: #f43f5e;
  font-size: 0.75rem;
  font-weight: 800;
  margin: 0 2px;
}

.flags-non-grata {
  display: flex;
  align-items: center;
  gap: 2px;
}

.group-title-non-grata {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fb7185;
  display: block;
  margin-bottom: 4px;
}

.comp-flags-group.group-non-grata {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(136, 19, 55, 0.22);
}

.comp-flag-item.non-grata-item {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.15);
  color: #fecdd3;
}

/* ==========================================================================
   MODAL DE DETALHAMENTO DO CANDIDATO, TIMELINE E RADAR MULTIDIMENSIONAL
   ========================================================================== */

/* Botão de Disparo nos Cards Colecionáveis */
.btn-card-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #f59e0b;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.btn-card-detail:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.card-head-clickable {
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 8px 8px 0 0;
}

.card-head-clickable:hover {
  background: rgba(245, 158, 11, 0.04);
}

.portrait-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portrait-clickable:hover {
  transform: scale(1.015);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.btn-profile-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-profile-detail:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}

/* Modal do Detalhamento */
.modal-candidate-detail {
  max-width: 1020px;
  width: 95vw;
  max-height: 92vh;
  padding: 24px;
}

.detail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-crest-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
}

.detail-header-text h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: #f8fafc;
  margin: 0;
}

.detail-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 3px 0 0 0;
  line-height: 1.35;
}

.detail-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.switcher-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.detail-candidate-select {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 250px;
}

.detail-candidate-select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.detail-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Banner de Identidade do Candidato */
.detail-hero-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.detail-photo-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.detail-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-profile-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.detail-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cargo-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.detail-candidate-fullname {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.detail-candidate-bio {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.detail-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* Tabs Bar */
.detail-tabs-bar {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

.modal-tab-btn.active {
  background: var(--gold-primary);
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.tab-section-header {
  margin-bottom: 14px;
}

.tab-section-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.tab-section-header p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

/* ==========================================================================
   GRÁFICO DE TIMELINE DE CANDIDATURAS
   ========================================================================== */

.timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-progression-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
}

.progression-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 8px;
}

.progression-svg {
  width: 100%;
  height: 90px;
  display: block;
}

.timeline-track {
  position: relative;
  padding-left: 28px;
  margin-left: 10px;
  border-left: 2px dashed rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  position: relative;
  transition: transform 0.2s ease;
}

.timeline-marker {
  position: absolute;
  left: -37px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #0f172a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  flex-shrink: 0;
}

.timeline-item.item-eleito .marker-dot {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

.timeline-year-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: #f59e0b;
  min-width: 36px;
  text-align: right;
}

.timeline-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.timeline-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-cargo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-cargo {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
}

.timeline-party-chip {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
}

.timeline-result-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-eleito {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-segundo-turno {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.badge-nao-eleito {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.timeline-votos-row {
  margin-top: 6px;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.votos-label {
  color: #94a3b8;
  margin-right: 4px;
}

.votos-val {
  color: #f59e0b;
  font-weight: 700;
}

.timeline-indicators-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-ind-chip {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-lbl {
  color: #94a3b8;
}

.mini-val {
  color: #f8fafc;
  font-weight: 700;
}

.timeline-destaque-text {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 10px 0 0 0;
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

.destaque-bullet {
  margin-right: 3px;
}

/* ==========================================================================
   GRÁFICO DE RADAR MULTIDIMENSIONAL & FORÇAS / FRAQUEZAS
   ========================================================================== */

.radar-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.radar-visual-column {
  display: flex;
  flex-direction: column;
}

.radar-card-frame {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.radar-chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.candidate-color {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.avg-color {
  background: rgba(148, 163, 184, 0.65);
}

.radar-svg-wrapper {
  max-width: 360px;
  margin: 0 auto;
}

.radar-chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.radar-polygon-candidate {
  transition: all 0.4s ease;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.radar-dot {
  cursor: pointer;
  transition: all 0.2s ease;
}

.radar-dot:hover {
  r: 6;
  fill: #ffffff;
  filter: drop-shadow(0 0 8px #f59e0b);
}

.radar-tip-note {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 10px;
  line-height: 1.35;
}

.radar-insights-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insights-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-strengths {
  color: #34d399;
}

.title-weaknesses {
  color: #f87171;
}

.insights-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radar-insight-card {
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.radar-insight-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-strength {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.06);
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  border-right: 1px solid rgba(16, 185, 129, 0.2);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.card-weakness {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.06);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  border-right: 1px solid rgba(239, 68, 68, 0.2);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.insight-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  flex: 1;
}

.insight-score-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.score-high {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.score-low {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.insight-meta {
  margin-top: 2px;
}

.insight-raw {
  font-size: 0.74rem;
  color: #94a3b8;
}

.insight-raw strong {
  color: #e2e8f0;
}

.insight-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 6px 0 0 0;
  line-height: 1.38;
}

.detail-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
}

.detail-footer-sources {
  font-size: 0.76rem;
  color: #94a3b8;
}

/* Responsividade do Modal de Detalhamento */
@media (max-width: 768px) {
  .modal-candidate-detail {
    padding: 16px;
    width: 98vw;
    max-height: 96vh;
  }

  .detail-hero-profile {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .detail-tags-row, .detail-chips-row {
    justify-content: center;
  }

  .radar-content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .detail-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .detail-switcher-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}



