:root {
  color-scheme: dark;
  --bg: #06111d;
  --panel: rgba(11, 26, 43, 0.76);
  --panel-strong: rgba(16, 37, 61, 0.92);
  --line: rgba(130, 205, 255, 0.22);
  --text: #edf8ff;
  --muted: #9fb9ca;
  --accent: #4cc9f0;
  --accent-2: #7c3aed;
  --ok: #2dd4bf;
  --danger: #fb7185;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 14%, rgba(76, 201, 240, 0.15), transparent 28rem),
    linear-gradient(135deg, #06111d 0%, #0d1728 48%, #151226 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.tool-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  padding: 6px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 14, 25, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tool-tab:hover,
.tool-tab:focus-visible {
  color: var(--text);
  border-color: rgba(76, 201, 240, 0.42);
  background: rgba(76, 201, 240, 0.09);
}

.tool-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tool-tab.active {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.52);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(76, 201, 240, 0.12));
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.1);
}

.tool-tab-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary {
  color: var(--muted);
  font-size: 18px;
  margin: 16px 0 0;
}

.status-card,
.panel,
.drop-zone,
.log-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 16px var(--ok);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.drop-zone {
  position: relative;
  min-height: 430px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(76, 201, 240, 0.38);
  border-radius: 8px;
  pointer-events: none;
}

.drop-zone.drag {
  border-color: rgba(45, 212, 191, 0.72);
  background: rgba(11, 38, 52, 0.8);
}

.drop-zone.file-selected {
  border-color: rgba(45, 212, 191, 0.72);
  background:
    radial-gradient(circle at 50% 42%, rgba(45, 212, 191, 0.16), transparent 18rem),
    rgba(9, 31, 45, 0.86);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.14), 0 24px 90px rgba(0, 0, 0, 0.34);
}

.drop-zone.file-selected::before {
  border-color: rgba(45, 212, 191, 0.68);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-selected .upload-icon {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--ok), var(--accent));
  box-shadow: 0 0 34px rgba(45, 212, 191, 0.38);
}

.drop-zone h2,
.log-panel h2 {
  margin: 0;
}

.drop-zone p {
  color: var(--muted);
}

.selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: min(560px, 92%);
  margin: 14px auto 4px;
  padding: 14px 18px;
  border: 1px solid rgba(45, 212, 191, 0.48);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--text);
  text-align: left;
}

.selected-badge[hidden] {
  display: none;
}

.selected-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--ok), var(--accent));
  color: #03111c;
  font-size: 12px;
  font-weight: 900;
}

.selected-badge strong,
.selected-badge small {
  display: block;
}

.selected-badge strong {
  font-size: 18px;
  margin-bottom: 4px;
}

.selected-badge small {
  color: #bfe5f2;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.panel {
  border-radius: 8px;
  padding: 22px;
  background: var(--panel-strong);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(5, 12, 21, 0.72);
  color: var(--text);
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 15px;
}

.checks {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8e9f4;
}

.operation-help {
  margin: -4px 0 2px 28px;
  padding: 12px 14px;
  border: 1px solid rgba(76, 201, 240, 0.22);
  border-radius: 8px;
  background: rgba(5, 12, 21, 0.44);
  color: #a9c6d9;
  font-size: 14px;
  line-height: 1.65;
}

.operation-help[hidden] {
  display: none;
}

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

button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  color: #03111c;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--ok));
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 20px 0 14px;
}

#progressBar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--ok));
  transition: width 0.24s ease;
}

.message {
  min-height: 48px;
  color: var(--muted);
  line-height: 1.6;
}

.message.error {
  color: var(--danger);
}

.download {
  display: block;
  margin-top: 14px;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 8px;
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.download.disabled {
  color: rgba(159, 185, 202, 0.42);
  border-color: rgba(130, 205, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  cursor: not-allowed;
  box-shadow: none;
}

.download.ready {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.72);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(76, 201, 240, 0.16));
  cursor: pointer;
  box-shadow: 0 0 26px rgba(45, 212, 191, 0.16);
}

.download.ready:hover {
  border-color: rgba(45, 212, 191, 0.95);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.32), rgba(76, 201, 240, 0.22));
}

.log-panel {
  margin-top: 18px;
  border-radius: 8px;
  padding: 20px 22px;
}

.quiet-title {
  position: fixed;
  right: 18px;
  bottom: 12px;
  z-index: 5;
  color: rgba(159, 185, 202, 0.22);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.site-footer {
  padding: 0 16px 24px;
  text-align: center;
}

.site-footer a {
  color: rgba(159, 185, 202, 0.78);
  font-size: 13px;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

#logs {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 860px) {
  .tool-tabs {
    width: 100%;
  }

  .tool-tab {
    justify-content: center;
    flex: 1 1 0;
    padding-inline: 10px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .drop-zone {
    min-height: 300px;
  }

  .quiet-title {
    right: 12px;
    bottom: 10px;
    font-size: 11px;
  }
}
