:root {
  --ink: #0f2027;
  --ink-soft: #203a43;
  --accent: #2c5364;
  --accent-bright: #38bdf8;
  --accent-warm: #f97316;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --line: #dfe5ea;
  --text: #1f2d33;
  --text-muted: #64757f;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(15, 32, 39, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 32, 39, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.12), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(249, 115, 22, 0.1), transparent 38%),
    linear-gradient(180deg, #eef2f5 0%, #f7f9fa 320px, #f4f6f8 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-bright);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 32, 39, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: none;
  box-shadow: none;
}

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.78);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: #fff;
  border-bottom-color: var(--accent-bright);
}

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 200px;
  gap: 28px;
  align-items: start;
}

.ad-column {
  width: 200px;
  min-height: 1px;
}

.main-column {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 55%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 34px 32px;
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.14);
}

.hero h1 {
  color: #fff;
  font-size: 27px;
  line-height: 1.4;
}

.hero-sub {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14.5px;
  max-width: 720px;
}

.hero-tags {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags li {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 22px;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 18px;
  padding-left: 12px;
  border-left: 4px solid var(--accent-bright);
  margin-bottom: 20px;
}

.field {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 9px;
}

.file-list {
  display: none;
  margin-top: 14px;
  border: 1px solid #b6e3c6;
  border-left: 5px solid #16a34a;
  border-radius: 10px;
  background: #f0fdf4;
  padding: 12px 16px;
}

.file-list.is-visible {
  display: block;
  animation: fileListIn 0.25s ease;
}

@keyframes fileListIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-list-title {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #15803d;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed #cbe9d6;
  font-size: 13.5px;
}

.file-item:first-of-type {
  border-top: 0;
}

.file-item-icon {
  flex: none;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.file-item-name {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  word-break: break-all;
}

.file-item-size {
  flex: none;
  color: var(--text-muted);
  font-size: 12.5px;
}

.drop-zone {
  border: 2px dashed #c3d0d8;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: #fafcfd;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--accent-bright);
  background: #f0f9ff;
}

.drop-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.drop-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.text-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.text-input--sm {
  max-width: 260px;
}

.text-input:disabled {
  background: #f2f4f6;
  color: #9aa8b0;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}

.radio-item input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.size-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  cursor: pointer;
  background: #fbfcfd;
  transition: border-color 0.2s, background 0.2s;
}

.size-item:hover {
  border-color: var(--accent-bright);
}

.size-item input {
  accent-color: var(--accent);
  cursor: pointer;
}

.size-item:has(input:checked) {
  border-color: var(--accent);
  background: #eef7fb;
  font-weight: 700;
  color: var(--ink);
}

.custom-size {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-row {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 30px;
  font-size: 14.5px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 32, 39, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(15, 32, 39, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  background: #eef2f5;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: #e2e9ee;
}

.status-text {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  min-height: 20px;
}

.status-text.is-error {
  color: #c2410c;
}

.status-text.is-success {
  color: #15803d;
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table,
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.result-table th,
.result-table td,
.info-table th,
.info-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.result-table thead th,
.info-table thead th {
  background: #f2f6f8;
  color: var(--ink-soft);
  font-weight: 700;
  white-space: nowrap;
}

.info-table tbody th {
  background: #f8fafb;
  width: 110px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.empty-row td {
  text-align: center;
  color: #9aa8b0;
  padding: 26px 12px;
}

.preview-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eef2f5 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f5 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f5 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  display: block;
}

.file-name {
  font-weight: 700;
  color: var(--ink-soft);
  word-break: break-all;
}

.res-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  background: #eef2f5;
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.res-badge--multi {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.result-summary {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #b6e3c6;
  border-left: 5px solid #16a34a;
  font-size: 14px;
  color: #15803d;
}

.result-summary.is-visible {
  display: flex;
}

.summary-icon {
  flex: none;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.summary-text strong {
  color: #14532d;
  font-size: 15px;
}

.size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.size-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: #eef7fb;
  border: 1px solid #cfe6f2;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.download-link {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.download-link:hover {
  background: var(--ink);
  color: #fff;
}

.step-list {
  margin: 0;
  padding-left: 22px;
}

.step-list li {
  margin-bottom: 14px;
  color: var(--text);
}

.step-list li:last-child {
  margin-bottom: 0;
}

.step-list strong {
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: #fbfcfd;
}

.faq-list details:last-child {
  margin-bottom: 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 14.5px;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--accent-bright);
  font-weight: 700;
}

.faq-list details[open] summary::before {
  content: "−";
}

.faq-list p {
  margin: 10px 0 0 18px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.site-footer {
  margin-top: 10px;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 18px 32px;
  }

  .ad-column {
    display: none;
  }

  .main-column {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
    height: 56px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    padding: 26px 20px;
  }

  .hero h1 {
    font-size: 21px;
  }

  .panel {
    padding: 20px 18px;
  }

  .size-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  .action-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
