:root {
  --bg: #0a0a0a;
  --bg-elev: #131313;
  --bg-elev-2: #1a1a1a;
  --fg: #e8e8e8;
  --muted: #888;
  --accent: #00ff88;
  --accent-dim: #00cc6e;
  --danger: #ff4444;
  --border: #222;
  --mono: 'JetBrains Mono', 'Fira Code', 'Menlo', 'Consolas', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(at 20% 0%, rgba(0,255,136,0.05) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(0,255,136,0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

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

.muted { color: var(--muted); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand .prompt { color: var(--accent); }
.brand .name { letter-spacing: -0.02em; }
.brand .dot { color: var(--accent); }

.topbar nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.875rem;
}
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--accent); text-decoration: none; }
.topbar nav a.lang-toggle {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
}
.topbar nav a.lang-toggle:hover {
  border-color: var(--accent);
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hero .lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 2.5rem;
}
.hero .lede strong { color: var(--fg); font-weight: 500; }

.gen-form {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.gen-form .row {
  display: flex;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .gen-form .row { flex-direction: column; }
}

.gen-form input[type=url] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .15s;
}
.gen-form input[type=url]:focus {
  border-color: var(--accent);
}

.gen-form button[type=submit] {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  min-width: 120px;
}
.gen-form button[type=submit]:hover { background: var(--accent-dim); }
.gen-form button[type=submit]:disabled { opacity: 0.5; cursor: wait; }

.gen-form .cf-turnstile { margin-top: 1rem; }

.locale-row {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: center;
}
.locale-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.locale-select {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.locale-select:focus { border-color: var(--accent); }
.locale-hint {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}
@media (max-width: 600px) {
  .locale-row { grid-template-columns: 1fr; }
}

.osint {
  margin: 1rem 0 0;
  padding: 0.875rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.osint legend {
  padding: 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.osint label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--fg);
  cursor: pointer;
  padding: 0.25rem 0;
}
.osint label:hover .osint-name { color: var(--accent); }
.osint input[type=checkbox] {
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}
.osint .osint-name {
  color: var(--fg);
  font-weight: 600;
  min-width: 8.5rem;
  transition: color .15s;
}
.osint .osint-desc {
  color: var(--muted);
  font-size: 0.78rem;
}
@media (max-width: 600px) {
  .osint .osint-name { min-width: 0; }
  .osint label { flex-wrap: wrap; }
}

.hint {
  margin-top: 0.875rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.result {
  margin-top: 2rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.result-host {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
}
.result-count {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.result-actions {
  display: flex;
  gap: 0.5rem;
}
.result-actions button {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.875rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all .15s;
}
.result-actions button:hover { border-color: var(--accent); color: var(--accent); }
.result-actions button.ghost { background: transparent; }

#result-pre {
  margin: 0;
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--fg);
  max-height: 400px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.error {
  margin-top: 1rem;
  padding: 0.875rem 1.125rem;
  background: rgba(255,68,68,0.1);
  border: 1px solid rgba(255,68,68,0.3);
  border-radius: 8px;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 0.875rem;
}

section { margin-top: 5rem; }

section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

.how ol {
  padding-left: 1.5rem;
  color: var(--muted);
}
.how ol li { margin-bottom: 0.5rem; }
.how strong { color: var(--fg); font-weight: 500; }

.api .code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-x: auto;
  color: var(--fg);
}

.ethics {
  border: 1px solid rgba(255,68,68,0.2);
  border-radius: 12px;
  padding: 1.5rem;
  background: rgba(255,68,68,0.03);
}
.ethics h2 { color: var(--danger); margin-top: 0; }
.ethics p { margin: 0; color: var(--muted); }
.ethics strong { color: var(--fg); }

footer {
  max-width: 880px;
  margin: 4rem auto 0;
  padding: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.8rem;
}
