/* 线稿工程风 · 简洁蓝图线条 · 清晰结构 · API 开放平台 */
:root {
  --blue: #1565D8;
  --blue-dark: #0D47A1;
  --blue-light: #E3F2FD;
  --blue-border: #BBDEFB;
  --gray-bg: #F4F6F8;
  --gray-border: #E0E0E0;
  --text: #212121;
  --text-secondary: #757575;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 4px 12px rgba(21, 101, 216, 0.15);
  --shadow-hover: 0 8px 24px rgba(21, 101, 216, 0.2);
  --blueprint-grid: rgba(21, 101, 216, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--blue-border);
}
.topbar-right { display: flex; align-items: center; gap: 24px; }
.btn-api {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}
.btn-api:hover { background: var(--blue); color: var(--white); }
.link-en {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}
.link-en:hover { color: var(--blue); }

/* ===== 首屏 ===== */
.hero {
  background: var(--gray-bg);
  position: relative;
  overflow: hidden;
  padding: 80px 24px 100px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(21,101,216,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
/* 蓝图网格背景 */
.hero-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--blueprint-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}
.announce {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: var(--blue);
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(21,101,216,0.06);
}
.announce-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 400;
}
.hero-cards {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.card {
  width: 280px;
  padding: 32px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); }
.card-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
}
.card-primary:hover { box-shadow: var(--shadow-hover); }
.card-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M0 0l60 60M60 0L0 60' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.card-secondary {
  background: var(--white);
  border: 1px solid var(--gray-border);
  color: var(--text);
}
.card-secondary:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.card-primary .card-icon { background: rgba(255,255,255,0.15); }
.card-secondary .card-icon { background: var(--blue-light); }
.card-title { font-size: 1.25rem; font-weight: 700; }
.card-desc { font-size: 0.875rem; opacity: 0.85; line-height: 1.5; }
.card-arrow {
  position: absolute;
  bottom: 24px; right: 24px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  transition: transform 0.2s;
}
.card-primary .card-arrow { background: rgba(255,255,255,0.2); color: var(--white); }
.card-secondary .card-arrow { background: var(--gray-bg); color: var(--text-secondary); }
.card:hover .card-arrow { transform: translateX(4px); }

/* ===== 线稿工程风区块 ===== */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 蓝图线稿卡片 */
.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.blueprint-card {
  border: 1.5px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--white);
  position: relative;
  transition: all 0.25s ease;
}
.blueprint-card::before {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px dashed var(--blue-border);
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.5;
}
.blueprint-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}
.blueprint-card:hover::before { border-color: var(--blue); opacity: 0.8; }
.bp-icon {
  width: 56px; height: 56px;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 20px;
  background: var(--blue-light);
}
.bp-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.bp-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* 线稿步骤 */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--blue-border);
}
.step {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  position: relative;
}
.step-num {
  width: 56px; height: 56px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--blue);
  font-size: 1.125rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.step-content h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.step-content p { font-size: 0.875rem; color: var(--text-secondary); }

/* 图片展示 */
.image-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.image-showcase img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  object-fit: cover;
  aspect-ratio: 16/10;
}

/* API 代码块 */
.api-block {
  background: #1a1a2e;
  border-radius: var(--radius);
  padding: 32px;
  color: #e0e0e0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  overflow-x: auto;
  position: relative;
  border: 1px solid #2d2d44;
}
.api-block::before {
  content: 'POST /v1/chat/completions';
  position: absolute;
  top: -12px; left: 24px;
  background: var(--blue);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.api-block .comment { color: #6a9955; }
.api-block .string { color: #ce9178; }
.api-block .keyword { color: #569cd6; }

/* 页脚 */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.8;
}

/* 响应式 */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero-cards { flex-direction: column; align-items: stretch; }
  .card { width: 100%; }
  .btn { width: 100%; }
  .topbar { padding: 0 16px; }
  .topbar-right { gap: 16px; }
}

/* 帮助中心特有 */
.help-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.help-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--gray-border);
  transition: all 0.2s;
}
.help-nav a:hover, .help-nav a.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.faq-item {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  transition: background 0.2s;
}
.faq-q:hover { background: var(--gray-bg); }
.faq-q::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-secondary);
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.faq-item.open .faq-a {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* 网页版入口页特有 */
.web-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}
.web-feature:nth-child(even) { direction: rtl; }
.web-feature:nth-child(even) > * { direction: ltr; }
.web-feature img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
}
.web-feature h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.web-feature p { color: var(--text-secondary); margin-bottom: 20px; }
.web-feature ul { list-style: none; }
.web-feature li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9375rem;
}
.web-feature li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}
@media (max-width: 768px) {
  .web-feature { grid-template-columns: 1fr; }
  .web-feature:nth-child(even) { direction: ltr; }
}
