:root {
  --bg: linear-gradient(180deg, #f7f8fb 0%, #f2f5fa 100%);
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --ink: #10203b;
  --muted: #5a6780;
  --line: rgba(16, 32, 59, 0.12);
  --accent: #1959ff;
  --accent-strong: #0f3eb7;
  --accent-warm: #ffb020;
  --shadow: 0 12px 32px rgba(18, 53, 126, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.wordmark {
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.nav a:hover,
.footer-links a:hover {
  color: var(--accent-strong);
}

.nav-cta,
.primary-link,
.secondary-link,
.plan-link,
.actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-cta,
.primary-link,
.plan-link.primary,
.actions button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(25, 89, 255, 0.18);
}

.secondary-link,
.plan-link,
.dropzone,
.mini-card,
.proof-card,
.feature-card,
.price-card,
.faq-card,
.legal-card,
.thumb,
.controls,
.signal-bar,
.tool-main,
.tool-side {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.secondary-link,
.plan-link {
  color: var(--ink);
}

.nav-cta:hover,
.primary-link:hover,
.secondary-link:hover,
.plan-link:hover,
.actions button:not(:disabled):hover {
  transform: translateY(-2px);
}

.tool-main,
.tool-side,
.legal-card {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.simple-hero {
  max-width: 760px;
  margin: 20px 0 26px;
  padding: 12px 0 4px;
}

.simple-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.02;
}

.simple-hero-text {
  max-width: 640px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading p,
.proof-copy,
.plan-copy,
.faq-card p,
.mini-card p,
.legal-card p,
.legal-card li,
.feature-card p,
.footer-copy {
  color: var(--muted);
  line-height: 1.65;
}

.proof-card,
.mini-card,
.feature-card,
.price-card,
.faq-card,
.legal-card,
.tool-main,
.tool-side {
  border-radius: var(--radius-xl);
}

.proof-card,
.mini-card,
.feature-card,
.price-card,
.faq-card,
.legal-card {
  padding: 22px;
}

.proof-card.alt,
.mini-card.contrast,
.price-card.featured {
  background: linear-gradient(165deg, rgba(16, 32, 59, 0.96), rgba(25, 89, 255, 0.88));
  color: #fff;
}

.proof-card.alt p,
.mini-card.contrast p,
.price-card.featured .plan-copy,
.price-card.featured .plan-list li {
  color: rgba(255, 255, 255, 0.82);
}

.proof-label,
.mini-label {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm);
}

.proof-list,
.plan-list,
.legal-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.proof-list li,
.plan-list li {
  margin-bottom: 8px;
}

.tool-section,
.feature-section,
.pricing-section,
.faq-section {
  margin-bottom: 32px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading.compact h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.tool-main,
.tool-side {
  padding: 18px;
}

.tool-main-standalone {
  padding: 20px;
}

.tool-side {
  display: grid;
  gap: 18px;
}

.mini-item {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid rgba(16, 32, 59, 0.1);
}

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

.mini-item span {
  color: var(--muted);
  line-height: 1.5;
}

.dropzone {
  border: 2px dashed rgba(25, 89, 255, 0.24);
  border-radius: 18px;
  padding: 34px 24px;
  text-align: center;
  background: var(--panel-strong);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hint {
  margin-bottom: 10px;
  font-size: 20px;
}

.hint button {
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.note {
  margin-bottom: 0;
  color: var(--muted);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
}

.status {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions button#a4Btn {
  background: linear-gradient(135deg, #10203b, #214a9f);
}

.actions button#splitBtn {
  background: linear-gradient(135deg, #ffb020, #df6c00);
}

.actions button:disabled {
  background: #cdd5e2;
  color: #eef2f8;
  box-shadow: none;
  cursor: not-allowed;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mini-feature-section {
  margin-bottom: 28px;
}

.mini-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mini-feature-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.mini-feature-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.mini-feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.checkout-status {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 700;
}

.checkout-button {
  width: fit-content;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(25, 89, 255, 0.18);
}

.checkout-note {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.success-card h1 {
  margin-bottom: 10px;
}

.thumb {
  padding: 10px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.thumb:hover,
.thumb.selected {
  transform: translateY(-2px);
  border-color: rgba(25, 89, 255, 0.34);
}

.page-face {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.72;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 240, 255, 0.96)),
    linear-gradient(145deg, rgba(25, 89, 255, 0.12), rgba(255, 176, 32, 0.14));
  border: 1px solid rgba(25, 89, 255, 0.12);
}

.page-number {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  color: var(--accent-strong);
}

.thumb .caption,
.thumb .meta {
  text-align: center;
}

.thumb .caption {
  margin-top: 9px;
  font-weight: 700;
}

.thumb .meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.feature-grid,
.pricing-grid,
.faq-grid {
  display: grid;
  gap: 18px;
}

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

.pricing-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.simple-pricing {
  margin-bottom: 24px;
}

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

.faq-grid {
  grid-template-columns: repeat(2, 1fr);
}

.feature-number,
.plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(25, 89, 255, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-name {
  margin: 14px 0 6px;
  font-size: 26px;
  font-weight: 800;
}

.plan-price {
  margin-bottom: 12px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.plan-link {
  margin-top: 14px;
  border-radius: 999px;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 24px 0 8px;
}

.simple-footer {
  padding-top: 12px;
}

.footer-mark {
  display: inline-block;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
}

.footer-meta {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
}

.legal-shell {
  max-width: 940px;
}

.legal-main {
  padding-top: 20px;
}

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

.legal-card h2 {
  margin-top: 26px;
  margin-bottom: 8px;
  font-size: 24px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

@media (max-width: 1080px) {
  .tool-layout,
  .pricing-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .mini-feature-grid,
  .simple-pricing-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--content-width));
    padding-top: 12px;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    border-radius: 26px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    font-size: 14px;
  }

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

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    width: 100%;
  }

  .actions button {
    width: 100%;
  }

}

/* 统一宽度选项样式 */
.uniform-options {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e9ecef;
}

.options-header h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #212529;
}

.options-header p {
  margin: 0 0 1rem 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.option-group {
  margin-bottom: 1.25rem;
}

.option-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
  font-size: 0.95rem;
}

.option-hint {
  margin: 0.25rem 0 0.5rem 0;
  color: #6c757d;
  font-size: 0.85rem;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-btn {
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.option-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.option-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.selected-page {
  padding: 0.75rem;
  background: #e9ecef;
  border-radius: 4px;
  font-weight: 500;
  color: #495057;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.size-inputs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#customWidth {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  width: 120px;
  font-size: 0.95rem;
}

.size-unit {
  color: #6c757d;
  font-size: 0.9rem;
}

.size-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 0.4rem 0.75rem;
  background: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: #dee2e6;
}

.option-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.primary-btn {
  padding: 0.75rem 1.5rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: #0056b3;
}

.secondary-btn {
  padding: 0.75rem 1.5rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.secondary-btn:hover {
  background: #545b62;
}

.text-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #6c757d;
  border: none;
  font-weight: 500;
  cursor: pointer;
}

.text-btn:hover {
  color: #495057;
}

.analysis-actions {
  margin-bottom: 1rem;
}

/* 分析报告模态框样式 */
.analysis-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #212529;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #212529;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.summary-label {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
}

.report-details h4 {
  margin: 1.5rem 0 1rem 0;
  font-size: 1.1rem;
  color: #212529;
}

.size-distribution {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.anomalies-list, .suggestions {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.page-data-table {
  overflow-x: auto;
}

.page-data-table table {
  width: 100%;
  border-collapse: collapse;
}

.page-data-table th,
.page-data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.page-data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.page-data-table tr:hover {
  background: #f8f9fa;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
