/* ===== PureRef中文站 全局样式 ===== */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-h: 64px;
}
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e3a5f;
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.4);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background .3s, color .3s;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  position: fixed; top:0; left:0; right:0; height: var(--header-h);
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); z-index:1000;
  transition: background .3s, border-color .3s;
}
[data-theme="dark"] .header { background: rgba(15,23,42,.85); }
.header .container { display:flex; align-items:center; justify-content:space-between; height:100%; }
.logo { display:flex; align-items:center; gap:10px; font-size:18px; font-weight:700; color:var(--text); }
.logo-icon { width:32px; height:32px; background:var(--primary); border-radius:8px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:14px; }
.nav { display:flex; align-items:center; gap:4px; }
.nav a { color:var(--text-secondary); padding:8px 14px; border-radius:6px; font-size:14px; font-weight:500; }
.nav a:hover, .nav a.active { color:var(--primary); background:var(--primary-light); }
.header-actions { display:flex; align-items:center; gap:10px; }
.theme-toggle { background:none; border:1px solid var(--border); border-radius:8px; width:38px; height:38px; cursor:pointer; color:var(--text-secondary); font-size:16px; display:flex; align-items:center; justify-content:center; transition:all .2s; }
.theme-toggle:hover { border-color:var(--primary); color:var(--primary); }
.btn { display:inline-flex; align-items:center; gap:6px; padding:10px 22px; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; border:none; transition:all .2s; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-hover); color:#fff; transform:translateY(-1px); box-shadow:var(--shadow-lg); }
.btn-outline { background:transparent; color:var(--primary); border:1.5px solid var(--primary); }
.btn-outline:hover { background:var(--primary-light); }
.btn-lg { padding:14px 32px; font-size:16px; }
.mobile-menu-btn { display:none; background:none; border:none; color:var(--text); font-size:24px; cursor:pointer; }

/* Hero */
.hero { padding: calc(var(--header-h) + 60px) 0 60px; text-align:center; background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%); }
.hero-badge { display:inline-block; padding:6px 16px; background:var(--primary-light); color:var(--primary); border-radius:20px; font-size:13px; font-weight:600; margin-bottom:20px; }
.hero h1 { font-size:42px; font-weight:800; line-height:1.3; margin-bottom:16px; background:linear-gradient(135deg, var(--text) 0%, var(--primary) 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.hero p { font-size:18px; color:var(--text-secondary); max-width:680px; margin:0 auto 30px; }
.hero-tags { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin-bottom:36px; }
.hero-tag { padding:6px 14px; background:var(--bg-card); border:1px solid var(--border); border-radius:20px; font-size:13px; color:var(--text-secondary); }
.hero-actions { display:flex; justify-content:center; gap:14px; flex-wrap:wrap; }

/* Sections */
.section { padding:70px 0; }
.section-alt { background:var(--bg-secondary); }
.section-title { text-align:center; margin-bottom:48px; }
.section-title h2 { font-size:32px; font-weight:700; margin-bottom:12px; }
.section-title p { color:var(--text-secondary); font-size:16px; }

/* Feature Grid */
.feature-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.feature-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:28px; transition:all .3s; }
.feature-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:var(--primary); }
.feature-icon { width:48px; height:48px; background:var(--primary-light); border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:24px; margin-bottom:16px; }
.feature-card h3 { font-size:18px; font-weight:600; margin-bottom:8px; }
.feature-card p { color:var(--text-secondary); font-size:14px; line-height:1.7; }

/* Scene Grid */
.scene-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:20px; }
.scene-card { text-align:center; padding:30px 16px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); transition:all .3s; }
.scene-card:hover { border-color:var(--primary); transform:translateY(-3px); }
.scene-icon { font-size:36px; margin-bottom:12px; }
.scene-card h4 { font-size:15px; font-weight:600; }

/* Download Cards */
.download-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.download-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:32px; text-align:center; transition:all .3s; }
.download-card:hover { box-shadow:var(--shadow-lg); border-color:var(--primary); }
.download-card .os-icon { font-size:40px; margin-bottom:12px; }
.download-card h3 { font-size:20px; margin-bottom:8px; }
.download-card .version { color:var(--text-muted); font-size:13px; margin-bottom:16px; }
.download-card ul { list-style:none; text-align:left; margin-bottom:20px; }
.download-card ul li { padding:6px 0; font-size:14px; color:var(--text-secondary); }
.download-card ul li::before { content:"✓ "; color:var(--primary); font-weight:700; }

/* Tutorial Grid */
.tutorial-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.tutorial-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; transition:all .3s; display:flex; flex-direction:column; }
.tutorial-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.tutorial-thumb { height:160px; background:linear-gradient(135deg, var(--primary-light), var(--bg-secondary)); display:flex; align-items:center; justify-content:center; font-size:48px; }
.tutorial-body { padding:20px; flex:1; display:flex; flex-direction:column; }
.tutorial-cat { display:inline-block; padding:3px 10px; background:var(--primary-light); color:var(--primary); border-radius:4px; font-size:12px; font-weight:600; margin-bottom:8px; align-self:flex-start; }
.tutorial-body h3 { font-size:16px; font-weight:600; margin-bottom:8px; line-height:1.5; }
.tutorial-body h3 a { color:var(--text); }
.tutorial-body h3 a:hover { color:var(--primary); }
.tutorial-body p { color:var(--text-secondary); font-size:13px; flex:1; }
.tutorial-meta { display:flex; justify-content:space-between; align-items:center; margin-top:12px; font-size:12px; color:var(--text-muted); }

/* FAQ */
.faq-list { max-width:800px; margin:0 auto; }
.faq-item { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm); margin-bottom:12px; overflow:hidden; }
.faq-q { padding:18px 24px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-weight:600; font-size:15px; transition:background .2s; }
.faq-q:hover { background:var(--bg-secondary); }
.faq-q .arrow { transition:transform .3s; color:var(--text-muted); }
.faq-item.open .faq-q .arrow { transform:rotate(180deg); }
.faq-a { max-height:0; overflow:hidden; transition:max-height .3s ease; }
.faq-item.open .faq-a { max-height:500px; }
.faq-a-inner { padding:0 24px 18px; color:var(--text-secondary); font-size:14px; line-height:1.8; }

/* Article Page */
.breadcrumb { padding: calc(var(--header-h) + 20px) 0 16px; font-size:13px; color:var(--text-muted); }
.breadcrumb a { color:var(--text-secondary); }
.breadcrumb a:hover { color:var(--primary); }
.article-layout { display:grid; grid-template-columns:1fr 280px; gap:40px; padding:20px 0 60px; }
.article-header { margin-bottom:32px; }
.article-header h1 { font-size:30px; font-weight:700; line-height:1.4; margin-bottom:12px; }
.article-meta { display:flex; gap:16px; font-size:13px; color:var(--text-muted); }
.article-content { font-size:16px; line-height:1.9; }
.article-content h2 { font-size:24px; font-weight:700; margin:36px 0 16px; padding-bottom:10px; border-bottom:2px solid var(--primary-light); }
.article-content h3 { font-size:19px; font-weight:600; margin:28px 0 12px; }
.article-content p { margin-bottom:16px; }
.article-content ul, .article-content ol { margin:16px 0; padding-left:24px; }
.article-content li { margin-bottom:8px; }
.article-content img { border-radius:var(--radius-sm); margin:20px 0; border:1px solid var(--border); }
.article-content a { color:var(--primary); border-bottom:1px dashed var(--primary); }
.article-content a:hover { border-bottom-style:solid; }
.tip-box { background:var(--primary-light); border-left:4px solid var(--primary); padding:16px 20px; border-radius:0 var(--radius-sm) var(--radius-sm) 0; margin:20px 0; }
.tip-box strong { color:var(--primary); }
.article-img-placeholder { width:100%; height:280px; background:linear-gradient(135deg, var(--primary-light), var(--bg-secondary)); border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:14px; margin:20px 0; border:1px dashed var(--border); }
.related-posts { margin-top:48px; padding-top:32px; border-top:1px solid var(--border); }
.related-posts h3 { font-size:20px; margin-bottom:20px; }
.related-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.related-item { padding:16px; background:var(--bg-secondary); border-radius:var(--radius-sm); }
.related-item a { font-weight:600; font-size:14px; color:var(--text); }
.related-item a:hover { color:var(--primary); }
.post-nav { display:flex; justify-content:space-between; margin-top:32px; gap:16px; }
.post-nav a { padding:12px 20px; background:var(--bg-secondary); border-radius:var(--radius-sm); font-size:14px; flex:1; }
.post-nav a:last-child { text-align:right; }

/* Sidebar */
.sidebar { position:sticky; top:calc(var(--header-h) + 20px); align-self:start; }
.sidebar-widget { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:20px; margin-bottom:20px; }
.sidebar-widget h4 { font-size:16px; margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.sidebar-widget ul { list-style:none; }
.sidebar-widget ul li { padding:8px 0; font-size:14px; border-bottom:1px solid var(--border); }
.sidebar-widget ul li:last-child { border-bottom:none; }
.sidebar-widget ul li a { color:var(--text-secondary); }
.sidebar-widget ul li a:hover { color:var(--primary); }

/* Changelog */
.changelog-list { max-width:800px; margin:0 auto; }
.changelog-item { position:relative; padding-left:32px; padding-bottom:32px; border-left:2px solid var(--border); }
.changelog-item:last-child { border-left-color:transparent; }
.changelog-item::before { content:''; position:absolute; left:-7px; top:4px; width:12px; height:12px; background:var(--primary); border-radius:50%; }
.changelog-version { font-weight:700; font-size:18px; color:var(--primary); }
.changelog-date { font-size:13px; color:var(--text-muted); margin-left:10px; }
.changelog-content { margin-top:10px; color:var(--text-secondary); font-size:14px; }
.changelog-content li { margin-bottom:6px; }

/* Resources */
.resource-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.resource-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:24px; transition:all .3s; }
.resource-card:hover { border-color:var(--primary); box-shadow:var(--shadow); }
.resource-card .res-icon { font-size:32px; margin-bottom:12px; }
.resource-card h3 { font-size:17px; margin-bottom:8px; }
.resource-card p { font-size:13px; color:var(--text-secondary); margin-bottom:14px; }
.resource-card .res-count { font-size:12px; color:var(--primary); font-weight:600; }

/* About */
.about-section { max-width:800px; margin:0 auto; }
.about-section h2 { font-size:24px; margin:32px 0 16px; }
.about-section p { color:var(--text-secondary); margin-bottom:16px; font-size:15px; }
.about-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin:40px 0; text-align:center; }
.about-stat .num { font-size:32px; font-weight:800; color:var(--primary); }
.about-stat .label { font-size:13px; color:var(--text-secondary); margin-top:4px; }

/* 404 */
.error-page { min-height:100vh; display:flex; align-items:center; justify-content:center; text-align:center; padding:20px; }
.error-page h1 { font-size:96px; font-weight:800; color:var(--primary); line-height:1; }
.error-page h2 { font-size:24px; margin:16px 0; }
.error-page p { color:var(--text-secondary); margin-bottom:24px; }

/* Footer */
.footer { background:var(--bg-secondary); border-top:1px solid var(--border); padding:48px 0 24px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:32px; margin-bottom:32px; }
.footer-col h4 { font-size:15px; font-weight:600; margin-bottom:16px; }
.footer-col ul { list-style:none; }
.footer-col ul li { margin-bottom:8px; }
.footer-col ul li a { color:var(--text-secondary); font-size:14px; }
.footer-col ul li a:hover { color:var(--primary); }
.footer-col p { color:var(--text-secondary); font-size:14px; line-height:1.8; }
.footer-bottom { text-align:center; padding-top:24px; border-top:1px solid var(--border); color:var(--text-muted); font-size:13px; }
.footer-bottom a { color:var(--text-secondary); }

/* Back to top */
.back-top { position:fixed; bottom:30px; right:30px; width:44px; height:44px; background:var(--primary); color:#fff; border:none; border-radius:50%; cursor:pointer; font-size:20px; box-shadow:var(--shadow-lg); opacity:0; visibility:hidden; transition:all .3s; z-index:999; }
.back-top.show { opacity:1; visibility:visible; }
.back-top:hover { background:var(--primary-hover); }

/* Responsive */
@media (max-width: 968px) {
  .feature-grid, .download-grid, .tutorial-grid, .resource-grid { grid-template-columns:repeat(2,1fr); }
  .scene-grid { grid-template-columns:repeat(3,1fr); }
  .article-layout { grid-template-columns:1fr; }
  .sidebar { position:static; }
  .footer-grid { grid-template-columns:repeat(2,1fr); }
  .about-stats { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 640px) {
  .nav { position:fixed; top:var(--header-h); left:0; right:0; background:var(--bg); flex-direction:column; align-items:stretch; padding:16px; border-bottom:1px solid var(--border); gap:4px; transform:translateY(-120%); transition:transform .3s; }
  .nav.open { transform:translateY(0); }
  .nav a { padding:12px 16px; }
  .mobile-menu-btn { display:block; }
  .hero h1 { font-size:28px; }
  .hero p { font-size:15px; }
  .feature-grid, .download-grid, .tutorial-grid, .resource-grid, .scene-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr; }
  .related-grid { grid-template-columns:1fr; }
  .article-header h1 { font-size:22px; }
  .section { padding:48px 0; }
  .section-title h2 { font-size:24px; }
}
