/* Layout base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #02030a;
  color: #f5f5f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 16px;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.controls {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.map-container {
  position: relative;
  max-width: 1000px;
  border: 1px solid #333;
  margin-bottom: 24px;
}

.map-image {
  display: block;
  width: 100%;
  height: auto;
}

.faction-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #444;
  background: #111;
  color: #f5f5f5;
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.faction-btn.active {
  background: #c41e3a;
  box-shadow: 0 0 12px rgba(196, 30, 58, 0.8);
  transform: translateY(-1px);
}



/* Marcador genérico */
.marker {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
  /* Permite hover para tooltips */
  transition: transform 0.3s;
}

.marker:hover {
  transform: scale(1.5);
  z-index: 20;
}

/* Tooltip customizado */
.marker::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--accent-imperium, #c41e3a);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

.marker:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Escondido via JS */
.marker.hidden {
  display: none;
}

/* ===================== */
/* Imperium */
/* ===================== */

.marker-imperium {
  background: #fff7c0;
  border: 2px solid #ffec6b;
  box-shadow:
    0 0 12px 6px rgba(255, 255, 180, 0.95),
    0 0 30px 12px rgba(255, 220, 100, 0.9),
    0 0 60px 20px rgba(255, 180, 50, 0.85);
  animation: pulseImperium 1s ease-in-out infinite;
}

.marker-imperium.p1 {
  top: 49.2%;
  left: 26.1%;
}

.marker-imperium.p2 {
  top: 57.8%;
  left: 36.5%;
}

.marker-imperium.p3 {
  top: 37.9%;
  left: 31.4%;
}

.marker-imperium.p4 {
  top: 59.4%;
  left: 17.9%;
}

.marker-imperium.p5 {
  top: 45.4%;
  left: 61.3%;
}

.marker-imperium.p6 {
  top: 80.3%;
  left: 55.2%;
}

.marker-imperium.p7 {
  top: 36.6%;
  left: 41.4%;
}

.marker-imperium.p8 {
  top: 77.8%;
  left: 68.7%;
}

.marker-imperium.p9 {
  top: 79.0%;
  left: 41.3%;
}

.marker-imperium.p10 {
  top: 17.8%;
  left: 48.6%;
}

@keyframes pulseImperium {
  0% {
    box-shadow: 0 0 10px rgba(255, 255, 180, 0.8);
  }

  50% {
    box-shadow: 0 0 25px rgba(255, 255, 180, 1);
  }

  100% {
    box-shadow: 0 0 10px rgba(255, 255, 180, 0.8);
  }
}

/* ===================== */
/* Chaos */
/* ===================== */

.marker-chaos {
  background: #ff4b4b;
  border: 2px solid #ff1a1a;
  box-shadow:
    0 0 10px 4px rgba(255, 80, 80, 0.9),
    0 0 26px 10px rgba(255, 0, 0, 0.8),
    0 0 40px 16px rgba(120, 0, 0, 0.9);
  animation: pulseChaos 1.3s ease-in-out infinite;
}

.marker-chaos.c1 {
  top: 32.9%;
  left: 19.0%;
}

.marker-chaos.c2 {
  top: 15.2%;
  left: 16.9%;
}

.marker-chaos.c3 {
  top: 21.3%;
  left: 37.1%;
}

.marker-chaos.c4 {
  top: 70.4%;
  left: 73.1%;
}

.marker-chaos.c5 {
  top: 10.8%;
  left: 65.1%;
}

.marker-chaos.c6 {
  top: 33.5%;
  left: 75.5%;
}

@keyframes pulseChaos {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.7);
    opacity: 0.4;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================== */
/* T'au */
/* ===================== */

.marker-tau {
  background: #7ffcff;
  border: 2px solid #3be0ff;
  box-shadow:
    0 0 10px 4px rgba(123, 243, 255, 0.9),
    0 0 26px 10px rgba(0, 200, 255, 0.8),
    0 0 40px 16px rgba(0, 80, 120, 0.9);
  animation: pulseTau 1.4s ease-in-out infinite;
}

.marker-tau.t1 {
  top: 55.5%;
  left: 15.7%;
}

.marker-tau.t2 {
  top: 71.0%;
  left: 21.6%;
}

.marker-tau.t3 {
  top: 25.5%;
  left: 57.7%;
}

.marker-tau.t4 {
  top: 75.9%;
  left: 18.0%;
}

.marker-tau.t5 {
  top: 77.1%;
  left: 54.1%;
}

.marker-tau.t6 {
  top: 29.5%;
  left: 67.7%;
}

@keyframes pulseTau {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.4;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================== */
/* Orks */
/* ===================== */

.marker-ork {
  background: #7bff4b;
  border: 2px solid #4cff1a;
  box-shadow:
    0 0 10px 4px rgba(120, 255, 75, 0.9),
    0 0 26px 10px rgba(80, 200, 40, 0.85),
    0 0 40px 16px rgba(0, 80, 0, 0.9);
  animation: pulseOrk 1.2s ease-in-out infinite;
}

.marker-ork.o1 {
  top: 33.3%;
  left: 52.2%;
}

.marker-ork.o2 {
  top: 71.2%;
  left: 41.4%;
}

.marker-ork.o3 {
  top: 49.4%;
  left: 10.3%;
}

.marker-ork.o4 {
  top: 16.5%;
  left: 38.9%;
}

.marker-ork.o5 {
  top: 31.2%;
  left: 76.8%;
}

.marker-ork.o6 {
  top: 33.6%;
  left: 52.0%;
}

@keyframes pulseOrk {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.6);
    opacity: 0.4;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================== */
/* Aeldari */
/* ===================== */

.marker-aeldari {
  background: #f28bff;
  border: 2px solid #e54bff;
  box-shadow:
    0 0 10px 4px rgba(242, 139, 255, 0.9),
    0 0 26px 10px rgba(210, 80, 255, 0.85),
    0 0 40px 16px rgba(80, 0, 120, 0.9);
  animation: pulseAeldari 1.5s ease-in-out infinite;
}

.marker-aeldari.e1 {
  top: 24.5%;
  left: 40.5%;
}

.marker-aeldari.e2 {
  top: 51.9%;
  left: 74.3%;
}

.marker-aeldari.e3 {
  top: 74.8%;
  left: 23.0%;
}

.marker-aeldari.e4 {
  top: 42.5%;
  left: 12.9%;
}

.marker-aeldari.e5 {
  top: 21.4%;
  left: 60.1%;
}

@keyframes pulseAeldari {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.4;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.map-base {
  width: 80%;
  max-width: 900px;
  height: 6px;
  margin: 8px auto 12px;
  background: linear-gradient(90deg, #444, #c41e3a, #444);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
  border-radius: 999px;
}

/* Container da seção do mapa na página principal */
#mapa-galaxia {
  max-width: 1200px;
  margin: 40px auto;
  /* centraliza horizontalmente */
  padding: 16px 20px 24px;
  background: rgba(5, 8, 20, 0.95);
  border-radius: 8px;
  border: 1px solid #444;
  box-shadow:
    0 0 25px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 0, 0, 0.6);
}

#mapa-galaxia h2 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  text-align: center;
}

/* alinhamento dos checkboxes */
#mapa-galaxia .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-bottom: 12px;
}

#mapa-galaxia .controls label {
  font-size: 0.9rem;
}

/* centra o mapa dentro da seção */
#mapa-galaxia .map-container {
  margin: 0 auto;
}

/* nota explicativa embaixo */
.map-note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #bbbbbb;
  text-align: center;
}

/* ===================== */
/* Tyranids (gancho) */
/* ===================== */

.marker-tyranid {
  /* depois vamos trocar por linhas/trilhas animadas */
}