* { box-sizing: border-box; }
:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22d3ee;
  --accent-2: #60a5fa;
  --ring: #22d3ee55;
  --danger: #ef4444;
  --ok: #10b981;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  background: radial-gradient(1200px 600px at 10% 0%, #0b1220 10%, #0f172a 55%, #0b1220 100%);
  color: var(--text);
  line-height: 1.55;
}
.container { width: min(1100px, 92%); margin: 0 auto; }
header { padding: 32px 0 12px; }
h1 { font-size: clamp(24px, 3.8vw, 36px); margin: 0 0 6px; letter-spacing: -0.02em; }
.sub { margin: 0; color: var(--muted); }
code { background: #0b1220; padding: 2px 6px; border-radius: 6px; color: #cbd5e1; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
  margin: 18px 0;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.dropzone {
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  outline: none;
  transition: 0.2s ease;
}
.dropzone:focus,
.dropzone.dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--ring);
}
.dz-content svg { opacity: 0.9; }
.dz-content p { margin: 8px 0; }
.button {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #081018;
  border: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease;
  display: inline-block;
}
.button:active { transform: translateY(1px); }
.button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
}
.button.danger { background: var(--danger); color: white; }
.muted { color: var(--muted); font-size: 14px; }
.tips { color: var(--muted); font-size: 12px; }

.queue { margin-top: 16px; display: grid; gap: 12px; }
.item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 8px;
}
.item .thumb {
  width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #0b1220;
}
.meta { font-size: 14px; }
.meta .name { font-weight: 600; }
.meta .size { color: var(--muted); }
.progress {
  height: 8px; background: #0b1220; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06);
}
.bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s ease; }

.tabs { display: flex; gap: 8px; margin: 2px 2px 12px; }
.tab {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.tab.active { outline: 3px solid var(--ring); border-color: transparent; }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.input {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 180px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.tile {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
.tile img { display: block; width: 100%; height: 160px; object-fit: cover; }
.tile .cap {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px;
  padding: 8px; font-size: 12px; color: var(--muted);
}
.cap .copy, .cap .del, .cap .restore, .cap .purge {
  cursor: pointer; border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; padding: 4px 8px;
}
.cap .del, .cap .purge { border-color: rgba(239,68,68,0.5); }
.checkbox {
  appearance: none;
  width: 16px; height: 16px; border: 1px solid rgba(255,255,255,0.4); border-radius: 4px;
  display: inline-block; position: relative; margin-right: 6px;
}
.checkbox:checked { background: var(--accent); border-color: var(--accent); }
.checkbox:checked::after { content: ""; position: absolute; inset: 3px; background: white; border-radius: 2px; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(17,24,39,.95); color: var(--text); border: 1px solid rgba(255,255,255,.12);
  padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex; gap: 10px; align-items: center; z-index: 9999;
}
.toast button { border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--text); padding: 4px 8px; }

.foot { padding: 24px 0 40px; color: var(--muted); text-align: center; }

@media (max-width: 420px) {
  .item { grid-template-columns: 48px 1fr; }
  .item .thumb { display: none; }
  .tile .cap { grid-template-columns: 1fr auto; gap: 6px; }
}
