﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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 {
  --bg: #0b1020;
  --panel: #111827;
  --panel-2: #0f172a;
  --text: #e5edf8;
  --muted: #95a3b8;
  --line: rgba(148,163,184,.22);
  --cyan: #22d3ee;
  --green: #34d399;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --pink: #fb7185;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at 18% 14%, rgba(34,211,238,.14), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(167,139,250,.18), transparent 28%),
    linear-gradient(135deg, #070b16 0%, #0b1020 58%, #101827 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.68;
}
a { color: var(--cyan); text-decoration: none; font-weight: 800; }
a:hover { color: #fff; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.notice { background: rgba(251,191,36,.1); border-bottom: 1px solid rgba(251,191,36,.32); color: #fde68a; padding: 10px 0; font-size: 13px; }
.site-header { background: rgba(11,16,32,.78); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { color: #fff; font-size: 21px; font-weight: 950; letter-spacing: -0.03em; }
.brand::before { content: "</>"; color: var(--green); margin-right: 8px; }
.nav, .footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.nav a, .footer-links a { color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 8px; padding: 7px 11px; font-size: 14px; }
.nav a:hover, .footer-links a:hover { color: #fff; border-color: var(--cyan); text-decoration: none; }
.hero { padding: 66px 0 36px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .95fr); gap: 28px; align-items: center; }
.eyebrow { display: inline-flex; padding: 6px 11px; border: 1px solid rgba(52,211,153,.35); border-radius: 999px; background: rgba(52,211,153,.09); color: var(--green); font-size: 13px; font-weight: 950; margin-bottom: 16px; }
.hero h1 { max-width: 760px; font-size: clamp(36px, 5.4vw, 72px); line-height: 1.03; letter-spacing: -0.07em; margin-bottom: 20px; }
.hero p { max-width: 760px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-width: 180px; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); font-weight: 950; }
.button.primary { background: linear-gradient(90deg, var(--cyan), var(--blue)); color: #07111f; border-color: transparent; box-shadow: 0 18px 42px rgba(34,211,238,.2); }
.button.secondary { background: rgba(255,255,255,.06); color: var(--text); }
.code-chat { background: #070b16; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 28px 70px rgba(0,0,0,.34); }
.window-bar { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.04); }
.dot { width: 11px; height: 11px; border-radius: 999px; display: block; }
.dot.red { background: var(--pink); } .dot.yellow { background: #fbbf24; } .dot.green { background: var(--green); }
.workspace { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 320px; }
.editor, .chat-pane { padding: 18px; }
.editor { border-right: 1px solid var(--line); font-family: Consolas, "Cascadia Code", monospace; font-size: 14px; }
.line { display: block; color: #9ca3af; margin: 7px 0; }
.line .kw { color: var(--purple); } .line .fn { color: var(--cyan); } .line .str { color: var(--green); }
.chat-bubble { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.chat-bubble.ai { border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.08); }
.section { padding: 50px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.section h2 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.06em; line-height: 1.06; }
.section-note { max-width: 450px; color: var(--muted); }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card, .intro-box, .article { background: rgba(17,24,39,.72); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 60px rgba(0,0,0,.24); }
.card { min-height: 206px; padding: 24px; }
.card .num { display: inline-flex; color: var(--green); font-family: Consolas, monospace; font-weight: 950; margin-bottom: 30px; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p, .intro-box p, .intro-box li, td { color: var(--muted); }
.card strong, td strong { color: var(--cyan); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.intro-box { padding: 28px; }
.intro-box h3 { font-size: 28px; margin-bottom: 12px; }
.intro-box ul { margin: 14px 0 0 20px; }
.table-wrap { overflow-x: auto; background: rgba(17,24,39,.72); border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #fff; background: rgba(255,255,255,.06); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.faq-list { display: grid; gap: 12px; }
details { background: rgba(17,24,39,.72); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
summary { cursor: pointer; list-style: none; font-weight: 950; color: #fff; }
summary::-webkit-details-marker { display: none; }
details p { margin-top: 10px; color: var(--muted); }
.article { max-width: 880px; margin: 42px auto; padding: 38px; }
.article h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1.05; letter-spacing: -0.06em; margin-bottom: 20px; }
.article h2 { font-size: 28px; margin: 34px 0 12px; border-top: 1px solid var(--line); padding-top: 20px; }
.article p, .article li { color: var(--muted); margin-bottom: 12px; }
.article ul { margin-left: 20px; }
.site-footer { margin-top: 42px; padding: 36px 0; border-top: 1px solid var(--line); background: rgba(0,0,0,.22); }
.site-footer p { margin-top: 14px; color: var(--muted); font-size: 14px; }
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .editor { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .grid-6, .intro-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-note { margin-top: 10px; }
}
