:root {
  --bg: #0a0a0a;
  --bg-elevated: #111;
  --bg-input: #0d0d0d;
  --border: #1a1a1a;
  --text: #00ff88;
  --text-dim: #00cc6a;
  --text-muted: #00884d;
  --accent: #00ff88;
  --accent-glow: rgba(0, 255, 136, 0.15);
  --error: #ff4466;
  --font-sans: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app {
  width: 100%;
  max-width: 520px;
  padding: 2rem 1.5rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.main {
  margin-bottom: 2rem;
}

.search-form {
  margin-bottom: 2rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: #fff;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input::placeholder {
  color: #fff;
}

.input-group input:hover {
  border-color: var(--text-muted);
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group input.error {
  border-color: var(--error);
}

.input-hint {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  min-height: 1.2em;
}

.input-hint.error {
  color: var(--error);
}

.input-hint.ok {
  color: var(--text-muted);
}

.popup-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  background: var(--text-dim);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sources h2 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.sources-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.source-list li {
  flex: 0 0 auto;
}

.source-list a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.source-list a:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.footer {
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
