:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(103, 232, 249, 0.38);
  --panel: rgba(5, 9, 20, 0.72);
  --panel-strong: rgba(8, 13, 27, 0.92);
  --accent: #06b6d4;
  --accent-2: #2563eb;
  --gold: #f59e0b;
  --ok: #22c55e;
  --warn: #f97316;
  --error: #fb7185;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #030712;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.14), transparent 34%),
    linear-gradient(225deg, rgba(245, 158, 11, 0.08), transparent 28%),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.055) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(180deg, rgba(148, 163, 184, 0.045) 0 1px, transparent 1px 88px),
    #030712;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0), rgba(3, 7, 18, 0.76)),
    linear-gradient(90deg, rgba(3, 7, 18, 0.88), transparent 28%, transparent 72%, rgba(3, 7, 18, 0.88));
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  margin: 32px auto;
}

.workspace {
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(3, 7, 18, 0.82)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.topbar,
.hero-label,
.controls,
.setting-strip,
.action-strip,
.actions,
.row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.hero-copy {
  min-width: 0;
}

.hero-label {
  gap: 10px;
  margin-bottom: 12px;
}

.hero-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #0f172a;
  background: linear-gradient(135deg, #67e8f9, #38bdf8 48%, #facc15);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(6, 182, 212, 0.28);
}

.eyebrow {
  margin: 0;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #a5f3fc 42%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
}

.status {
  flex: 0 0 auto;
  min-width: 168px;
  padding: 11px 16px;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
}

.status.ok {
  color: #a7f3d0;
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(20, 83, 45, 0.28);
}

.status.bad {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(127, 29, 29, 0.3);
}

.naming {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) minmax(260px, 0.95fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.text-field,
.preview-shell {
  min-width: 0;
}

.text-field,
.preview-shell,
.field,
.toggle {
  color: var(--muted);
  font-size: 14px;
}

.text-field,
.preview-shell {
  display: grid;
  gap: 8px;
}

.field-label {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 750;
}

.text-field input,
.preview {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(5, 9, 20, 0.64);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.text-field input::placeholder {
  color: rgba(148, 163, 184, 0.66);
}

.text-field input:focus {
  border-color: rgba(103, 232, 249, 0.56);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.preview {
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #e2e8f0;
  border-style: dashed;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.72)),
    rgba(5, 9, 20, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.setting-strip,
.action-strip {
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.setting-strip {
  align-items: stretch;
}

.field {
  display: grid;
  grid-template-columns: auto 82px auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.44);
}

.field span,
.field small {
  white-space: nowrap;
}

.field input {
  width: 82px;
  height: 36px;
  padding: 0 10px;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.86);
  outline: none;
}

.field input:focus {
  border-color: rgba(103, 232, 249, 0.56);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.44);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.actions {
  gap: 10px;
  flex-wrap: wrap;
}

button,
.download {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 18px;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(5, 9, 20, 0.92);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover:not(:disabled),
.download:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.34);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

input:disabled {
  color: #64748b;
  background: rgba(15, 23, 42, 0.46);
}

#chooseBtn::before {
  content: "+";
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

#startBtn {
  min-width: 154px;
  border-color: rgba(103, 232, 249, 0.56);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 42px rgba(6, 182, 212, 0.25);
  font-weight: 800;
}

#startBtn::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

#zipBtn {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.1);
}

#zipBtn::before {
  content: "";
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
  box-shadow: inset 0 -2px 0 currentColor;
}

#clearBtn {
  width: 54px;
  padding: 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0;
}

#clearBtn::before,
#clearBtn::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

#clearBtn::before {
  transform: rotate(45deg);
}

#clearBtn::after {
  transform: rotate(-45deg);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 220px;
  margin: 18px 0;
  padding: 34px;
  color: #dbeafe;
  border: 1.5px dashed rgba(103, 232, 249, 0.36);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(8, 47, 73, 0.22), rgba(2, 6, 23, 0.62)),
    rgba(3, 7, 18, 0.5);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.dragover {
  transform: translateY(-1px);
  border-color: rgba(103, 232, 249, 0.72);
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.22), rgba(2, 6, 23, 0.64)),
    rgba(3, 7, 18, 0.54);
}

.drop-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 18px;
  background: rgba(14, 165, 233, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.drop-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border-left: 3px solid #67e8f9;
  border-top: 3px solid #67e8f9;
  transform: translateY(5px) rotate(45deg);
}

.drop-icon::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 16px;
  bottom: 15px;
  border: 3px solid #67e8f9;
  border-top: 0;
  border-radius: 3px;
}

.dropzone strong {
  max-width: 100%;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 850;
  line-height: 1.1;
}

.dropzone span:not(.drop-icon),
.sub {
  color: var(--muted);
}

.queue {
  display: grid;
  gap: 10px;
}

.row {
  gap: 14px;
  min-height: 84px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(5, 9, 20, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.index {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: #0f172a;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  border-radius: 14px;
  font-weight: 900;
}

.meta {
  flex: 1;
  min-width: 0;
}

.name {
  overflow: hidden;
  color: #f8fafc;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub {
  margin-top: 4px;
  font-size: 13px;
}

.bar {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #67e8f9, #2563eb);
  border-radius: inherit;
  transition: width 180ms ease;
}

.download {
  display: none;
  min-height: 42px;
  padding: 0 14px;
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.11);
  font-size: 14px;
  white-space: nowrap;
}

.row.done .download {
  display: inline-flex;
}

.row.error .index {
  color: #fff1f2;
  background: linear-gradient(135deg, #fb7185, #be123c);
}

.row.working .index {
  color: #eff6ff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.row.queued .index {
  color: #e2e8f0;
  background: rgba(100, 116, 139, 0.44);
}

.notice {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(14px);
}

.notice[hidden] {
  display: none;
}

.notice-box {
  width: min(430px, calc(100vw - 40px));
  padding: 24px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(8, 13, 27, 0.94);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.notice-box h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.15;
}

.notice-box p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.notice-box button {
  width: 100%;
  color: #0f172a;
  border-color: rgba(103, 232, 249, 0.5);
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  font-weight: 800;
}

@media (max-width: 920px) {
  .naming {
    grid-template-columns: 1fr;
  }

  .topbar,
  .action-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .status {
    width: 100%;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #clearBtn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    margin: 10px auto;
  }

  .workspace {
    padding: 18px;
    border-radius: 24px;
  }

  h1 {
    font-size: 34px;
  }

  .setting-strip,
  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .field {
    grid-template-columns: 1fr 82px auto;
    width: 100%;
  }

  .toggle {
    width: 100%;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .index {
    width: 100%;
    height: 36px;
  }

  .download {
    width: 100%;
  }
}
