/* ============================================================================
   BUS CALL - ESTILOS PRINCIPAIS
   Design fiel inspirado em https://tour.renanpresidente.com.br/
   ============================================================================ */

:root {
  --home-blue: #087fa4;
  --home-deep: #075b7a;
  --home-yellow: #ffd344;
  --tour-cream: #fffbed;
  --tour-paper: #fffdf4;
  --tour-ink: #16475b;
  --tour-muted: #466573;
  --color-red: #e53e3e;
  --color-blue: #2b6cb0;
  --color-yellow: #ecc94b;
  --font-sans: 'Barlow Condensed', sans-serif;
  --font-display: 'Anton', 'Londrina Solid', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(ellipse at 10% 0%, #1499bb 0, transparent 55%), var(--home-blue);
  color: var(--tour-cream);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Textura Paper-Grain Idêntica ao Site Original */
.paper-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

/* Cabeçalho */
.tour-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--tour-cream);
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

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

.brand-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 0.9;
  letter-spacing: 0.05em;
  color: #fff;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--home-yellow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

/* Botão Ao Vivo com Indicador Vermelho Pulsante */
.live-button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  padding: 8px 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.live-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #ff3b30;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  animation: pulse-ring 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 59, 48, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--tour-cream);
  cursor: pointer;
  transition: background-color 0.15s;
}

.sound-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Área Principal do Jogo (Stage estilo Mapa do Tour) */
.main-content {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 10px auto 24px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-stage-wrapper {
  background: var(--tour-paper);
  border: 2px solid #fff9e6;
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(3, 69, 96, 0.35);
  position: relative;
  overflow: hidden;
  color: var(--tour-ink);
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

/* Barra de Status do Ônibus (no topo da janela do jogo) */
.stage-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(22, 71, 91, 0.05);
  border-bottom: 1px solid rgba(22, 71, 91, 0.12);
}

.bus-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(22, 71, 91, 0.2);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tour-ink);
  box-shadow: 0 1px 4px rgba(22, 71, 91, 0.08);
}

.bus-status-badge svg {
  color: var(--home-blue);
}

.passenger-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tour-ink);
}

.passenger-badge-active img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--home-yellow);
}

/* HUD DE VOTAÇÃO (3 BARRAS) */
.hud-polling-container {
  padding: 8px 16px 6px;
  background: #fff;
  border-bottom: 1px solid rgba(22, 71, 91, 0.12);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hud-polling-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tour-muted);
  gap: 12px;
  flex-wrap: wrap;
}

.hud-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-meta-badge {
  background: rgba(22, 71, 91, 0.08);
  color: var(--home-blue);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}



@keyframes timer-pulse {
  from { transform: scale(1); box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
  to { transform: scale(1.06); box-shadow: 0 0 14px rgba(239, 68, 68, 0.8); }
}

.polling-bars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
}

.poll-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.poll-label-val {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.poll-bar-track {
  height: 14px;
  background: #e2e8f0;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.poll-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.25s ease-out;
}

.fill-red {
  background: linear-gradient(90deg, #e53e3e, #c53030);
}

.fill-blue {
  background: linear-gradient(90deg, #3182ce, #2b6cb0);
}

.fill-yellow {
  background: linear-gradient(90deg, #ecc94b, #d69e2e);
  box-shadow: 0 0 8px rgba(236, 201, 75, 0.6);
}

/* ==================== TELAS INTERNAS DO JOGO ==================== */

/* 1. TELA INICIAL (SPLASH SCREEN) */
.screen-splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, #fef3c7 0%, var(--tour-paper) 70%);
  position: relative;
}

.splash-road {
  width: 100%;
  max-width: 460px;
  height: 140px;
  background: #2d3748;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.4), 0 8px 20px rgba(0,0,0,0.1);
  margin-bottom: 24px;
}

.splash-road-lines {
  position: absolute;
  width: 200%;
  height: 4px;
  background: repeating-linear-gradient(90deg, #ecc94b 0px, #ecc94b 28px, transparent 28px, transparent 56px);
  animation: road-scroll 1.2s linear infinite;
}

@keyframes road-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-56px); }
}

.splash-animated-bus {
  position: relative;
  z-index: 2;
  width: 150px;
  animation: bus-bounce 1s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.3));
}

@keyframes bus-bounce {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-7px) rotate(-1deg); }
}

.splash-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 76px);
  color: var(--tour-ink);
  line-height: 0.95;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.splash-subtitle {
  font-size: clamp(17px, 2.5vw, 22px);
  color: var(--tour-muted);
  max-width: 540px;
  margin-bottom: 26px;
  font-weight: 600;
}

.btn-start-journey {
  background: var(--home-yellow);
  color: #123f55;
  border: 1px solid #ffe596;
  border-radius: 14px;
  padding: 16px 36px;
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 0 #b78a02, 0 10px 20px rgba(255, 207, 50, 0.4);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.btn-start-journey:hover {
  background: #ffe170;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #b78a02, 0 12px 24px rgba(255, 207, 50, 0.5);
}

.btn-start-journey:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b78a02;
}

/* 2. TELA DE SELEÇÃO DE PASSAGEIROS */
.screen-passenger-select {
  flex: 1;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.selection-header {
  text-align: center;
  margin-bottom: 24px;
}

.selection-header h2 {
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--tour-ink);
  text-transform: uppercase;
  line-height: 1;
}

.selection-header p {
  color: var(--tour-muted);
  font-size: 18px;
  margin-top: 6px;
}

.passengers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  max-height: 400px;
  overflow-y: auto;
  padding: 6px;
}

.passenger-card {
  background: #fff;
  border: 2px solid rgba(22, 71, 91, 0.15);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.passenger-card:hover {
  border-color: var(--home-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(8, 127, 164, 0.18);
}

.passenger-card.selected {
  border-color: var(--home-yellow);
  background: #fffdf0;
  box-shadow: 0 0 0 3px var(--home-yellow);
}

.passenger-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--tour-ink);
  line-height: 1.1;
}

.diff-badge {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}

.diff-facil {
  background: #c6f6d5;
  color: #22543d;
}

.diff-medio {
  background: #feebc8;
  color: #7b341e;
}

.diff-dificil {
  background: #fed7d7;
  color: #742a2a;
}

.diff-extrema {
  background: #e9d8fd;
  color: #44337a;
  box-shadow: 0 0 8px rgba(159, 122, 234, 0.4);
}

.selection-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* 3. TELA DO CANVAS DO JOGO */
.screen-game-canvas {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a2332;
  height: clamp(480px, 62vh, 600px);
  min-height: 460px;
  padding: 0;
  overflow: hidden;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

#gameCanvas {
  background: #1e293b;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Timer do Dia da Eleição Flutuante no Palco */
.canvas-election-timer {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.94);
  color: #fff;
  padding: 6px 18px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  z-index: 15;
  animation: timer-slide-down 0.4s ease-out;
}

.canvas-election-timer .timer-icon {
  font-size: 16px;
}

.canvas-election-timer .timer-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  font-weight: 800;
}

.canvas-election-timer .timer-digits {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.05em;
  color: #ffd344;
  line-height: 1;
}

.canvas-election-timer.timer-urgent {
  background: rgba(185, 28, 28, 0.95);
  border-color: #ef4444;
  animation: timer-pulse 0.7s infinite alternate ease-in-out;
}

.canvas-election-timer.timer-urgent .timer-digits {
  color: #ffffff;
}

@keyframes timer-slide-down {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Alerta da Primeira Cebola (substitui o timer no palco por ~6 segundos) */
.canvas-onion-alert {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(197, 48, 48, 0.95);
  color: #fff;
  padding: 8px 22px;
  border-radius: 9999px;
  box-shadow: 0 4px 18px rgba(197, 48, 48, 0.5);
  border: 2px solid #fed7d7;
  backdrop-filter: blur(4px);
  z-index: 16;
  animation: timer-slide-down 0.3s ease-out, onion-pulse 0.75s infinite alternate ease-in-out;
}

.canvas-onion-alert .alert-icon {
  font-size: 18px;
}

.canvas-onion-alert .alert-text {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

@keyframes onion-pulse {
  from {
    transform: translateX(-50%) scale(0.97);
    box-shadow: 0 4px 14px rgba(197, 48, 48, 0.4);
  }
  to {
    transform: translateX(-50%) scale(1.04);
    box-shadow: 0 6px 22px rgba(229, 62, 62, 0.7);
  }
}

/* Controles Touch / Mobile: D-Pad / Joystick Translúcido (Estilo Minecraft Pocket Edition) */
.virtual-dpad-overlay {
  display: none;
  position: absolute;
  bottom: 24px;
  left: 20px;
  width: 170px;
  height: 170px;
  z-index: 25;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.virtual-dpad-overlay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
}

.dpad-touch-btn {
  background: rgba(15, 23, 42, 0.42);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  touch-action: none;
  transition: background-color 0.08s, transform 0.08s, color 0.08s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.dpad-touch-btn:active,
.dpad-touch-btn.active {
  background: rgba(255, 211, 68, 0.65);
  border-color: #ffd344;
  color: #123f55;
  transform: scale(0.92);
  box-shadow: 0 0 12px rgba(255, 211, 68, 0.6);
}

.dpad-center-hub {
  grid-column: 2;
  grid-row: 2;
  background: rgba(15, 23, 42, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.dpad-up { grid-column: 2; grid-row: 1; border-radius: 14px 14px 6px 6px; }
.dpad-left { grid-column: 1; grid-row: 2; border-radius: 14px 6px 6px 14px; }
.dpad-right { grid-column: 3; grid-row: 2; border-radius: 6px 14px 14px 6px; }
.dpad-down { grid-column: 2; grid-row: 3; border-radius: 6px 6px 14px 14px; }

/* 4. TELA DE GAME OVER: O CARIMBO "FAXISTA!" (ESTILO BUSTED GTA) */
.faxista-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  backdrop-filter: blur(4px);
  padding: 20px;
}

.faxista-stamp {
  font-family: var(--font-display);
  font-size: clamp(60px, 12vw, 110px);
  color: #ff1a1a;
  border: 8px solid #ff1a1a;
  padding: 6px 30px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-12deg) scale(2);
  opacity: 0;
  border-radius: 12px;
  text-shadow: 0 0 15px rgba(255, 26, 26, 0.6);
  box-shadow: 0 0 20px rgba(255, 26, 26, 0.5), inset 0 0 20px rgba(255, 26, 26, 0.3);
  animation: stamp-slam 0.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes stamp-slam {
  0% {
    transform: rotate(-18deg) scale(3.5);
    opacity: 0;
  }
  70% {
    transform: rotate(-10deg) scale(0.92);
    opacity: 1;
  }
  100% {
    transform: rotate(-12deg) scale(1);
    opacity: 1;
  }
}

.screen-shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

.faxista-subtext {
  color: #fff;
  font-size: clamp(17px, 2.5vw, 22px);
  font-weight: 600;
  margin-top: 24px;
  text-align: center;
  max-width: 480px;
}

.faxista-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

/* Overlay de Derrota nas Urnas (Tempo Esgotado) */
.election-loss-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  backdrop-filter: blur(5px);
  padding: 20px;
}

.election-loss-card {
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  animation: pop-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pop-in {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.loss-ballot-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
}

.loss-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 44px);
  color: #b91c1c;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.loss-subtext {
  font-size: 16px;
  color: var(--tour-muted);
  font-weight: 600;
  margin-bottom: 18px;
}

.loss-score-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.loss-score-pill {
  padding: 10px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loss-score-pill .pill-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.loss-score-pill strong {
  font-family: var(--font-display);
  font-size: 22px;
}

.loss-score-pill.user-score {
  background: #fefce8;
  border-color: #fef08a;
}
.loss-score-pill.user-score strong {
  color: #ca8a04;
}

.loss-score-pill.red-score strong {
  color: #dc2626;
}

.loss-score-pill.blue-score strong {
  color: #2563eb;
}

.loss-encouragement {
  font-size: 14px;
  color: var(--tour-ink);
  background: rgba(22, 71, 91, 0.05);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* 5. TELA DE VITÓRIA */
.screen-victory {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, #fef9c3 0%, var(--tour-paper) 70%);
}

.victory-badge {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  color: #b7791f;
  line-height: 1;
  text-transform: uppercase;
}

.victory-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  color: var(--tour-ink);
  line-height: 1;
  margin-top: 8px;
}

.victory-stats {
  background: #fff;
  border: 1px solid rgba(22, 71, 91, 0.15);
  border-radius: 12px;
  padding: 12px 24px;
  margin: 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--home-deep);
}

.victory-form {
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--tour-ink);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(22, 71, 91, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--tour-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group select {
  cursor: pointer;
  appearance: auto;
  text-overflow: ellipsis;
  background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--home-blue);
  box-shadow: 0 0 0 2px rgba(8, 127, 164, 0.2);
}

.form-group textarea {
  resize: none;
  height: 80px;
}

.required-star {
  color: #e53e3e;
  font-weight: 900;
}

/* Card de Intenção de Voto Obrigatória no Formulário de Vitória */
.votes-form-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.votes-card-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--home-deep);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.vote-state-group {
  background: #eef7fb;
  border: 1.5px solid #bce1f1;
  border-radius: 10px;
  padding: 10px 12px;
}

.vote-state-group label {
  color: var(--home-deep);
  font-weight: 800;
}

.vote-state-group select {
  font-weight: 700;
  border-color: #92cae6;
  background-color: #ffffff;
}

.votes-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .votes-fields-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== SEÇÃO DO RANKING (LEADERBOARD) ==================== */
.ranking-section {
  background: var(--tour-paper);
  border: 2px solid #fff9e6;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(3, 69, 96, 0.35);
  padding: 24px;
  color: var(--tour-ink);
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(22, 71, 91, 0.12);
  padding-bottom: 14px;
}

.ranking-title-wrap h3 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--tour-ink);
}

.ranking-title-wrap p {
  color: var(--tour-muted);
  font-size: 15px;
  margin-top: 2px;
}

.ranking-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ranking-filters select {
  background: #fff;
  border: 1px solid rgba(22, 71, 91, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--tour-ink);
  outline: none;
}

/* Abas dos Rankings Individuais dos Candidatos */
.ranking-candidate-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--home-yellow) #e2e8f0;
}

.ranking-candidate-tabs::-webkit-scrollbar {
  height: 6px;
}

.ranking-candidate-tabs::-webkit-scrollbar-thumb {
  background: var(--home-yellow);
  border-radius: 3px;
}

.ranking-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #cbd5e0;
  border-radius: 12px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--tour-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ranking-tab-btn:hover {
  border-color: var(--home-blue);
  background: #f8fafc;
  transform: translateY(-1px);
}

.ranking-tab-btn.active {
  background: var(--tour-ink);
  color: #fff;
  border-color: var(--tour-ink);
  box-shadow: 0 4px 12px rgba(22, 71, 91, 0.25);
}

.ranking-tab-btn .tab-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.ranking-tab-btn.active .tab-badge {
  background: var(--home-yellow);
  color: #123f55;
}

.ranking-selected-candidate-info {
  background: rgba(22, 71, 91, 0.05);
  border-left: 4px solid var(--home-yellow);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--tour-ink);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking-card {
  background: #fff;
  border: 1px solid rgba(22, 71, 91, 0.12);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.15s ease;
}

.ranking-card:hover {
  border-color: rgba(22, 71, 91, 0.28);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ranking-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.ranking-pos {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--home-blue);
  min-width: 32px;
  text-align: center;
}

.ranking-pos.gold { color: #d69e2e; }
.ranking-pos.silver { color: #718096; }
.ranking-pos.bronze { color: #b7791f; }

.ranking-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ranking-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ranking-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--tour-ink);
}

.ranking-target {
  font-size: 13px;
  font-weight: 600;
  color: var(--tour-muted);
}

.ranking-message {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.35;
  font-style: italic;
  overflow-wrap: break-word;
}

/* Votos Declarados no Cartão do Ranking */
.ranking-declared-votes {
  margin-top: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.declared-votes-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vote-pill {
  background: #fff;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--tour-ink);
  white-space: nowrap;
}

.vote-pill .pill-cargo {
  color: var(--home-blue);
  font-weight: 800;
  margin-right: 3px;
}

.vote-pill.uf-pill {
  background: var(--home-yellow);
  color: #123f55;
  border-color: #d69e2e;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.vote-pill.muted-pill {
  color: #718096;
  background: #f1f5f9;
  border-color: #e2e8f0;
  font-style: italic;
}

.ranking-card.highlight-card {
  border-color: var(--home-yellow);
  background: #fffdf5;
  box-shadow: 0 0 0 2px rgba(255, 211, 68, 0.4);
}

.ranking-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.ranking-score {
  font-family: var(--font-display);
  font-size: 24px;
  color: #2b6cb0;
  line-height: 1;
}

.ranking-populars {
  font-size: 12px;
  color: var(--tour-muted);
}

/* ==================== RODAPÉ ==================== */
.tour-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 18px 24px;
  text-align: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-discreet {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
}

.admin-secret-trigger {
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 4px;
  transition: color 0.2s;
}

.admin-secret-trigger:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ==================== MODAL DE ADMINISTRAÇÃO ==================== */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}

.admin-modal-card {
  background: var(--tour-paper);
  border: 2px solid #fff9e6;
  border-radius: 20px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  color: var(--tour-ink);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(22, 71, 91, 0.15);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.admin-modal-header h3 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--tour-ink);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--tour-muted);
  cursor: pointer;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(22, 71, 91, 0.12);
  padding-bottom: 8px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--tour-muted);
  border-radius: 6px;
  cursor: pointer;
}

.admin-tab-btn.active {
  background: var(--tour-ink);
  color: #fff;
}

/* Banner de Jogador Bloqueado até a Próxima Cidade */
.player-blocked-banner {
  background: #fffbeb;
  border: 2px solid #fde68a;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0 16px;
  text-align: center;
  color: #92400e;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeIn 0.3s ease;
}

.player-blocked-banner strong {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.player-blocked-banner p {
  font-size: 14px;
  color: #78350f;
  margin: 0;
  line-height: 1.4;
}

/* Caixa de Controle de Parada da Caravana no Admin */
.admin-round-box {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .tour-header {
    padding: 10px 14px;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
  }
  .brand-title {
    font-size: 24px;
  }
  .live-button {
    padding: 6px 10px;
    font-size: 13px;
  }
  .main-content {
    padding: 0 8px;
    margin: 6px auto 16px;
    gap: 12px;
  }
  .game-stage-wrapper {
    border-radius: 16px;
    min-height: 540px;
    box-shadow: 0 8px 24px rgba(3, 69, 96, 0.28);
  }
  .screen-game-canvas {
    height: clamp(520px, 75vh, 680px);
    min-height: 520px;
    border-radius: 12px;
  }
  .hud-polling-container {
    padding: 6px 12px 6px;
  }
  .polling-bars-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  /* Exibe o D-Pad Translúcido estilo Minecraft sobre o canvas no celular */
  .virtual-dpad-overlay {
    display: grid !important;
  }
  /* Remove o D-pad separado antigo que ficava fora do jogo */
  .mobile-controls {
    display: none !important;
  }
  .ranking-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .ranking-right {
    align-items: flex-start;
    margin-top: 6px;
  }
}
