/**
 * news.docms.nz 全局样式
 * 版本: 4.0
 * 更新: 现代新闻媒体UI设计升级 - 增强版
 * 风格: Modern Minimalism with Glassmorphism
 */

/* ==================== 滚动行为 - 流畅滚动体验 ==================== */
html {
  scroll-behavior: smooth;
}

/* 无障碍：减弱动画 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 跳转到主要内容链接（无障碍） */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 16px;
    outline: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* 基础变量 - 现代新闻媒体配色 (21 palettes) */
:root {
  /* ==================== 主色调 - 优雅紫蓝渐变 ==================== */
  --primary-hue: 245;
  --primary-color: hsl(var(--primary-hue), 85%, 60%);
  --primary-dark: hsl(var(--primary-hue), 85%, 45%);
  --primary-light: hsl(var(--primary-hue), 90%, 75%);
  --primary-soft: hsla(var(--primary-hue), 85%, 60%, 0.15);

  /* ==================== 强调色 - 活力珊瑚 ==================== */
  --accent-hue: 15;
  --accent-color: hsl(var(--accent-hue), 90%, 60%);
  --accent-light: hsl(var(--accent-hue), 95%, 70%);
  --accent-soft: hsla(var(--accent-hue), 90%, 60%, 0.15);

  /* ==================== 语义色 ==================== */
  --success-color: #10B981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning-color: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger-color: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info-color: #0EA5E9;
  --info-soft: rgba(14, 165, 233, 0.15);

  /* ==================== 文本色 - 三级层次 ==================== */
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-tertiary: #718096;
  --text-muted: #a0aec0;

  /* ==================== 背景色 - 温暖的灰白 ==================== */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --white: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);

  /* ==================== 边框色 ==================== */
  --border-color: rgba(226, 232, 240, 0.8);
  --border-strong: rgba(203, 213, 225, 1);

  /* ==================== 阴影系统 ==================== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px hsla(var(--primary-hue), 85%, 60%, 0.2);

  /* ==================== 圆角系统 ==================== */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* ==================== 过渡系统 ==================== */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ==================== 字体系统 - Newsreader + Roboto + Noto Sans SC (新闻阅读优化) ==================== */
  --font-sans: 'Noto Sans SC', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Newsreader', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', Monaco, monospace;

  /* 字体加载策略 - 避免 FOIT (Flash of Invisible Text) */
  @font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Roboto'), local('Roboto-Regular');
  }

  @font-face {
    font-family: 'Newsreader';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Newsreader'), local('Newsreader-Regular');
  }

  /* ==================== 布局 ==================== */
  --header-height: 72px;
  --container-max: 1200px;
  --content-padding: 24px;

  /* ==================== 玻璃拟态效果 ==================== */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: 20px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 重置样式 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 触摸优化：消除 300ms 点击延迟 */
  touch-action: manipulation;
}

body {
  font-family: var(--font-sans);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at top, hsla(var(--primary-hue), 85%, 60%, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, hsla(var(--accent-hue), 90%, 60%, 0.06) 0%, transparent 50%);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

a:hover {
  color: var(--primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 选中文本样式 */
::selection {
  background-color: var(--primary-color);
  color: var(--white);
}

/* ==================== 主题切换按钮 ==================== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* 移动端主题切换 */
@media screen and (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* 键盘快捷键按钮 */
.shortcuts-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.shortcuts-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.shortcuts-toggle svg {
    width: 20px;
    height: 20px;
}

/* 键盘快捷键弹窗 */
.shortcuts-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.shortcuts-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.shortcuts-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.shortcuts-modal .modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.shortcuts-modal .modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.shortcuts-modal .modal-close svg {
    width: 20px;
    height: 20px;
}

.shortcuts-content {
    padding: 24px;
}

.shortcut-group {
    margin-bottom: 24px;
}

.shortcut-group:last-child {
    margin-bottom: 0;
}

.shortcut-group h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.shortcut-item kbd {
    display: inline-block;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}

.shortcut-item span {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.shortcuts-modal .modal-footer {
    padding: 16px 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.shortcuts-modal .modal-footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.shortcuts-modal .modal-footer kbd {
    display: inline-block;
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-right: 4px;
}

/* ==================== 骨架屏加载 ==================== */

/* 骨架屏动画 */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* 脉冲骨架屏 - 更柔和的效果 */
.skeleton-pulse {
  animation: pulse 2s ease-in-out infinite;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

/* 骨架屏文章卡片 */
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}

.skeleton-card .skeleton-category {
  width: 60px;
  height: 20px;
  margin-bottom: 12px;
}

.skeleton-card .skeleton-title {
  width: 80%;
  height: 24px;
  margin-bottom: 8px;
}

.skeleton-card .skeleton-title:last-of-type {
  width: 60%;
}

.skeleton-card .skeleton-excerpt {
  width: 100%;
  height: 16px;
  margin-bottom: 6px;
}

.skeleton-card .skeleton-excerpt:nth-child(odd) {
  width: 90%;
}

.skeleton-card .skeleton-meta {
  width: 120px;
  height: 16px;
  margin-top: 16px;
}

/* 骨架屏分类标签 */
.skeleton-tag {
  display: inline-block;
  width: 50px;
  height: 24px;
  border-radius: var(--radius-full);
  margin-right: 8px;
  margin-bottom: 8px;
}

/* 骨架屏统计信息 */
.skeleton-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 80px;
  height: 20px;
}

/* 骨架屏头像 */
.skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

/* 骨架屏按钮 */
.skeleton-btn {
  height: 40px;
  width: 100px;
  border-radius: var(--radius);
}

/* 骨架屏表格单元格 */
.skeleton-cell {
  height: 20px;
  width: 100%;
  margin-bottom: 8px;
}

/* 骨架屏卡片网格 */
.skeleton-grid {
  display: grid;
  gap: 16px;
}

.skeleton-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.skeleton-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.skeleton-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
  .skeleton-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .skeleton-grid-3,
  .skeleton-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .skeleton-grid-2,
  .skeleton-grid-3,
  .skeleton-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* 骨架屏列表 */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.skeleton-list-item .skeleton-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-list-item .skeleton-text {
  flex: 1;
  height: 16px;
}

/* 骨架屏横幅/广告位 */
.skeleton-banner {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-lg);
}

/* 骨架屏评论 */
.skeleton-comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
}

.skeleton-comment .skeleton-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.skeleton-comment-content {
  flex: 1;
}

.skeleton-comment-content .skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-comment-content .skeleton-text:first-child {
  width: 60%;
  height: 18px;
}

/* 减弱动画模式下的骨架屏 */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: var(--bg-tertiary);
  }

  .skeleton::after,
  .skeleton-card::after {
    display: none;
  }

  .skeleton-pulse {
    animation: none;
    opacity: 0.7;
  }
}

/* 骨架屏按钮 */
.skeleton-btn {
  width: 100px;
  height: 40px;
  border-radius: var(--radius);
}

/* 骨架屏列表 */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.skeleton-list-item .skeleton-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-list-item .skeleton-text {
  flex: 1;
  height: 16px;
}

/* 减弱动画模式下的骨架屏 */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: var(--bg-tertiary);
  }
}

/* ==================== 无障碍改进 ==================== */

/* 跳转到内容链接（键盘导航） */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

/* 改进触摸目标尺寸（最小 44x44px） */
button,
input[type="submit"],
input[type="button"],
.btn,
.category-btn,
.tag,
.pagination a,
.nav a {
  min-height: 44px;
  min-width: 44px;
}

/* 小按钮例外：保持合理大小但增加触摸区域 */
.btn-small {
  min-height: 36px;
  padding: 8px 16px;
}

.bookmark-btn {
  min-height: 40px;
  min-width: 40px;
}

/* 触摸目标间距（最小 8px） */
.article-card,
.category-btn,
.tag,
.pagination a,
.nav a {
  margin: 2px;
}

/* 焦点可见性增强 */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 降低动画设置 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    touch-action: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066CC;
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #000000;
  }

  .article-card,
  .header,
  .footer {
    border-width: 2px;
    border-style: solid;
  }
}

/* 布局 */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* 头部导航 - 玻璃拟态设计 */
.header {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-primary);
  padding: 0;
  position: sticky;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 100;
  margin: 12px;
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.header.scrolled {
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  gap: 24px;
}

/* Logo样式 */
.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.logo:hover {
  color: var(--primary-color);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px hsla(var(--primary-hue), 85%, 60%, 0.35);
  transition: var(--transition-spring);
}

.logo:hover .logo-icon {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 6px 20px hsla(var(--primary-hue), 85%, 60%, 0.45);
}

.logo-icon::before {
  content: 'N';
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius);
  transition: var(--transition);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: var(--bg-secondary);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* 导航菜单 */
.nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav a {
  position: relative;
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
}

.nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-soft) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
}

.nav a:hover {
  color: var(--primary-color);
}

.nav a:hover::before {
  opacity: 1;
}

.nav a:active {
  transform: scale(0.97);
}

.nav a.router-link-active {
  color: var(--primary-color);
  background: var(--primary-soft);
}

.nav a.router-link-active::before {
  opacity: 1;
}

.nav .username {
  color: var(--text-tertiary);
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* 主内容区 */
.main {
  padding: 24px 0 48px;
  min-height: calc(100vh - 140px);
}

/* 首页 */
.home-page {
  animation: fadeIn 0.4s ease-out;
}

/* 页面标题区域 */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* 搜索框 */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  position: relative;
  max-width: 520px;
  width: 100%;
}

.search-input {
  flex: 1;
  padding: 14px 52px 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 400;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), var(--shadow-md);
  transform: translateY(-1px);
}

.search-btn {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.search-btn:hover {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.clear-btn:hover {
  color: var(--danger-color);
  background: var(--danger-soft);
}

/* 阅读历史 */
.reading-history {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.reading-history .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.reading-history .section-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.history-item:hover {
  background: var(--primary-soft);
  transform: translateX(4px);
}

.history-category {
  font-size: 0.6875rem;
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 500;
}

.history-title {
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 分类筛选 */
.category-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  background: var(--white);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.category-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(59, 130, 246, 0.04);
}

.category-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 2px 8px hsla(var(--primary-hue), 85%, 60%, 0.3);
}

/* 文章列表 */
.article-list {
  display: grid;
  gap: 16px;
}

/* 文章卡片 - 现代设计 */
.article-card {
  background: linear-gradient(145deg, var(--white) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover,
.article-card:focus-within {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
  border-color: var(--primary-light);
  transform: translateY(-6px);
}

.article-card:hover::before,
.article-card:focus-within::before {
  opacity: 1;
  width: 6px;
}

.article-card:hover::after,
.article-card:focus-within::after {
  opacity: 1;
}

/* 文章卡片置顶样式 */
.article-card.pinned {
  border: 2px solid var(--primary-color);
}

.article-card.pinned::before {
  opacity: 1;
  width: 6px;
}

.article-card.pinned .category-tag {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 2px 8px hsla(var(--primary-hue), 85%, 60%, 0.3); }
  50% { box-shadow: 0 2px 16px hsla(var(--primary-hue), 85%, 60%, 0.5); }
}

/* 焦点状态 - 无障碍 */
.article-card:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.article-card:focus:not(:focus-visible) {
  outline: none;
}

.article-card:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tag {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px hsla(var(--primary-hue), 85%, 60%, 0.3);
  transition: var(--transition-spring);
  cursor: pointer;
}

.category-tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px hsla(var(--primary-hue), 85%, 60%, 0.4);
}

/* 分类颜色变体 */
.category-tag.tech,
.category-tag.AI,
.category-tag.人工智能 {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.category-tag.tech:hover,
.category-tag.AI:hover,
.category-tag.人工智能:hover {
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.category-tag.software,
.category-tag.软件 {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.category-tag.software:hover,
.category-tag.软件:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.category-tag.hardware,
.category-tag.硬件 {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.category-tag.hardware:hover,
.category-tag.硬件:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.category-tag.mobile,
.category-tag.移动 {
  background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.category-tag.mobile:hover,
.category-tag.移动:hover {
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.category-tag.internet,
.category-tag.互联网 {
  background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.category-tag.internet:hover,
.category-tag.互联网:hover {
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.category-tag.security,
.category-tag.安全 {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.category-tag.security:hover,
.category-tag.安全:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.category-tag.game,
.category-tag.游戏 {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.category-tag.game:hover,
.category-tag.游戏:hover {
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.article-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-date::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

.article-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  transition: var(--transition-fast);
  letter-spacing: -0.01em;
}

.article-card h2 a {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-primary) 100%);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: var(--transition);
  padding-bottom: 2px;
  display: inline;
}

.article-card:hover h2 a,
.article-card h2 a:focus {
  background-size: 100% 2px;
  color: var(--primary-color);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  margin: 14px 0;
  align-items: center;
  line-height: 1.5;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-meta svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.article-excerpt {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 0.9375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1.5;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.btn-danger {
  background: var(--danger-color);
  color: var(--white);
}

.btn-danger:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* 带轮廓的按钮 */
.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* 文字按钮 */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-color);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--text-color);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:hover:not(:focus) {
  border-color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  font-family: inherit;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 消息提示 */
.error-message {
  background: #FEF2F2;
  color: #B91C1C;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  border: 1px solid #FECACA;
}

.success-message {
  background: #F0FDF4;
  color: #15803D;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  border: 1px solid #BBF7D0;
}

.warning-message {
  background: #FFFBEB;
  color: #B45309;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  border: 1px solid #FDE68A;
}

.info-message {
  background: #EFF6FF;
  color: #1D4ED8;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  border: 1px solid #BFDBFE;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  min-width: 40px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.pagination a:hover,
.pagination span:not(.active):hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
  border-color: var(--primary-light);
}

.pagination .active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* 文章详情页 */
.article-detail-page {
  animation: fadeIn 0.4s ease-out;
}

.article-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-header .category-tag.large {
  font-size: 0.8125rem;
  padding: 6px 16px;
}

.article-detail h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  margin: 16px 0;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-meta-full {
  display: flex;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.article-meta-full span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta-full svg {
  opacity: 0.7;
}

/* 文章内容排版 - 优化阅读体验 (65-75字符最佳行长度) */
.article-content {
  font-family: var(--font-serif);
  line-height: 1.9;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  max-width: 68ch;
  margin: 0 auto;
  text-align: justify;
  hyphens: auto;
}

/* 首字下沉（段落样式） */
.article-content > p:first-of-type::first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 1;
  padding-right: 0.1em;
  padding-top: 0.1em;
  color: var(--primary-color);
  font-weight: 700;
}

.article-content p {
  margin-bottom: 1.5em;
  text-indent: 0;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 12px;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.article-content h4 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.article-content p {
  margin-bottom: 1.5em;
  text-align: justify;
  orphans: 3;
  widows: 3;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin: 8px 0;
}

.article-content li::marker {
  color: var(--primary-color);
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  margin: 32px 0;
  padding: 20px 28px;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 4rem;
  color: var(--primary-soft);
  font-family: var(--font-serif);
  line-height: 1;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content code {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 0.875em;
}

.article-content pre {
  background: #1E293B;
  color: #E2E8F0;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--primary-dark);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  text-align: left;
}

.article-content th {
  background: var(--primary-color);
  color: var(--white);
  font-weight: 600;
}

.article-content tbody tr:hover {
  background: var(--bg-secondary);
}

.article-content hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 32px 0;
}

.article-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

/* 登录/注册页面 */
.auth-page {
  max-width: 420px;
  margin: 48px auto;
  animation: fadeIn 0.4s ease-out;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.auth-links {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.auth-links p {
  margin: 8px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-links a {
  font-weight: 500;
}

/* 个人中心 */
.profile-page {
  animation: fadeIn 0.4s ease-out;
}

.profile-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.profile-header {
  text-align: center;
  margin-bottom: 32px;
}

.avatar {
  width: 88px;
  height: 88px;
  background: var(--primary-color);
  color: var(--white);
  font-size: 2rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}

.profile-header h1 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  font-weight: 600;
}

.role-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
}

.role-badge.admin {
  background: var(--primary-color);
  color: var(--white);
}

.role-badge.user {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.profile-info {
  margin-bottom: 32px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item label {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.info-item span {
  color: var(--text-color);
  font-size: 0.9375rem;
}

.profile-actions {
  display: flex;
  gap: 12px;
}

/* 空状态 */
.no-articles {
  text-align: center;
  padding: 80px 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 48px 24px;
  animation: fadeIn 0.4s ease-out;
}

.empty-state svg {
  color: var(--border-color);
  margin-bottom: 16px;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.empty-state:hover svg {
  opacity: 0.8;
  transform: scale(1.05);
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

/* 搜索无结果状态 */
.no-articles .empty-state {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.no-articles .empty-state svg {
  color: var(--text-muted);
  opacity: 0.4;
}

.no-articles .empty-state p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.no-articles .empty-state .btn {
  margin-top: 8px;
}

/* 加载状态 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 骨架屏动画 */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 骨架屏基础样式 */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* 骨架屏卡片 */
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  border: 1px solid var(--border-color);
}

.skeleton-title {
  height: 28px;
  width: 70%;
  margin-bottom: 16px;
}

.skeleton-excerpt {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-excerpt:last-child {
  width: 90%;
}

.skeleton-meta {
  height: 20px;
  width: 40%;
  margin-top: 16px;
}

.skeleton-category {
  height: 24px;
  width: 80px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.skeleton-line {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-line:last-child {
  width: 85%;
}

/* 骨架屏网格 */
.skeleton-grid {
  display: grid;
  gap: 16px;
}

.skeleton-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.skeleton-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .skeleton-grid-2,
  .skeleton-grid-3 {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动触发动画 - 元素进入视口时显示 */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 无障碍：减弱动画时不使用滚动动画 */
@media (prefers-reduced-motion: reduce) {
  .fade-in-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 图片懒加载占位符 */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

img.loaded {
  opacity: 1;
}

/* 页脚 */
.footer {
  background: var(--white);
  color: var(--text-muted);
  padding: 24px;
  font-size: 0.875rem;
  margin: 0 16px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 16px;
}

.footer-section {
  flex: 1;
  min-width: 150px;
}

.footer-section h4 {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-section p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.footer-section a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-section span {
  display: block;
  padding: 4px 0;
}

.footer-copyright {
  text-align: center;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin: 0;
}

.footer a {
  color: var(--text-secondary);
}

.footer a:hover {
  color: var(--primary-color);
}

/* 键盘快捷键提示 */
.keyboard-hints {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.keyboard-hints kbd {
  display: inline-block;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 640px) {
  .keyboard-hints {
    display: none;
  }
}

/* 新闻通讯订阅 */
.newsletter-section {
  margin: 0 16px 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.newsletter-container {
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--accent-soft) 100%);
  padding: 32px;
}

.newsletter-content {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.newsletter-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.newsletter-text {
  flex: 1;
}

.newsletter-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.newsletter-text p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.newsletter-input {
  width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: var(--white);
  transition: all 0.2s;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.newsletter-btn {
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.newsletter-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.newsletter-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.newsletter-message {
  max-width: 900px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  text-align: center;
}

.newsletter-message.success {
  background: var(--success-soft);
  color: var(--success-color);
}

.newsletter-message.error {
  background: var(--danger-soft);
  color: var(--danger-color);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  /* 头部调整 */
  .header {
    margin: 8px;
    top: 8px;
    border-radius: var(--radius-md);
  }

  .header .container {
    padding: 10px 16px;
  }

  .logo {
    font-size: 1.125rem;
    gap: 10px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* 移动端菜单 */
  .mobile-menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 68px;
    left: 8px;
    right: 8px;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-150%) scale(0.98);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    gap: 4px;
    z-index: 99;
  }

  .nav.mobile-open {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  /* 移动端菜单背景遮罩 */
  .mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 98;
  }

  .mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    padding: 12px 16px;
    width: 100%;
    text-align: left;
  }

  /* 主内容区 */
  .main {
    padding: 16px 0 32px;
  }

  .container {
    padding: 0 16px;
  }

  /* 文章卡片 */
  .article-card {
    padding: 20px;
  }

  .article-card h2 {
    font-size: 1.125rem;
  }

  .article-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* 文章详情 */
  .article-detail {
    padding: 24px 20px;
  }

  .article-detail h1 {
    font-size: 1.5rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .article-content h2 {
    font-size: 1.25rem;
    margin-top: 32px;
  }

  .article-content h3 {
    font-size: 1.125rem;
  }

  .article-content pre {
    padding: 16px;
    font-size: 0.8125rem;
    margin-left: -20px;
    margin-right: -20px;
    border-radius: 0;
  }

  .article-meta-full {
    gap: 16px;
  }

  /* 作者信息 */
  .author-bio {
    flex-direction: column;
    text-align: center;
  }

  /* 认证页面 */
  .auth-page {
    margin: 24px auto;
    padding: 0 16px;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  /* 个人中心 */
  .profile-card {
    padding: 28px 24px;
  }

  /* 表单 */
  .form-row {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    flex-direction: column;
  }

  /* 分类筛选 */
  .category-filter {
    gap: 6px;
  }

  .category-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
  }

  /* 搜索框 */
  .search-box {
    max-width: 100%;
  }

  /* 分页 */
  .pagination {
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    padding: 8px 12px;
    min-width: 36px;
    font-size: 0.8125rem;
  }

  /* 页脚 */
  .footer {
    margin: 0 8px 8px;
    padding: 20px 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .footer-section {
    text-align: center;
  }

  /* 新闻通讯 */
  .newsletter-content {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-input {
    width: 100%;
  }
}

/* 更小屏幕适配 */
@media screen and (max-width: 480px) {
  .header {
    margin: 4px;
    top: 4px;
  }

  .nav {
    top: 64px;
    left: 4px;
    right: 4px;
  }

  .article-card {
    padding: 16px;
  }

  .article-detail {
    padding: 20px 16px;
  }

  .article-content pre {
    margin-left: -16px;
    margin-right: -16px;
    padding: 12px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .footer {
    margin: 0 4px 4px;
  }

  .newsletter-container {
    padding: 24px 16px;
  }

  .newsletter-icon {
    width: 48px;
    height: 48px;
  }

  .newsletter-text h3 {
    font-size: 1.125rem;
  }

  .newsletter-text p {
    font-size: 0.875rem;
  }
}

/* ==================== 性能优化样式 ==================== */

/* 骨架屏加载动画 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.skeleton-title {
  height: 28px;
  width: 70%;
  margin-bottom: 15px;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: 10px;
}

.skeleton-text-short {
  height: 16px;
  width: 60%;
  margin-bottom: 15px;
}

.skeleton-meta {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.skeleton-meta-item {
  height: 14px;
  width: 80px;
}

/* 图片懒加载 */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* 懒加载图片占位符 */
.lazy-image {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.lazy-image.loaded {
  opacity: 1;
}

.lazy-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  animation: lazyShine 1.5s infinite;
}

.lazy-image.loaded::after {
  display: none;
}

@keyframes lazyShine {
  100% {
    transform: translateX(100%);
  }
}

/* data-src 图片懒加载 */
img[data-src] {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  background: var(--bg-secondary);
}

img[data-src].loaded {
  opacity: 1;
  background: transparent;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 减少动画（用户偏好设置） */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 性能优化：使用 will-change */
.article-card:hover,
.btn:hover,
.btn-icon:hover {
  will-change: transform;
}

/* 焦点可见性改进 */
.btn:focus,
.btn-icon:focus,
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000;
    --text-light: #333;
  }

  .article-card {
    border: 2px solid var(--border-color);
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #60A5FA;
    --primary-dark: #3B82F6;
    --primary-light: #93C5FD;

    --accent-color: #FB923C;
    --accent-light: #FDBA74;

    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-tertiary: #94A3B8;
    --text-muted: #64748B;

    --bg-color: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;

    --white: #1E293B;
    --border-color: #334155;
    --border-strong: #475569;
  }

  body {
    background-color: var(--bg-color);
    color: var(--text-primary);
  }

  .header,
  .footer,
  .article-card,
  .article-detail,
  .auth-card,
  .profile-card,
  .admin-content,
  .admin-sidebar,
  .stat-card {
    background: #1E293B;
    border-color: var(--border-color);
  }

  .logo {
    color: var(--text-color);
  }

  .nav a {
    color: var(--text-secondary);
  }

  .nav a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
  }

  .form-control {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
  }

  .form-control:focus {
    background: var(--bg-secondary);
  }

  .search-input {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
  }

  .category-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
  }

  .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
  }

  .article-content {
    color: var(--text-color);
  }

  .article-content blockquote {
    background: var(--bg-secondary);
    color: var(--text-secondary);
  }

  .article-content code {
    background: var(--bg-secondary);
    color: var(--accent-color);
  }

  .article-content th {
    background: var(--primary-color);
  }

  .article-content tbody tr:hover {
    background: var(--bg-secondary);
  }

  .error-message {
    background: #450A0A;
    color: #FCA5A5;
    border-color: #7F1D1D;
  }

  .success-message {
    background: #052E16;
    color: #86EFAC;
    border-color: #14532D;
  }

  .sidebar-nav a {
    color: var(--text-secondary);
  }

  .sidebar-nav a:hover {
    background: var(--bg-secondary);
  }

  .loading-overlay {
    background: rgba(15, 23, 42, 0.95);
  }

  .empty-state svg {
    color: var(--border-color);
  }
}

/* 内容可见性优化 */
.article-content {
  /* 优化文本渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 图片优化 */
.article-content img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* 代码块优化 */
.article-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 打印样式 */
@media print {
  .header,
  .footer,
  .article-actions,
  .btn,
  .pagination {
    display: none !important;
  }

  .article-detail {
    box-shadow: none;
    padding: 0;
  }

  body {
    background: white;
  }

  /* Toast通知深色模式 */
  .toast {
    background: #1E293B;
  }
}

/* ==================== 新增：Toast 通知系统 ==================== */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-color);
    pointer-events: auto;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateX(-4px);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }
.toast.warning { border-left-color: var(--warning-color); }
.toast.info { border-left-color: var(--info-color); }

.toast-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ==================== 新增：Hero 区域 ==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 32px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    transform: rotate(15deg);
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.hero-section p {
    font-size: 1.0625rem;
    opacity: 0.9;
    max-width: 600px;
    position: relative;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    position: relative;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.hero-stat-label {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ==================== 新增：精选文章卡片 ==================== */
.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #f97316 100%);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-card.featured {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.article-card.featured .featured-content {
    padding: 28px;
    background: var(--white);
}

.article-card.featured .featured-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.5;
}

/* ==================== 新增：标签系统 ==================== */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    padding: 5px 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    letter-spacing: 0.02em;
}

.tag:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.tag.primary {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* ==================== 新增：阅读时间 ==================== */
.read-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.read-time svg {
    width: 14px;
    height: 14px;
}

/* ==================== 新增：文章目录 ==================== */
.table-of-contents {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.table-of-contents h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-of-contents .toc-back-top {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.2s;
}

.table-of-contents .toc-back-top:hover {
    color: var(--primary-dark);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin: 6px 0;
}

.toc-list a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 4px 0;
    display: block;
    transition: var(--transition);
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -8px;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.toc-list .toc-h3 {
    padding-left: 24px;
    font-size: 0.8125rem;
}

/* ==================== 新增：分享按钮 ==================== */
.share-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== 新增：作者信息 ==================== */
.author-bio {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.author-bio-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==================== 阅读进度条 ==================== */
.reading-progress-container {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: var(--white);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.reading-progress-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: var(--radius-full);
    transition: width 0.15s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 40px;
}

.reading-progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    padding-right: 8px;
    white-space: nowrap;
}

/* ==================== 相关文章 ==================== */
.related-articles {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.related-articles h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.related-articles h3 svg {
    color: var(--primary-color);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-soft);
    transform: translateX(4px);
}

.related-title {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ==================== 新增：底部导航（移动端） ==================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 8px 16px 20px;
    z-index: 1000;
    justify-content: space-around;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active {
    color: var(--primary-color);
}

.mobile-bottom-nav a svg {
    width: 24px;
    height: 24px;
}

@media screen and (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .main {
        padding-bottom: 80px;
    }
}

/* ==================== 新增：进度条 ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ==================== 新增：悬停卡片效果增强 ==================== */
.article-card.featured:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* ==================== 新增：空状态增强 ==================== */
.empty-state-enhanced {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.empty-state-enhanced svg {
    width: 80px;
    height: 80px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state-enhanced h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state-enhanced p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ==================== 新增：分类磁贴 ==================== */
.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.category-tile {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-tile:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.category-tile.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.category-tile-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.category-tile-name {
    font-weight: 500;
    font-size: 0.875rem;
}

/* ==================== 新增：文章操作栏 ==================== */
.article-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

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

.article-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.article-nav-link:hover {
    color: var(--primary-color);
}

.article-nav-link svg {
    width: 18px;
    height: 18px;
}

/* ==================== 新增：搜索建议下拉框 ==================== */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--bg-secondary);
}

.suggestion-title {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.suggestion-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==================== 新增：骨架屏增强 ==================== */
.skeleton-card {
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: skeletonShine 1.5s infinite;
}

@keyframes skeletonShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==================== 打印样式 ==================== */
@media print {
    /* 隐藏不需要打印的元素 */
    .navbar,
    .search-box,
    .category-filter,
    .category-tiles,
    .pagination,
    .footer,
    .article-toolbar,
    .share-buttons,
    .reading-progress,
    .toast-container,
    .modal-overlay {
        display: none !important;
    }

    /* 基础打印样式 */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
        padding: 0;
        margin: 0;
    }

    .main-content {
        max-width: 100%;
        margin: 0;
        padding: 20mm;
    }

    /* 文章卡片打印样式 */
    .article-list {
        display: block;
    }

    .article-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
        margin-bottom: 20px;
        padding: 16px;
    }

    .article-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* 文章详情打印样式 */
    .article-detail {
        max-width: 100%;
        padding: 0;
    }

    .article-detail h1 {
        font-size: 24pt;
        color: #000;
        margin-bottom: 16px;
    }

    .article-content {
        font-size: 11pt;
        line-height: 1.6;
        color: #333;
    }

    .article-content h2 {
        font-size: 16pt;
        margin-top: 24px;
        border-bottom: 1px solid #000;
    }

    .article-content h3 {
        font-size: 14pt;
    }

    .article-content a {
        color: #000;
        text-decoration: underline;
    }

    .article-content img {
        max-width: 100%;
        height: auto;
    }

    .article-content pre,
    .article-content code {
        background: #f5f5f5;
        border: 1px solid #ddd;
        padding: 4px 8px;
        border-radius: 4px;
    }

    .article-content table {
        border-collapse: collapse;
        width: 100%;
    }

    .article-content th,
    .article-content td {
        border: 1px solid #ddd;
        padding: 8px;
    }

    /* 链接打印 - 显示 URL */
    .article-content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    /* 分类标签打印 */
    .category-tag {
        border: 1px solid #000;
        color: #000;
        background: none;
    }

    /* 分页打印 */
    .article-detail {
        counter-increment: page;
    }

    /* 页脚打印 */
    @page {
        margin: 2cm;
    }

    @page :left {
        margin-left: 2.5cm;
    }

    @page :right {
        margin-right: 2.5cm;
    }

    /* 首页打印 */
    .hero-section {
        padding: 20px;
        text-align: center;
        border-bottom: 2px solid #000;
    }

    .hero-section h1 {
        font-size: 28pt;
    }

    /* 打印页眉 */
    .article-detail::before {
        content: "news.docms.nz - " attr(data-title);
        display: block;
        font-size: 10pt;
        color: #666;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #ddd;
    }

    /* 作者信息打印 */
    .author-bio {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        padding: 16px;
        margin-top: 24px;
    }

    /* 相关文章打印 */
    .related-articles {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .related-item {
        border: 1px solid #ddd;
        padding: 12px;
        margin-bottom: 8px;
    }

    /* 打印日期 */
    .article-meta-full::after {
        content: "打印时间: " attr(data-print-date);
        display: block;
        font-size: 10pt;
        color: #666;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #ddd;
    }

    /* 防止孤儿标题 */
    h2, h3 {
        break-after: avoid;
    }

    /* 图片打印 */
    img {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ==================== 新增：收藏功能样式 ==================== */
.bookmarks-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}

.bookmarks-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bookmarks-section .section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bookmarks-section .section-header h3::before {
    content: '★';
    color: var(--warning-color);
}

.bookmark-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.bookmark-item:hover {
    background: var(--warning-soft);
    transform: translateX(4px);
}

.bookmark-icon {
    color: var(--warning-color);
    flex-shrink: 0;
}

.bookmark-title {
    font-size: 0.875rem;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* 收藏按钮样式 */
.bookmark-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.bookmark-btn:hover {
    background: var(--warning-soft);
    color: var(--warning-color);
}

.bookmark-btn.active {
    background: var(--warning-soft);
    color: var(--warning-color);
}

.bookmark-btn svg {
    transition: transform 0.2s ease;
}

.bookmark-btn:hover svg {
    transform: scale(1.1);
}

/* 深色模式下的收藏样式 */
@media (prefers-color-scheme: dark) {
    .bookmarks-section {
        background: #1E293B;
        border-color: var(--border-color);
    }

    .bookmark-item {
        background: var(--bg-secondary);
    }

    .bookmark-item:hover {
        background: var(--warning-soft);
    }

    .bookmark-btn {
        background: var(--bg-secondary);
    }

    .bookmark-btn:hover,
    .bookmark-btn.active {
        background: var(--warning-soft);
    }
}

/* ==================== 热门文章 ==================== */
.popular-articles {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}

.popular-articles .section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popular-articles .section-header h3 svg {
    color: var(--warning-color);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.popular-item:hover {
    background: var(--warning-soft);
    transform: translateX(4px);
}

.popular-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    flex-shrink: 0;
}

.popular-rank.rank-1 {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.popular-rank.rank-2 {
    background: linear-gradient(135deg, #94A3B8 0%, #64748B 100%);
    color: white;
}

.popular-rank.rank-3 {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white;
}

.popular-content {
    flex: 1;
    min-width: 0;
}

.popular-title {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.popular-item:hover .popular-title {
    color: var(--primary-color);
}

.popular-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.popular-meta svg {
    opacity: 0.7;
}

/* 深色模式下的热门文章 */
@media (prefers-color-scheme: dark) {
    .popular-articles {
        background: #1E293B;
        border-color: var(--border-color);
    }

    .popular-item {
        background: var(--bg-secondary);
    }

    .popular-item:hover {
        background: var(--warning-soft);
    }
}

/* 手动主题切换的数据属性覆盖（优先级高于 prefers-color-scheme） */
[data-theme="light"] {
  --primary-color: #3B82F6;
  --primary-light: #60A5FA;
  --primary-dark: #1E40AF;
  --primary-soft: rgba(59, 130, 246, 0.1);

  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;

  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-tertiary: #E2E8F0;
  --bg-hover: #E2E8F0;

  --border-color: #E2E8F0;

  --card-bg: #FFFFFF;

  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  /* 深色模式 - 增强可访问性对比度 (WCAG AAA) */
  --primary-color: #60A5FA;
  --primary-light: #93C5FD;
  --primary-dark: #3B82F6;
  --primary-soft: rgba(96, 165, 250, 0.15);

  /* 提高对比度的文本颜色 */
  --text-primary: #F8FAFC;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;

  /* 深色背景 */
  --bg-primary: #0B1120;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --bg-hover: #475569;

  /* 更清晰的边框颜色 */
  --border-color: #334155;
  --border-strong: #475569;

  --card-bg: #1E293B;

  /* 增强阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* 深色模式下的链接可访问性 */
[data-theme="dark"] a {
  color: #60A5FA;
}

[data-theme="dark"] a:hover {
  color: #93C5FD;
}

/* 深色模式下的表单输入 */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: #1E293B;
  border-color: #475569;
  color: #F8FAFC;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: #60A5FA;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

/* 深色模式下的按钮 */
[data-theme="dark"] .btn-primary {
  background: #3B82F6;
  color: #FFFFFF;
}

[data-theme="dark"] .btn-primary:hover {
  background: #60A5FA;
}

[data-theme="dark"] .btn-secondary {
  background: #334155;
  color: #F8FAFC;
  border-color: #475569;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #475569;
}

/* 深色模式下的焦点轮廓 - 增强可访问性 */
[data-theme="dark"] *:focus-visible {
  outline: 2px solid #60A5FA;
  outline-offset: 2px;
}

/* 深色模式下的代码块 */
[data-theme="dark"] .article-content pre {
  background: #0B1120;
  border: 1px solid #334155;
}

[data-theme="dark"] .article-content code {
  background: #1E293B;
  color: #93C5FD;
}

/* ==================== 新增：浮动分享侧边栏 ==================== */
.floating-share-sidebar {
    position: fixed;
    left: max(16px, calc(50% - 580px));
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
}

.share-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.share-sidebar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.share-sidebar-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.share-sidebar-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.share-sidebar-btn:hover::before {
    opacity: 1;
}

.share-sidebar-btn svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

/* 微信按钮特殊样式 */
.share-sidebar-btn[title="分享到微信"]:hover {
    color: #07C160;
}

.share-sidebar-btn[title="分享到微信"]:hover::before {
    background: linear-gradient(135deg, rgba(7, 192, 96, 0.15) 0%, transparent 100%);
}

/* 微博按钮特殊样式 */
.share-sidebar-btn[title="分享到微博"]:hover {
    color: #E6162D;
}

.share-sidebar-btn[title="分享到微博"]:hover::before {
    background: linear-gradient(135deg, rgba(230, 22, 45, 0.15) 0%, transparent 100%);
}

/* Twitter 按钮特殊样式 */
.share-sidebar-btn[title="分享到 Twitter"]:hover {
    color: #1DA1F2;
}

.share-sidebar-btn[title="分享到 Twitter"]:hover::before {
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.15) 0%, transparent 100%);
}

/* 深色模式下的分享侧边栏 */
@media (prefers-color-scheme: dark) {
    .floating-share-sidebar {
        --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }

    .share-sidebar-inner {
        background: #1E293B;
        border-color: var(--border-color);
    }

    .share-sidebar-btn {
        color: var(--text-secondary);
    }

    .share-sidebar-btn:hover {
        background: var(--bg-secondary);
    }
}

[data-theme="dark"] .share-sidebar-inner {
    background: #1E293B;
    border-color: var(--border-color);
}

[data-theme="dark"] .share-sidebar-btn {
    color: var(--text-secondary);
}

[data-theme="dark"] .share-sidebar-btn:hover {
    background: var(--bg-secondary);
}

/* 响应式：移动端隐藏浮动分享栏 */
@media screen and (max-width: 1200px) {
    .floating-share-sidebar {
        display: none;
    }
}

/* ==================== UI/UX 增强改进 ==================== */

/* 增强的按钮悬停效果 */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* 增强的焦点指示器 */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 平滑的页面过渡 */
.page-transition {
  animation: pageSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 增强的加载指示器 */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loadingDots {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* 增强的卡片悬停效果 */
.article-card {
  will-change: transform;
}

.article-card:hover .article-meta {
  color: var(--text-primary);
}

/* 更好的工具提示 */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
}

.tooltip:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* 滚动指示器 */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 9999;
  transition: width 0.2s ease;
}

/* 增强的选择效果 */
::selection {
  background-color: var(--primary-color);
  color: white;
}

::-moz-selection {
  background-color: var(--primary-color);
  color: white;
}

/* 平滑的图片加载 */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* 增强的悬浮按钮 */
.floating-action-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-action-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.floating-action-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* 增强的模态框动画 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.3s ease;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 增强的表单输入 */
.form-input {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* 改进的滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 响应式触摸优化 */
@media (hover: none) and (pointer: coarse) {
  .article-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* ==================== 可访问性增强 ==================== */

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --primary-color: hsl(var(--primary-hue), 85%, 50%);
    --text-primary: #000000;
    --border-color: #000000;
  }

  .article-card {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }
}

/* 减少动画模式已在开头处理 */

/* 焦点管理增强 */
.focus-trap {
  position: relative;
}

.focus-trap::before,
.focus-trap::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* 跳转到内容链接 */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 8px;
}

/* 屏幕阅读器专用内容 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 强制显示的焦点 */
.focus-force:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* ARIA live 区域 */
[aria-live] {
  position: relative;
}

/* 错误状态增强 */
[aria-invalid="true"] {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

[aria-invalid="true"]:focus {
  outline: 2px solid var(--danger-color);
  outline-offset: 2px;
}

/* 加载状态增强 */
[aria-busy="true"] {
  cursor: wait;
  opacity: 0.7;
}

/* 折叠/展开状态 */
[aria-expanded="false"] + * {
  display: none;
}

[aria-expanded="true"] + * {
  display: block;
}

/* 表格可访问性增强 */
table {
  caption-side: top;
}

caption {
  padding: 12px;
  font-weight: 600;
  text-align: left;
  color: var(--text-primary);
}

th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}

/* 表单标签增强 */
label {
  font-weight: 500;
  color: var(--text-primary);
  display: inline-block;
  margin-bottom: 6px;
}

.required::after {
  content: ' *';
  color: var(--danger-color);
}

/* 键盘导航指示器 */
.keyboard-nav *:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 打印优化 */
@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ==================== 额外视觉增强 ==================== */

/* 浮动标签效果 */
.floating-label {
  position: relative;
  margin-bottom: 24px;
}

.floating-label input,
.floating-label textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.floating-label input:focus,
.floating-label textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.floating-label label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  padding: 0 4px;
  color: var(--text-muted);
  transition: all 0.2s ease;
  pointer-events: none;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 0.75rem;
  color: var(--primary-color);
}

/* 玻璃形态卡片 */
.glass-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 渐变边框 */
.gradient-border {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

/* 3D 悬浮效果 */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* 霓虹发光效果 */
.neon-glow {
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
  transition: box-shadow 0.3s ease;
}

.neon-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6),
              0 0 40px rgba(59, 130, 246, 0.4);
}

/* 涟漪效果 */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* 打字机效果 */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--primary-color);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color) }
}

/* 浮动动画 */
.float {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* 脉冲动画 */
.pulse-scale {
  animation: pulseScale 2s ease-in-out infinite;
}

@keyframes pulseScale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 旋转加载 */
.spin-loader {
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 波浪效果 */
.wave {
  position: relative;
  overflow: hidden;
}

.wave::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: wave 2s infinite;
}

@keyframes wave {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 粒子背景 */
.particles-bg {
  position: relative;
  overflow: hidden;
}

.particles-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: particleFloat 20s linear infinite;
  pointer-events: none;
}

@keyframes particleFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

/* 高级悬停效果 */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 文字发光 */
.text-glow {
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* 边框流动 */
.border-flow {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
}

.border-flow::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(45deg,
    var(--primary-color),
    var(--accent-color),
    var(--primary-color)
  );
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 高级渐变文字 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 立体按钮 */
.btn-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s;
}

.btn-3d:hover {
  transform: translateY(-2px);
}

.btn-3d:active {
  transform: translateY(0);
}

/* 磁性吸附效果 */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 毛玻璃导航栏 */
.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* 高级卡片阴影层级 */
.card-shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.card-shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.card-shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.card-shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); }
.card-shadow-2xl { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15); }

/* 图片遮罩效果 */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
  opacity: 1;
}

/* 高级动画延迟 */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* 视差滚动效果 */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* 平滑滚动增强 */
.smooth-scroll {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 自定义选择框 */
.custom-select {
  position: relative;
  display: inline-block;
}

.custom-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 30px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px 30px 10px 12px;
  cursor: pointer;
}

.custom-select::after {
  content: '▼';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

/* 高级切换开关 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-color);
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background: var(--primary-color);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* 浮动标签输入框 */
.floating-input {
  position: relative;
}

.floating-input input,
.floating-input textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: transparent;
  transition: all 0.3s ease;
}

.floating-input input:focus,
.floating-input textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.floating-input label {
  position: absolute;
  top: 16px;
  left: 16px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  pointer-events: none;
}

.floating-input input:focus + label,
.floating-input input:not(:placeholder-shown) + label,
.floating-input textarea:focus + label,
.floating-input textarea:not(:placeholder-shown) + label {
  top: -8px;
  left: 12px;
  font-size: 0.75rem;
  background: var(--white);
  padding: 0 4px;
  color: var(--primary-color);
}

/* 鼠标跟踪器 */
.mouse-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: multiply;
}

.mouse-follower.active {
  transform: scale(1.5);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5) 0%, transparent 70%);
}

/* 波纹效果元素 */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 滚动动画 */
.animate-in {
  animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 高级加载动画 */
.advanced-loader {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
}

.advanced-loader::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 2px solid rgba(245, 158, 11, 0.2);
  border-left-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

/* 渐变加载条 */
.gradient-loading-bar {
  height: 4px;
  background: linear-gradient(90deg,
    transparent,
    var(--primary-color),
    transparent
  );
  background-size: 200% 100%;
  animation: gradientMove 1.5s ease-in-out infinite;
}

@keyframes gradientMove {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 弹性动画 */
.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 旋转进入 */
.rotate-in {
  animation: rotateIn 0.6s ease-out;
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-200deg);
  }
  to {
    opacity: 1;
    transform: rotate(0);
  }
}

/* 缩放入场 */
.zoom-in {
  animation: zoomIn 0.5s ease-out;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 滑动入场 */
.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 淡入效果 */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 翻转卡片 */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* 弹性缩放 */
.elastic-scale {
  animation: elasticScale 0.5s ease-out;
}

@keyframes elasticScale {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* 高级阴影 */
.advanced-shadow {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.advanced-shadow:hover {
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 16px 32px rgba(0, 0, 0, 0.15);
}

/* 彩虹边框 */
.rainbow-border {
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(45deg,
                #ff0000, #ff7f00, #ffff00, #00ff00,
                #0000ff, #4b0082, #9400d3
              ) border-box;
  animation: rainbowMove 3s linear infinite;
}

@keyframes rainbowMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 液体效果 */
.liquid {
  position: relative;
  overflow: hidden;
}

.liquid::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: liquidWave 2s infinite;
}

@keyframes liquidWave {
  0% { left: -100%; }
  100% { left: 100%; }
}
