* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "PingFang SC", "Microsoft Yahei", sans-serif;
  margin: 0;
  background: #eeeeee;
  color: #1c1c1c;
}

a {
  color: #1c1c1c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e6e6e6;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
}

.brand-title {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0.2px;
}

.brand-red {
  color: #d60f0f;
  font-size: 24px;
  font-weight: 1000;
}

.topbar-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 860px) {
  .row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.row.three {
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .row.three {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.card {
  background: #ffffff;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  padding: 14px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #cfcfcf;
  background: #ffffff;
  color: #1c1c1c;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

button {
  cursor: pointer;
  border-color: #d60f0f;
  background: #d60f0f;
  color: #ffffff;
}

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

.banner {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  font-size: 13px;
}

.banner-error {
  background: #d60f0f;
  border-color: #d60f0f;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
}

.muted {
  color: #6a6a6a;
  font-size: 13px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 560px) {
  .actions.two {
    grid-template-columns: 1fr 1fr;
  }
}

.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cfcfcf;
  font-size: 13px;
}

#batchLink {
  color: #2f2f2f;
  font-weight: 800;
}

.progress-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.progress-item {
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d7d7d7;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 8px;
}

.bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f2f2f2;
  border: 1px solid #d7d7d7;
  overflow: hidden;
}

.bar > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d60f0f, #ff5a5a);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: top;
}

th {
  text-align: left;
  color: #444444;
  font-weight: 600;
}

.status {
  font-size: 13px;
  margin-top: 8px;
}

.home {
  padding-top: 42px;
}

.home-title {
  text-align: center;
  font-size: 34px;
  line-height: 1.2;
  margin: 0;
  font-weight: 900;
}

.home-meta {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-search {
  position: relative;
  max-width: 820px;
  margin: 26px auto 0;
}

.home-search input {
  height: 54px;
  border-radius: 999px;
  padding-left: 18px;
  padding-right: 132px;
  font-size: 16px;
  border-color: #d0d0d0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.home-search-actions {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}

.home-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d60f0f;
  display: grid;
  place-items: center;
}

.home-icon-btn#btnPaste,
.home-icon-btn#btnClear {
  color: #8e8e8e;
}

.home-icon-btn#btnPaste:hover,
.home-icon-btn#btnClear:hover {
  background: transparent;
}

.home-icon-btn:hover {
  background: transparent;
  text-decoration: none;
}

.home-icon-btn:disabled {
  opacity: 0.35;
  background: transparent;
}

.home .banner-error {
  max-width: 540px;
  margin: 22px auto 0;
  border-radius: 4px;
  padding: 14px 12px;
}

.home-progress {
  max-width: 820px;
  margin: 18px auto 0;
}

.home-tipbox {
  max-width: 640px;
  margin: 44px auto 0;
  background: #ffffff;
  border: 1px solid #3b3b3b;
  border-radius: 4px;
  padding: 16px 18px;
}

.home-tip-title {
  text-align: center;
  font-weight: 800;
  color: #d60f0f;
  font-size: 14px;
}

.home-tip-divider {
  border-top: 1px solid #3b3b3b;
  margin: 12px 0;
}

.home-tip-text {
  text-align: center;
  font-size: 13px;
  color: #1c1c1c;
}

.home-tip-url {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #1c1c1c;
  word-break: break-all;
}

.home-hl {
  color: #d60f0f;
  font-weight: 900;
}

.home-section {
  max-width: 820px;
  margin: 44px auto 0;
  text-align: center;
}

.home-section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}

.home-paragraph {
  margin: 14px auto 0;
  max-width: 820px;
  color: #444444;
  font-size: 14px;
  line-height: 1.65;
}

/* ── 解析结果 ─────────────────────────────────────────── */
.parse-result {
  background: #ffffff;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  margin-top: 18px;
  overflow: hidden;
}

.parse-header {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.parse-thumb {
  width: 200px;
  height: 112px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  flex-shrink: 0;
}

.parse-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.parse-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #1c1c1c;
}

.parse-subtitle {
  margin: 0;
  font-size: 13px;
  color: #888;
}

.format-list {
  padding: 0;
}

.format-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.format-item:last-child {
  border-bottom: none;
}

.format-item:hover {
  background: #fafafa;
}

.format-type {
  flex: 1;
  font-size: 13px;
  color: #444;
}

.format-quality {
  width: 80px;
  font-size: 14px;
  font-weight: 600;
  color: #1c1c1c;
}

.format-size {
  width: 60px;
  font-size: 13px;
  color: #888;
  text-align: right;
}

.btn-download {
  padding: 6px 14px;
  background: #d60f0f;
  color: #fff !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}

.btn-download:hover {
  background: #b30000;
}

@media (max-width: 480px) {
  .parse-header {
    flex-direction: column;
  }
  .parse-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .format-quality {
    width: 60px;
    font-size: 12px;
  }
  .format-size {
    width: 50px;
  }
}
