/* 跨境电商物流工具箱 — 官网样式（与 APP.py COLORS 对齐） */

:root {
  --primary: #8b5cf6;
  --secondary: #ec4899;
  --accent: #f97316;
  --success: #10b981;
  --info: #06b6d4;
  --warning: #fbbf24;
  --danger: #ef4444;
  --dark: #1e1b4b;
  --bg-light: #faf5ff;
  --card-border: #e9d5ff;
  --text-muted: #6b7280;
  --shadow: 0 4px 24px rgba(139, 92, 246, 0.12);
  --radius: 16px;
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--dark);
  background: var(--bg-light);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 顶栏 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--dark);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

/* 主内容区偏移顶栏 */
main {
  padding-top: var(--nav-h);
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin: 0 0 12px;
}

.hero-slogan {
  font-size: 1.15rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  background: linear-gradient(160deg, var(--dark) 0%, #312e81 100%);
  border-radius: var(--radius);
  padding: 32px;
  color: #fff;
  box-shadow: var(--shadow);
  min-height: 280px;
}

.hero-visual h3 {
  margin: 0 0 20px;
  font-size: 1rem;
  opacity: 0.9;
}

.tool-grid-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tool-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
}

/* 统计条 */
.stats-bar {
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 1.75rem;
  color: var(--primary);
}

.stat-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 通用区块 */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.75rem;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 40px;
  max-width: 560px;
}

/* 功能卡片 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.feature-card .cat-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.cat-make { background: #fef3c7; color: #b45309; }
.cat-check { background: #d1fae5; color: #047857; }
.cat-assist { background: #ede9fe; color: #6d28d9; }
.cat-unique { background: #f3f4f6; color: #4b5563; }
.cat-api { background: #cffafe; color: #0e7490; }

.feature-card ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.feature-card li {
  margin-bottom: 6px;
}

.badge-db {
  font-size: 0.7rem;
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* 物流商 */
.integrations {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.chip {
  background: #fff;
  border: 1px solid var(--card-border);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
}

/* 流程 */
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  text-align: center;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
}

.step-num {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 700;
  margin: 0 auto 12px;
}

/* 下载区 */
.download-box {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.version-line {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.version-line #latest-version {
  color: var(--primary);
  font-weight: 700;
}

.requirements {
  text-align: left;
  max-width: 480px;
  margin: 24px auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.package-list {
  text-align: left;
  max-width: 520px;
  margin: 16px auto 24px;
  font-size: 0.85rem;
}

/* FAQ */
.faq-item {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq-item h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 页脚 */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 24px;
  margin-top: 48px;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: #c4b5fd;
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }
}
