:root {
  --bg: #090c14;
  --panel: rgba(255,255,255,0.06);
  --panel-strong: rgba(255,255,255,0.10);
  --line: rgba(255,255,255,0.14);
  --text: #edf2ff;
  --muted: #9ea8c7;
  --accent: #76a7ff;
  --accent2: #6ff2d4;
  --danger: #ff7676;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #060914, #0f1528 45%, #0b1120);
}
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}
.hero, .sectionHeader, .actions, .resultFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero { margin-bottom: 20px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent2);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px;
}
h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 46px); }
h2 { margin: 0 0 8px; font-size: 22px; }
.sub, .sectionHeader p, .compactNote p { color: var(--muted); margin: 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  margin-bottom: 16px;
}
.compactNote { padding: 14px 18px; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
input, select, textarea, button {
  width: 100%;
  font: inherit;
}
input, select, textarea {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  padding: 12px 14px;
}
textarea {
  min-height: 300px;
  line-height: 1.45;
  resize: vertical;
}
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #07111d;
  font-weight: 800;
  cursor: pointer;
}
button.secondary, a.buttonLink.secondary {
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid var(--line);
}
button.small { width: auto; padding: 10px 14px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.status {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}
.status.ok { color: var(--accent2); }
.status.bad { color: var(--danger); }
.drop {
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 32px 20px;
  text-align: center;
  transition: 160ms ease;
}
.drop.dragover {
  border-color: var(--accent2);
  background: rgba(111,242,212,0.06);
}
.drop h2, .drop p { margin: 0; }
.drop p { color: var(--muted); margin-top: 8px; }
.dropIcon {
  font-size: 38px;
  margin-bottom: 10px;
}
.actions { margin-top: 14px; }
.hidden { display: none; }
.queue, .results {
  display: grid;
  gap: 14px;
}
.queueItem {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(0,0,0,0.18);
  border-radius: 18px;
  border: 1px solid var(--line);
}
.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #111;
}
.name {
  display: block;
  word-break: break-all;
}
.meta {
  color: var(--muted);
  margin: 4px 0 0;
}
.resultItem {
  padding: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.compare span {
  display: inline-block;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}
.compare img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 16px;
  background: #080b12;
  border: 1px solid var(--line);
}
.resultFooter {
  gap: 12px;
  margin-top: 14px;
}
.resultActions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
a.buttonLink {
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
}
.errorText { color: var(--danger); }
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.24);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.9s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.queueInfo { flex: 1; min-width: 0; }
.queueProgress { margin-top: 10px; }
.queueStatus {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.queueStatus.ok { color: var(--accent2); }
.queueStatus.bad { color: var(--danger); }
.progressTrack {
  width: 100%;
  height: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  overflow: hidden;
}
.progressFill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.35s ease;
}
.progressDetail {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.noteMuted { color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero, .sectionHeader, .resultFooter, .actions { flex-direction: column; align-items: stretch; }
  .grid, .compare { grid-template-columns: 1fr; }
  .status { white-space: normal; }
}
