:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  max-width: 800px;
  width: 100%;
}

header {
  margin-bottom: 2rem;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Input area */
.input-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.prompt-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prompt {
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
  user-select: none;
}

#query-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  outline: none;
  caret-color: var(--accent);
}

#query-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

/* Output area */
.output-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  min-height: 120px;
  margin-bottom: 1.5rem;
}

.loading {
  color: var(--text-dim);
  font-size: 0.85rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.result {
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-command {
  font-size: 1.05rem;
  color: var(--green);
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.result-command .cmd-prefix {
  color: var(--accent);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-safe { background: rgba(63, 185, 80, 0.15); color: var(--green); }
.badge-caution { background: rgba(210, 153, 34, 0.15); color: var(--yellow); }
.badge-dangerous { background: rgba(248, 81, 73, 0.15); color: var(--red); }

.no-match {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
}

.error-msg {
  color: var(--red);
  font-size: 0.85rem;
}

/* Examples */
.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.examples-label {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.example-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
}

.example-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

/* Footer */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

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

footer a:hover {
  text-decoration: underline;
}
