/* ═══════════════════════════════════════════════════════════════
   聚合线报 - 现代化样式系统 v2.0
   
   特性：
   - 移动端优先响应式设计
   - 毛玻璃效果头部导航
   - 流畅的动画过渡
   - 完整的深色模式支持
   - WCAG AA 可访问性标准
═══════════════════════════════════════════════════════════════ */

/* ═══ 设计令牌 ═══ */
:root {
  /* 品牌色 */
  --brand-primary: #6366f1;
  --brand-primary-light: #818cf8;
  --brand-primary-dark: #4f46e5;
  --brand-secondary: #06b6d4;
  --brand-secondary-light: #22d3ee;
  
  /* 语义色 */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  --color-hot: #f43f5e;
  
  /* 中性色 */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;
  
  /* 字体 */
  --font-sans: 'Inter', -apple-system, 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* 字体大小 */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  
  /* 间距 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  
  /* 圆角 */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* 动画 */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ═══ 深色主题（默认） ═══ */
:root, [data-theme="dark"] {
  --bg: var(--gray-950);
  --bg2: var(--gray-900);
  --bg3: var(--gray-800);
  --t1: var(--gray-50);
  --t2: var(--gray-400);
  --t3: var(--gray-500);
  --t4: var(--gray-600);
  --t5: var(--gray-700);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.05);
  --accent: var(--brand-primary-light);
  --accent2: var(--brand-secondary-light);
  --accent-bg: rgba(129, 140, 248, 0.12);
  --accent-bg2: rgba(129, 140, 248, 0.08);
  --accent-border: rgba(129, 140, 248, 0.25);
  --accent-border2: rgba(129, 140, 248, 0.15);
  --glow1: rgba(129, 140, 248, 0.08);
  --glow2: rgba(34, 211, 238, 0.05);
  --header: rgba(2, 6, 23, 0.92);
  --row-bg: rgba(15, 23, 42, 0.7);
  --row-active: rgba(129, 140, 248, 0.1);
  --shadow: rgba(0, 0, 0, 0.3);
  --card-grad: linear-gradient(145deg, var(--gray-900), var(--gray-800));
}

/* ═══ 浅色主题 ═══ */
[data-theme="light"] {
  --bg: var(--gray-100);
  --bg2: #ffffff;
  --bg3: #ffffff;
  --t1: var(--gray-900);
  --t2: var(--gray-600);
  --t3: var(--gray-400);
  --t4: var(--gray-300);
  --t5: var(--gray-200);
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.05);
  --accent: var(--brand-primary);
  --accent2: var(--brand-secondary);
  --accent-bg: rgba(99, 102, 241, 0.08);
  --accent-bg2: rgba(99, 102, 241, 0.05);
  --accent-border: rgba(99, 102, 241, 0.2);
  --accent-border2: rgba(99, 102, 241, 0.12);
  --glow1: rgba(99, 102, 241, 0.04);
  --glow2: rgba(6, 182, 212, 0.03);
  --header: rgba(255, 255, 255, 0.92);
  --row-bg: rgba(255, 255, 255, 0.85);
  --row-active: rgba(99, 102, 241, 0.08);
  --shadow: rgba(0, 0, 0, 0.06);
  --card-grad: linear-gradient(145deg, #ffffff, #fafafe);
}

/* ═══ 基础重置 ═══ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; height: auto; display: block; }
a { -webkit-tap-highlight-color: transparent; }
input { -webkit-appearance: none; appearance: none; border-radius: 0; }

/* 焦点样式 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══ 头部（移动端基础） ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--header);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
  transition: background var(--duration-normal) var(--ease-in-out);
}

.site-header-in {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--t1);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  transition: opacity var(--duration-fast) var(--ease-in-out);
}

.site-brand:hover {
  opacity: 0.8;
}

.site-brand i {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg2);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.header-back:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-bg);
  transform: translateX(-2px);
}

.header-back:active {
  transform: scale(0.95);
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--t2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.theme-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-btn:active {
  transform: scale(0.95) translateY(0);
}

.theme-btn .ico {
  font-size: 1.15rem;
  line-height: 1;
}

.countdown, .live, .cnt { display: none; }

/* ═══ 分类栏（移动端：底部线条风格） ═══ */
.cat-bar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 12px;
}

.cat-bar::-webkit-scrollbar { display: none; }

.cat-bar-inner {
  display: flex;
  gap: 0;
  padding: 0;
  min-width: max-content;
}

.cat-pill {
  font-size: 13px;
  color: var(--t3);
  text-decoration: none;
  padding: 10px 14px;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-in-out);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  user-select: none;
  flex-shrink: 0;
  position: relative;
}

.cat-pill.on {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.cat-pill:hover {
  color: var(--t1);
  background: var(--accent-bg);
}

.cat-pill:active {
  opacity: 0.7;
}

/* ═══ 搜索栏（移动端隐藏，用弹窗替代） ═══ */
.sb { display: none; }

/* ═══ 文章列表（移动端基础） ═══ */
.lst {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.r {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  min-height: 48px;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.r:hover {
  background: var(--row-active);
}

.r:active {
  background: var(--accent-bg);
  transform: scale(0.99);
}

.r .cat-badge {
  min-width: 32px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.r:hover .cat-badge {
  transform: scale(1.05);
}

.r .bd {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.r .tt {
  font-size: 15px;
  font-weight: 500;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.r .tt .title-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.r:hover .tt .title-text {
  color: var(--accent);
}

.r .tt .tm {
  font-size: 12px;
  color: var(--t3);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.r .tt .tm.recent {
  color: var(--color-error);
  font-weight: 600;
  animation: pulse-recent 2s infinite;
}

@keyframes pulse-recent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.r .ar { display: none; }
.r .meta { display: none; }
.r .au, .r .cmt { display: none; }

.r.pinned {
  border-left: 3px solid var(--color-error);
  background: rgba(239, 68, 68, 0.05);
}

.pin-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: var(--color-error);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  z-index: 1;
  animation: pin-bounce 2s infinite;
}

@keyframes pin-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 空状态 */
.emp {
  text-align: center;
  padding: 60px 20px;
  color: var(--t4);
}

.emp .ei {
  font-size: 2.5rem;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

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

.loading {
  text-align: center;
  padding: 40px;
  color: var(--t3);
  font-size: 0.875rem;
}

.loading .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ═══ 分页（移动端基础） ═══ */
.pager {
  padding: 16px 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-in-out);
  border: 1px solid var(--border);
  color: var(--t2);
  background: var(--bg2);
}

.pager a:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-1px);
}

.pager a:active {
  transform: scale(0.95);
}

.pager .on {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.pager .disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pager .dot { display: none; }

/* ═══ 侧边栏（移动端隐藏） ═══ */
.main-right { display: none; }

/* ═══ 排行榜 ═══ */
.rank-card {
  display: block;
  background: var(--card-grad);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: 16px;
  transition: all var(--duration-normal) var(--ease-in-out);
}

.rank-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ═══ 底部 ═══ */
.foot {
  text-align: center;
  padding: 16px 12px;
  color: var(--t4);
  font-size: 12px;
  border-top: 1px solid var(--border);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.foot .icp {
  margin-top: 8px;
}

.foot .icp a {
  color: var(--t3);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.foot .icp a:hover {
  color: var(--accent);
}

/* ═══ 弹窗 ═══ */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

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

.modal-mask.show { display: flex; }

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: calc(100vw - 32px);
  max-width: 320px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp var(--duration-normal) var(--ease-spring);
}

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

.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
  border-bottom: 1px solid var(--border);
}

.modal-close {
  cursor: pointer;
  font-size: 1rem;
  color: var(--t3);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.modal-close:hover {
  background: var(--accent-bg);
  color: var(--accent);
}

.modal-bd {
  padding: 16px 20px 20px;
}

.modal-tip {
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 14px;
  line-height: 1.5;
}

.modal-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  font-size: 14px;
  color: var(--t1);
}

.modal-opt:hover {
  background: var(--accent-bg);
}

.modal-opt:active {
  transform: scale(0.98);
}

.modal-opt input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  opacity: 1 !important;
}

#searchModal .modal-box { max-width: 400px; }

#searchModalInput {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--t1);
  outline: none;
  transition: all var(--duration-fast) var(--ease-in-out);
}

#searchModalInput:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ═══ 评论区（移动端基础） ═══ */
.cmt-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

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

.cmt-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cmt-count {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--accent-border);
  font-weight: 600;
}

.cmt-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.cmt-refresh:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.cmt-refresh:active {
  transform: scale(0.95);
}

.cmt-refresh .ico {
  font-size: 0.85rem;
  display: inline-block;
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.cmt-refresh.loading .ico {
  animation: spin 0.6s linear infinite;
}

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

.cmt-item {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: var(--row-bg);
  border: 1px solid var(--border2);
  border-radius: 12px;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.cmt-item:hover {
  border-color: var(--accent-border2);
  box-shadow: var(--shadow-sm);
}

.cmt-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  text-transform: uppercase;
}

.cmt-body {
  flex: 1;
  min-width: 0;
}

.cmt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.cmt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent2);
}

.cmt-time {
  font-size: 11px;
  color: var(--t4);
}

.cmt-loc {
  font-size: 11px;
  color: var(--t4);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

.cmt-text {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: break-word;
}

.cmt-text img {
  max-width: 150px;
  max-height: 100px;
  border-radius: 10px;
  margin: 6px 0;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-in-out);
}

.cmt-text img:hover {
  transform: scale(1.05);
}

.cmt-text a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  word-break: break-all;
  transition: border-color var(--duration-fast) var(--ease-in-out);
}

.cmt-text a:hover {
  border-color: var(--accent2);
}

.cmt-reply {
  margin-top: 8px;
  margin-left: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 10px;
  border-left: 3px solid var(--accent-border);
}

.cmt-reply .rp-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.cmt-reply .rp-time {
  font-size: 11px;
  color: var(--t4);
  margin-left: 8px;
  font-weight: 400;
}

.cmt-reply .rp-text {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.5;
}

.cmt-empty {
  text-align: center;
  padding: 24px;
  color: var(--t4);
  font-size: 13px;
}

.cmt-update-time {
  text-align: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
}

/* ═══ 文章页（移动端基础） ═══ */
.wrap { padding: 14px; }

.card {
  background: var(--card-grad);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-in-out);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.meta span {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border2);
  white-space: nowrap;
}

.ttl {
  font-size: 18px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.5;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-cnt {
  line-height: 1.8;
  color: var(--t2);
  font-size: 15px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.article-cnt a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  word-break: break-all;
  transition: border-color var(--duration-fast) var(--ease-in-out);
}

.article-cnt a:hover {
  border-color: var(--accent2);
}

.article-cnt img {
  max-width: 100%;
  border-radius: 10px;
  margin: 8px 0;
  box-shadow: var(--shadow-md);
  height: auto;
  display: block;
  background: var(--bg);
  transition: transform var(--duration-fast) var(--ease-in-out);
}

.article-cnt img:hover {
  transform: scale(1.02);
}

.article-cnt img[src=""], .article-cnt img:not([src]) { display: none; }
.article-cnt p { margin: 8px 0; overflow-wrap: break-word; line-height: inherit; }
.article-cnt p:empty { display: none; }
.article-cnt br { display: block; margin: 4px 0; }

.article-foot {
  text-align: center;
  padding: 24px 12px;
  color: var(--t4);
  font-size: 12px;
  margin-top: 28px;
}

.copyright-notice {
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  font-size: 13px;
  color: var(--t3);
  line-height: 1.8;
}

.copyright-notice p { margin: 4px 0; }

.copyright-notice a {
  color: var(--accent2);
  text-decoration: underline;
  word-break: break-all;
}

.back {
  color: var(--t3);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.back:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(-2px);
}

.back:active {
  transform: scale(0.95);
}

/* 链接二维码 */
.qr-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ═══ 屏幕阅读器专用 ═══ */
.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;
}

/* ═══ 新消息动画 ═══ */
@keyframes newFlash {
  0% { background: rgba(245, 158, 11, 0.2); }
  100% { background: transparent; }
}

.new-flash {
  animation: newFlash 3s var(--ease-out);
}

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

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

/* ═══ hover 效果（仅支持 hover 的设备） ═══ */
@media (hover: hover) {
  .r:hover { background: var(--row-active); }
  .rank-r:hover { background: var(--row-active); }
  .rank-r:hover .rank-ar { color: var(--accent); }
  .cat-pill:hover { opacity: 0.9; }
}

/* ═══ 平板及以上（≥768px） ═══ */
@media (min-width: 768px) {
  .site-header-in { padding: 12px 20px; gap: 12px; }
  .site-brand { font-size: 1.1rem; }
  .theme-btn { width: 38px; height: 38px; }
  
  .countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--t3);
    white-space: nowrap;
  }
  
  .countdown .cd-num {
    color: var(--accent2);
    font-weight: 700;
    font-size: 14px;
    min-width: 1.4em;
    text-align: center;
  }
  
  .countdown.cd-pulse .cd-num {
    color: var(--color-error);
    animation: cd-blink 0.5s infinite;
  }
  
  @keyframes cd-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }
  
  .live {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--t3);
  }
  
  .live::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
    animation: pulse-live 2s infinite;
  }
  
  @keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
  }
  
  .cnt {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent-border);
    white-space: nowrap;
  }
  
  .sb {
    display: block;
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 20px 0;
  }
  
  .sb input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--t1);
    font-size: 14px;
    outline: none;
    transition: all var(--duration-normal) var(--ease-in-out);
  }
  
  .sb input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-bg);
  }
  
  .sb input::placeholder { color: var(--t4); }
  
  .cat-bar { padding: 0 20px; }
  
  .cat-pill {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg2);
    border-bottom: none;
    margin: 4px 2px;
  }
  
  .cat-pill.on {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  }
  
  .cat-pill.on:hover {
    background: var(--brand-primary-dark);
  }
  
  .lst { padding: 8px 0; gap: 4px; }
  
  .r {
    padding: 12px 16px;
    gap: 10px;
    border-radius: 10px;
    border: 1px solid var(--border2);
    border-bottom: none;
    background: var(--row-bg);
    margin-bottom: 2px;
  }
  
  .r .cat-badge {
    min-width: 36px;
    height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
  }
  
  .r .tt { font-size: 15px; gap: 4px; }
  .r .tt .tm { font-size: 12px; }
  
  .r .ar {
    display: block;
    color: var(--t4);
    font-size: 16px;
    flex-shrink: 0;
    transition: all var(--duration-fast) var(--ease-in-out);
  }
  
  .r:hover .ar {
    color: var(--accent);
    transform: translateX(2px);
  }
  
  .r .meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
  }
  
  .r .au {
    display: block;
    font-size: 11px;
    color: var(--t4);
    white-space: nowrap;
  }
  
  .r .cmt {
    display: block;
    font-size: 11px;
    color: var(--accent);
    white-space: nowrap;
  }
  
  .pager { gap: 6px; padding: 0 0 28px; }
  .pager a, .pager span { min-width: 38px; height: 38px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
  .pager .dot { display: inline; font-size: 12px; color: var(--t4); border: none; background: none; padding: 0 8px; }
  
  .foot { font-size: 13px; padding: 24px 20px; }
  .wrap { padding: 24px; }
  .card { padding: 28px; border-radius: 16px; }
  .meta { gap: 10px; margin-bottom: 18px; }
  .meta span { font-size: 12px; padding: 5px 12px; }
  .ttl { font-size: 20px; padding-bottom: 18px; margin-bottom: 18px; }
  .article-cnt { font-size: 16px; line-height: 1.85; }
  .article-cnt img { max-width: 600px; border-radius: 12px; }
  .cmt-item { padding: 16px 18px; gap: 12px; }
  .cmt-avatar { width: 38px; height: 38px; font-size: 14px; }
  .cmt-text { font-size: 15px; }
  .modal-box { width: 360px; border-radius: 18px; }
}

/* ═══ 桌面端（≥960px）：显示侧边栏 ═══ */
@media (min-width: 960px) {
  .site-header-in { max-width: 960px; margin: 0 auto; }
  .site-brand { font-size: 1.15rem; }
  
  .main-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 20px 16px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  
  .main-left { flex: 1; min-width: 0; }
  
  .main-right {
    display: block;
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
  }
  
  .rank-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 0;
  }
  
  .rank-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .rank-title .ico { font-size: 18px; }
  
  .rank-tabs {
    display: flex;
    gap: 6px;
    padding: 0 16px 12px;
  }
  
  .rank-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--t3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all var(--duration-fast) var(--ease-in-out);
  }
  
  .rank-tab:hover {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent);
  }
  
  .rank-tab:active { transform: scale(0.96); }
  
  .rank-tab.on {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  }
  
  .rank-lst { padding: 0 12px 12px; }
  
  .rank-r {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all var(--duration-fast) var(--ease-in-out);
  }
  
  .rank-r:hover {
    background: var(--accent-bg);
  }
  
  .rank-r + .rank-r { border-top: 1px solid var(--border2); }
  
  .rank-no {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--t4);
    background: var(--bg);
    flex-shrink: 0;
  }
  
  .rank-r:nth-child(1) .rank-no {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  }
  
  .rank-r:nth-child(2) .rank-no {
    background: linear-gradient(135deg, #ffa502, #e67e22);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 165, 2, 0.3);
  }
  
  .rank-r:nth-child(3) .rank-no {
    background: linear-gradient(135deg, #ffd32a, #f9ca24);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 211, 42, 0.3);
  }
  
  .rank-r .rank-bd { flex: 1; min-width: 0; }
  
  .rank-r .rank-tt {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--t1);
    transition: color var(--duration-fast) var(--ease-in-out);
  }
  
  .rank-r:hover .rank-tt {
    color: var(--accent);
  }
  
  .rank-r .rank-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
  }
  
  .rank-r .rank-cmt {
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
  }
  
  .rank-r .rank-cate {
    font-size: 11px;
    color: var(--t3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
  }
  
  .rank-r .rank-tm {
    font-size: 11px;
    color: var(--t4);
    white-space: nowrap;
  }
  
  .rank-r .rank-ar {
    color: var(--t4);
    font-size: 14px;
    flex-shrink: 0;
    transition: all var(--duration-fast) var(--ease-in-out);
  }
  
  .rank-r:hover .rank-ar {
    color: var(--accent);
    transform: translateX(2px);
  }
  
  .rank-empty {
    text-align: center;
    padding: 20px 12px;
    color: var(--t4);
    font-size: 12px;
  }
  
  .rank-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 12px;
    color: var(--t3);
    font-size: 12px;
  }
  
  .rank-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
  }
  
  .cat-bar { max-width: 960px; margin: 0 auto; }
  .sb { max-width: 960px; }
  .foot { max-width: 960px; margin: 0 auto; }
  .r .tt { font-size: 16px; }
  .r .tt .tm { font-size: 13px; }
}

/* ═══ 大屏（≥1200px） ═══ */
@media (min-width: 1200px) {
  .site-header-in { max-width: 1200px; }
  .site-brand { font-size: 1.2rem; }
  .main-wrap { max-width: 1200px; }
  .main-right { width: 300px; }
  .cat-bar { max-width: 1200px; }
  .sb { max-width: 1200px; }
  .r .tt { font-size: 16px; }
  .pager a, .pager span { font-size: 14px; min-width: 40px; height: 40px; }
  .ttl { font-size: 24px; }
  .article-cnt { font-size: 17px; line-height: 1.9; }
  .foot { max-width: 1200px; }
}

/* ═══ 超大屏（≥1536px） ═══ */
@media (min-width: 1536px) {
  .site-header-in { max-width: 1400px; }
  .main-wrap { max-width: 1400px; }
  .cat-bar { max-width: 1400px; }
  .sb { max-width: 1400px; }
  .foot { max-width: 1400px; }
}
