/* 芯片剖面风 · 微观电路 · 层级结构 · 强大模型底座 */
: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;
  --copper: #D4A017;
  --copper-light: #FFF8E1;
  --silicon: #37474F;
  --silicon-dark: #1C282E;
  --trace: rgba(212, 160, 23, 0.35);
  --radius: 14px;
  --shadow: 0 4px 12px rgba(21, 101, 216, 0.15);
  --shadow-hover: 0 8px 24px rgba(21, 101, 216, 0.2);
}

* { 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;
}

/* ===== 顶部 Logo + 主导航 ===== */
.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);
}
.brand-name {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.mainnav { display: flex; align-items: center; gap: 28px; }
.mainnav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.mainnav a:hover, .mainnav a.active { color: var(--blue); }
.mainnav a.active::after {
  content: '';
  position: absolute;
  bottom: -21px; left: 0; right: 0;
  height: 2px;
  background: var(--copper);
}
.btn-api {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  border: 1.5px solid var(--blue);
  color: var(--blue) !important;
  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) !important; }
.btn-api::after { display: none !important; }

/* ===== 首屏：芯片剖面 ===== */
.hero {
  background: var(--gray-bg);
  position: relative;
  overflow: hidden;
  padding: 72px 24px 88px;
}
/* 电路走线背景 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23D4A017' stroke-opacity='0.13' stroke-width='1.5'%3E%3Cpath d='M20 20 H120 V80 H200'/%3E%3Cpath d='M380 40 H300 V120 H240 V200'/%3E%3Cpath d='M40 380 V300 H140 V240'/%3E%3Cpath d='M360 380 H280 V320 H200 V260'/%3E%3Cpath d='M20 160 H80 V220 H160'/%3E%3C/g%3E%3Cg fill='%23D4A017' fill-opacity='0.2'%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3Ccircle cx='200' cy='80' r='4'/%3E%3Ccircle cx='380' cy='40' r='4'/%3E%3Ccircle cx='240' cy='200' r='4'/%3E%3Ccircle cx='40' cy='380' r='4'/%3E%3Ccircle cx='160' cy='240' r='4'/%3E%3Ccircle cx='360' cy='380' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 400px 400px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(21,101,216,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  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(--copper);
  box-shadow: 0 0 8px var(--copper);
  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::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--copper) 0 12px, transparent 12px 20px);
  opacity: 0.6;
}
.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(--copper-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); }

/* ===== 两栏布局 ===== */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.content-main { min-width: 0; }
.sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.side-box {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
}
.side-box h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--copper-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-box ul { list-style: none; }
.side-box li { margin-bottom: 10px; }
.side-box a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.side-box a:hover { color: var(--blue); }
/* 边栏芯片规格面板 */
.chip-box {
  background: var(--silicon-dark);
  border-color: #2A3A42;
  color: #ECEFF1;
}
.chip-box h4 { color: #ECEFF1; border-bottom-color: #2A3A42; }
.chip-die {
  width: 100%;
  aspect-ratio: 1;
  max-width: 140px;
  margin: 0 auto 16px;
  border: 2px solid var(--copper);
  border-radius: 8px;
  position: relative;
  background:
    linear-gradient(90deg, rgba(212,160,23,0.08) 1px, transparent 1px),
    linear-gradient(rgba(212,160,23,0.08) 1px, transparent 1px);
  background-size: 14px 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Consolas', monospace;
  font-weight: 700;
  color: var(--copper);
  font-size: 0.875rem;
}
.chip-die::before, .chip-die::after {
  content: '';
  position: absolute;
  background: var(--copper);
}
.chip-die::before { top: -6px; left: 20%; right: 20%; height: 4px; border-radius: 2px; }
.chip-die::after { bottom: -6px; left: 20%; right: 20%; height: 4px; border-radius: 2px; }
.chip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 8px 0;
  border-bottom: 1px dashed #2A3A42;
  font-family: 'Consolas', monospace;
}
.chip-row:last-child { border-bottom: none; }
.chip-val { font-weight: 700; color: var(--copper); }

/* 芯片风内容区块 */
.section-block { margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--copper-light);
  color: var(--copper);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* 芯片层级卡片 */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.chip-card {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.chip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--copper) 0 12px, transparent 12px 20px);
}
.chip-card::after {
  content: '';
  position: absolute;
  bottom: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(212,160,23,0.3);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(212,160,23,0.1) 1px, transparent 1px),
    linear-gradient(rgba(212,160,23,0.1) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
}
.chip-card:hover {
  border-color: var(--copper);
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.15);
  transform: translateY(-4px);
}
.chip-icon {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  background: var(--copper-light);
  border: 1px solid rgba(212,160,23,0.3);
}
.chip-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.chip-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* 层级结构图 */
.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}
.layer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  transition: all 0.2s;
}
.layer:hover { border-color: var(--copper); transform: translateX(6px); }
.layer-no {
  font-family: 'Consolas', monospace;
  font-weight: 700;
  color: var(--copper);
  font-size: 0.8125rem;
  width: 48px;
  flex-shrink: 0;
}
.layer-name { font-weight: 700; font-size: 0.9375rem; }
.layer-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-left: auto; text-align: right; }

/* 规格数据条 */
.spec-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.spec {
  text-align: center;
  padding: 24px 12px;
  border-radius: var(--radius);
  background: var(--silicon-dark);
  color: #ECEFF1;
  border: 1px solid #2A3A42;
  border-top: 3px solid var(--copper);
}
.spec-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--copper);
  letter-spacing: -0.02em;
  font-family: 'Consolas', monospace;
}
.spec-label { font-size: 0.8125rem; color: rgba(236,239,241,0.55); margin-top: 4px; }

/* 步骤 */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 0; bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--copper) 0 8px, transparent 8px 14px);
  opacity: 0.45;
}
.step {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  position: relative;
}
.step-num {
  width: 56px; height: 56px;
  border: 2px solid var(--copper);
  border-radius: 10px;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--copper);
  font-size: 1.0625rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  font-family: 'Consolas', monospace;
}
.step-content h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 6px; }
.step-content p { font-size: 0.875rem; color: var(--text-secondary); }

/* 图片展示 */
.image-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.image-showcase img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  object-fit: cover;
  aspect-ratio: 16/10;
  transition: transform 0.3s, box-shadow 0.3s;
}
.image-showcase img:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(212,160,23,0.18); }

/* API 代码块 */
.api-block {
  background: var(--silicon-dark);
  border-radius: var(--radius);
  padding: 32px;
  color: #FFE0A3;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  overflow-x: auto;
  position: relative;
  border: 1px solid #2A3A42;
}
.api-block::before {
  content: 'CORE · POST /v1/chat/completions';
  position: absolute;
  top: -12px; left: 24px;
  background: var(--copper);
  color: var(--silicon-dark);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.api-block .comment { color: #80CBC4; }
.api-block .string { color: #FFCC80; }
.api-block .keyword { color: #4FC3F7; }

/* 页脚 */
.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) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-box { flex: 1 1 260px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .mainnav a:not(.btn-api) { display: none; }
  .layer-desc { display: none; }
}
@media (max-width: 560px) {
  .hero-cards { flex-direction: column; align-items: stretch; }
  .card { width: 100%; }
  .topbar { padding: 0 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(--copper);
  color: var(--white);
  border-color: var(--copper);
}
.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: 40px;
  align-items: center;
  margin-bottom: 64px;
}
.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.375rem; font-weight: 700; margin-bottom: 12px; }
.web-feature p { color: var(--text-secondary); margin-bottom: 16px; }
.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(--copper);
  font-size: 0.75rem;
  top: 11px;
}
@media (max-width: 768px) {
  .web-feature { grid-template-columns: 1fr; }
  .web-feature:nth-child(even) { direction: ltr; }
}
