:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f9fbfc;
  --text: #101828;
  --muted: #667085;
  --line: #d9e1e8;
  --primary: #0b7a75;
  --primary-dark: #075e59;
  --primary-soft: #e7f6f4;
  --success: #087443;
  --success-soft: #e8f7ef;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warning: #b54708;
  --warning-soft: #fff4e6;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef5f4 0, rgba(244, 246, 248, 0) 280px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
textarea,
a {
  font: inherit;
}

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

.contact-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #b9dfda;
  border-radius: 8px;
  background: linear-gradient(90deg, #e7f6f4 0, #ffffff 72%);
}

.contact-notice-copy {
  display: grid;
  gap: 4px;
}

.contact-notice-copy strong {
  font-size: 14px;
}

.contact-notice-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.brand p,
.muted-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions a,
.icon-button,
.primary-button,
.download-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.header-actions a {
  padding: 0 14px;
  color: var(--primary-dark);
  border: 1px solid #addad5;
  background: #fff;
}

.text-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #addad5;
  color: var(--primary-dark);
  background: #fff;
  font-size: 13px;
}

.icon-button {
  width: 40px;
  border: 1px solid #addad5;
  color: var(--primary-dark);
  background: #fff;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.status-strip div {
  min-height: 84px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.status-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.seo-intro {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #cfe4e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.seo-intro p {
  color: #3d4d5c;
  font-size: 14px;
  line-height: 1.65;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.submit-card,
.queue-card,
.downloads-card,
.announcements-card,
.seo-faq {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.submit-card {
  padding: 20px;
}

.queue-card {
  min-height: 410px;
}

.downloads-card,
.announcements-card.expanded,
.seo-faq {
  margin-top: 16px;
}

.seo-faq {
  padding: 20px;
}

.seo-faq .card-head {
  margin-bottom: 14px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.faq-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #edf1f4;
  border-radius: 8px;
  background: var(--surface-soft);
}

.faq-grid h3 {
  margin: 0;
  color: #23313f;
  font-size: 15px;
  line-height: 1.35;
}

.faq-grid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-head {
  margin-bottom: 16px;
}

.card-head.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 750;
}

textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  border: 1px solid #c8d2dc;
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #c8d2dc;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 122, 117, 0.14);
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 122, 117, 0.14);
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  gap: 8px;
  border: 0;
  color: #fff;
  background: var(--primary);
}

.primary-button.compact {
  width: auto;
  min-width: 112px;
  margin-top: 0;
}

.primary-button:hover,
.icon-button:hover {
  background: var(--primary-dark);
  color: #fff;
}

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

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.message.success {
  color: var(--success);
}

.tips {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.tips div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e4e9ee;
  border-radius: 8px;
  background: var(--surface-soft);
}

.tips strong {
  font-size: 13px;
}

.tips span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tip-link {
  width: fit-content;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.tip-link:hover {
  text-decoration: underline;
}

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #b9dfda;
  border-radius: 8px;
  background: var(--primary-soft);
}

.support-card div {
  display: grid;
  gap: 5px;
}

.support-card strong {
  font-size: 14px;
}

.support-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.support-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid #c8d2dc;
  border-radius: 8px;
  background: #fff;
}

.polling-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 750;
}

.jobs-list {
  display: grid;
}

.job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #edf1f4;
}

.job:last-child {
  border-bottom: 0;
}

.job-main {
  min-width: 0;
}

.job-url,
.download-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-url {
  color: #23313f;
  font-size: 14px;
  font-weight: 650;
}

.job-meta,
.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.job-progress {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.job-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf2;
}

.job-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.job-progress-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.status.pending {
  color: #475467;
  background: #eef1f5;
}

.status.running {
  color: var(--warning);
  background: var(--warning-soft);
}

.status.success {
  color: var(--success);
  background: var(--success-soft);
}

.status.failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.error-text {
  margin-top: 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}

.downloads-list {
  display: grid;
}

.announcements-list {
  display: grid;
}

.announcements-card {
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.announcement-summary {
  display: grid;
  grid-template-columns: auto auto minmax(160px, 0.7fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(90deg, #e7f6f4 0, #ffffff 65%);
  cursor: pointer;
  list-style: none;
}

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

.contact-float-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 18px 40px rgba(11, 122, 117, 0.24);
  cursor: pointer;
  font-weight: 800;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.52);
}

.contact-modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 24px));
  margin: 8vh auto 0;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(16, 24, 40, 0.22);
}

.contact-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid #d0d8df;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.contact-modal-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.contact-modal-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  margin-top: 18px;
  align-items: start;
}

.contact-modal-body img {
  width: 180px;
  height: 180px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
}

.contact-modal-content {
  display: grid;
  gap: 16px;
}

.contact-benefits {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
}

.contact-benefits div {
  padding: 10px 12px;
  border: 1px solid #e7edf2;
  border-radius: 8px;
  background: var(--surface-soft);
}

.download-code-form {
  display: grid;
  gap: 10px;
}

.download-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.announcement-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 122, 117, 0.12);
}

.announcement-kicker {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.announcement-summary strong,
.announcement-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-summary strong {
  color: #23313f;
  font-size: 14px;
}

.announcement-desc {
  color: var(--muted);
  font-size: 13px;
}

.announcements-card:not([open]) .announcements-list,
.announcements-card:not([open]) .empty-state {
  display: none;
}

.announcements-card[open] .announcements-list {
  display: grid;
}

.announcements-card[open] .empty-state {
  display: block;
}

.announcements-card[open] #announcement-toggle {
  font-size: 0;
}

.announcements-card[open] #announcement-toggle::after {
  content: "收起";
  font-size: 13px;
}

.announcement {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #edf1f4;
}

.announcement:last-child {
  border-bottom: 0;
}

.announcement-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.announcement-body {
  min-width: 0;
}

.announcement-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #23313f;
  font-size: 15px;
}

.announcement-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.announcement-tag.fix {
  color: var(--success);
  background: var(--success-soft);
}

.announcement-tag.notice,
.announcement-tag.issue {
  color: var(--warning);
  background: var(--warning-soft);
}

.announcement p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #edf1f4;
}

.download-item:last-child {
  border-bottom: 0;
}

.download-title {
  max-width: 100%;
  color: #23313f;
  font-size: 15px;
  font-weight: 750;
}

.media-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 8px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
  vertical-align: 1px;
}

.platform-badge {
  color: #ffffff;
}

.platform-douyin {
  background: #111827;
  border-color: #111827;
}

.platform-bilibili {
  background: #00a1d6;
  border-color: #008fbe;
}

.media-type-badge {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.download-link {
  min-height: 34px;
  padding: 0 12px;
  color: var(--primary-dark);
  border: 1px solid #addad5;
  background: #fff;
  font-size: 13px;
}

.download-link.primary {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.empty-state {
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}

.pager {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #edf1f4;
}

.pager-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.pager-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #c8d2dc;
  border-radius: 8px;
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.pager-button:hover:not(:disabled) {
  color: var(--primary-dark);
  border-color: #addad5;
  background: var(--primary-soft);
}

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

.site-footer a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary-dark);
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 16px 0 28px;
  }

  .app-header,
  .workspace,
  .download-item,
  .job,
  .announcement,
  .contact-modal-body {
    grid-template-columns: 1fr;
  }

  .app-header,
  .workspace {
    display: grid;
  }

  .header-actions {
    width: 100%;
  }

  .contact-notice {
    display: grid;
  }

  .header-actions a {
    flex: 1;
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .announcement-summary {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }

  .announcement-desc {
    grid-column: 3 / -1;
  }

  .card-head.inline {
    align-items: flex-start;
  }

  .file-actions {
    justify-content: flex-start;
  }

  .pager {
    justify-content: space-between;
  }

  .support-card {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .support-card img {
    width: 88px;
    height: 88px;
  }

  .contact-modal-body img {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 520px) {
  .status-strip {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

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

  .contact-float-button {
    right: 14px;
    bottom: 14px;
  }
}
