/* ============================================================
   myweb Design System v3.0
   设计规范：web-design-system skill
   风格：静谧工作室 — 极简暗色、大留白、清晰层级 + 毛玻璃导航 + 微交互动效
   变更：合并所有内联样式、统一设计令牌、消除重复定义、新增搜索/资料/文件页样式
   ============================================================ */

/* ===== 1. 设计令牌 ===== */
:root {
  /* 灰阶 — 从深到浅 */
  --gray-950: #060b14;
  --gray-900: #0a1020;
  --gray-850: #111827;
  --gray-800: #1c1c28;
  --gray-750: #252531;
  --gray-700: #2e2e3c;
  --gray-600: #3d3d4d;
  --gray-500: #5c5c6e;
  --gray-400: #7a7a8e;
  --gray-300: #9595a5;
  --gray-200: #b8b8c4;
  --gray-100: #d4d4df;
  --gray-050: #eaeaef;

  /* 品牌色 */
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --accent-subtle: rgba(59,130,246,0.08);
  --accent-glow: rgba(59,130,246,0.15);
  --accent-ghost: rgba(59,130,246,0.04);

  /* 语义色 */
  --success: #3ecf8e;
  --success-bg: rgba(62,207,142,0.12);
  --warning: #f2a83d;
  --warning-bg: rgba(242,168,61,0.12);
  --danger: #f25c5c;
  --danger-bg: rgba(242,92,92,0.12);
  --info: #4da8da;
  --info-bg: rgba(77,168,218,0.12);

  /* 排版 */
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-serif: 'Georgia', 'Noto Serif SC', 'Times New Roman', serif;

  /* 字阶 (1.25 比例) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* 行高 */
  --leading-tight: 1.25;
  --leading-snug: 1.4;
  --leading-normal: 1.7;
  --leading-relaxed: 1.85;

  /* 间距 — 4px 基线 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-14: 56px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.02);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --shadow-glow-sm: 0 0 12px rgba(59,130,246,0.1);

  /* 布局 — PC 端优化 */
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --content-max: 1400px;
  --reading-max: 800px;

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 350ms;

  /* 语义别名（兼容旧模板中的变量名） */
  --text-primary: var(--gray-050);
  --text-secondary: var(--gray-400);
  --text-muted: var(--gray-500);
  --bg-card: var(--gray-850);
  --bg-hover: var(--gray-800);
  --bg-elevated: var(--gray-750);
  --border: var(--gray-700);
  --border-light: rgba(255,255,255,0.06);
  --purple: #a78bfa;
  --radius: var(--radius-sm);
}

/* ===== 2. Reset & 全局基础 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--gray-100);
  background: #060b14 url('/uploads/bg-mountain.jpg') center/cover no-repeat fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-width: 1100px;
  overflow-x: auto;
}

::selection {
  background: rgba(59,130,246,0.3);
  color: #fff;
}

/* ===== 3. 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }
* { scrollbar-width: thin; scrollbar-color: var(--gray-700) transparent; }

/* ===== 4. 布局系统 ===== */

/* 主内容区 — 全宽，顶部留出 topbar 高度 */
.main-content {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-h);
}

/* 内容容器 — 居中，有最大宽度 */
.content-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  width: 100%;
}

/* 窄内容容器 — 文章阅读 */
.content-narrow {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  width: 100%;
}

/* 首页 2 栏布局 */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-8);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--sp-8);
  width: 100%;
  align-items: start;
}

.home-main { min-width: 0; }

.home-sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-8));
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ===== 5. 顶部导航栏 ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(10,10,18,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-6);
  gap: 0;
}

/* Logo */
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-100);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  margin-right: var(--sp-8);
  flex-shrink: 0;
  transition: opacity var(--duration-fast);
}
.topbar-logo:hover { opacity: 0.8; }

.topbar-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 16px rgba(59,130,246,0.35); }
}

/* 导航链接 */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.topbar-nav-link {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.topbar-nav-link:hover {
  color: var(--gray-100);
  background: var(--gray-850);
}
.topbar-nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* 搜索框 */
.topbar-spacer { flex: 1; }

.topbar-search {
  width: 320px;
  flex-shrink: 1;
  position: relative;
  margin-right: var(--sp-4);
}

.topbar-search input {
  width: 100%;
  height: 36px;
  padding: 0 var(--sp-4) 0 36px;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-full);
  color: var(--gray-100);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--duration-fast);
}
.topbar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: var(--gray-800);
}
.topbar-search input::placeholder { color: var(--gray-500); }

.topbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

/* 用户区 */
.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--gray-300);
  text-decoration: none;
  transition: all var(--duration-fast);
  flex-shrink: 0;
}
.topbar-user:hover { background: var(--gray-850); color: var(--gray-100); }

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: var(--text-xs);
}

/* 登录按钮 */
.topbar-login {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-100);
  text-decoration: none;
  background: var(--accent);
  transition: all var(--duration-fast);
  flex-shrink: 0;
}
.topbar-login:hover { background: var(--accent-light); }

/* 汉堡菜单 — PC 端永久隐藏 */
.topbar-menu-btn { display: none !important; }

/* 移动端导航面板 — PC 端永不显示 */
.mobile-nav { display: none !important; }

/* 侧栏用户头像 */
.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: var(--text-sm);
  color: var(--gray-300);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 6. 左侧导航栏 ===== */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-700);
}

.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: var(--text-lg);
}

.sidebar-brand-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-100);
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: var(--sp-4) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: var(--sp-3) var(--sp-3) var(--sp-1);
  margin-top: var(--sp-3);
}

.sidebar-section-title:first-child { margin-top: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--gray-300);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast);
  position: relative;
}

.sidebar-link:hover {
  background: var(--gray-850);
  color: var(--gray-100);
}

.sidebar-link.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-icon {
  width: 20px;
  text-align: center;
  font-size: var(--text-base);
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active .sidebar-icon { opacity: 1; }

.sidebar-link.logout {
  color: var(--gray-500);
  margin-top: auto;
}

.sidebar-link.logout:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.sidebar-divider {
  height: 1px;
  background: var(--gray-700);
  margin: var(--sp-3) var(--sp-3);
  opacity: 0.4;
}

/* 侧栏底部用户信息 */
.sidebar-user {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* 移动端侧栏遮罩 */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ===== 7. 页面标题 / Hero ===== */
.page-hero {
  padding: var(--sp-16) 0 var(--sp-12);
  text-align: center;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  border-radius: 1px;
}

.page-hero h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-100);
  margin-bottom: var(--sp-4);
  line-height: var(--leading-tight);
}

.page-hero p {
  font-size: var(--text-lg);
  color: var(--gray-400);
  max-width: 560px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* 小 Hero（内页） */
.page-hero-sm {
  padding: var(--sp-10) 0 var(--sp-8);
  text-align: left;
}

.page-hero-sm h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-100);
  margin-bottom: var(--sp-2);
}

/* ===== 8. 文章卡片 ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-6);
  padding-bottom: var(--sp-8);
}

.article-card {
  background: linear-gradient(180deg, rgba(21,21,31,0.75) 0%, rgba(21,21,31,0.9) 100%), var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card:hover {
  border-color: rgba(59,130,246,0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.08);
}

.article-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--gray-800);
}

.article-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.article-card:hover .article-card-cover img {
  transform: scale(1.04);
}

.article-card-badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: var(--gray-200);
  border: 1px solid rgba(255,255,255,0.06);
}

.article-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--sp-2);
  letter-spacing: -0.01em;
}

.article-card-body h2 a {
  color: #fff;
  text-decoration: none;
  transition: color var(--duration-fast);
}

.article-card-body h2 a:hover {
  color: var(--accent-light);
}

.article-card-body p {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: var(--sp-5);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--gray-700);
}

.article-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== 9. 排序栏 ===== */
.sort-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  padding: var(--sp-2);
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  width: fit-content;
}

.sort-label {
  color: var(--gray-500);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0 var(--sp-2);
  letter-spacing: 0.3px;
}

.sort-btn {
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  text-decoration: none;
  color: var(--gray-400);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.sort-btn:hover {
  background: var(--gray-800);
  color: var(--gray-200);
}

.sort-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

/* ===== 10. 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-top: var(--sp-8);
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--gray-400);
  background: var(--gray-850);
  transition: all var(--duration-fast);
}

.page-link:hover {
  border-color: var(--accent);
  color: var(--gray-100);
  background: var(--gray-800);
}

.page-link.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: default;
}

.page-dots {
  color: var(--gray-600);
  padding: 0 var(--sp-2);
  letter-spacing: 2px;
  user-select: none;
}

/* ===== 11. 文章详情 — PC 端优化 ===== */
.article-detail {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-6) 0;
}

.article-header { margin-bottom: var(--sp-10); }

/* 面包屑 */
.breadcrumb {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); color: var(--text-muted);
  margin-bottom: var(--sp-5); flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--duration-fast); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb .sep { color: var(--border); font-size: 0.65rem; }
.breadcrumb .current { color: var(--text-secondary); }

/* 标题 — PC 大字号 */
.article-header h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.03em;
}

/* 作者卡片 — 大号头像 + 信息 */
.article-author {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding: var(--sp-4); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.article-author-avatar {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: var(--text-xl); flex-shrink: 0;
}
.article-author-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.article-author-name { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.article-author-date { font-size: var(--text-xs); color: var(--text-muted); }

/* 标签 */
.article-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.article-tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--accent-subtle);
  color: var(--accent-light);
  text-decoration: none;
  border: 1px solid rgba(59,130,246,0.1);
  transition: all var(--duration-fast);
}
.article-tag:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.25);
}

/* 元信息栏 */
.article-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-8);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.article-meta-stats {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3);
  font-size: 0.85rem; color: var(--text-muted);
}
.meta-dot { color: var(--border); user-select: none; }

/* 复制链接按钮 */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--gray-700);
  background: var(--gray-850);
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-subtle);
}

/* 排版工具栏 */
.article-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  padding: var(--sp-3) 0;
}

.btn-format {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  background: var(--accent-subtle);
  color: var(--accent-light);
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
}
.btn-format:hover {
  background: var(--accent);
  color: #fff;
}
.btn-format:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ai {
  border-color: rgba(96,165,250,0.4);
  background: rgba(96,165,250,0.06);
  color: #b8a0ff;
}
.btn-ai:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.toolbar-hint {
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* 旧版兼容 */
.article-header .article-cat-badge { display: none; }

.article-detail-cover {
  margin-bottom: var(--sp-10);
  border-radius: var(--radius-xl); overflow: hidden;
}
.article-detail-cover img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* 文章摘要 */
.article-summary {
  margin-bottom: var(--sp-8);
  padding: var(--sp-6);
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(59,130,246,0.02));
  border: 1px solid rgba(59,130,246,0.12);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}

.article-summary::before {
  content: '📋';
  position: absolute;
  top: var(--sp-5);
  left: var(--sp-5);
  font-size: 1.1rem;
  opacity: 0.6;
}

.article-summary .summary-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-light);
  margin-bottom: var(--sp-2);
  margin-left: 28px;
  display: block;
}

.article-summary p {
  color: var(--gray-200);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0;
  margin-left: 28px;
}

/* 正文排版 — PC 优化 */
.article-content {
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.article-content > p:first-of-type::first-letter {
  float: left; font-size: 3.2em; font-weight: 700;
  line-height: 0.75; padding-right: var(--sp-2);
  color: var(--accent); font-family: var(--font-serif);
}

.article-content p { margin-bottom: var(--sp-6); }

.article-content h2 {
  font-size: 1.6rem; font-weight: 700;
  margin: var(--sp-14) 0 var(--sp-5);
  color: var(--text-primary); letter-spacing: -0.01em;
  padding-left: var(--sp-5); border-left: 4px solid var(--accent);
  line-height: 1.35;
}

.article-content h3 {
  font-size: 1.25rem; font-weight: 600;
  margin: var(--sp-10) 0 var(--sp-4);
  color: var(--text-primary);
  padding-left: var(--sp-5); position: relative;
}
.article-content h3::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3px; background: var(--accent); opacity: 0.5; border-radius: 2px;
}

.article-content h4 {
  font-size: 1.1rem; font-weight: 600;
  margin: var(--sp-8) 0 var(--sp-3);
  color: var(--text-secondary);
}

.article-content a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(59,130,246,0.25);
  transition: all var(--duration-fast);
  padding-bottom: 1px;
}

.article-content a:hover {
  color: #9ab8ff;
  border-bottom-color: var(--accent-light);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--sp-8) auto;
  display: block;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.article-content blockquote {
  margin: var(--sp-8) 0;
  padding: var(--sp-6) var(--sp-6) var(--sp-6) var(--sp-8);
  border: 1px solid rgba(59,130,246,0.1);
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(59,130,246,0.04), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--gray-300);
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: 0;
  left: var(--sp-4);
  font-size: 2.5rem;
  color: rgba(59,130,246,0.08);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.article-content blockquote p { margin-bottom: 0; }

/* 警告段落 */
.article-warn {
  background: rgba(210,153,34,0.08);
  border: 1px solid rgba(210,153,34,0.15);
  border-left: 3px solid var(--warning);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--sp-4) var(--sp-5);
  color: var(--gray-200);
  font-size: 0.92rem;
}

.article-content ul, .article-content ol {
  margin: var(--sp-5) 0;
  padding-left: 0;
}

.article-content ul { list-style: none; }

.article-content ul > li {
  position: relative;
  padding: 4px 0 4px var(--sp-6);
  margin-bottom: 2px;
  color: var(--gray-200);
  font-size: 1.05rem;
}

.article-content ul > li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.article-content ol {
  padding-left: var(--sp-6);
  counter-reset: step;
}

.article-content ol > li {
  position: relative;
  padding: 4px 0 4px var(--sp-1);
  margin-bottom: 4px;
  color: var(--gray-200);
  font-size: 1.05rem;
}

.article-content ol > li::marker {
  color: var(--accent);
  font-weight: 600;
}

.article-content code {
  background: var(--gray-750);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e6a27a;
  font-family: var(--font-mono);
}

/* 代码块 — 悬浮卡片效果 */
.article-content pre {
  background: linear-gradient(180deg, #0f1119 0%, #0d0f17 100%);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid var(--gray-700);
  margin: var(--sp-8) 0;
  font-size: 0.88rem;
  line-height: 1.75;
  position: relative;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.4),
    0 0 0 1px rgba(59,130,246,0.04),
    0 1px 2px rgba(0,0,0,0.3);
  transition: box-shadow var(--duration-normal), border-color var(--duration-normal);
}

.article-content pre:hover {
  border-color: rgba(59,130,246,0.2);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    0 0 0 1px rgba(59,130,246,0.08),
    0 2px 4px rgba(0,0,0,0.3);
}

/* 代码块顶部装饰条 */
.article-content pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--sp-4);
  right: var(--sp-4);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.15), transparent);
}

/* 代码块语言标签 */
.article-content pre::after {
  content: attr(data-lang, 'CODE');
  position: absolute;
  top: 0;
  right: var(--sp-4);
  padding: 3px 12px;
  border-radius: 0 0 6px 6px;
  background: var(--gray-800);
  color: var(--gray-500);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  font-family: var(--font-sans);
  border: 1px solid var(--gray-700);
  border-top: none;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: #d4d4df;
  font-size: inherit;
  font-family: var(--font-mono);
  display: block;
}

/* 行内代码 */
.article-content :not(pre) > code {
  background: var(--gray-800);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #e6a27a;
  font-family: var(--font-mono);
  border: 1px solid var(--gray-700);
}

.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--sp-8) 0;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-700);
}

.article-content th, .article-content td {
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--gray-700);
  text-align: left;
}

.article-content thead th {
  background: var(--gray-850);
  font-weight: 600;
  color: var(--gray-200);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid rgba(59,130,246,0.2);
}

.article-content tbody tr:hover td { background: rgba(59,130,246,0.03); }
.article-content tbody tr:last-child td { border-bottom: none; }

.article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.15), transparent);
  margin: var(--sp-12) 0;
}

/* 文章底部操作栏 */
.article-actions-bar {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  margin-top: var(--sp-12); padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.article-action-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5); height: 40px;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); text-decoration: none; cursor: pointer;
  font-family: var(--font-sans); transition: all var(--duration-fast);
}
.article-action-btn:hover { border-color: var(--accent); color: var(--text-primary); background: var(--bg-hover); }

/* 上下篇导航卡片 — 复用 glow-card */
.article-nav-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5);
  margin-top: var(--sp-8);
}
.article-nav-card { text-decoration: none; }
.article-nav-card .glow-card-body { text-align: left; }
.article-nav-card-next .glow-card-body { text-align: right; }
.article-nav-label { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--sp-1); }
.article-nav-empty { visibility: hidden; }

/* AI 推荐文章区 */
.article-recommend { margin-top: var(--sp-10); }
.recommend-loading { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }

/* 阅读进度条 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 110;
  background: transparent;
  pointer-events: none;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  box-shadow: 0 0 10px rgba(59,130,246,0.5);
  transition: width 0.1s linear;
  border-radius: 0 3px 3px 0;
}

/* AI 推荐（已迁移到 .article-recommend + glow-card，此处保留兼容） */

/* ===== 12. 按钮系统 — v3.3 卡片式 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  user-select: none;
  position: relative; overflow: hidden;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(59,130,246,0.1);
  transform: translateY(-1px);
}

.btn:active { transform: scale(0.97); }

.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-subtle); }

/* 卡片主按钮 */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #059669);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light), #34d399);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
  transform: translateY(-2px);
}

/* 危险按钮 */
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(239,68,68,0.2);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 4px 16px rgba(239,68,68,0.35);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border); color: var(--text-primary); }

/* 小按钮 — 表格行操作 */
.btn-sm {
  height: 30px; padding: 0 var(--sp-3); font-size: 0.75rem; line-height: 1;
  border-radius: var(--radius-sm); font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); text-decoration: none;
  display: inline-flex; align-items: center; vertical-align: middle;
}
.btn-sm:hover { border-color: var(--accent); color: var(--text-primary); background: var(--bg-hover); }

/* btn-sm + btn-danger 组合：保持尺寸一致 */
.btn-sm.btn-danger {
  height: 30px; padding: 0 var(--sp-3); font-size: 0.75rem; line-height: 1;
  border-radius: var(--radius-sm);
}

.btn-lg { height: 48px; padding: 0 var(--sp-6); font-size: var(--text-base); border-radius: var(--radius-md); }

.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* 编辑/成功按钮 */
.btn-edit { border-color: rgba(34,197,94,0.3) !important; color: var(--success) !important; }
.btn-edit:hover { background: var(--success-bg) !important; border-color: var(--success) !important; }

/* 卡片式操作按钮（管理后台专用） */
.btn-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5); min-width: 100px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; text-decoration: none;
  font-size: 0.82rem; font-weight: 500; font-family: var(--font-sans);
  color: var(--text-muted); transition: all 0.2s var(--ease-out);
}
.btn-card svg { opacity: 0.5; transition: opacity 0.2s; }
.btn-card:hover { border-color: var(--accent); color: var(--text-primary); box-shadow: 0 2px 12px rgba(59,130,246,0.1); transform: translateY(-2px); }
.btn-card:hover svg { opacity: 1; color: var(--accent); }

/* ===== 13. 表单 ===== */
.form-group { margin-bottom: var(--sp-5); }

.form-group label {
  display: block;
  margin-bottom: var(--sp-1);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--gray-300);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0 var(--sp-4);
  height: 42px;
  border: 1.5px solid var(--gray-700);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  background: var(--gray-750);
  color: var(--gray-100);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}

.form-group textarea {
  height: auto;
  min-height: 120px;
  padding: var(--sp-3) var(--sp-4);
  resize: vertical;
  line-height: var(--leading-normal);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-600);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239595a5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px var(--danger-bg) !important;
}

.form-group.error .error-msg {
  color: var(--danger);
  font-size: var(--text-xs);
  margin-top: var(--sp-1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }

.form-inline { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.form-inline input { flex: 1; min-width: 150px; }

/* 验证码输入（注册页） */
.invite-code-input {
  font-family: var(--font-mono);
  letter-spacing: 2px;
}

/* ===== 登录/注册页 — 纹理背景 ===== */
.auth-page-bg {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #060b14 url('/uploads/bg-tech.jpg') center/cover no-repeat fixed;
}
.auth-page-bg::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: rgba(6,11,20,0.5);
}

/* Auth form card */
.auth-form {
  max-width: 420px;
  margin: var(--sp-16) auto;
  background: rgba(17,24,39,0.9);
  backdrop-filter: blur(20px);
  padding: var(--sp-10);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.05);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: var(--sp-6);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-link {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--gray-400);
}

.auth-link a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}

.auth-link a:hover { text-decoration: underline; }

/* ===== 14. 告警 ===== */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(242,92,92,0.25);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(62,207,142,0.25);
}

/* ===== 15. 表格 ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-700);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th, .table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--gray-700);
}

.table th {
  background: var(--gray-850);
  font-weight: 600;
  color: var(--gray-400);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  position: sticky;
  top: 0;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-850); }

/* ===== 16. 徽章 ===== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge-published { background: var(--success-bg); color: var(--success); }
.badge-draft { background: var(--warning-bg); color: var(--warning); }
.badge-pending { background: rgba(167,139,250,0.15); color: #a78bfa; }
.badge-archived { background: rgba(149,149,165,0.15); color: var(--gray-400); }
.badge-super_admin { background: var(--accent-subtle); color: var(--accent-light); }
.badge-admin { background: var(--success-bg); color: var(--success); }
.badge-editor { background: var(--warning-bg); color: var(--warning); }
.badge-user { background: rgba(149,149,165,0.15); color: var(--gray-400); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); }

/* Category badge on cards */
.cat-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(59,130,246,0.15);
  margin-bottom: var(--sp-2);
}

/* ===== 17. 标签 ===== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-light);
  text-decoration: none;
  border: 1px solid rgba(59,130,246,0.1);
  transition: all var(--duration-fast);
  font-weight: 500;
}

.tag:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.25);
}

.tag:nth-child(5n+2) { background: rgba(167,139,250,0.1); color: #a78bfa; border-color: rgba(167,139,250,0.12); }
.tag:nth-child(5n+2):hover { background: rgba(167,139,250,0.18); }
.tag:nth-child(5n+3) { background: rgba(62,207,142,0.1); color: var(--success); border-color: rgba(62,207,142,0.12); }
.tag:nth-child(5n+3):hover { background: rgba(62,207,142,0.18); }
.tag:nth-child(5n+4) { background: rgba(242,168,61,0.1); color: var(--warning); border-color: rgba(242,168,61,0.12); }
.tag:nth-child(5n+4):hover { background: rgba(242,168,61,0.18); }
.tag:nth-child(5n+5) { background: rgba(242,92,92,0.1); color: var(--danger); border-color: rgba(242,92,92,0.12); }
.tag:nth-child(5n+5):hover { background: rgba(242,92,92,0.18); }

/* Tag chips (admin editor) */
.tag-chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); min-height: 28px; }
.tag-selected {
  cursor: pointer;
  padding: 2px 10px;
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(59,130,246,0.12);
  transition: all var(--duration-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tag-selected:hover { background: var(--danger-bg); color: var(--danger); border-color: rgba(242,92,92,0.25); }
.tag-suggest {
  cursor: pointer;
  padding: 1px 8px;
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background: var(--gray-800);
  color: var(--gray-400);
  border: 1px solid var(--gray-700);
  transition: all var(--duration-fast);
}
.tag-suggest:hover { background: var(--accent-subtle); color: var(--accent-light); border-color: rgba(59,130,246,0.2); }
.tag-suggestions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ===== 18. 空状态 ===== */
.empty-state {
  text-align: center;
  padding: var(--sp-20) var(--sp-6);
  color: var(--gray-500);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--text-lg);
  color: var(--gray-400);
  margin-bottom: var(--sp-2);
  font-weight: 600;
}

.empty-state p {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

/* ===== 19. Toast 通知 ===== */
.toast-container {
  position: fixed;
  top: var(--sp-5);
  right: var(--sp-5);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.35s var(--ease-out), toastOut 0.3s var(--ease-in) 2.7s forwards;
  max-width: 380px;
  backdrop-filter: blur(8px);
  border: 1px solid;
}

.toast-success {
  background: rgba(62,207,142,0.15);
  color: var(--success);
  border-color: rgba(62,207,142,0.25);
}

.toast-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(242,92,92,0.25);
}

.toast-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(242,168,61,0.25);
}

.toast-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: rgba(77,168,218,0.25);
}

.toast-icon { font-size: var(--text-base); flex-shrink: 0; }
.toast-msg { flex: 1; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

/* ===== 20. 公告栏 ===== */
.announcement-bar {
  max-width: var(--content-max);
  margin: var(--sp-4) auto 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(59,130,246,0.02));
  border: 1px solid rgba(59,130,246,0.12);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--gray-200);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* ===== 21. AI 聊天浮窗 ===== */
.ai-chat-widget { position: fixed; bottom: var(--sp-6); right: var(--sp-6); z-index: 999; }
.ai-chat-toggle {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(59,130,246,0.3);
  background: linear-gradient(135deg, var(--accent), #5b6ee8);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
  transition: all var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(59,130,246,0.4); }

.ai-chat-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 370px;
  height: 500px;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--gray-700);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--gray-800);
  cursor: grab;
  color: var(--gray-200);
}

.ai-chat-header:active { cursor: grabbing; }
.ai-chat-dragging { transition: none !important; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }

.ai-chat-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: var(--text-base);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.ai-chat-close:hover { background: var(--gray-700); color: var(--gray-200); }

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.ai-chat-msg { display: flex; flex-direction: column; max-width: 85%; }
.ai-chat-msg-bot { align-self: flex-start; }
.ai-chat-msg-user { align-self: flex-end; }

.ai-chat-msg-content {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.6;
  word-break: break-word;
}

.ai-chat-msg-bot .ai-chat-msg-content {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  color: var(--gray-200);
  border-bottom-left-radius: 4px;
}

.ai-chat-msg-user .ai-chat-msg-content {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-chat-loading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.ai-chat-dots { display: flex; gap: 4px; }
.ai-chat-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-500);
  animation: chatDot 1s infinite;
}
.ai-chat-dots span:nth-child(2) { animation-delay: .2s; }
.ai-chat-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes chatDot { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

.ai-chat-input-wrap {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-top: 1px solid var(--gray-700);
  background: var(--gray-800);
}

.ai-chat-input {
  flex: 1;
  height: 38px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  background: var(--gray-750);
  color: var(--gray-100);
  outline: none;
  font-family: var(--font-sans);
}

.ai-chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.ai-chat-send {
  height: 38px;
  padding: 0 var(--sp-4);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--duration-fast);
  white-space: nowrap;
}

.ai-chat-send:hover { background: var(--accent-light); }

.ai-chat-footer {
  text-align: center;
  padding: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--gray-600);
  border-top: 1px solid var(--gray-700);
  background: var(--gray-800);
}

/* ===== 22a. 编辑器 v5 — Word风格菜单栏 ===== */

.ed-title {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--gray-050);
  font-size: 2rem;
  font-weight: 800;
  padding: 0;
  margin-bottom: 16px;
  outline: none;
  letter-spacing: -0.02em;
}
.ed-title::placeholder { color: var(--gray-600); font-weight: 400; }

.ed-ribbon {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  margin-bottom: 0;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  flex-wrap: wrap;
  user-select: none;
}

.ed-group {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 0 6px;
}
.ed-group + .ed-group { border-left: 1px solid var(--gray-700); }

.ed-btn {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--gray-400);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.ed-btn:hover { background: var(--gray-800); color: var(--gray-100); }
.ed-btn:active { transform: scale(0.95); }
.ed-btn-accent { color: var(--accent-light); }

.ed-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--gray-700);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  min-height: 500px;
}

.ed-textarea {
  width: 100%;
  min-height: 500px;
  padding: 20px;
  border: none;
  border-right: 1px solid var(--gray-700);
  background: var(--gray-900);
  color: var(--gray-100);
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  resize: none;
  outline: none;
  tab-size: 2;
}
.ed-textarea:focus { background: #0c0c16; }
.ed-textarea::placeholder { color: var(--gray-600); font-style: italic; }

.ed-preview {
  padding: 28px;
  background: var(--gray-950);
  overflow-y: auto;
  min-height: 500px;
}

.ed-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.ed-foot-status { font-size: 0.75rem; color: var(--gray-600); margin-left: 8px; }

.ed-sidebar {
  position: fixed;
  right: calc((100vw - 1280px) / 2 + 32px);
  top: calc(var(--topbar-h) + 24px);
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
}

@media (max-width: 1400px) {
  .ed-sidebar { display: none; }
}

@media (max-width: 768px) {
  .ed-area { grid-template-columns: 1fr; }
  .ed-preview { display: none; }
  .ed-textarea { border-right: none; }
}

/* ===== 22. 管理后台 ===== */
.e-select {
  padding: 6px 12px;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: 8px;
  color: var(--gray-300);
  font-size: 0.78rem;
  cursor: pointer;
  outline: none;
}

.es-card {
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.es-card-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.e-top { margin-bottom: 28px; }

.e-title {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--gray-050);
  font-size: 2.2rem;
  font-weight: 800;
  padding: 0;
  margin-bottom: 16px;
  outline: none;
  letter-spacing: -0.03em;
  line-height: 1.25;
  transition: opacity var(--duration-fast);
}
.e-title:focus { opacity: 0.9; }
.e-title::placeholder { color: var(--gray-600); font-weight: 400; }

.e-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.e-top-left { display: flex; align-items: center; gap: 12px; }
.e-top-right { display: flex; align-items: center; gap: 8px; }

.e-badge {
  font-size: 0.68rem;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-light);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.e-top-hint { font-size: 0.7rem; color: var(--gray-600); }

.e-select {
  padding: 6px 12px;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: 8px;
  color: var(--gray-300);
  font-size: 0.78rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--duration-fast);
}
.e-select:focus { border-color: var(--accent); }

.ebtn {
  padding: 6px 14px;
  border: 1px solid var(--gray-700);
  border-radius: 8px;
  background: var(--gray-850);
  color: var(--gray-400);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ebtn:hover { background: var(--gray-800); color: var(--gray-100); transform: translateY(-1px); }
.ebtn-on { background: var(--accent-subtle); color: var(--accent-light); border-color: rgba(59,130,246,0.25); }

/* 单栏编辑区 */
.e-body {
  border: 1px solid var(--gray-700);
  border-radius: 12px;
  overflow: hidden;
  min-height: 560px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

.e-editor {
  display: flex;
  flex-direction: column;
}

.e-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 8px 12px;
  background: var(--gray-850);
  border-bottom: 1px solid var(--gray-700);
  user-select: none;
}

.etb {
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--gray-400);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.etb:hover { background: var(--gray-800); color: var(--gray-100); }
.etb:active { transform: scale(0.95); }
.etb-gap { width: 1px; height: 14px; background: var(--gray-700); margin: 0 6px; border-radius: 1px; }

.e-textarea {
  flex: 1;
  width: 100%;
  min-height: 500px;
  padding: 24px;
  border: none;
  background: var(--gray-900);
  color: var(--gray-100);
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  resize: none;
  outline: none;
  tab-size: 2;
  transition: background var(--duration-fast);
}
.e-textarea:focus { background: #0c0c16; }
.e-textarea::placeholder { color: var(--gray-600); font-style: italic; }

.e-preview {
  background: var(--gray-950);
  overflow-y: auto;
}

.e-preview-inner {
  padding: 32px;
  min-height: 500px;
}

/* 底部 */
.e-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-700);
}
.e-foot-status { font-size: 0.75rem; color: var(--gray-500); }

/* 设置卡片 */
.es-card {
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color var(--duration-fast);
}
.es-card:hover { border-color: rgba(59,130,246,0.1); }
.es-card-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.ai-xs { display: flex; flex-direction: column; gap: 2px; }
.ai-x {
  padding: 8px 12px;
  border: 1px solid var(--gray-700);
  border-radius: 8px;
  background: var(--gray-900);
  color: var(--gray-400);
  cursor: pointer;
  font-size: 0.8rem;
  text-align: left;
  transition: all 0.2s ease;
}
.ai-x:hover { border-color: var(--accent); color: var(--gray-100); transform: translateX(2px); }
.ai-x-go { border-color: rgba(59,130,246,0.3); color: var(--accent-light); }

/* ===== 22. 管理后台 ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-6);
  padding-top: var(--sp-6);
  min-height: 60vh;
}

.admin-sidebar {
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  padding: var(--sp-4) 0;
  height: fit-content;
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-6));
}

.admin-sidebar h3 { display: none; }

.sidebar-section { padding: 0 0 var(--sp-1); }

.sidebar-section-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  font-weight: 600;
  padding: 0 var(--sp-4) var(--sp-1);
}

.sidebar-divider {
  height: 1px;
  background: var(--gray-700);
  margin: var(--sp-3) var(--sp-4);
  opacity: 0.4;
}

.admin-sidebar ul { list-style: none; }

.admin-sidebar ul li { margin-bottom: 1px; }

.admin-sidebar ul li a {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  color: var(--gray-400);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: all var(--duration-fast);
  border-left: 2px solid transparent;
}

.admin-sidebar ul li a:hover {
  background: var(--gray-800);
  color: var(--gray-100);
  border-left-color: var(--gray-600);
}

.admin-sidebar ul li a.active {
  background: var(--accent-subtle);
  color: var(--accent-light);
  font-weight: 500;
  border-left-color: var(--accent);
}

.sidebar-back {
  font-size: var(--text-xs) !important;
  color: var(--gray-500) !important;
}

.sidebar-back:hover {
  color: var(--accent-light) !important;
  border-left-color: var(--accent-light) !important;
}

.admin-main {
  background: linear-gradient(180deg, rgba(21,21,31,0.88) 0%, rgba(21,21,31,0.95) 100%), url('/uploads/bg-ocean.jpg') center/cover no-repeat;
  padding: var(--sp-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-700);
  min-width: 0;
}

.admin-main h2 {
  margin-bottom: var(--sp-5);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-main h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--sp-4);
  color: var(--gray-200);
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.stat-card {
  background: var(--gray-800);
  padding: var(--sp-6);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--gray-700);
  transition: border-color var(--duration-fast);
  position: relative;
  overflow: hidden;
}

.stat-card:hover { border-color: rgba(59,130,246,0.2); }

.stat-card h3 {
  font-size: var(--text-3xl);
  color: var(--accent-light);
  margin-bottom: var(--sp-1);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-card p {
  color: var(--gray-400);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* 管理表单卡片 */
.admin-form-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* 管理工具栏 */
.admin-toolbar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.admin-toolbar-label { font-size: 0.82rem; color: var(--text-muted); margin-right: var(--sp-1); }

/* deleteForm / 行内删除按钮 — 统一 btn-sm 尺寸 */
td > form button,
.admin-file-actions > form button,
.admin-file-item form button {
  height: 30px; padding: 0 var(--sp-3); font-size: 0.75rem;
  border-radius: var(--radius-sm); font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-family: var(--font-sans);
  transition: all var(--duration-fast); display: inline-flex; align-items: center;
  line-height: 1; white-space: nowrap;
}
td > form button:hover,
.admin-file-actions > form button:hover {
  border-color: var(--danger); color: var(--danger); background: var(--danger-bg);
}

/* 排序/切换按钮 active 态 */
.btn-sm.active {
  background: var(--accent) !important; color: #fff !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}

.admin-main select {
  background: var(--gray-750);
  color: var(--gray-200);
  border: 1px solid var(--gray-700);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.form-inline select {
  height: 42px;
  padding: 0 var(--sp-4);
  border: 1.5px solid var(--gray-700);
  border-radius: var(--radius-sm);
  background: var(--gray-750);
  color: var(--gray-100);
  font-size: var(--text-sm);
  min-width: 100px;
}

/* ===== 23. AI 助手面板 (文章编辑器) ===== */
.editor-layout { display: flex; gap: var(--sp-6); align-items: flex-start; }
.editor-form { flex: 1; min-width: 0; }

.ai-panel {
  width: 280px;
  flex-shrink: 0;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  position: sticky;
  top: calc(var(--topbar-h) + var(--sp-6));
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.ai-panel-header {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--gray-700);
}

.ai-panel-header h3 { margin: 0; font-size: var(--text-sm); color: var(--gray-200); }

.ai-panel-body { padding: var(--sp-4); }

.ai-panel-desc {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin: 0 0 var(--sp-3) 0;
}

.ai-actions { display: flex; flex-direction: column; gap: var(--sp-1); }

.ai-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-sm);
  color: var(--gray-300);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all var(--duration-fast);
  text-align: left;
  font-family: var(--font-sans);
}

.ai-btn:hover { background: var(--gray-700); border-color: var(--accent); color: var(--gray-100); }
.ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-btn-icon { font-size: var(--text-base); }

.ai-result {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--gray-800);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
}

.ai-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--accent-light);
  font-weight: 600;
}

.ai-insert-btn {
  padding: 2px 10px;
  font-size: var(--text-xs);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.ai-insert-btn:hover { background: var(--accent); color: #fff; }

.ai-result-content {
  font-size: var(--text-sm);
  color: var(--gray-300);
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

.ai-loading {
  margin-top: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.ai-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--gray-700);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: aiSpin 0.6s linear infinite;
}

@keyframes aiSpin { to { transform: rotate(360deg); } }

.ai-error {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--danger-bg);
  border: 1px solid rgba(242,92,92,0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: var(--text-xs);
  display: none;
}

/* 编辑器标签页 */
.editor-tabs { display: flex; gap: 0; margin-bottom: 0; border-bottom: 1px solid var(--gray-700); }
.editor-tab {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  border: 1px solid var(--gray-700);
  border-bottom: none;
  background: var(--gray-800);
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--duration-fast);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: -1px;
}
.editor-tab:not(:first-child) { margin-left: -1px; }
.editor-tab:hover { color: var(--gray-200); background: var(--gray-750); }
.editor-tab.active {
  background: var(--gray-750);
  color: var(--accent-light);
  border-color: var(--gray-700);
  border-bottom-color: var(--gray-750);
  font-weight: 600;
}
.editor-container { border: 1px solid var(--gray-700); border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-top: none; }
.editor-container textarea {
  border: none !important;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
  font-family: var(--font-mono) !important;
  font-size: var(--text-sm) !important;
  line-height: 1.6 !important;
}
#previewArea {
  min-height: 300px;
  padding: var(--sp-6) !important;
  border: none !important;
  background: var(--gray-750);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ===== 24. 友链 ===== */
.friend-links {
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--gray-700);
  margin-top: auto;
}

.friend-links-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.friend-links-label {
  font-size: var(--text-base);
  margin-right: var(--sp-3);
  opacity: 0.4;
}

.friend-link {
  color: var(--gray-500);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--sp-1) 0;
  transition: color var(--duration-fast);
}

.friend-link:hover { color: var(--accent-light); }

.friend-link-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gray-600);
  opacity: 0.3;
  margin: 0 var(--sp-3);
}

/* ===== 25. 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--gray-700);
  background: var(--gray-900);
  padding: var(--sp-10) var(--sp-8) var(--sp-8);
  margin-top: var(--sp-16);
}

/* 友链区 */
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: none;
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  transition: all var(--duration-normal);
}

.footer-links a:hover {
  color: var(--accent-light);
  background: var(--accent-subtle);
  border-color: rgba(59,130,246,0.25);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59,130,246,0.08);
}

/* 版权区 */
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.footer-sep {
  color: var(--gray-600);
  user-select: none;
}

/* ===== 26. 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-850);
  border: 1.5px solid var(--gray-700);
  color: var(--gray-400);
  font-size: var(--text-lg);
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--duration-slow), transform var(--duration-slow), background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}

/* ===== 27. 内联代码 ===== */
code {
  background: var(--gray-750);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-light);
  font-family: var(--font-mono);
}

/* ===== 29. 图片通用 ===== */
img { max-width: 100%; height: auto; }

/* 懒加载模糊淡入 */
img.lazy-load { filter: blur(12px); opacity: 0; transition: filter 0.5s ease, opacity 0.5s ease; }
img.lazy-loaded { filter: blur(0); opacity: 1; }

/* ===== 30. 表单抖动动画 ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  animation: shake 0.5s ease;
}

/* ===== 31. 骨架屏 ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-800) 25%, var(--gray-750) 50%, var(--gray-800) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; margin-bottom: 10px; border-radius: 4px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-title { height: 22px; width: 75%; margin-bottom: 14px; border-radius: 4px; }
.skeleton-cover { height: 200px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.skeleton-card { background: var(--gray-850); border: 1px solid var(--gray-700); border-radius: var(--radius-md); overflow: hidden; }
.skeleton-card .skeleton-body { padding: var(--sp-6); }

/* ===== 32. 卡片入场动画 ===== */
.article-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.article-card.card-visible {
  opacity: 1;
  transform: translateY(0);
}



@keyframes cardFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 33. 辅助类 ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mono-textarea { font-family: var(--font-mono) !important; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-8 { margin-bottom: var(--sp-8); }

/* ===== 34. 首页侧栏卡片 ===== */
.sidebar-card {
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
}
.sidebar-card-title {
  font-size: var(--text-xs);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--gray-700);
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.sidebar-list li + li { border-top: 1px solid var(--gray-700); }
.sidebar-list a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--duration-fast);
}
.sidebar-list a:hover { color: var(--accent); }
.sidebar-badge {
  font-size: var(--text-xs);
  color: var(--gray-400);
  background: var(--gray-800);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}
.sidebar-recent li { flex-direction: column; align-items: flex-start; gap: 2px; }
.sidebar-recent small { font-size: var(--text-xs); color: var(--gray-500); }

/* 排序栏 */
.sort-label {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-right: var(--sp-2);
}
.sort-chip {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--gray-400);
  background: var(--gray-850);
  border: 1px solid var(--gray-700);
  transition: all var(--duration-fast);
  font-weight: 500;
}
.sort-chip:hover { border-color: var(--accent); color: var(--gray-100); }
.sort-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== 聚焦轮播 ===== */
.carousel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 240px;
  height: 200px;
  margin: var(--sp-8) auto;
  max-width: var(--content-max);
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-lg);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.carousel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.carousel-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
  filter: brightness(0.5) saturate(0.2);
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent 55%, rgba(21,21,31,0.85) 80%);
  pointer-events: none;
}

.carousel-main {
  position: relative;
  z-index: 2;
  padding: var(--sp-6) var(--sp-6) var(--sp-6) var(--sp-8);
}

.carousel-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(59,130,246,0.1);
  color: var(--accent-light);
  border: 1px solid rgba(59,130,246,0.15);
  margin-bottom: var(--sp-3);
}

.carousel-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: var(--sp-2);
}
.carousel-title a { color: var(--gray-100); text-decoration: none; }
.carousel-title a:hover { color: var(--accent-light); }

.carousel-excerpt {
  font-size: 0.85rem;
  color: #fff;
  line-height: 1.55;
  margin-bottom: var(--sp-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  color: var(--gray-600);
}

.carousel-avatar { display: none; }

/* 右侧预览列表 */
.carousel-sidebar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-4) var(--sp-5);
  border-left: 1px solid rgba(255,255,255,0.04);
  gap: 1px;
}

.carousel-sidebar-title {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  margin-bottom: 2px;
}

.carousel-sidebar-subtitle {
  font-size: 0.6rem;
  color: var(--gray-600);
  margin-bottom: var(--sp-2);
  font-style: italic;
  letter-spacing: 0.3px;
}

.carousel-sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px var(--sp-1);
  border-radius: 3px;
  text-decoration: none;
}
.carousel-sidebar-item:hover .carousel-sidebar-text { color: var(--gray-300); }

.carousel-sidebar-num {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--gray-600);
  font-family: var(--font-mono);
  min-width: 16px;
}
.carousel-sidebar-item.active .carousel-sidebar-num { color: var(--accent); }

.carousel-sidebar-text {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.carousel-sidebar-item.active .carousel-sidebar-text { color: var(--gray-300); }

/* 指示器 */
.carousel-indicators {
  position: absolute;
  bottom: var(--sp-4);
  left: var(--sp-8);
  z-index: 3;
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  padding: 0;
  transition: all var(--duration-fast);
}
.carousel-dot.active { background: var(--accent); width: 16px; border-radius: 3px; }
.carousel-dot:hover { background: rgba(255,255,255,0.3); }

/* Hero 文字 */
.hero-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto;
}

/* 空状态 */
.empty-state-icon { font-size: 3rem; margin-bottom: var(--sp-4); }

/* 文章卡片补充 */
.article-card-title {
  margin-bottom: var(--sp-2);
  font-size: var(--text-lg);
  line-height: 1.4;
}
.article-card-title a {
  color: #fff;
  text-decoration: none;
  transition: color var(--duration-fast);
}
.article-card-title a:hover { color: var(--accent); }
.article-card-excerpt {
  color: #fff;
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--sp-3);
}
.article-card-badge-static {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--accent-subtle);
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

/* 文章列表包装 */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}



/* ===== 35. 响应式 ===== */

/* ===== 35. 响应式 ===== */

/* PC 大屏 (≥1440px) */
@media (min-width: 1440px) {
  :root { --content-max: 1600px; }

  .hero { padding: 140px 20px 120px; }
  .hero-title { font-size: 3.5rem; }
  .topbar-search { width: 520px; }
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
  .home-layout { grid-template-columns: 1fr 360px; gap: var(--sp-10); }
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
  .carousel { height: 340px; }
  .carousel-title { font-size: 1.6rem; }
  .glow-grid { grid-template-columns: repeat(3, 1fr); }
  .files-card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .article-content { font-size: 1.2rem; }
}

/* 超宽屏 (≥1920px) */
@media (min-width: 1920px) {
  :root { --content-max: 1700px; }
  .articles-grid { grid-template-columns: repeat(4, 1fr); }
  .glow-grid { grid-template-columns: repeat(4, 1fr); }
  .home-layout { grid-template-columns: 1fr 380px; }
}

/* 桌面 (≥1024px) — PC 端双列起步 */
@media (min-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .glow-grid { grid-template-columns: repeat(2, 1fr); }
  .glow-grid-sm { grid-template-columns: repeat(2, 1fr); }
  .files-card-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .article-nav-cards { grid-template-columns: 1fr 1fr; }
  .home-layout { grid-template-columns: 1fr 320px; }
}

/* 移动端适配已移除 — 仅 PC 端 */

/* ===== 36. 无障碍 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .skeleton { animation: none !important; background: var(--gray-800); }
}

/* ===== 37. 文章编辑器 — 单栏布局 + 预览覆盖 ===== */

/* 隐藏旧的固定侧边栏 */
.ed-sidebar { display: none !important; }

/* 预览窗格内部 */
.ed-preview { display: block; }
.ed-preview-inner { padding: 28px; min-height: 520px; }

/* 预览空状态 */
.ed-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 0.9rem;
  min-height: 520px;
}

/* 预览中的文章样式 */
.ed-preview-inner img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.ed-preview-inner pre {
  background: linear-gradient(180deg, #0f1119 0%, #0d0f17 100%);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid var(--gray-700);
  margin: var(--sp-4) 0;
  font-size: 0.88rem;
  line-height: 1.75;
}
.ed-preview-inner pre code { background: none; color: #d4d4df; font-family: var(--font-mono); }
.ed-preview-inner blockquote {
  margin: var(--sp-4) 0;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-6);
  border-left: 4px solid var(--accent);
  background: rgba(59,130,246,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--gray-300);
}
.ed-preview-inner .article-warn {
  background: rgba(210,153,34,0.08);
  border: 1px solid rgba(210,153,34,0.15);
  border-left: 3px solid var(--warning);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--sp-3) var(--sp-4);
  color: var(--gray-200);
  font-size: 0.92rem;
}
.ed-preview-inner table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ed-preview-inner th, .ed-preview-inner td { padding: 8px 12px; border: 1px solid var(--gray-700); text-align: left; }
.ed-preview-inner th { background: var(--gray-850); font-weight: 600; }
.ed-preview-inner hr { border: none; height: 1px; background: var(--gray-700); margin: var(--sp-4) 0; }
.ed-preview-inner p { margin-bottom: var(--sp-4); line-height: 1.8; }
.ed-preview-inner h2 { font-size: 1.4rem; font-weight: 700; margin: var(--sp-6) 0 var(--sp-3); padding-left: var(--sp-3); border-left: 4px solid var(--accent); }
.ed-preview-inner h3 { font-size: 1.15rem; font-weight: 600; margin: var(--sp-5) 0 var(--sp-2); }
.ed-preview-inner h4 { font-size: 1.05rem; font-weight: 600; margin: var(--sp-4) 0 var(--sp-2); }
.ed-preview-inner ul, .ed-preview-inner ol { margin: var(--sp-3) 0; padding-left: var(--sp-6); }
.ed-preview-inner a { color: var(--accent-light); text-decoration: none; }

/* 隐藏预览时的布局 */
.ed-area.preview-only { grid-template-columns: 1fr; }
.ed-area.preview-only .ed-textarea { display: none; }
.ed-area.preview-only .ed-preview { display: block; }

/* 文章设置（可折叠） */
.ed-settings {
  margin-top: 16px;
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  overflow: hidden;
}

.ed-settings-toggle {
  width: 100%;
  padding: 12px 16px;
  background: var(--gray-850);
  border: none;
  color: var(--gray-300);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
}
.ed-settings-toggle:hover { background: var(--gray-800); color: var(--gray-100); }

.ed-settings-arrow {
  display: inline-block;
  font-size: 0.65rem;
  transition: transform 0.2s ease;
  color: var(--gray-500);
}
.ed-settings-arrow.open { transform: rotate(90deg); }

.ed-settings-body {
  padding: 16px;
  border-top: 1px solid var(--gray-700);
  background: var(--gray-900);
}

.ed-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* 标签卡片占满宽 */
.ed-settings-grid .es-card:has(.tag-chips),
.ed-settings-grid .es-card:has(#tagInput) {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .ed-area { grid-template-columns: 1fr; }
  .ed-preview { display: none; }
  .ed-textarea { border-right: none; }
  .ed-settings-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   搜索页面 — v3.2 卡片网格 + 流动光晕
   ============================================================ */
.search-page { max-width: var(--content-max); margin: 0 auto; }

/* 搜索页 */
.search-hero-bg { padding: var(--sp-10) var(--sp-4) var(--sp-6); text-align: center; }
.search-hero-inner { max-width: 640px; margin: 0 auto; }
.search-hero-title { font-size: var(--text-4xl); font-weight: 800; letter-spacing: -0.03em; color: var(--text-primary); margin-bottom: var(--sp-6); }

.search-form-lg {
  display: flex; align-items: center; max-width: 560px; margin: 0 auto;
  border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.search-form-lg:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }
.search-form-lg .search-form-icon { flex-shrink: 0; margin-left: var(--sp-4); color: var(--text-muted); }
.search-form-lg input { flex: 1; padding: var(--sp-3) var(--sp-4); height: 50px; border: none; background: transparent; color: var(--text-primary); font-size: var(--text-base); font-family: var(--font-sans); outline: none; min-width: 0; }
.search-form-lg input::placeholder { color: var(--text-muted); }
.search-form-lg button { flex-shrink: 0; padding: 0 var(--sp-6); height: 50px; background: var(--accent); color: #fff; border: none; font-size: 0.95rem; font-weight: 600; font-family: var(--font-sans); cursor: pointer; transition: background var(--duration-fast); }
.search-form-lg button:hover { background: var(--accent-light); }

/* 搜索结果区 */
.search-results { max-width: var(--content-max); margin: 0 auto; padding: var(--sp-8) var(--sp-4); animation: fadeInUp 0.4s var(--ease-out); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.search-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-8); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-muted); }
.search-summary strong { color: var(--text-primary); font-weight: 600; }
.ai-search-btn { display: inline-flex; align-items: center; gap: 5px; padding: var(--sp-1) var(--sp-4); height: 32px; border: 1px solid rgba(59,130,246,0.25); border-radius: var(--radius-full); background: rgba(59,130,246,0.06); color: var(--accent-light); font-size: 0.8rem; font-weight: 500; font-family: var(--font-sans); cursor: pointer; transition: all var(--duration-fast); }
.ai-search-btn:hover { background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.4); }
.ai-search-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.search-ai-status { font-size: 0.8rem; color: var(--text-muted); padding: var(--sp-2) 0; }

/* 卡片网格 */
.search-results .glow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-6); }

/* 卡片标签 */
.glow-card-tag { padding: 1px 8px; border-radius: var(--radius-full); background: rgba(59,130,246,0.08); color: var(--accent-light); font-size: 0.68rem; font-weight: 500; }
.meta-dot { opacity: 0.3; user-select: none; }

/* 空状态 */
.search-empty-state { text-align: center; padding: var(--sp-20) var(--sp-4); }
.search-empty-icon { font-size: 3.5rem; display: block; margin-bottom: var(--sp-4); opacity: 0.4; }
.search-empty-state h3 { font-size: var(--text-xl); font-weight: 600; color: var(--text-primary); margin-bottom: var(--sp-1); }
.search-empty-state p { font-size: 0.9rem; color: var(--text-muted); }

/* AI */
.ai-keywords { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--sp-4) 0; }
.ai-keyword { padding: 3px 12px; border-radius: var(--radius-full); background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.15); font-size: 0.78rem; color: var(--accent-light); font-weight: 500; }
.ai-search-badge { font-size: 0.7rem; padding: 1px 8px; border-radius: var(--radius-full); background: rgba(59,130,246,0.1); color: var(--accent-light); margin-left: var(--sp-2); font-weight: 500; }

/* ============================================================
   资料页 — v3.2 流动光晕卡片
   ============================================================ */
.pages-layout { max-width: var(--content-max); margin: 0 auto; padding: var(--sp-6) var(--sp-4); }

.pages-hero { text-align: center; padding: var(--sp-8) 0 var(--sp-6); }
.pages-hero h1 { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: var(--sp-1); }
.pages-hero p { color: var(--text-muted); font-size: var(--text-base); }

.pages-tabs { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-6); justify-content: center; }
.pages-tab { display: inline-flex; align-items: center; gap: var(--sp-1); padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; color: var(--text-muted); text-decoration: none; border: 1px solid var(--border); background: var(--bg-card); transition: all var(--duration-fast); cursor: pointer; user-select: none; }
.pages-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.pages-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   文件浏览页 — v3.2 流动光晕卡片
   ============================================================ */
.files-page { max-width: var(--content-max); margin: 0 auto; padding: var(--sp-6) var(--sp-4); }

/* 文件页顶部 */
.files-hero-bg {
  position: relative; padding: var(--sp-8) var(--sp-4);
  margin: calc(-1 * var(--sp-6)) calc(-1 * var(--sp-4)) var(--sp-6);
  background: linear-gradient(180deg, rgba(6,11,20,0.75) 0%, rgba(6,11,20,0.92) 100%), url('/uploads/bg-tech.jpg') center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}

.files-toolbar { display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.files-search { max-width: 380px; width: 100%; position: relative; }
.files-search input { width: 100%; padding: var(--sp-2) var(--sp-4) var(--sp-2) 36px; height: 38px; border: 1.5px solid var(--border); border-radius: var(--radius-full); font-size: 0.85rem; font-family: var(--font-sans); background: var(--bg-card); color: var(--text-primary); outline: none; transition: border-color var(--duration-fast); }
.files-search input:focus { border-color: var(--accent); }
.files-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.files-tabs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.files-tab { padding: var(--sp-1) var(--sp-3); height: 32px; display: inline-flex; align-items: center; gap: 3px; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 500; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted); text-decoration: none; transition: all var(--duration-fast); }
.files-tab:hover { border-color: var(--accent); color: var(--text-primary); }
.files-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.files-tab .count { font-size: 0.68rem; opacity: 0.7; }

.files-bar { margin-bottom: var(--sp-5); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.files-bar-stat { font-size: 0.82rem; color: var(--text-muted); }
.files-bar-stat strong { color: var(--text-primary); font-weight: 600; }

/* 文件卡片网格 — 复用 glow-card */
.files-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-5); }

.glow-card-file .glow-card-cover-file { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.file-card-icon-large { font-size: 3.5rem; line-height: 1; opacity: 0.5; }
.file-card-ext-badge { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 4px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; background: rgba(0,0,0,0.5); color: #fff; letter-spacing: 0.3px; backdrop-filter: blur(4px); }

/* ============================================================
   文件查看页 (view.php)
   ============================================================ */
.view-container { max-width: 960px; margin: 0 auto; padding: var(--sp-6) 0; }
.view-header {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-5);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.view-header .back-btn {
  padding: 6px 14px; border-radius: var(--radius-sm); font-size: 0.85rem;
  border: 1px solid var(--border); color: var(--text-secondary);
  text-decoration: none; transition: all var(--duration-fast); flex-shrink: 0;
}
.view-header .back-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.view-header .file-info { flex: 1; min-width: 0; }
.view-header .file-info h1 {
  font-size: 1.1rem; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.view-header .file-info .meta { font-size: 0.8rem; color: var(--text-muted); }
.view-header .download-btn {
  padding: var(--sp-2) var(--sp-5); border-radius: var(--radius-sm); font-size: 0.88rem;
  background: var(--accent); color: #fff; text-decoration: none;
  transition: opacity var(--duration-fast); flex-shrink: 0;
}
.view-header .download-btn:hover { opacity: 0.85; }

.image-viewer {
  display: flex; justify-content: center; align-items: center;
  min-height: 60vh; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--sp-5);
}
.image-viewer img {
  max-width: 100%; max-height: 75vh; object-fit: contain;
  border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.pdf-viewer { width: 100%; height: 80vh; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.pdf-viewer iframe { width: 100%; height: 100%; border: none; }

.office-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.office-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border);
  background: var(--bg-hover); font-size: 0.82rem; color: var(--text-muted);
}
.office-badge {
  padding: 2px 10px; border-radius: 4px;
  background: rgba(59,130,246,0.12); color: var(--accent); font-weight: 500; font-size: 0.82rem;
}
.office-stat { color: var(--text-muted); font-size: 0.82rem; }
.office-credit { margin-left: auto; color: var(--text-muted); font-size: 0.8rem; }
.office-body {
  padding: var(--sp-6) var(--sp-7); max-height: 72vh; overflow-y: auto;
  font-size: 0.95rem; line-height: 1.8; color: var(--text-primary);
}
.doc-h {
  font-size: 1.15rem; font-weight: 700; margin: var(--sp-5) 0 var(--sp-2);
  padding-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--accent);
}
.doc-p { margin: 6px 0; }
.doc-empty { height: 0.8em; }

.xls-wrap { overflow-x: auto; }
.xls-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
  font-family: 'Consolas', 'Monaco', monospace;
}
.xls-table th {
  background: var(--bg-hover); padding: var(--sp-2) var(--sp-3); text-align: left;
  font-weight: 600; color: var(--text-primary); border: 1px solid var(--border); white-space: nowrap;
}
.xls-table td {
  padding: 6px var(--sp-3); border: 1px solid var(--border);
  color: var(--text-primary); white-space: nowrap;
}
.xls-table tbody tr:nth-child(even) td { background: rgba(128,128,128,0.03); }
.xls-table tbody tr:hover td { background: rgba(59,130,246,0.06); }

.ppt-slide {
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: var(--sp-4);
  overflow: hidden; background: var(--bg-card);
}
.ppt-hdr {
  padding: var(--sp-2) var(--sp-4); font-size: 0.82rem; font-weight: 600;
  background: var(--bg-hover); color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.ppt-body { padding: 14px var(--sp-5); }
.ppt-txt { margin: 4px 0; font-size: 0.92rem; }
.ppt-empty { color: var(--text-muted); font-style: italic; font-size: 0.85rem; }

/* 文本/代码查看器 */
.text-viewer {
  background: #0d1117; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.text-viewer .text-toolbar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #161b22; font-size: 0.8rem; color: var(--text-muted);
}
.text-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.lang-badge {
  padding: 2px 10px; border-radius: 4px; font-size: 0.72rem; font-weight: 600;
  background: rgba(59,130,246,0.15); color: var(--accent-light);
  letter-spacing: 0.3px;
}
.btn-copy-text {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted); cursor: pointer; font-size: 0.75rem;
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: var(--radius-sm); transition: all var(--duration-fast);
}
.btn-copy-text:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: rgba(255,255,255,0.15); }

/* 代码视图（行号 + 内容） */
.code-view { overflow-x: auto; max-height: 70vh; }
.code-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.code-table tr { transition: background 0.1s; }
.code-table tr:hover { background: rgba(59,130,246,0.04); }
.code-line-num {
  padding: 0 var(--sp-4) 0 var(--sp-3); text-align: right; width: 1%;
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.7;
  color: rgba(255,255,255,0.18); user-select: none; white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.code-line-content {
  padding: 0 var(--sp-5); white-space: pre; word-wrap: normal;
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.7;
  color: #c9d1d9;
}

.media-viewer {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; padding: var(--sp-5);
}
.media-viewer video, .media-viewer audio { width: 100%; border-radius: var(--radius-sm); }
.media-viewer audio { margin: var(--sp-10) 0; }

/* ===== Markdown 查看器 (view.php) ===== */
.markdown-viewer {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.md-body {
  padding: var(--sp-8) var(--sp-10); max-width: 800px; margin: 0 auto;
  line-height: 1.85; color: var(--text-primary);
}
.md-body .md-h { margin: 1.5em 0 0.5em; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.md-body .md-h:nth-of-type(1) { margin-top: 0; }
.md-body h1.md-h { font-size: 1.8rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
.md-body h2.md-h { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25em; }
.md-body h3.md-h { font-size: 1.25rem; }
.md-body h4.md-h { font-size: 1.1rem; }
.md-body h5.md-h { font-size: 1rem; }
.md-body h6.md-h { font-size: 0.9rem; color: var(--text-secondary); }
.md-body .md-p { margin: 0.6em 0; }
.md-body .md-code {
  display: block; padding: var(--sp-4) var(--sp-5); margin: var(--sp-4) 0;
  background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow-x: auto; font-family: var(--font-mono); font-size: 0.85rem;
  line-height: 1.6; color: #c9d1d9; white-space: pre-wrap; word-break: break-all;
}
.md-body .md-inline {
  padding: 1px 6px; border-radius: 3px; background: rgba(110,118,129,0.2);
  font-family: var(--font-mono); font-size: 0.88em; color: #c9d1d9;
}
.md-body .md-quote {
  margin: var(--sp-4) 0; padding: var(--sp-2) var(--sp-5);
  border-left: 3px solid var(--accent); color: var(--text-secondary);
  background: rgba(59,130,246,0.04); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.md-body .md-ul, .md-body .md-ol { margin: var(--sp-3) 0; padding-left: var(--sp-8); }
.md-body .md-ul li, .md-body .md-ol li { margin: 4px 0; }
.md-body .md-hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-8) 0; }
.md-body .md-link { color: var(--accent-light); text-decoration: none; }
.md-body .md-link:hover { text-decoration: underline; }
.md-body strong { color: #f0f0f0; }
.md-body em { color: var(--text-secondary); }

/* 改进：文件卡片封面增强 */
.glow-card-cover-file {
  background: linear-gradient(135deg, rgba(59,130,246,0.04) 0%, rgba(139,92,246,0.04) 100%);
}
.file-card-icon-large { font-size: 3.5rem; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.glow-card-file:hover .file-card-icon-large { opacity: 0.9; }
.file-card-ext-badge {
  position: absolute; top: 10px; right: 10px; padding: 3px 10px;
  border-radius: var(--radius-full); font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; background: rgba(59,130,246,0.15);
  color: var(--accent-light); letter-spacing: 0.5px;
  border: 1px solid rgba(59,130,246,0.2);
}

.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--sp-10); text-align: center;
}
.info-card .big-icon { font-size: 4rem; margin-bottom: var(--sp-4); }
.info-card h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: var(--sp-2); color: var(--text-primary); }
.info-card p { color: var(--text-secondary); margin-bottom: var(--sp-2); }
.info-card .detail-row {
  display: flex; justify-content: center; gap: var(--sp-8); margin: var(--sp-4) 0;
  font-size: 0.88rem; color: var(--text-muted);
}
.info-card .detail-row span { display: flex; align-items: center; gap: 6px; }

.view-fallback {
  text-align: center; padding: 60px 20px;
}
.view-fallback .big-icon { font-size: 4rem; margin-bottom: var(--sp-4); }
.view-fallback h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: var(--sp-2); }
.view-fallback p { color: var(--text-secondary); margin-bottom: var(--sp-4); }

/* ============================================================
   管理后台 — 文件管理 (admin/files.php)
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: var(--sp-12) var(--sp-5); text-align: center;
  transition: all var(--duration-fast); cursor: pointer;
}
.upload-zone:hover { border-color: var(--accent); background: rgba(59,130,246,0.05); }
.upload-icon { font-size: 3rem; margin-bottom: var(--sp-2); }
.upload-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--sp-2); }

.admin-file-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4); margin-top: var(--sp-5);
}
.admin-file-item {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: all 0.25s ease;
}
.admin-file-item:hover { border-color: rgba(59,130,246,0.15); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.admin-file-preview {
  height: 140px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-hover); overflow: hidden;
}
.admin-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-file-icon { font-size: 3rem; }
.admin-file-info { padding: var(--sp-3) 14px; }
.admin-file-name {
  font-size: 0.85rem; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-bottom: 4px;
}
.admin-file-meta { font-size: 0.75rem; color: var(--text-muted); }
.admin-file-actions { padding: var(--sp-2) 14px; border-top: 1px solid var(--border); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.admin-file-actions .btn-sm { height: 30px; padding: 0 8px; }
.btn-edit { border-color: rgba(34,197,94,0.3) !important; color: var(--success) !important; }
.btn-edit:hover { background: var(--success-bg) !important; border-color: var(--success) !important; }

/* 管理弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 90%; max-width: 480px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  animation: modalIn 0.2s var(--ease-out);
}
.modal-box-lg { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--border);
}
.modal-header h4 { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.modal-close {
  width: 32px; height: 32px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: var(--text-lg); display: flex; align-items: center; justify-content: center;
  transition: all var(--duration-fast);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-box .form-group { padding: var(--sp-4) var(--sp-6); margin: 0; }
.modal-box .form-group:first-of-type { padding-top: var(--sp-5); }
.modal-actions {
  display: flex; justify-content: flex-end; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border);
}

/* 管理后台代码编辑器 */
.code-editor-wrap {
  background: #0d1117; border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); overflow: hidden;
}
.code-editor-textarea {
  width: 100%; min-height: 420px; padding: var(--sp-4); border: none;
  background: transparent; color: #c9d1d9;
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.7;
  resize: vertical; outline: none; tab-size: 4;
  white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.code-editor-textarea::selection { background: rgba(59,130,246,0.3); }

/* 列表视图 */
.files-list { display: flex; flex-direction: column; gap: 4px; }
.file-list-item {
  display: flex; align-items: center; gap: 14px; padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: background var(--duration-fast); cursor: pointer;
}
.file-list-item:hover { background: var(--bg-hover); }
.file-list-icon { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; }
.file-list-info { flex: 1; min-width: 0; }
.file-list-name { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-list-meta { font-size: 0.78rem; color: var(--text-muted); }
.file-list-actions { flex-shrink: 0; display: flex; gap: 6px; }

/* ============================================================
   毛玻璃导航增强 (v3.0)
   ============================================================ */
.topbar {
  background: rgba(10,10,20,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* ===== 通用流动光晕卡片 ===== */
.glow-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(17,24,39,0.82) 0%, rgba(17,24,39,0.92) 100%), url('/uploads/bg-ocean.jpg') center/cover no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.35s var(--ease-out);
}
/* 流动光晕边框 — 旋转 conic-gradient */
.glow-card::before {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    transparent, transparent,
    rgba(59,130,246,0.15), rgba(96,165,250,0.2),
    rgba(59,130,246,0.15), transparent, transparent
  );
  opacity: 0; transition: opacity 0.35s;
  animation: glowRotate 3s linear infinite;
  animation-play-state: paused;
}
.glow-card::after {
  content: ''; position: absolute; inset: 1px; z-index: -1;
  border-radius: calc(var(--radius-lg) - 1px);
  background: var(--bg-card);
}
.glow-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59,130,246,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.1);
}
.glow-card:hover::before {
  opacity: 1;
  animation-play-state: running;
}
@keyframes glowRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 封面图片缩放 */
.glow-card-cover {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-hover);
}
.glow-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.glow-card:hover .glow-card-cover img { transform: scale(1.06); }

.glow-card-body { padding: var(--sp-5) var(--sp-6); }
.glow-card-body h3 {
  font-size: var(--text-base); font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin-bottom: var(--sp-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.glow-card-body p {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: var(--sp-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.glow-card-meta {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  font-size: 0.72rem; color: var(--text-muted);
  padding-top: var(--sp-3); border-top: 1px solid var(--border);
}

/* 首页卡片光晕兼容 */
.article-card { position: relative; }
.article-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  opacity: 0; transition: opacity var(--duration-slow);
  box-shadow: 0 0 30px var(--accent-glow);
  pointer-events: none; z-index: 0;
}
.article-card:hover::after { opacity: 1; }

/* 按钮涟漪效果 */
.btn, .btn-primary, .btn-danger, .btn-ghost {
  position: relative; overflow: hidden;
}
.btn::before, .btn-primary::before, .btn-danger::before, .btn-ghost::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s;
}
.btn:active::before, .btn-primary:active::before, .btn-danger:active::before, .btn-ghost:active::before {
  width: 300px; height: 300px;
}

/* 轮播 — PC 端加大 */
.carousel {
  height: 300px; border-radius: var(--radius-xl);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  grid-template-columns: 1fr 280px;
}
.carousel-title { font-size: 1.5rem; }
.carousel-excerpt { -webkit-line-clamp: 3; font-size: 0.9rem; }
.carousel-bg img { opacity: 0.08; }
.carousel-overlay {
  background: linear-gradient(90deg, transparent 35%, rgba(21,21,31,0.95) 70%);
}

/* Hero 无轮播时 — 光斑背景 */
.hero {
  max-width: var(--content-max); margin: var(--sp-14) auto var(--sp-8);
  padding: var(--sp-12) var(--sp-8); text-align: center; position: relative;
  background:
    radial-gradient(ellipse 60% 40% at 20% 50%, rgba(59,130,246,0.06), transparent),
    radial-gradient(ellipse 40% 50% at 80% 30%, rgba(59,130,246,0.04), transparent),
    var(--gray-950);
  border-radius: var(--radius-xl); border: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* 文章页顶部渐变条 */
.article-detail {
  position: relative;
}
.article-detail::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; height: 200px;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(59,130,246,0.04), transparent);
  pointer-events: none; z-index: -1;
}

/* ============================================================
   打印样式
   ============================================================ */
@media print {
  .topbar, .mobile-nav, .ai-chat-widget, .back-to-top,
  .reading-progress, .article-toolbar, .recommend-section,
  .site-footer, .announcement-bar, .carousel-sidebar, .carousel-indicators { display: none !important; }
  .main-content { padding-top: 0 !important; }
  body { background: #fff; color: #000; }
  .article-content { color: #000; }
  .article-content a { color: #0056b3; }
  .article-header h1 { color: #000; }
  .carousel { height: auto; border: none; box-shadow: none; grid-template-columns: 1fr; }
  .carousel-slide { position: static; opacity: 1; }
  .carousel-bg, .carousel-overlay { display: none; }
}

/* 公告轮播 */
.announcement-wrap{max-width:var(--content-max);margin:var(--sp-3) auto 0;overflow:hidden;padding:12px 0;position:relative}
.announcement-wrap::before,.announcement-wrap::after{content:'';position:absolute;top:0;bottom:0;width:60px;z-index:1;pointer-events:none}
.announcement-wrap::before{left:0;background:linear-gradient(90deg,var(--gray-950) 0%,transparent 100%)}
.announcement-wrap::after{right:0;background:linear-gradient(270deg,var(--gray-950) 0%,transparent 100%)}
.announcement-track{display:flex;align-items:center}
.announcement-item{display:inline-flex;flex-shrink:0;white-space:nowrap;padding:8px 28px;margin:0 12px;background:linear-gradient(135deg,rgba(59,130,246,0.1),rgba(59,130,246,0.03));border:1px solid rgba(59,130,246,0.15);border-radius:var(--radius-full);color:#c9d9ff;font-size:0.84rem;font-weight:500;box-shadow:0 1px 4px rgba(59,130,246,0.06)}
.announce-marquee{animation:ticker 18s linear infinite}
.announce-marquee:hover{animation-play-state:paused}
@keyframes ticker{0%{transform:translateX(100%)}100%{transform:translateX(-100%)}}

/* 文章底部推荐卡片 */
.article-recommend .glow-card,.article-nav-cards .glow-card{background:linear-gradient(180deg,rgba(3,6,12,0.92) 0%,rgba(3,6,12,0.97) 100%),url('/uploads/bg-night-city.jpg') center/cover no-repeat!important}
.article-recommend .glow-card::after,.article-nav-cards .glow-card::after{background:transparent!important;box-shadow:inset 0 0 80px rgba(0,0,0,0.5)!important}
