:root {
  color-scheme: dark;
  --bg: #111214;
  --card: #1a1b1f;
  --line: #2b2d33;
  --text: #e6e6e9;
  --muted: #8b8d96;
  --accent: #7aa2ff;
  --danger: #ff6b6b;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px;
}

h1 { font-size: 1.25rem; margin: 0 0 20px; letter-spacing: 0.02em; }
h1 a { color: inherit; text-decoration: none; }

a { color: var(--accent); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}

.muted { color: var(--muted); font-size: 0.875rem; }

button, select, input, textarea {
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

button { padding: 6px 14px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: #0b1020; margin-top: 10px; }
button.danger { background: var(--danger); border-color: var(--danger); color: #1a0505; }

.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tabs button { border-color: transparent; background: none; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); background: var(--bg); border-color: var(--line); }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 16px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(122, 162, 255, 0.05); }

textarea { width: 100%; padding: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 0.875rem; resize: vertical; }

.options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.options select { padding: 4px 8px; margin-left: 6px; }

.error { color: var(--danger); margin: 12px 0 0; }

.results { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.result { display: flex; gap: 14px; align-items: center; }
.thumb {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.info { flex: 1; min-width: 0; display: grid; gap: 6px; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
progress { width: 100%; height: 6px; accent-color: var(--accent); }
.link-row { display: flex; gap: 6px; }
.link { flex: 1; min-width: 0; padding: 6px 8px; }

code { background: var(--bg); padding: 2px 6px; border-radius: 4px; }

footer { margin-top: 32px; color: var(--muted); font-size: 0.8125rem; display: flex; justify-content: space-between; gap: 12px; }
