:root {
  --bg: #edf5ff;
  --bg-strong: #dceefe;
  --surface: rgba(247, 251, 255, 0.86);
  --surface-strong: #ffffff;
  --line: rgba(39, 90, 155, 0.14);
  --text: #10233d;
  --muted: #55708f;
  --primary: #1f67c7;
  --primary-deep: #13478c;
  --accent: #6eb7ff;
  --green: #1f8c7b;
  --shadow: 0 24px 60px rgba(32, 84, 153, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 183, 255, 0.30), transparent 26%),
    radial-gradient(circle at top right, rgba(31, 103, 199, 0.18), transparent 26%),
    linear-gradient(180deg, #edf4ff 0%, #f5faff 45%, #fbfdff 100%);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.top-header {
  margin-bottom: 18px;
}

.brand-link {
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-actions form {
  margin: 0;
}

.user-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--primary-deep);
  font-weight: 600;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash-banner {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.flash-banner.success {
  color: #165c49;
  background: rgba(217, 245, 236, 0.95);
}

.flash-banner.error {
  color: #8b2d17;
  background: rgba(255, 236, 231, 0.96);
}

.hero,
.section-block,
.section-split,
.analyzer-section {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 22px 24px 28px;
}

.topbar,
.hero-grid,
.section-split,
.analyzer-grid,
.result-head,
.preview-head {
  display: flex;
  gap: 20px;
}

.topbar,
.result-head,
.preview-head {
  justify-content: space-between;
  align-items: center;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #6eb7ff);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
}

.brand p,
.section-heading p,
.panel-tag,
.eyebrow,
.preview-head p,
.status-text,
.ghost-link {
  margin: 0;
  color: var(--muted);
}

.brand h1,
.hero-copy h2,
.section-heading h3,
.process-card h4,
.upload-title,
.result-head h4,
.preview-head h4,
.stream-card h4 {
  margin: 0;
}

.ghost-link,
.primary-btn,
.secondary-btn {
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ghost-link {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.hero-grid {
  margin-top: 34px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.split-copy,
.process-card,
.upload-card,
.result-card,
.preview-card,
.auth-card,
.auth-callout,
.history-card {
  border-radius: 24px;
}

.hero-copy {
  flex: 1.35;
}

.hero-panel {
  width: min(360px, 100%);
  padding: 16px;
  color: #eef7ff;
  background: linear-gradient(160deg, #12478f 0%, #0d2d59 100%);
}

.eyebrow {
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.hero-copy h2 {
  max-width: 12em;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.12;
}

.lead {
  max-width: 760px;
  margin: 18px 0 22px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-actions,
.upload-actions,
.highlight-list,
.panel-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.secondary-btn {
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #5faefc);
  color: #fff;
  box-shadow: 0 14px 30px rgba(31, 103, 199, 0.28);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border: 1px solid rgba(114, 79, 34, 0.12);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-link:hover {
  transform: translateY(-1px);
}

.fact-grid,
.stream-grid,
.metric-grid,
.preview-grid,
.download-grid {
  display: grid;
  gap: 16px;
}

.fact-grid {
  margin-top: 26px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact-card,
.stream-card,
.upload-card,
.result-card,
.preview-card,
.process-card {
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.fact-card {
  padding: 18px;
  border-radius: 20px;
}

.fact-card strong {
  display: block;
  font-size: 28px;
  color: var(--primary-deep);
}

.fact-card span {
  display: block;
  margin-top: 8px;
  line-height: 1.6;
  color: var(--muted);
}

.signal-list {
  margin: 18px 0 20px;
  padding-left: 18px;
  line-height: 1.9;
}

.panel-ribbon span,
.highlight-list span {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.panel-ribbon span {
  background: rgba(255, 255, 255, 0.1);
}

.section-block,
.analyzer-section {
  padding: 28px 24px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.section-heading h3 {
  font-size: clamp(28px, 4vw, 42px);
}

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

.stream-card {
  position: relative;
  padding: 22px;
  border-radius: 22px;
  overflow: hidden;
}

.feature-card {
  min-height: 220px;
}

.status-badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 103, 199, 0.12);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 700;
}

.stream-card .index {
  display: inline-block;
  margin-bottom: 20px;
  color: rgba(31, 103, 199, 0.45);
  font-size: 32px;
  font-weight: 700;
}

.stream-card p,
.split-copy p,
.process-card li,
.metric-card p {
  line-height: 1.75;
  color: var(--muted);
}

.section-split {
  padding: 24px;
  align-items: stretch;
}

.split-copy {
  flex: 1.2;
}

.process-card {
  width: min(390px, 100%);
  padding: 24px;
  background: linear-gradient(180deg, #eef6ff 0%, #ffffff 100%);
}

.process-card ol {
  margin: 18px 0 0;
  padding-left: 22px;
}

.highlight-list span {
  background: rgba(110, 183, 255, 0.16);
  color: var(--primary-deep);
}

.team-photo {
  display: block;
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-copy {
  padding: 14px 6px 4px;
}

.panel-note {
  margin: 10px 0 0;
  line-height: 1.7;
  color: rgba(238, 247, 255, 0.82);
}

.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.member-card,
.publication-item {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: 22px;
}

.member-card {
  padding: 22px;
  width: 100%;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.member-profile {
  display: block;
}

.member-photo {
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: #eef5ff;
}

.member-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 14px;
}

.member-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #7fc4ff);
}

.member-head h4,
.publication-item h4 {
  margin: 0;
  font-size: 22px;
}

.member-head p,
.publication-item p,
.member-summary {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.member-summary {
  margin-top: 0;
  max-width: none;
}

.leader-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
  align-self: stretch;
}

.leader-info-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f4f9ff, #ffffff);
  border: 1px solid rgba(39, 90, 155, 0.12);
  min-height: 100%;
}

.leader-info-card h5 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--primary-deep);
}

.leader-info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.publication-list {
  display: grid;
  gap: 14px;
}

.publication-item {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: start;
}

.pub-year {
  display: inline-grid;
  place-items: center;
  min-height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d8edff, #eef7ff);
  color: var(--primary-deep);
  font-weight: 700;
}

.analyzer-grid {
  align-items: stretch;
}

.upload-card,
.result-card,
.preview-card {
  padding: 22px;
}

.auth-page,
.history-page {
  display: block;
}

.auth-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-form {
  display: grid;
  gap: 14px;
}

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

.text-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(39, 90, 155, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font: inherit;
}

.text-input:focus {
  outline: 2px solid rgba(31, 103, 199, 0.18);
  border-color: rgba(31, 103, 199, 0.35);
}

.auth-submit {
  margin-top: 8px;
}

.auth-hint {
  margin: 18px 0 0;
  color: var(--muted);
}

.auth-hint a {
  color: var(--primary);
}

.auth-callout {
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(232, 243, 255, 0.94));
}

.auth-callout h4,
.history-head h4 {
  margin: 0;
}

.auth-callout p {
  margin: 14px 0 20px;
  line-height: 1.8;
  color: var(--muted);
}

.sample-option {
  margin-bottom: 14px;
}

.sample-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(31, 103, 199, 0.06);
  color: var(--primary-deep);
  font-size: 14px;
}

.sample-toggle input {
  margin: 0;
}

.upload-card {
  width: min(410px, 100%);
}

.result-card {
  flex: 1;
}

.upload-dropzone {
  min-height: 250px;
  padding: 24px;
  border: 2px dashed rgba(31, 103, 199, 0.24);
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(234, 245, 255, 0.88)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(110, 183, 255, 0.06) 14px 28px);
}

.upload-dropzone input {
  display: block;
  width: 100%;
  margin-bottom: 16px;
}

.upload-title {
  font-size: 22px;
}

.upload-subtitle {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.status-text {
  margin-top: 14px;
}

.metric-grid {
  margin-top: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(114, 79, 34, 0.1);
}

.metric-card h5 {
  margin: 0 0 12px;
  font-size: 18px;
}

.metric-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
  color: var(--primary-deep);
}

.preview-card {
  margin-top: 18px;
}

.preview-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.download-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-item {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(114, 79, 34, 0.1);
}

.preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.preview-item figcaption {
  padding: 14px 16px 16px;
  font-size: 14px;
  color: var(--muted);
}

.download-item {
  display: block;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(39, 90, 155, 0.1);
  text-decoration: none;
}

.download-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-deep);
}

.download-item span {
  color: var(--muted);
}

.history-list {
  display: grid;
  gap: 18px;
}

.admin-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(39, 90, 155, 0.1);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--primary-deep);
  background: rgba(237, 245, 255, 0.85);
  font-size: 14px;
}

.admin-table td {
  color: var(--muted);
}

.review-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-textarea {
  min-height: 88px;
  resize: vertical;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.table-btn {
  padding: 9px 14px;
  font-size: 13px;
}

.table-note {
  color: var(--muted);
  font-size: 13px;
}

.history-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.history-head,
.history-info-grid,
.history-meta,
.history-metrics,
.history-previews,
.history-downloads {
  display: grid;
  gap: 14px;
}

.history-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.history-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.history-meta {
  justify-items: end;
  color: var(--muted);
}

.history-info-grid {
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-info-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(237, 245, 255, 0.7);
  border: 1px solid rgba(39, 90, 155, 0.1);
}

.history-info-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-deep);
}

.history-info-item span {
  color: var(--muted);
}

.history-error {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 236, 231, 0.9);
  color: #8b2d17;
}

.history-metrics,
.history-previews,
.history-downloads {
  margin-top: 18px;
}

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

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

.subjob-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(237, 245, 255, 0.7);
  color: var(--muted);
}

.batch-result-card {
  display: grid;
  gap: 18px;
}

.progress-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(237, 245, 255, 0.7);
  border: 1px solid rgba(39, 90, 155, 0.1);
}

.task-progress {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(237, 245, 255, 0.72);
  border: 1px solid rgba(39, 90, 155, 0.12);
}

.task-progress[hidden] {
  display: none;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--primary-deep);
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 103, 199, 0.12);
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 220ms ease;
}

.progress-hint {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.task-progress.is-error {
  background: rgba(255, 236, 231, 0.92);
  border-color: rgba(182, 61, 28, 0.14);
}

.task-progress.is-error .progress-head {
  color: #8b2d17;
}

.task-progress.is-error .progress-bar {
  background: linear-gradient(90deg, #d45a34, #f18a68);
}

.task-progress.is-success .progress-bar {
  background: linear-gradient(90deg, #1f8c7b, #63c7a1);
}

.task-progress.is-indeterminate .progress-track {
  position: relative;
}

.task-progress.is-indeterminate .progress-bar {
  width: 42% !important;
  animation: task-progress-indeterminate 1.35s ease-in-out infinite;
}

@keyframes task-progress-indeterminate {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(260%);
  }
}

.history-metrics,
.history-previews,
.history-downloads {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-pill {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.completed {
  color: #165c49;
  background: rgba(217, 245, 236, 0.95);
}

.status-pill.running,
.status-pill.pending {
  color: #8b5b15;
  background: rgba(255, 243, 220, 0.96);
}

.status-pill.failed {
  color: #8b2d17;
  background: rgba(255, 236, 231, 0.96);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: 20px;
  border: 1px dashed rgba(114, 79, 34, 0.18);
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

@media (max-width: 1024px) {
  .hero-grid,
  .section-split,
  .analyzer-grid {
    flex-direction: column;
  }

  .hero-panel,
  .process-card,
  .upload-card {
    width: 100%;
  }

  .member-card {
    grid-template-columns: 1fr;
  }

  .fact-grid,
  .stream-grid,
  .metric-grid,
  .preview-grid,
  .download-grid,
  .admin-summary-grid,
  .history-metrics,
  .history-previews,
  .history-downloads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-head,
  .history-info-grid {
    grid-template-columns: 1fr;
  }

  .history-meta {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 10px;
  }

  .hero,
  .section-block,
  .section-split,
  .analyzer-section {
    border-radius: 22px;
  }

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

  .hero-copy h2 {
    font-size: 36px;
  }

  .fact-grid,
  .stream-grid,
  .metric-grid,
  .preview-grid,
  .download-grid,
  .admin-summary-grid,
  .history-metrics,
  .history-previews,
  .history-downloads {
    grid-template-columns: 1fr;
  }

  .member-profile,
  .leader-cards {
    grid-template-columns: 1fr;
  }

  .publication-item {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions .ghost-link,
  .nav-actions .primary-btn,
  .nav-actions .secondary-btn,
  .nav-actions form {
    width: 100%;
  }

  .nav-actions form .secondary-btn {
    width: 100%;
  }
}
