﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (Smoothness & Performance Optimization)
   ========================================================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* 硬件加速与流畅悬停 */
a, button, .media-news-card, .btn-media-primary, .btn-media-secondary, .faq-card, .intro-panel {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 移动端平滑滚动与防抖 */
.table-wrapper, .table-container, .code-box, pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* 媒体图片防溢出与自适应 */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 消除点击高亮延迟 */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* OpenAI 风格克制极简设计系统变量 (OpenAI Restrained Minimalist Aesthetic) */
  --oa-bg: #fafafa;              /* 沉静灰白背景 (Subtle Off-white) */
  --oa-bg-subtle: #f4f4f5;       /* 浅灰次级底色 */
  --oa-surface: #ffffff;         /* 纯白卡片容器 */
  --oa-primary: #000000;         /* 极致纯黑主调 */
  --oa-primary-hover: #27272a;   /* 深黑悬停 */
  --oa-primary-light: #f4f4f5;   /* 极浅灰微底 */
  
  --oa-accent: #10a37f;          /* OpenAI 标志性经典绿 (微量点缀) */
  --oa-accent-light: #f0fdf4;    /* 浅绿底 */
  
  --oa-text-main: #09090b;       /* 浓郁纯黑大字号文字 */
  --oa-text-muted: #52525b;      /* 优雅正文灰 */
  --oa-text-sub: #71717a;        /* 辅助说明灰 */
  
  --oa-border: #e4e4e7;          /* 极细极简边框 */
  --oa-border-focus: #18181b;    /* 聚焦黑边框 */
  
  --oa-radius: 6px;              /* 克制微圆角 */
  --oa-radius-lg: 12px;          /* 容器大圆角 */
  --oa-radius-pill: 9999px;      /* 纯圆胶囊形态 */
  
  --oa-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --oa-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --oa-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --oa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --oa-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--oa-font);
  background-color: var(--oa-bg);
  color: var(--oa-text-main);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部声明区 */
.oa-topbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--oa-border);
  padding: 10px 0;
  font-size: 13px;
  color: var(--oa-text-muted);
}

.topbar-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.oa-badge {
  display: inline-block;
  white-space: nowrap;
  background: var(--oa-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--oa-radius-pill);
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.topbar-text {
  flex: 1;
  line-height: 1.55;
}

/* 极简导航头 */
.oa-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--oa-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.oa-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.oa-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--oa-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oa-title-group {
  display: flex;
  flex-direction: column;
}

.oa-main-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--oa-text-main);
  letter-spacing: -0.4px;
}

.oa-main-title span {
  font-weight: 400;
  color: var(--oa-text-sub);
}

.oa-sub-title {
  font-size: 11px;
  color: var(--oa-text-sub);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--oa-text-muted);
  text-decoration: none;
  border-radius: var(--oa-radius);
  transition: var(--oa-transition);
}

.nav a:hover {
  color: var(--oa-primary);
  background-color: var(--oa-bg-subtle);
}

.nav a.active {
  color: var(--oa-primary);
  background-color: var(--oa-bg-subtle);
  font-weight: 700;
}

/* 主标题区 / 英雄区（大字号标题 + 灰白克制） */
.oa-hero {
  padding: 72px 0 56px;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px solid var(--oa-border);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--oa-bg-subtle);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--oa-text-main);
  margin-bottom: 24px;
}

.hero-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oa-accent);
}

.oa-hero h1 {
  font-size: 40px;
  font-weight: 900;
  color: var(--oa-text-main);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -1.2px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.oa-hero p.hero-desc {
  max-width: 820px;
  margin: 0 auto 36px;
  font-size: 17px;
  color: var(--oa-text-muted);
  line-height: 1.75;
}

/* 双入口按钮 CTA (经典胶囊按钮) */
.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.oa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--oa-radius-pill);
  text-decoration: none;
  transition: var(--oa-transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--oa-primary);
  color: #ffffff;
  border: 1px solid var(--oa-primary);
}

.btn-primary:hover {
  background: var(--oa-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--oa-text-main);
  border: 1px solid var(--oa-border);
}

.btn-secondary:hover {
  background-color: var(--oa-bg-subtle);
  border-color: var(--oa-text-sub);
  transform: translateY(-1px);
}

/* 极简指标条 */
.oa-metric-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px;
  background: var(--oa-bg-subtle);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--oa-border);
}

.metric-item:last-child {
  border-right: none;
}

.metric-item .val {
  font-size: 17px;
  font-weight: 800;
  color: var(--oa-text-main);
}

.metric-item .lbl {
  font-size: 12px;
  color: var(--oa-text-sub);
  margin-top: 2px;
}

/* 模块通用 */
.section {
  padding: 64px 0;
}

.section-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--oa-border);
  border-bottom: 1px solid var(--oa-border);
}

.section-head {
  text-align: center;
  margin-bottom: 44px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--oa-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--oa-text-main);
  margin-bottom: 10px;
  letter-spacing: -0.6px;
}

.section-head p {
  font-size: 15px;
  color: var(--oa-text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* 六宫格功能模块区 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-card {
  background: var(--oa-surface);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
  padding: 28px 24px;
  transition: var(--oa-transition);
  display: flex;
  flex-direction: column;
}

.grid-card:hover {
  border-color: #a1a1aa;
  box-shadow: var(--oa-shadow-hover);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-stamp {
  font-family: var(--oa-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--oa-text-muted);
  background: var(--oa-bg-subtle);
  padding: 2px 8px;
  border-radius: var(--oa-radius);
}

.card-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--oa-text-sub);
}

.grid-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--oa-text-main);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.grid-card p {
  font-size: 14px;
  color: var(--oa-text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.card-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--oa-text-main);
  text-decoration: none;
  transition: var(--oa-transition);
}

.card-footer-link:hover {
  color: var(--oa-accent);
  text-decoration: underline;
}

/* 正文介绍区（教程中心 + 我们提供什么） */
.intro-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.intro-box {
  background: var(--oa-surface);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
  padding: 36px 30px;
}

.intro-box h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--oa-text-main);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.intro-box p {
  font-size: 14px;
  color: var(--oa-text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.intro-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--oa-text-main);
}

.feature-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oa-primary);
  margin-top: 8px;
  flex-shrink: 0;
}

/* 热门教程表格 */
.table-wrapper {
  background: var(--oa-surface);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
  overflow: hidden;
}

.oa-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.oa-table th {
  background-color: var(--oa-bg-subtle);
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--oa-text-main);
  border-bottom: 1px solid var(--oa-border);
  letter-spacing: 0.3px;
}

.oa-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--oa-text-muted);
  border-bottom: 1px solid var(--oa-border);
  vertical-align: middle;
}

.oa-table tr:last-child td {
  border-bottom: none;
}

.oa-table tr:hover td {
  background-color: var(--oa-bg-subtle);
}

.badge-target {
  display: inline-block;
  background: var(--oa-bg-subtle);
  color: var(--oa-text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--oa-radius);
  border: 1px solid var(--oa-border);
}

.badge-difficulty {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--oa-radius);
}

.diff-easy {
  background: #f0fdf4;
  color: #166534;
}

.diff-med {
  background: #fefce8;
  color: #854d0e;
}

.diff-hard {
  background: #fef2f2;
  color: #991b1b;
}

/* FAQ 常见问答 */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.faq-card {
  background: var(--oa-surface);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
  padding: 24px 22px;
}

.faq-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--oa-text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-card h4 .q-mark {
  color: var(--oa-text-sub);
  font-family: var(--oa-font-mono);
}

.faq-card p {
  font-size: 14px;
  color: var(--oa-text-muted);
  line-height: 1.7;
}

/* 延伸阅读区 */
.extended-reading {
  margin-top: 40px;
  background: var(--oa-bg-subtle);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
  padding: 24px 28px;
}

.extended-reading h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--oa-text-main);
  margin-bottom: 12px;
}

.extended-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.extended-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--oa-border);
  padding: 6px 14px;
  border-radius: var(--oa-radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--oa-text-main);
  text-decoration: none;
  transition: var(--oa-transition);
}

.extended-links a:hover {
  border-color: var(--oa-primary);
  transform: translateY(-1px);
}

/* 页脚 */
.oa-footer {
  background: #ffffff;
  color: var(--oa-text-muted);
  padding: 50px 0 30px;
  border-top: 1px solid var(--oa-border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--oa-border);
}

.footer-brand {
  max-width: 520px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--oa-text-main);
  font-size: 16px;
}

.oa-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--oa-primary);
  color: #fff;
  border-radius: 50%;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--oa-text-sub);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  max-width: 440px;
}

.footer-nav a {
  color: var(--oa-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: var(--oa-transition);
}

.footer-nav a:hover {
  color: var(--oa-primary);
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--oa-text-sub);
}

/* 子页面排版 */
.subpage-hero {
  padding: 48px 0 36px;
  background: #ffffff;
  border-bottom: 1px solid var(--oa-border);
}

.subpage-hero h1 {
  font-size: 30px;
  font-weight: 900;
  color: var(--oa-text-main);
  margin-bottom: 10px;
  letter-spacing: -0.6px;
}

.subpage-hero p {
  font-size: 16px;
  color: var(--oa-text-muted);
}

.article-container {
  padding: 48px 0;
}

.article-content {
  background: var(--oa-surface);
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-lg);
  padding: 40px;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--oa-text-main);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--oa-border);
  letter-spacing: -0.4px;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--oa-text-main);
  margin: 24px 0 12px;
}

.article-content p {
  font-size: 15px;
  color: var(--oa-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.article-content ul, .article-content ol {
  margin: 0 0 20px 24px;
  color: var(--oa-text-muted);
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.oa-callout {
  background: var(--oa-bg-subtle);
  border-left: 4px solid var(--oa-primary);
  padding: 16px 20px;
  border-radius: 0 var(--oa-radius) var(--oa-radius) 0;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--oa-text-main);
}

.code-box {
  background: #18181b;
  color: #fafafa;
  padding: 18px 22px;
  border-radius: var(--oa-radius);
  font-family: var(--oa-font-mono);
  font-size: 13px;
  overflow-x: auto;
  margin-bottom: 20px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .oa-hero h1 {
    font-size: 32px;
  }
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .intro-container {
    grid-template-columns: 1fr;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .oa-metric-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-item:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 640px) {
  .grid-6 {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 14px 0;
    gap: 12px;
  }
  .oa-hero h1 {
    font-size: 24px;
  }
  .footer-top {
    flex-direction: column;
  }
  .oa-metric-bar {
    grid-template-columns: 1fr;
  }
  .metric-item {
    border-right: none;
    border-bottom: 1px solid var(--oa-border);
  }
  .metric-item:last-child {
    border-bottom: none;
  }
}
