/* ============================================================
   shared.css — 全局设计令牌 + 子页面共享布局
   适用范围：所有页面（index 除外，它自带 fixed navbar）
   一劳永逸：新增页面只需加载此文件即可继承统一风格
   ============================================================ */

/* ============================================================
   SECTION 0: 全局设计令牌（CSS 变量 + 基础重置）
   ============================================================ */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2235;
    --bg-card-hover: #1e2a42;
    --bg-input: #0d1321;
    --border: #1e2d4a;
    --border-focus: #6366f1;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --gradient-accent: linear-gradient(135deg, #6366f1, #3b82f6);
    --gradient-card: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(59,130,246,0.03) 100%);
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --success-border: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --warning-border: rgba(245, 158, 11, 0.2);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --danger-border: rgba(239, 68, 68, 0.2);
    --critical: #dc2626;
    --critical-bg: rgba(220, 38, 38, 0.08);
    --critical-border: rgba(220, 38, 38, 0.2);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 24px rgba(99,102,241,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

*, *::before, *::after { 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", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* ---- 粘性导航栏 ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.brand-icon { font-size: 1.2rem; }
.brand-text { color: #e2e8f0; }

.nav-links { display: flex; gap: 8px; }

.nav-link {
  padding: 6px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.12);
}

/* ---- 页面头部 ---- */
.page-header {
  background:
    linear-gradient(180deg, rgba(10, 14, 23, 1) 0%, rgba(17, 24, 39, 1) 100%),
    radial-gradient(ellipse 60% 50% at 50% -20%, rgba(99,102,241,0.08) 0%, transparent 60%);
  padding: 48px 0 36px;
  border-bottom: 1px solid rgba(99,102,241,0.1);
  position: relative;
}

.page-header h1,
.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.page-header .subtitle,
.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.page-subtitle a {
  color: var(--accent-light);
  text-decoration: none;
}

.page-subtitle a:hover {
  text-decoration: underline;
}

/* ---- 通用容器 ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 丰富四列页脚 ---- */
.site-footer {
  background: rgba(10, 14, 23, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 48px 0 0;
  margin-top: 0;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 4px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .page-header {
    padding: 36px 0 28px;
  }

  .page-header h1,
  .page-title {
    font-size: 1.5rem;
  }

  .page-header .subtitle,
  .page-subtitle {
    font-size: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
