:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --border: #2a2e37;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

h1 { margin: 0 0 8px; }

.subtitle { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  resize: vertical;
}

button {
  align-self: flex-start;
  background: var(--accent);
  border: none;
  color: white;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.6; cursor: default; }

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #3a1f1f;
  color: #ffb4b4;
  border: 1px solid #5a2a2a;
}

#results {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  display: flex;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.card img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
  flex-shrink: 0;
}

.card .info { flex: 1; min-width: 0; }

.card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .meta { color: var(--muted); font-size: 13px; margin: 0 0 10px; }

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.options a {
  display: inline-block;
  background: #232733;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 20px;
}

.options a:hover { border-color: var(--accent); color: var(--accent); }

.card.error { border-color: #5a2a2a; color: #ffb4b4; }
