:root {
  --bg0: #0b1020;
  --bg1: #0c152b;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --muted2: rgba(255,255,255,0.55);
  --line: rgba(255,255,255,0.14);
  --accent: #7cf7c4;
  --accent2: #5aa7ff;
  --danger: #ff5a7a;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --r: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 15px/1.35 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1200px 700px at 10% 20%, rgba(124,247,196,0.18), transparent 60%),
    radial-gradient(900px 700px at 80% 10%, rgba(90,167,255,0.16), transparent 55%),
    radial-gradient(900px 700px at 70% 90%, rgba(255,90,122,0.14), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 18px;
}

.kicker {
  color: var(--muted2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

h1 {
  margin: 6px 0 6px;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.sub { margin: 0; color: var(--muted); }

.pill {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  white-space: nowrap;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-top: 14px;
}

.cardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cardHeader h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.86);
}

.drop {
  position: relative;
  border: 1px dashed rgba(255,255,255,0.26);
  border-radius: calc(var(--r) - 6px);
  padding: 22px;
  background: rgba(0,0,0,0.10);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.drop:hover {
  transform: translateY(-1px);
  border-color: rgba(124,247,196,0.5);
}

.drop.drag {
  background: rgba(124,247,196,0.08);
  border-color: rgba(124,247,196,0.65);
}

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropInner { text-align: center; }
.dropTitle { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.dropHint { color: var(--muted); margin-top: 6px; }

.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.rowTight {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.meta {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  min-width: 0;
}

.label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}

.value {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  margin-top: 14px;
}

.barFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 140ms ease;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 650;
}

.btn:hover { border-color: rgba(124,247,196,0.55); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btnGhost {
  background: transparent;
}

.log {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.16);
  color: rgba(255,255,255,0.82);
  min-height: 42px;
  white-space: pre-wrap;
}

.files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fileItem {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.fileTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fileName { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileMeta { color: var(--muted); font-size: 13px; }

.a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.12);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  white-space: nowrap;
}
.a:hover { border-color: rgba(90,167,255,0.6); }

.foot {
  margin-top: 16px;
  color: var(--muted2);
  font-size: 13px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

@media (max-width: 820px) {
  .top { align-items: flex-start; flex-direction: column; }
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rowTight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions { grid-column: 1 / -1; justify-content: stretch; }
  .actions .btn { flex: 1; }
  .files { grid-template-columns: 1fr; }
}
