/* === 全局基础样式 === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --color-black: #383838;
  --color-blue: #667FDA;
  --color-blue-dark: #5068c4;
  --color-blue-light: #8a9de5;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fc;
  --color-text: #383838;
  --color-text-light: #6b7280;
  --color-border: #e5e7eb;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); color: var(--color-text); background: var(--color-bg); line-height: 1.8; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--color-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-blue-dark); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* === 导航 header === */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px 0; transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
header.scrolled { padding: 8px 0; }
.navbar { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.nav-container { position: relative; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 24px; border-radius: 16px; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); background: rgba(255,255,255,0.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; transition: opacity 0.2s; color: var(--color-text); }
.nav-brand:hover { opacity: 0.8; color: var(--color-text); }
.nav-logo { width: 32px; height: 32px; object-fit: contain; }
.brand-info { display: flex; flex-direction: column; gap: 0; line-height: 1; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.4px; color: inherit; }
.brand-by { font-size: 11px; font-weight: 400; color: var(--color-text-light); opacity: 0.7; margin-top: 2px; }
.nav-center { display: flex; align-items: center; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-item { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; font-size: 14px; font-weight: 500; color: var(--color-text-light); text-decoration: none; border-radius: 10px; transition: all 0.35s; }
.nav-item:hover { color: var(--color-text); background: rgba(0,0,0,0.03); }
.nav-item.active { color: var(--color-blue); background: rgba(102,125,218,0.08); }
.nav-item-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--color-blue); }
.nav-item.active .nav-item-dot { display: block; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-buttons { display: flex; align-items: center; gap: 8px; }
.nav-btn-ghost { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--color-text-light); text-decoration: none; border-radius: 10px; transition: all 0.35s; }
.nav-btn-ghost svg { opacity: 0.5; transition: opacity 0.2s; }
.nav-btn-ghost:hover { color: var(--color-text); background: rgba(0,0,0,0.04); }
.nav-btn-ghost:hover svg { opacity: 0.8; }
.nav-btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%); border-radius: 10px; text-decoration: none; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 1px 3px rgba(102,125,218,0.3), inset 0 1px 0 rgba(255,255,255,0.15); }
.nav-btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(102,125,218,0.4), inset 0 1px 0 rgba(255,255,255,0.15); }
.nav-hamburger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: none; border: none; border-radius: 10px; cursor: pointer; transition: background 0.2s; }
.nav-hamburger:hover { background: rgba(0,0,0,0.04); }
.nav-hamburger-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 20px; height: 16px; position: relative; }
.nav-hamburger-icon span { position: absolute; display: block; width: 20px; height: 1.5px; background: var(--color-text); border-radius: 2px; transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-hamburger-icon span:nth-child(1) { top: 0; }
.nav-hamburger-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-hamburger-icon span:nth-child(3) { bottom: 0; }
header.menu-open .nav-container { background: transparent !important; border-color: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
header.menu-open .nav-brand, header.menu-open .nav-center, header.menu-open .nav-buttons { opacity: 0; pointer-events: none; }
.nav-hamburger.active .nav-hamburger-icon span { background: #fff !important; }
.nav-hamburger.active .nav-hamburger-icon span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-hamburger.active .nav-hamburger-icon span:nth-child(2) { opacity: 0; transform: translateY(-50%) scaleX(0); }
.nav-hamburger.active .nav-hamburger-icon span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }
.nav-overlay { position: fixed; inset: 0; z-index: 998; opacity: 0; visibility: hidden; pointer-events: none; }
.nav-overlay.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-drawer { display: none; position: fixed; inset: 0; z-index: 999; background: linear-gradient(160deg, #0d0f17 0%, #151928 40%, #1c2340 70%, #263060 100%); opacity: 0; visibility: hidden; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s; }
.nav-drawer.open { opacity: 1; visibility: visible; }
.drawer-body { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; padding: 80px 32px 60px; text-align: center; }
.drawer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; opacity: 0; transform: translateY(12px); transition: all 0.4s 0.1s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-drawer.open .drawer-brand { opacity: 1; transform: translateY(0); }
.drawer-brand-logo { width: 28px; height: 28px; object-fit: contain; }
.drawer-brand-name { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: -0.3px; }
.drawer-links { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 40px; }
.drawer-link { display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px; font-size: 22px; font-weight: 600; color: rgba(255,255,255,0.5); text-decoration: none; border-radius: 14px; letter-spacing: -0.3px; opacity: 0; transform: translateY(16px); transition: color 0.25s, background 0.25s, opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-drawer.open .drawer-link { opacity: 1; transform: translateY(0); }
.nav-drawer.open .drawer-link:nth-child(1) { transition-delay: 0.15s; }
.nav-drawer.open .drawer-link:nth-child(2) { transition-delay: 0.2s; }
.nav-drawer.open .drawer-link:nth-child(3) { transition-delay: 0.25s; }
.drawer-link:hover { color: #fff; }
.drawer-link.active { color: #fff; }
.drawer-link-indicator { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--color-blue-light); box-shadow: 0 0 10px var(--color-blue-light); flex-shrink: 0; }
.drawer-link.active .drawer-link-indicator { display: block; }
.drawer-divider { width: 48px; height: 1px; background: rgba(255,255,255,0.1); margin: 0 auto 36px; opacity: 0; transition: opacity 0.4s 0.25s; }
.nav-drawer.open .drawer-divider { opacity: 1; }
.drawer-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 280px; }
.drawer-btn-ghost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px 24px; font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.55); text-decoration: none; border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; transition: all 0.25s; opacity: 0; transform: translateY(16px); }
.nav-drawer.open .drawer-btn-ghost { opacity: 1; transform: translateY(0); transition: color 0.25s, border-color 0.25s, background 0.25s, opacity 0.4s 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.drawer-btn-ghost:hover { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.05); }
.drawer-btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px 24px; font-size: 15px; font-weight: 600; color: var(--color-text); background: #fff; border-radius: 14px; text-decoration: none; transition: all 0.25s; box-shadow: 0 4px 20px rgba(0,0,0,0.15); opacity: 0; transform: translateY(16px); }
.nav-drawer.open .drawer-btn-primary { opacity: 1; transform: translateY(0); transition: box-shadow 0.25s, transform 0.25s, opacity 0.4s 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.drawer-btn-primary:hover { color: var(--color-text); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.drawer-btn-primary svg { opacity: 0.4; }
.drawer-close { position: absolute; top: 20px; right: 20px; z-index: 10; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.12); border-radius: 50%; color: #fff; cursor: pointer; transition: all 0.25s; opacity: 0; transform: scale(0.8); }
.nav-drawer.open .drawer-close { opacity: 1; transform: scale(1); transition-delay: 0.15s; }
.drawer-close:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.2); transform: scale(1.05); }
.drawer-close:active { transform: scale(0.95); }
.drawer-footer { position: absolute; bottom: 32px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,0.2); opacity: 0; transition: opacity 0.4s 0.4s; }
.nav-drawer.open .drawer-footer { opacity: 1; }

/* === 页面头部 === */
.page-hero { padding: 140px 0 60px; text-align: center; background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); }
.page-hero .section-label { display: inline-block; font-size: 13px; font-weight: 600; color: var(--color-blue); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.page-hero h1 { font-size: 40px; font-weight: 700; color: var(--color-text); letter-spacing: -0.8px; margin-bottom: 16px; }
.page-hero .hero-desc { font-size: 17px; color: var(--color-text-light); max-width: 680px; margin: 0 auto; line-height: 1.7; }

/* === 文章内容 === */
.article { max-width: 800px; margin: 0 auto; padding: 64px 24px 100px; }
.callout { display: flex; gap: 12px; padding: 16px 20px; border-radius: 12px; margin-bottom: 24px; font-size: 14px; line-height: 1.7; }
.callout-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.callout-info { background: rgba(102,125,218,0.06); border: 1px solid rgba(102,125,218,0.12); color: var(--color-text); }
.callout-info .callout-icon { color: var(--color-blue); }
.callout-warn { background: rgba(234,179,8,0.06); border: 1px solid rgba(234,179,8,0.15); color: var(--color-text); }
.callout-warn .callout-icon { color: #d97706; }
.article h2 { font-size: 24px; font-weight: 700; color: var(--color-text); margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); letter-spacing: -0.3px; }
.article h3 { font-size: 18px; font-weight: 600; color: var(--color-text); margin: 40px 0 16px; }
.article h4 { font-size: 16px; font-weight: 600; color: var(--color-text); margin: 32px 0 12px; }
.article p { font-size: 15px; color: var(--color-text); line-height: 1.8; margin-bottom: 16px; }
.article ul, .article ol { margin-bottom: 20px; padding-left: 24px; }
.article li { font-size: 15px; color: var(--color-text); line-height: 1.8; margin-bottom: 8px; }
.article strong { font-weight: 600; color: var(--color-text); }
.article code { display: inline-block; padding: 1px 6px; font-size: 13px; font-family: "SF Mono", "Fira Code", monospace; color: var(--color-blue-dark); background: rgba(102,125,218,0.06); border-radius: 5px; }
.article pre { position: relative; margin: 16px 0; padding: 16px 20px; background: #1e1e2e; color: #cdd6f4; border-radius: 12px; overflow-x: auto; font-size: 13px; line-height: 1.7; font-family: "SF Mono", "Fira Code", monospace; }
.article pre .copy-btn { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; color: #a6adc8; }
.article pre:hover .copy-btn { opacity: 1; }
.article pre .copy-btn:hover { background: rgba(255,255,255,0.15); color: #cdd6f4; }
.article pre .copy-btn:active { transform: scale(0.92); }
.article pre .copy-btn.copied { color: #a6e3a1; background: rgba(166,227,161,0.12); border-color: rgba(166,227,161,0.2); }
.article pre code { display: inline; padding: 0; font-size: inherit; font-family: inherit; color: inherit; background: none; border-radius: 0; }
.article-img { margin: 24px 0; border-radius: 14px; overflow: hidden; border: 1px solid rgba(0,0,0,0.06); background: var(--color-bg-alt); }
.article-img img { display: block; width: 100%; }
.article-img-caption { font-size: 12px; color: var(--color-text-light); text-align: center; padding: 10px 16px; background: var(--color-bg-alt); }
.article-img-row { display: flex; gap: 16px; margin: 24px 0; }
.article-img-row .article-img { flex: 1; margin: 0; }
.steps { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.step { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.step:last-child { border-bottom: none; }
.step-num { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: rgba(102,125,218,0.08); border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--color-blue); flex-shrink: 0; }
.step-text { flex: 1; font-size: 15px; color: var(--color-text); line-height: 1.7; padding-top: 2px; }
.step-text code { display: inline-block; padding: 1px 6px; font-size: 13px; font-family: "SF Mono", "Fira Code", monospace; color: var(--color-blue-dark); background: rgba(102,125,218,0.06); border-radius: 5px; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--color-bg-alt); border: 1px solid transparent; border-radius: 12px; margin: 24px 0; transition: all 0.25s; }
.link-card:hover { border-color: rgba(102,125,218,0.15); box-shadow: 0 4px 16px rgba(102,125,218,0.06); }
.link-card-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(102,125,218,0.08); border-radius: 8px; color: var(--color-blue); flex-shrink: 0; }
.link-card span { font-size: 14px; font-weight: 500; color: var(--color-blue); }

/* === 页脚 === */
footer { background: #1a1a1a; color: rgba(255,255,255,0.8); position: relative; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent 0%, rgba(102,125,218,0.3) 50%, transparent 100%); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 56px 24px 40px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 28px; height: 28px; object-fit: contain; opacity: 0.9; }
.footer-brand-info { display: flex; flex-direction: column; }
.footer-brand-name { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: -0.3px; }
.footer-brand-by { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 1px; }
.footer-contact { display: flex; gap: 12px; }
.footer-contact-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(255,255,255,0.45); padding: 8px 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; transition: all 0.2s; }
.footer-contact-item:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.1); }
.footer-contact-item a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s; }
.footer-contact-item a:hover { color: #fff; }
.footer-contact-item svg { flex-shrink: 0; color: rgba(255,255,255,0.3); }
.footer-reseller-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 18px; font-size: 13px; font-weight: 500; color: var(--color-blue-light); text-decoration: none; background: rgba(102,125,218,0.1); border: 1px solid rgba(102,125,218,0.2); border-radius: 10px; transition: all 0.25s; }
.footer-reseller-btn:hover { color: #fff; background: rgba(102,125,218,0.18); border-color: rgba(102,125,218,0.35); }
.footer-reseller-btn svg { opacity: 0.7; }
.footer-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 36px 0 28px; }
.footer-bottom { text-align: center; }
.footer-copyright { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.footer-notice { font-size: 12px; color: rgba(255,255,255,0.25); margin-bottom: 4px; line-height: 1.7; }
.footer-notice a { color: rgba(255,255,255,0.4); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,0.15); transition: all 0.2s; }
.footer-notice a:hover { color: rgba(255,255,255,0.8); text-decoration-color: rgba(255,255,255,0.4); }
.footer-notice-en { font-size: 11px; color: rgba(255,255,255,0.18); margin-top: 2px; }

/* === 响应式 === */
@media (max-width: 768px) {
  header { padding: 10px 0; }
  header.scrolled { padding: 6px 0; }
  .navbar { padding: 0 16px; }
  .nav-container { padding: 0 16px; height: 50px; border-radius: 14px; }
  .nav-center { display: none; }
  .nav-buttons { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: block; }
  .brand-by { display: none; }
  .page-hero { padding: 110px 0 48px; }
  .page-hero h1 { font-size: 28px; }
  .page-hero .hero-desc { font-size: 15px; }
  .article { padding: 48px 20px 64px; }
  .article h2 { font-size: 20px; margin-top: 40px; }
  .article h3 { font-size: 16px; }
  .article-img-row { flex-direction: column; }
  .footer-inner { padding: 44px 24px 32px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-contact { flex-direction: column; gap: 8px; width: 100%; }
  .footer-contact-item { width: 100%; }
}
