/* ===== interface 模板自定义样式 ===== */

:root {
  --if-text: #0f172a;
  --if-text-muted: #334155;
  --if-text-light: #64748b;
  --if-primary: #2563eb;
  --if-primary-dark: #1d4ed8;
  --if-bg: #ffffff;
  --if-bg-soft: #f1f5f9;
  --if-border: #e2e8f0;
  --if-radius: 0.5rem;
  --if-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --if-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--if-text);
  background: var(--if-bg);
  line-height: 1.7;
}

a {
  color: var(--if-primary);
  transition: color 0.15s ease;
}
a:hover {
  color: var(--if-primary-dark);
}

/* ===== 顶部导航 ===== */
.navbar {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  box-shadow: var(--if-shadow);
}
.navbar-brand {
  font-size: 1.25rem;
  color: var(--if-text) !important;
  letter-spacing: -0.01em;
}
.navbar .nav-link {
  color: var(--if-text-muted);
  font-weight: 500;
  padding: 0.5rem 1rem !important;
}
.navbar .nav-link:hover {
  color: var(--if-primary);
}
.navbar .btn-primary {
  background: var(--if-primary);
  border-color: var(--if-primary);
  font-weight: 500;
}
.navbar .btn-primary:hover {
  background: var(--if-primary-dark);
  border-color: var(--if-primary-dark);
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 5rem 0 4.5rem;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--if-text);
  margin-bottom: 1.25rem;
}
.hero .lead {
  font-size: 1.125rem;
  color: var(--if-text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero .btn-lg {
  padding: 0.75rem 1.75rem;
  font-weight: 500;
}
.btn-primary {
  background: var(--if-primary);
  border-color: var(--if-primary);
}
.btn-primary:hover {
  background: var(--if-primary-dark);
  border-color: var(--if-primary-dark);
}
.btn-outline-primary {
  color: var(--if-primary);
  border-color: var(--if-primary);
}
.btn-outline-primary:hover {
  background: var(--if-primary);
  border-color: var(--if-primary);
}

/* Hero 代码片段卡片 */
.code-card {
  background: #f8fafc;
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  box-shadow: var(--if-shadow-lg);
  overflow: hidden;
}
.code-card-header {
  background: #f1f5f9;
  border-bottom: 1px solid var(--if-border);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.code-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}
.code-card-dot.is-primary { background: var(--if-primary); }
.code-card-title {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--if-text-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code-card pre {
  margin: 0;
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--if-text);
  overflow-x: auto;
}
.code-card .c-key { color: #2563eb; }
.code-card .c-str { color: #16a34a; }
.code-card .c-com { color: #94a3b8; }
.code-card .c-fn  { color: #9333ea; }

/* ===== 通用区块 ===== */
.section {
  padding: 5rem 0;
}
.section-soft {
  background: var(--if-bg-soft);
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--if-text);
  margin-bottom: 0.75rem;
}
.section-subtitle {
  color: var(--if-text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 3rem;
}

/* ===== 接入流程卡片 ===== */
.step-card {
  background: #fff;
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  padding: 2rem 1.5rem;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.step-card:hover {
  box-shadow: var(--if-shadow-lg);
  transform: translateY(-2px);
}
.step-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--if-primary);
  color: var(--if-primary);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.step-icon {
  font-size: 1.5rem;
  color: var(--if-primary);
  margin-bottom: 1rem;
}
.step-card h5 {
  font-weight: 600;
  color: var(--if-text);
  margin-bottom: 0.5rem;
}
.step-card p {
  color: var(--if-text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* ===== 文档入口卡片 ===== */
.doc-card {
  display: block;
  background: #fff;
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  padding: 1.75rem 1.5rem;
  height: 100%;
  text-decoration: none;
  color: var(--if-text);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.doc-card:hover {
  box-shadow: var(--if-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--if-primary);
  color: var(--if-text);
}
.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--if-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.doc-card h5 {
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.doc-card p {
  color: var(--if-text-light);
  font-size: 0.9rem;
  margin: 0;
}
.doc-card .doc-arrow {
  color: var(--if-primary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  display: inline-block;
}

/* ===== 页脚 ===== */
footer {
  font-size: 0.9rem;
}
footer a {
  color: var(--if-text-muted);
}
footer a:hover {
  color: var(--if-primary);
}
footer h6 {
  color: var(--if-text);
}

/* ===== 响应式 ===== */
@media (max-width: 991.98px) {
  .hero {
    padding: 3rem 0 2.5rem;
    text-align: center;
  }
  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero .code-card {
    margin-top: 2.5rem;
  }
  .section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 575.98px) {
  .hero h1 {
    font-size: 1.7rem;
  }
  .hero .btn-lg {
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
  }
  .step-card,
  .doc-card {
    padding: 1.5rem 1.25rem;
  }
}
