:root { --margem: 24px; --fundo: #040a14; --texto: #e9f0fa; --suave: #8fa3bd; --amarelo: #f5c832; --ciano: #6fd3f2; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fundo); color: var(--texto); font-family: -apple-system, "Helvetica Neue", "Segoe UI", Roboto, sans-serif; overflow: hidden; }
#mapa { position: fixed; inset: 0; background: var(--fundo); }
#raios { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; }
.leaflet-container { background: var(--fundo); font: inherit; }
.leaflet-control-attribution { display: none; }
.leaflet-control-zoom { margin: 0 0 96px var(--margem) !important; border: 1px solid #23344d !important; }
.leaflet-control-zoom a { background: #0b1626; color: var(--texto); border-color: #23344d !important; }
.leaflet-control-zoom a:hover { background: #14243a; color: #fff; }
.leaflet-image-layer { image-rendering: auto; }

.topo, .relogio, .rodape, .painel, .creditos, .abrir-painel { position: fixed; z-index: 1000; }
.topo { top: 18px; left: var(--margem); right: 240px; pointer-events: none; text-shadow: 0 1px 6px #000c; }
.marca { color: var(--ciano); font-size: 12px; letter-spacing: 4px; font-weight: 700; }
h1 { margin: 4px 0 6px; font-size: clamp(20px, 2.6vw, 36px); font-weight: 500; line-height: 1.15; }
.selo { display: inline-block; vertical-align: middle; border: 1px solid var(--amarelo); color: var(--amarelo); font-size: 11px; letter-spacing: 2px; padding: 2px 8px; border-radius: 3px; font-weight: 700; }
.fontes { font-size: 12px; letter-spacing: 2.5px; color: var(--suave); font-weight: 600; }
.fontes b { color: var(--amarelo); font-weight: 700; }
.fontes .falha { color: #ff7b6b; }
.ponto { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; margin-right: 6px; animation: pisca 1.6s infinite; }
@keyframes pisca { 50% { opacity: .25; } }

.relogio { top: 18px; right: var(--margem); text-align: right; pointer-events: none; text-shadow: 0 1px 6px #000c; }
.hora { font: 300 44px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 2px; }
.hora small { font-size: 18px; color: var(--suave); margin-left: 4px; }
.data { font-size: 12px; letter-spacing: 2px; color: var(--suave); margin-top: 6px; font-weight: 600; }

.painel { top: 108px; right: var(--margem); width: 300px; max-height: calc(100vh - 230px); overflow: auto; background: #08121fe6; border: 1px solid #1c2c44; border-radius: 10px; padding: 14px 16px; backdrop-filter: blur(6px); }
.painel h2 { margin: 0 0 8px; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ciano); }
.painel section + section { margin-top: 16px; border-top: 1px solid #1c2c44; padding-top: 14px; }
.painel label { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 5px 0; cursor: pointer; }
.painel input { accent-color: var(--ciano); width: 16px; height: 16px; }
.botao { margin-top: 8px; width: 100%; background: #12233a; color: var(--texto); border: 1px solid #2a4263; border-radius: 6px; padding: 9px; font-size: 14px; cursor: pointer; }
.botao:hover { background: #1a3050; }
.conta { background: var(--amarelo); color: #111; border-radius: 9px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.lista-avisos { display: flex; flex-direction: column; gap: 8px; }
.aviso { border-left: 4px solid var(--cor, #f5c832); background: #0e1b2d; border-radius: 4px; padding: 8px 10px; cursor: pointer; }
.aviso:hover { background: #142640; }
.aviso strong { display: block; font-size: 14px; }
.aviso span { display: block; font-size: 12px; color: var(--suave); margin-top: 2px; }
.vazio { color: var(--suave); font-size: 13px; margin: 0; }
.abrir-painel { display: none; }

.rodape { left: var(--margem); right: var(--margem); bottom: 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid #1f3350; padding-top: 12px; pointer-events: none; text-shadow: 0 1px 6px #000c; }
.legenda { display: flex; align-items: center; gap: 10px; font: 13px ui-monospace, "SF Mono", Menlo, monospace; color: var(--suave); flex-wrap: wrap; }
.legenda b { color: var(--texto); font-family: -apple-system, sans-serif; font-size: 15px; }
.barra { width: 240px; height: 9px; border-radius: 2px; }
.amostra-raio { width: 30px; height: 30px; border-radius: 50%; margin-left: 18px; background: radial-gradient(circle, #fff 0 28%, #ff5fd2 46%, #ff5fd200 72%); }
.severas { color: var(--amarelo); font-size: 15px; font-weight: 600; white-space: nowrap; }
.creditos { left: var(--margem); right: var(--margem); bottom: 8px; font-size: 10px; color: #5d7190; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cidade { color: #dfe8f5; font-size: 12px; font-weight: 600; white-space: nowrap; text-shadow: 0 0 4px #000, 0 0 2px #000; display: flex; align-items: center; gap: 5px; }
.cidade i { width: 5px; height: 5px; border-radius: 50%; background: #fff; flex: none; }
.seta svg { overflow: visible; filter: drop-shadow(0 0 3px #000); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0b1626; color: var(--texto); border: 1px solid #23344d; }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.45; max-height: 260px; overflow: auto; }
.leaflet-popup-content h3 { margin: 0 0 6px; font-size: 15px; }
.leaflet-popup-content .obs { color: var(--suave); font-size: 11px; margin-top: 8px; }

@media (max-width: 800px) {
  :root { --margem: 12px; }
  .topo { right: 110px; top: 12px; }
  .marca { font-size: 10px; letter-spacing: 3px; }
  .fontes { font-size: 9px; letter-spacing: 1px; }
  .relogio { top: 12px; }
  .hora { font-size: 24px; } .hora small { font-size: 12px; }
  .data { font-size: 9px; letter-spacing: 1px; }
  .painel { display: none; top: auto; bottom: 150px; width: auto; left: var(--margem); max-height: 55vh; }
  .painel.aberto { display: block; }
  .abrir-painel { display: block; right: var(--margem); bottom: 108px; background: #12233a; color: var(--texto); border: 1px solid #2a4263; border-radius: 20px; padding: 9px 14px; font-size: 13px; }
  .rodape { flex-direction: column; align-items: flex-start; gap: 6px; bottom: 26px; }
  .barra { width: 120px; } .dica { display: none; } .amostra-raio { width: 20px; height: 20px; margin-left: 6px; }
  .severas { font-size: 13px; }
  .leaflet-control-zoom { display: none; }
}
