:root {
  --bg: #070b14;
  --card: rgba(14, 22, 40, 0.75);
  --line: rgba(0, 229, 255, 0.25);
  --cyan: #00e5ff;
  --violet: #9b59ff;
  --green: #35f0a0;
  --text: #e6f1ff;
  --muted: #8ba0bf;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: 0; width: 60vmax; height: 60vmax; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(155, 89, 255, 0.18), transparent 60%);
  filter: blur(30px);
}

.wrap {
  position: relative; z-index: 1; flex: 1;
  display: grid; place-items: center; padding: 32px 16px;
}

.card {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.08), inset 0 0 30px rgba(155, 89, 255, 0.05);
}

h1 { font-size: clamp(1.5rem, 5vw, 2rem); letter-spacing: 0.5px; margin-bottom: 8px; }
.sub { color: var(--muted); margin-bottom: 26px; }

/* radar */
.radar {
  width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%;
  border: 2px solid var(--line); position: relative;
  background:
    radial-gradient(circle, transparent 30%, rgba(0, 229, 255, 0.15) 31%, transparent 33%),
    radial-gradient(circle, transparent 58%, rgba(0, 229, 255, 0.15) 59%, transparent 61%);
}
.radar span {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 229, 255, 0.55), transparent 35%);
  animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dots { animation: blink 1.2s steps(3, end) infinite; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* passos */
.steps { list-style: none; text-align: left; max-width: 340px; margin: 0 auto 24px; display: grid; gap: 10px; }
.step { color: var(--muted); font-family: var(--mono); font-size: 0.95rem; transition: color 0.3s; }
.step .tick { display: inline-block; width: 1.4em; color: var(--green); opacity: 0; transform: scale(0.4); transition: 0.3s; }
.step.done { color: var(--text); }
.step.done .tick { opacity: 1; transform: scale(1); }

.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  animation: fill 3.2s ease-out forwards;
}
@keyframes fill { to { width: 100%; } }

/* resultado */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin-top: 4px; }
.grid > div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px; padding: 12px 14px;
}
.grid .wide { grid-column: 1 / -1; }
dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--cyan); margin-bottom: 4px; }
dd { font-family: var(--mono); font-size: 0.92rem; word-break: break-word; }
.visit { margin-top: 18px; color: var(--muted); font-size: 0.85rem; }
code { font-family: var(--mono); color: var(--green); }

/* rodapé */
.footer {
  position: relative; z-index: 1; text-align: center; padding: 18px 16px 24px;
  color: var(--muted); font-size: 0.78rem; line-height: 1.5;
}
.footer p { max-width: 640px; margin: 0 auto 6px; }
.link { background: none; border: 0; color: var(--cyan); cursor: pointer; font: inherit; text-decoration: underline; }

/* modal */
dialog {
  margin: auto; width: min(540px, calc(100% - 32px)); padding: 26px;
  background: #0d1526; color: var(--text);
  border: 1px solid var(--line); border-radius: 16px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(3px); }
dialog h2 { margin-bottom: 12px; }
dialog p, dialog li { color: #c3d3ea; font-size: 0.92rem; line-height: 1.55; margin-bottom: 10px; }
dialog ul { padding-left: 20px; margin-bottom: 10px; }
.btn {
  margin-top: 8px; padding: 10px 20px; border: 0; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, var(--cyan), var(--violet)); color: #05101c; font-weight: 700;
}

@media (max-width: 480px) {
  .card { padding: 28px 18px; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .radar span, .dots, .bar i { animation-duration: 0.01s; animation-iteration-count: 1; }
}
