/* 设计变量与基础重置 */
:root {
  --color-primary: #7c3aed;
  --color-secondary: #db2777;
  --gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --bg-base: #f4f6fa;
  --bg-hero: radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.08), transparent 50%), radial-gradient(circle at 80% 70%, rgba(219, 39, 119, 0.06), transparent 50%);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.45);
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 10px 40px rgba(124, 58, 237, 0.06);
  --shadow-hover: 0 16px 50px rgba(124, 58, 237, 0.12);
  --font-main: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --container-max: 1200px;
  --section-gap: clamp(3rem, 7vw, 5.5rem);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-base);
  background-image: var(--bg-hero);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }

/* 排版系统 */
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; letter-spacing: -0.01em; color: var(--text-main); }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; margin-bottom: 1rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }

/* 布局容器 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section { padding: var(--section-gap) 0; }

/* 导航与页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(244, 246, 250, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); background: rgba(124, 58, 237, 0.06); }
.nav-download { background: var(--gradient-brand); color: #fff !important; padding: 0.5rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2); }
.nav-download:hover { filter: brightness(1.05); transform: translateY(-1px); }

.site-footer { background: #fff; border-top: 1px solid var(--glass-border); padding: 2.5rem 0 1.5rem; margin-top: var(--section-gap); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 0.8rem; color: var(--text-main); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--color-primary); }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid #e2e8f0; padding-top: 1.5rem; }

/* 通用按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.8rem; font-weight: 600; border-radius: var(--radius-md); transition: all var(--transition-base); cursor: pointer; border: none; font-size: 1rem; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(124, 58, 237, 0.35); }
.btn-secondary { background: #fff; color: var(--text-main); border: 1px solid #cbd5e1; }
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn:focus-visible { outline: 3px solid rgba(124, 58, 237, 0.4); outline-offset: 2px; }

/* 玻璃卡片 */
.card-glass { background: var(--glass-bg); backdrop-filter: blur(14px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-soft); transition: transform var(--transition-base), box-shadow var(--transition-base); }
.card-glass:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* 网格系统 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .nav-links { display: none; } .header-inner { justify-content: space-between; } }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--glass-border); background: #fff; }
.platform-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.platform-table th, .platform-table td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.platform-table th { background: rgba(124, 58, 237, 0.05); font-weight: 600; color: var(--text-main); white-space: nowrap; }
.platform-table tr:last-child td { border-bottom: none; }
.platform-table td:first-child { font-weight: 500; color: var(--text-main); }

/* FAQ 组件 */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: #fff; border: 1px solid #e2e8f0; border-radius: var(--radius-md); overflow: hidden; }
.faq-item details { width: 100%; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; cursor: pointer; font-weight: 600; color: var(--text-main); list-style: none; user-select: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform 0.2s; }
.faq-item details[open] summary::after { transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 1.5rem 1.5rem; color: var(--text-secondary); line-height: 1.7; }
.faq-item details:focus-within { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* 卡片流（最新动态） */
.update-card { display: flex; flex-direction: column; height: 100%; }
.update-card .card-body { flex: 1; display: flex; flex-direction: column; }
.update-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem; }
.link-btn { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; color: var(--color-primary); margin-top: auto; padding-top: 1rem; }
.link-btn::after { content: ""; width: 16px; height: 1px; background: currentColor; }

/* 相关阅读 */
.related-list { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.related-item { flex: 1 1 calc(50% - 0.75rem); min-width: 240px; display: flex; flex-direction: column; gap: 0.4rem; }
.related-item a { font-weight: 500; color: var(--text-main); }
.related-item a:hover { color: var(--color-primary); }
.related-item span { font-size: 0.9rem; color: var(--text-muted); }

/* SVG 动效核心规则 */
.svg-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes draw-stroke { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes gentle-breathe { 0%, 100% { opacity: 0.88; transform: scale(1); } 50% { opacity: 1; transform: scale(1.015); } }
.draw-path { animation: draw-stroke 3.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.breathe-anim { animation: gentle-breathe 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  .draw-path, .breathe-anim { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* 辅助类 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.highlight-box { background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(219, 39, 119, 0.05)); border-left: 4px solid var(--color-primary); padding: 1.2rem 1.5rem; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 1.5rem 0; }
