:root {
  --bg: #07080c;
  --card: #12141c;
  --line: #2a3144;
  --txt: #eef1f7;
  --muted: #8b93a7;
  --acc: #3d7eff;
  --acc2: #00e5c0;
  --err: #ff5d6c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 400px at 10% -10%, #1b3a7a55, transparent 60%),
    radial-gradient(700px 360px at 100% 0%, #0b4a3a44, transparent 55%),
    var(--bg);
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand.center { justify-content: center; margin-bottom: 18px; }
.logo { color: var(--acc2); font-size: 22px; }
nav { display: flex; gap: 14px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover { color: #fff; }
.ghost { opacity: .75; }
.wrap { max-width: 720px; margin: 48px auto; padding: 0 20px; }
.wrap.slim { max-width: 400px; margin-top: 12vh; }
h1 { font-size: 32px; letter-spacing: -0.03em; }
.sub { color: var(--muted); margin: 8px 0 28px; }
.drop {
  border: 1px dashed var(--line);
  background: #0d1018cc;
  border-radius: 16px;
  padding: 12px;
}
.drop-inner {
  text-align: center;
  padding: 48px 16px;
  cursor: pointer;
  border-radius: 12px;
}
.drop-inner.over { background: #1a2440; }
.icon { font-size: 28px; margin-bottom: 10px; }
.hint { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }
button {
  width: 100%; margin-top: 12px; padding: 14px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, var(--acc), #6a5cff);
  color: #fff; font-weight: 700; font-size: 15px;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.card, .result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-top: 18px;
}
.result img { width: 100%; border-radius: 10px; margin-bottom: 14px; max-height: 320px; object-fit: contain; background: #000; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
input {
  width: 100%; padding: 12px 12px;
  border-radius: 8px; border: 1px solid var(--line);
  background: #0b0d14; color: var(--txt);
}
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.row button { width: auto; margin: 0; padding: 0 16px; }
.err { color: var(--err); margin: 10px 0; }
.hidden { display: none; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.tile {
  display: block; text-decoration: none; color: var(--muted);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; font-size: 12px;
}
.tile img { width: 100%; height: 140px; object-fit: cover; background: #000; display: block; }
.tile span { display: block; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
