/* The design comes from https://thicket.dev/ (Anil Madhavapeddy). */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
  --bg-primary: #000;
  --bg-secondary: #111;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #222;
  --border: #333;
  --text-primary: #ddd;
  --text-secondary: #888;
  --text-muted: #555;
  --accent: #00ff88;
  --accent-dim: #00cc6a;
  --accent-bg: rgba(0, 255, 136, 0.05);
  --link: #00ffff;
  --link-hover: #88ffff;
  --error: #ff4444;
}

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

body {
  font-family: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  max-width: 720px;
  padding: 32px 16px 0;
}

header h1 {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}

header .subtitle {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 1px;
}

.search-box {
  width: 100%;
  max-width: 720px;
  padding: 16px 16px 0;
}

.search-box input {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  outline: none;
  transition: border-color 0.15s;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  border-color: var(--accent-dim);
}

.status-bar {
  width: 100%;
  max-width: 720px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.status-bar .dot.ready {
  background: var(--accent);
}

.status-bar .dot.loading {
  background: #ffaa00;
  animation: pulse 1.2s ease-in-out infinite;
}

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

.results {
  width: 100%;
  max-width: 720px;
  padding: 0 16px 32px;
}

.results p {
  color: var(--text-secondary);
  font-size: 12px;
  padding: 8px 0;
}

.result {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  transition: background 0.15s;
}

.result:first-child {
  border-top: 1px solid var(--border);
}

.result:hover {
  background: var(--accent-bg);
}

.result a {
  text-decoration: none;
  color: var(--link);
  font-size: 13px;
  font-weight: 400;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result a:hover {
  color: var(--link-hover);
}

.result-meta {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.result-uid {
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-uid a {
  color: var(--text-muted);
  font-size: 11px;
}

.result-uid a:hover {
  color: var(--link);
}

.separator {
  width: 100%;
  max-width: 720px;
  padding: 0 16px;
  margin: 8px 0;
}

.separator hr {
  border: none;
  border-top: 1px solid var(--border);
}

.error-msg {
  color: var(--error);
  font-size: 12px;
  padding: 8px 0;
}
