/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --accent: #f97316;
  --text: #1e1b2e;
  --text-2: #6b7280;
  --bg: #fafafc;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 40px rgba(79,70,229,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ 导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.brand-logo svg { width: 20px; height: 20px; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.3px; }
.brand-accent { color: var(--primary); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 14.5px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.usage-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
}
.usage-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.usage-chip.low .usage-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,.15); }
.usage-chip.exhausted .usage-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
.usage-chip strong { color: var(--text); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(79,70,229,.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.35); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 9px 20px;
  font-size: 14px;
}
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-2); padding: 8px 14px; font-size: 13.5px; }
.btn-ghost:hover { color: var(--text); background: #f3f4f6; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }
.btn-danger { background: #ef4444; color: #fff; padding: 9px 18px; font-size: 13.5px; }
.btn-danger:hover { background: #dc2626; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ============ Hero ============ */
.hero { padding: 76px 24px 56px; text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { color: var(--text-2); font-size: 17px; margin-bottom: 32px; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.hero-note { color: var(--text-2); font-size: 13.5px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 28px; font-weight: 800; color: var(--primary); }
.stat span { font-size: 13px; color: var(--text-2); }

/* ============ 工具区 ============ */
.tools-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.section-head p { color: var(--text-2); font-size: 15px; }
.pro-tag-mini {
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.tool-card.pro { position: relative; }
.tool-card .tool-emoji { font-size: 30px; }
.tool-card h4 { font-size: 16.5px; font-weight: 700; }
.tool-card p { font-size: 13px; color: var(--text-2); flex: 1; }
.tool-card .pro-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.tool-card .tool-meta { display: flex; align-items: center; justify-content: space-between; }
.tool-card .tool-meta .free-tag { font-size: 12px; color: #22c55e; font-weight: 600; }
.tool-card .tool-meta .pro-tag { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ============ 工作区 ============ */
.workspace {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.workspace-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.workspace-head h3 { font-size: 16px; font-weight: 700; margin-right: auto; }
.ws-body { padding: 28px; min-height: 220px; }

.dropzone {
  border: 2px dashed #c7c9d4;
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: #fafbff;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.dropzone .dz-icon { font-size: 44px; margin-bottom: 12px; }
.dropzone .dz-main { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.dropzone .dz-sub { font-size: 13.5px; color: var(--text-2); }

.file-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}
.file-item .f-icon { font-size: 20px; }
.file-item .f-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .f-size { color: var(--text-2); font-size: 12.5px; }
.file-item .f-remove {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; font-size: 17px; transition: color .2s;
}
.file-item .f-remove:hover { color: #ef4444; }

.ws-result { margin-top: 24px; text-align: center; }
.ws-result .result-file {
  display: inline-flex; align-items: center; gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.ws-result .result-file:hover { background: #dcfce7; transform: translateY(-1px); }

.progress-wrap { margin-top: 24px; }
.progress-bar {
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 999px;
  transition: width .3s;
}
.progress-text { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 10px; }

.merge-options { margin-top: 20px; display: flex; gap: 16px; align-items: center; }
.merge-options label { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.merge-options input[type="checkbox"] { accent-color: var(--primary); }

/* ============ 定价 ============ */
.pricing { padding: 72px 24px; background: var(--card); border-top: 1px solid var(--border); }
.pricing-cards {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.price-card.featured {
  border: 2px solid var(--primary);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.featured-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card h3 { font-size: 18px; font-weight: 700; }
.price-card .price { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.price-card .price span { font-size: 15px; color: var(--text-2); font-weight: 400; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.price-card ul li { font-size: 14px; color: var(--text-2); position: relative; padding-left: 26px; }
.price-card ul li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--primary);
  font-weight: 700;
}
.price-card .btn { margin-top: auto; }

/* ============ FAQ ============ */
.faq { max-width: 720px; margin: 0 auto; padding: 72px 24px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-list details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  cursor: pointer;
}
.faq-list summary { font-weight: 600; font-size: 15px; }
.faq-list p { color: var(--text-2); font-size: 14px; margin-top: 10px; }

/* ============ 页脚 ============ */
.footer { text-align: center; padding: 32px 24px; color: var(--text-2); font-size: 13px; border-top: 1px solid var(--border); }

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 46, 0.55);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay:not([hidden]) {
  display: flex;
  animation: fadeIn .2s;
}
.modal {
  background: var(--card);
  border-radius: 18px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  animation: slideUp .25s;
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}
.modal-close:hover { color: var(--text); }
.modal-icon { font-size: 44px; margin-bottom: 14px; }
.modal h3 { font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.modal-sub { color: var(--text-2); font-size: 14px; margin-bottom: 22px; }
.modal-benefits { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; text-align: left; }
.modal-benefit { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.modal-benefit span { color: var(--primary); font-weight: 700; }
.modal .btn { margin-bottom: 8px; }
.checkout-detail { margin-bottom: 24px; text-align: left; }
.checkout-detail > div {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}
.checkout-detail .checkout-total { border-bottom: none; font-size: 16px; color: var(--text); font-weight: 700; }
.checkout-note { font-size: 12px; color: #9ca3af; margin-top: 12px; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  animation: slideUp .3s;
}

/* ============ 动画 ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .hero h1 { font-size: 36px; }
  .nav-links { display: none; }
  .hero-stats { gap: 24px; }
  .pricing-cards { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
