:root {
  --bg-0: #03060d;
  --bg-1: #060b1a;
  --ink: #e8f1ff;
  --ink-dim: #6b7a99;
  --accent: #00ffd1;
  --accent-2: #ff2e7e;
  --accent-3: #ffcc00;
  --grid: rgba(0, 255, 209, 0.08);
}

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

html, body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  overflow-x: hidden;
  min-height: 100vh;
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 255, 209, 0.12), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(255, 46, 126, 0.10), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ HEADER ============ */
header.site-header {
  position: relative;
  z-index: 10;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 255, 209, 0.15);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 56px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 16px rgba(0, 255, 209, 0.18));
  transition: filter 0.3s, transform 0.3s;
}

.logo:hover .logo-img {
  filter: drop-shadow(0 0 24px rgba(0, 255, 209, 0.45));
  transform: translateY(-1px);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.header-meta {
  display: flex;
  gap: 28px;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
}

.header-meta span b {
  color: var(--accent);
  font-weight: 500;
}

/* ============ AD SLOTS ============ */
.ad-slot {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  background: rgba(6, 11, 26, 0.4);
  border: 1px dashed rgba(0, 255, 209, 0.15);
  position: relative;
  z-index: 5;
  overflow: hidden;
}

.ad-slot::before {
  content: 'PUBLICIDADE';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  opacity: 0.6;
}

.ad-top { min-height: 90px; padding: 18px 12px 8px; max-width: 970px; }
.ad-mid { min-height: 250px; padding: 24px 12px 12px; max-width: 970px; margin: 32px auto; }
.ad-bottom { min-height: 280px; padding: 24px 12px 12px; max-width: 970px; margin: 32px auto; }

/* Placeholder visual quando AdSense ainda não está configurado */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.3em;
}
.ad-mid .ad-placeholder, .ad-bottom .ad-placeholder { height: 250px; }

/* ============ MAIN APP ============ */
main.app {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  min-height: calc(100vh - 70px);
}

/* ============ GLOBE STAGE ============ */
.stage {
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(0, 255, 209, 0.12);
  min-height: 600px;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.stage-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  opacity: 0.5;
}
.stage-corner.tl { top: 24px; left: 24px; border-right: none; border-bottom: none; }
.stage-corner.tr { top: 24px; right: 24px; border-left: none; border-bottom: none; }
.stage-corner.bl { bottom: 24px; left: 24px; border-right: none; border-top: none; }
.stage-corner.br { bottom: 24px; right: 24px; border-left: none; border-top: none; }

.stage-label {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--ink-dim);
  text-align: center;
  width: 90%;
}

.stage-label .live { display: inline-block; color: var(--accent-2); margin-right: 8px; }
.stage-label .live::before { content: '●'; margin-right: 4px; animation: pulse 1s infinite; }

.target-list {
  position: absolute;
  top: 80px;
  left: 24px;
  pointer-events: none;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
}

.target-list h4 {
  font-family: 'Syncopate', sans-serif;
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 400;
}

.target-list ul { list-style: none; }
.target-list li {
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}
.target-list li.active { color: var(--accent); }
.target-list li .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* ============ CONTROL PANEL ============ */
.panel {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-section {
  border: 1px solid rgba(0, 255, 209, 0.12);
  background: rgba(6, 11, 26, 0.5);
  padding: 18px;
  position: relative;
}

.panel-section::before {
  content: '';
  position: absolute;
  top: -1px; left: 16px;
  width: 24px; height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

/* ============ HERO READOUT ============ */
.hero-readout { text-align: center; padding: 16px 0 24px; }

/* ============ CTA BLOCK (botão no topo do painel) ============ */
.cta-block {
  background: linear-gradient(180deg, rgba(0, 255, 209, 0.04), transparent);
  border: 1px solid rgba(0, 255, 209, 0.2);
  padding: 16px;
  position: relative;
}
.cta-block::before {
  content: '// CONTROLE';
  position: absolute;
  top: -8px; left: 16px;
  background: var(--bg-1);
  padding: 0 8px;
  font-family: 'Syncopate', sans-serif;
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--accent);
}

/* ============ IP CARD ============ */
.ip-card .ip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(0, 255, 209, 0.12);
}
.ip-row {
  background: var(--bg-1);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ip-key {
  font-family: 'Syncopate', sans-serif;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
}
.ip-value {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.ip-value.dim { color: var(--ink-dim); font-weight: 400; }
.ip-row.full { grid-column: 1 / -1; }


.speed-value {
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--ink) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.1s;
  text-shadow: 0 0 60px rgba(0, 255, 209, 0.4);
}

.speed-value.testing { animation: flicker 0.15s infinite; }

@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }

.speed-unit {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  margin-top: 4px;
}

.speed-label {
  font-family: 'Syncopate', sans-serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-top: 12px;
}

/* ============ METRICS ============ */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(0, 255, 209, 0.12);
  margin-top: 4px;
}

.metric { background: var(--bg-1); padding: 14px; text-align: center; }

.metric-label { font-size: 9px; letter-spacing: 0.3em; color: var(--ink-dim); margin-bottom: 6px; }
.metric-value { font-family: 'Syncopate', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); }
.metric-value.up { color: var(--accent); }
.metric-value.down { color: var(--accent-2); }
.metric-value.ping { color: var(--accent-3); }

/* ============ TARGET TABLE ============ */
.target-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(0, 255, 209, 0.08);
  font-size: 11px;
  transition: all 0.3s;
}
.target-row:last-child { border-bottom: none; }
.target-row.pinging {
  background: linear-gradient(90deg, rgba(0, 255, 209, 0.08), transparent);
  padding-left: 8px;
  margin-left: -8px;
}
.target-name { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: 0.05em; }
.target-icon { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.target-loc { font-size: 9px; color: var(--ink-dim); letter-spacing: 0.1em; }
.target-ping { font-family: 'Space Mono', monospace; color: var(--accent); text-align: right; min-width: 60px; }
.target-ping.empty { color: var(--ink-dim); }

/* ============ START BUTTON ============ */
.start-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg-0);
  border: none;
  padding: 18px;
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.35em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.start-btn:hover { background: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 255, 209, 0.4); }
.start-btn:disabled { background: var(--bg-1); color: var(--ink-dim); cursor: not-allowed; transform: none; box-shadow: none; border: 1px solid var(--ink-dim); }
.start-btn::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}
.start-btn:hover::before { left: 100%; }

.progress-track { height: 2px; background: rgba(0, 255, 209, 0.15); margin-top: 14px; position: relative; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s; box-shadow: 0 0 10px var(--accent); }
.progress-status { margin-top: 8px; font-size: 9px; letter-spacing: 0.3em; color: var(--ink-dim); display: flex; justify-content: space-between; }
.progress-status .phase { color: var(--accent); }

/* ============ CONTENT SECTIONS (SEO) ============ */
.content-wrap { max-width: 1100px; margin: 0 auto; padding: 64px 32px; position: relative; z-index: 5; }
.content-wrap h1, .content-wrap h2, .content-wrap h3 { font-family: 'Syncopate', sans-serif; letter-spacing: 0.04em; margin-bottom: 16px; }
.content-wrap h1 { font-size: 32px; color: var(--accent); margin-bottom: 8px; }
.content-wrap h2 { font-size: 22px; color: var(--ink); margin-top: 48px; border-left: 3px solid var(--accent); padding-left: 16px; }
.content-wrap h3 { font-size: 16px; color: var(--accent); margin-top: 28px; }
.content-wrap p { font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.8; color: var(--ink-dim); margin-bottom: 14px; }
.content-wrap p strong { color: var(--ink); font-weight: 500; }
.content-wrap ul { padding-left: 20px; margin-bottom: 16px; }
.content-wrap li { font-size: 14px; line-height: 1.8; color: var(--ink-dim); margin-bottom: 6px; }

.quality-table {
  width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 13px;
}
.quality-table th, .quality-table td {
  padding: 12px; text-align: left; border-bottom: 1px solid rgba(0, 255, 209, 0.1);
}
.quality-table th { background: rgba(0, 255, 209, 0.05); color: var(--accent); font-family: 'Syncopate', sans-serif; font-size: 10px; letter-spacing: 0.2em; }
.quality-table td { color: var(--ink-dim); }
.quality-table td:first-child { color: var(--ink); font-weight: 500; }

.faq-item { border: 1px solid rgba(0, 255, 209, 0.1); margin-bottom: 8px; }
.faq-q { padding: 16px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500; color: var(--ink); }
.faq-q::after { content: '+'; font-size: 20px; color: var(--accent); transition: transform 0.3s; }
.faq-item[open] .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; font-size: 13px; color: var(--ink-dim); line-height: 1.7; }

/* ============ FOOTER ============ */
footer.site-footer {
  border-top: 1px solid rgba(0, 255, 209, 0.15);
  padding: 40px 32px 24px;
  position: relative;
  z-index: 5;
  background: var(--bg-1);
}
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-family: 'Syncopate', sans-serif; font-size: 10px; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 14px; }
.footer-grid p, .footer-grid a { font-size: 12px; color: var(--ink-dim); line-height: 1.8; display: block; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1100px; margin: 32px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(0, 255, 209, 0.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 11px; color: var(--ink-dim); letter-spacing: 0.1em;
}

/* ============ COOKIE BANNER (LGPD) ============ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-1); border-top: 2px solid var(--accent);
  padding: 18px 24px; z-index: 1000; display: none;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.cookie-banner.show { display: block; }
.cookie-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-text { flex: 1; min-width: 280px; font-size: 12px; color: var(--ink-dim); line-height: 1.6; }
.cookie-text strong { color: var(--ink); }
.cookie-text a { color: var(--accent); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn {
  padding: 10px 18px; font-family: 'Syncopate', sans-serif;
  font-size: 10px; letter-spacing: 0.2em; cursor: pointer;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  transition: all 0.2s;
}
.cookie-btn.accept { background: var(--accent); color: var(--bg-0); }
.cookie-btn:hover { background: var(--ink); color: var(--bg-0); border-color: var(--ink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 968px) {
  main.app { grid-template-columns: 1fr; }
  .stage { height: 60vh; min-height: 480px; border-right: none; border-bottom: 1px solid rgba(0, 255, 209, 0.12); }
  .panel { padding: 20px; }
  .speed-value { font-size: 64px; }
  header.site-header { padding: 14px 20px; flex-direction: column; gap: 10px; }
  .logo-img { height: 44px; }
  .header-meta { gap: 14px; font-size: 9px; flex-wrap: wrap; justify-content: center; }
  .target-list { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .content-wrap { padding: 40px 20px; }
  .content-wrap h1 { font-size: 24px; }
  .content-wrap h2 { font-size: 18px; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 209, 0.3); }
