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

:root {
  --bg:      #0f1117;
  --surface: #1a1d27;
  --border:  #2e3348;
  --accent:  #00d4aa;
  --text:    #e2e8f0;
  --muted:   #8892a4;
  --danger:  #ff5555;
  --mono:    'Courier New', Courier, monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  min-height: 100vh;
}

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand { color: var(--accent); text-decoration: none; font-weight: bold; font-size: 1.15rem; }
.brand:hover { text-decoration: underline; }

header nav { margin-left: auto; display: flex; gap: 1.5rem; }
header nav a { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
header nav a:hover { color: var(--text); }

/* ── Main ── */
main { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem; }

h1 { color: var(--accent); margin-bottom: 0.4rem; }
h2 { color: var(--text); margin-bottom: 0.75rem; }

.subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ── Search form ── */
.search-form { display: flex; gap: 0.5rem; margin-bottom: 2rem; }

.search-form input[type=text] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-family: var(--mono);
  font-size: 1rem;
  border-radius: 4px;
  outline: none;
}
.search-form input[type=text]:focus { border-color: var(--accent); }

.search-form button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.7rem 1.5rem;
  font-family: var(--mono);
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}
.search-form button:hover { opacity: 0.85; }

/* ── Result cards ── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
}
.result-card .topic-name { color: var(--accent); font-size: 1.05rem; margin-bottom: 0.5rem; }
.result-card .definition { color: var(--text); line-height: 1.7; }

.not-found {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Topic tags ── */
.topics-hint { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }

.topics-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.topic-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.topic-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── /stolen box ── */
.stolen-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  word-break: break-all;
  line-height: 1.7;
}
.stolen-box.empty { color: var(--muted); }
.stolen-box.filled { color: var(--accent); }

.stolen-hint { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }

/* ── Report widget ── */
.report-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  font-family: var(--mono);
}

.report-toggle {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.8rem 1.5rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 212, 170, 0.45);
  letter-spacing: 0.03em;
}
.report-toggle:hover { opacity: 0.85; }

.report-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  width: 420px;
  margin-top: 0.5rem;
}

.report-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
}

.report-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.report-close:hover { color: var(--text); }

.report-panel label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.report-panel input[type=url] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  outline: none;
}
.report-panel input[type=url]:focus { border-color: var(--accent); }

.report-submit {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.5rem;
  font-family: var(--mono);
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}
.report-submit:hover { opacity: 0.85; }

.report-status {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
  min-height: 1em;
}
