* {
  box-sizing: border-box;
}

:root {
  --bg-deep: #050b16;
  --panel: rgba(7, 18, 33, 0.66);
  --panel-2: rgba(5, 14, 27, 0.74);
  --line: rgba(123, 232, 255, 0.18);
  --line-strong: rgba(124, 232, 255, 0.34);
  --text-main: #f2fcff;
  --text-soft: rgba(221, 242, 248, 0.82);
  --text-fade: rgba(201, 228, 236, 0.58);
  --cyan: #7aefff;
  --cyan-2: #32cfff;
  --blue: #2b8cff;
  --violet: #b99cff;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
  color: var(--text-main);
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(74, 210, 255, 0.10), transparent 20%),
    radial-gradient(circle at 80% 16%, rgba(145, 108, 255, 0.09), transparent 24%),
    radial-gradient(circle at 52% 74%, rgba(0, 194, 255, 0.08), transparent 22%),
    #050b16;
}

#mapa {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #091321;
}

.leaflet-container {
  background: #08111d !important;
}

.leaflet-tile {
  filter: saturate(0.92) contrast(1.02) brightness(0.80) hue-rotate(170deg);
}

.leaflet-control-container {
  display: none;
}

#luzCanvas,
.grade-luz,
.aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#luzCanvas {
  z-index: 4;
}

.grade-luz {
  z-index: 3;
  background:
    linear-gradient(rgba(125, 232, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 232, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.30));
  background-size: 34px 34px, 34px 34px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.48;
}

.aurora {
  z-index: 2;
  filter: blur(36px);
  opacity: 0.48;
}

.aurora-1 {
  background: radial-gradient(circle at 28% 54%, rgba(69, 208, 255, 0.26), transparent 24%);
}

.aurora-2 {
  background: radial-gradient(circle at 74% 22%, rgba(149, 104, 255, 0.18), transparent 20%);
}

.busca-viva {
  position: fixed;
  left: 20px;
  top: calc(20px + env(safe-area-inset-top));
  z-index: 20;
  width: min(320px, calc(100vw - 28px));
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 19, 35, 0.78), rgba(7, 17, 30, 0.64));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 0 22px rgba(50, 190, 255, 0.12);
}

.busca-viva:focus-within,
.painel-vivo:hover,
.botao-vivo:hover {
  border-color: var(--line-strong);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 0 26px rgba(70, 200, 255, 0.18);
}

.icone-busca {
  width: 16px;
  height: 16px;
  border: 1.8px solid rgba(198, 244, 255, 0.92);
  border-radius: 50%;
  position: relative;
  flex: 0 0 16px;
  filter: drop-shadow(0 0 8px rgba(96, 228, 255, 0.58));
}

.icone-busca::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.8px;
  right: -6px;
  bottom: -3px;
  background: rgba(198, 244, 255, 0.92);
  transform: rotate(45deg);
  border-radius: 99px;
}

.busca-viva input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.busca-viva input::placeholder {
  color: rgba(223, 241, 248, 0.52);
}

.busca-viva button {
  width: 44px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #f9feff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(60, 210, 255, 0.96), rgba(41, 117, 255, 0.94));
  box-shadow: 0 0 20px rgba(40, 145, 255, 0.34);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.busca-viva button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.painel-vivo {
  position: fixed;
  left: 20px;
  top: calc(88px + env(safe-area-inset-top));
  z-index: 18;
  width: min(330px, calc(100vw - 40px));
  padding: 14px 15px 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(8, 19, 35, 0.72), rgba(6, 14, 27, 0.60)),
    radial-gradient(circle at 100% 0%, rgba(78, 224, 255, 0.14), transparent 35%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 0 30px rgba(60, 200, 255, 0.14);
}

.painel-vivo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255,255,255,0.07), transparent 22%, transparent 76%, rgba(117, 232, 255, 0.08));
  opacity: 0.9;
}

.painel-topo {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.selo-luz {
  color: rgba(137, 241, 255, 0.92);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(56, 214, 255, 0.20);
}

.fonte {
  color: rgba(218, 239, 245, 0.56);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(134, 232, 255, 0.10);
  background: rgba(9, 20, 35, 0.22);
}

.painel-vivo h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 560;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: #f8fdff;
  text-shadow: 0 0 16px rgba(0, 194, 255, 0.14);
}

.painel-vivo p {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
  color: rgba(228, 243, 248, 0.80);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.linha-info {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.linha-info span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(189, 246, 255, 0.90);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: rgba(54, 188, 255, 0.08);
  border: 1px solid rgba(124, 232, 255, 0.12);
  box-shadow: 0 0 12px rgba(0, 182, 255, 0.04) inset;
}

.acoes-vivas {
  position: fixed;
  left: 20px;
  right: auto;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.botao-vivo {
  height: 42px;
  min-width: 0;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(127, 229, 255, 0.14);
  background: linear-gradient(180deg, rgba(7, 19, 35, 0.72), rgba(7, 16, 30, 0.56));
  color: rgba(246, 253, 255, 0.95);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255,255,255,0.015) inset,
    0 0 16px rgba(62, 188, 255, 0.07);
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.botao-vivo:hover,
.botao-vivo.ativo {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(9, 25, 42, 0.82), rgba(8, 22, 38, 0.70));
  filter: brightness(1.03);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.20),
    0 0 18px rgba(72, 200, 255, 0.11);
}

.botao-principal {
  background: linear-gradient(135deg, rgba(78, 225, 255, 0.88), rgba(47, 139, 255, 0.84));
  border-color: rgba(134, 233, 255, 0.22);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(50, 185, 255, 0.18);
}

.luz-icone {
  width: 10px;
  height: 10px;
  position: relative;
  border-radius: 50%;
  flex: 0 0 10px;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.luz-icone::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid currentColor;
  opacity: 0.42;
  animation: pulsoLuz 2s ease-out infinite;
}

.luz-icone.micro { color: #c7f9ff; }
.luz-icone.waze { color: #88f7ff; }
.luz-icone.maps { color: #abc9ff; }
.luz-icone.gps { color: #c5b8ff; }

.radar-vivo {
  position: fixed;
  right: 20px;
  top: calc(20px + env(safe-area-inset-top));
  z-index: 19;
  width: 146px;
  padding: 12px 13px;
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.72);
  border: 1px solid rgba(255, 207, 118, 0.20);
  box-shadow: 0 0 24px rgba(255, 189, 70, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(-140%);
  opacity: 0;
  transition: 0.28s ease;
  pointer-events: none;
}

.radar-vivo.ativo {
  transform: translateY(0);
  opacity: 1;
}

.radar-vivo strong {
  display: block;
  color: #ffd67a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  margin-bottom: 5px;
}

.radar-vivo span {
  color: rgba(255, 245, 220, 0.86);
  font-size: 12px;
}

.assinatura {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 18;
  text-align: center;
  color: rgba(215, 242, 248, 0.24);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  pointer-events: none;
}

.usuario-vivo {
  position: relative;
  width: 28px;
  height: 28px;
}

.usuario-vivo .anel {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(118, 240, 255, 0.32);
  border-radius: 50%;
  animation: pulsoLuz 1.8s ease-out infinite;
}

.usuario-vivo .nucleo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, #ffffff 0%, #8ef5ff 28%, #16a4ff 72%);
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow:
    0 0 24px rgba(0, 211, 255, 0.82),
    0 0 60px rgba(32, 129, 255, 0.24);
}

.destino-vivo {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: radial-gradient(circle, #fff 0%, #ffc1e0 20%, #ff5ea4 76%);
  border: 2px solid rgba(255,255,255,0.92);
  box-shadow:
    0 0 22px rgba(255, 86, 164, 0.72),
    0 0 48px rgba(255, 86, 164, 0.20);
}

@keyframes pulsoLuz {
  0% {
    transform: scale(0.55);
    opacity: 0.75;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .busca-viva {
    left: 14px;
    right: 14px;
    top: calc(14px + env(safe-area-inset-top));
    width: auto;
   height: 46px;
  }

  .painel-vivo {
    left: 14px;
    right: 14px;
    top: calc(78px + env(safe-area-inset-top));
    width: auto;
    padding: 14px 14px 14px;
  }

  .painel-vivo h1 {
    font-size: 18px;
  }

  .painel-vivo p {
    font-size: 12px;
  }

  .radar-vivo {
    right: 14px;
    top: calc(196px + env(safe-area-inset-top));
    width: 136px;
  }

  .acoes-vivas {
    left: 14px;
    right: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  .botao-vivo {
    flex: 0 0 auto;
    min-width: 0;
    height: 40px;
    font-size: 12px;
    padding: 0 12px;
    gap: 7px;
  }

  .assinatura {
    bottom: calc(118px + env(safe-area-inset-bottom));
    font-size: 9px;
    letter-spacing: 0.22em;
  }
}


.acoes-vivas {
  overflow-x: auto;
  scrollbar-width: none;
}
.acoes-vivas::-webkit-scrollbar { display:none; }
.botao-vivo span:last-child {
  position: relative;
  top: -0.5px;
}
.painel-vivo::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 21px;
  pointer-events: none;
  box-shadow: inset 0 0 24px rgba(90, 220, 255, 0.03);
}


.camada-toggle {
  border: 1px solid rgba(134, 232, 255, 0.14);
  cursor: pointer;
  font-family: inherit;
}

.camada-toggle.ativo {
  color: #ffffff;
  border-color: rgba(134, 232, 255, 0.34);
  background: rgba(47, 139, 255, 0.30);
  box-shadow: 0 0 16px rgba(66, 205, 255, 0.16);
}
#btnWaze,
#btnMaps,
#btnGps {
  display: none !important;
}
