:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-soft: #11182c;
  --card: rgba(20, 28, 48, 0.86);
  --card-border: rgba(120, 150, 210, 0.18);
  --text: #e8eefc;
  --muted: #93a2c4;
  --accent: #5b8cff;
  --accent-2: #35d0ba;
  --warning: #f5b84b;
  --error: #ff6b7a;
  --success: #49d68a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding: 40px 20px 64px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(91, 140, 255, 0.24), transparent 60%),
    radial-gradient(900px 500px at 92% 0%, rgba(53, 208, 186, 0.16), transparent 55%),
    linear-gradient(180deg, #080d19 0%, #0b1020 55%, #0a0f1c 100%);
  background-attachment: fixed;
}

.shell {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero {
  padding: 8px 4px 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(91, 140, 255, 0.36);
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.1);
  color: #b9ccff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffffff 10%, #9fbcff 60%, #7fe8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

.hint {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.card {
  padding: 22px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

input,
select,
button {
  font: inherit;
}

input[type="url"],
input[type="number"],
select {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(8, 13, 26, 0.72);
  border: 1px solid rgba(120, 150, 210, 0.24);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input[type="url"] {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
}

input:focus,
select:focus {
  border-color: rgba(91, 140, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.16);
}

input:disabled,
select:disabled {
  opacity: 0.62;
}

.controls {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 150px 190px 1fr;
  gap: 14px;
  align-items: end;
}

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

button {
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.18s, opacity 0.18s;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

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

button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #5b8cff, #3f6ff0);
  box-shadow: 0 10px 28px rgba(64, 112, 240, 0.34);
}

button.primary:hover:not(:disabled) {
  box-shadow: 0 14px 34px rgba(64, 112, 240, 0.46);
}

button.ghost {
  color: #c9d6f5;
  background: rgba(120, 150, 210, 0.1);
  border-color: rgba(120, 150, 210, 0.24);
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid transparent;
}

.notice.warning {
  color: #ffe2a6;
  background: rgba(245, 184, 75, 0.1);
  border-color: rgba(245, 184, 75, 0.32);
}

.notice.error {
  color: #ffd0d6;
  background: rgba(255, 107, 122, 0.11);
  border-color: rgba(255, 107, 122, 0.36);
}

.notice.success {
  color: #c3f7dc;
  background: rgba(73, 214, 138, 0.1);
  border-color: rgba(73, 214, 138, 0.32);
}

.progress-card {
  display: grid;
  gap: 14px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  font-size: 14px;
  color: var(--muted);
}

.status[data-kind="info"] {
  color: #a8c0ff;
}

.status[data-kind="success"] {
  color: var(--success);
}

.status[data-kind="error"] {
  color: var(--error);
}

.percent {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--muted);
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(120, 150, 210, 0.14);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b8cff, #35d0ba);
  box-shadow: 0 0 18px rgba(91, 140, 255, 0.45);
  transition: width 0.18s ease-out;
}

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

.stat {
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(8, 13, 26, 0.48);
  border: 1px solid rgba(120, 150, 210, 0.12);
  min-width: 0;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.stat strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.track strong {
  color: #cfdcf8;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tips {
  padding: 6px 8px 0;
  color: var(--muted);
}

.tips h2 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #c9d6f5;
  letter-spacing: 0.02em;
}

.tips ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.tips code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(120, 150, 210, 0.13);
  color: #c8d8ff;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

@media (max-width: 760px) {
  body {
    padding: 26px 14px 48px;
  }

  .card {
    padding: 18px;
  }

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

  .actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .actions button {
    flex: 1;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
