/* === Linear-inspired Dark Theme === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #101012;
  --bg-surface: #1a1a1f;
  --bg-elevated: #222228;
  --bg-hover: #2a2a32;
  --bg-card: #1e1e24;
  --border: rgba(255,255,255,0.06);
  --border-subtle: rgba(255,255,255,0.04);
  --border-hover: rgba(255,255,255,0.12);
  --text: #ededf0;
  --text-secondary: #8b8b94;
  --text-muted: #5c5c66;
  --accent: #5e6ad2;
  --accent-hover: #7b84e0;
  --accent-bg: rgba(94,106,210,0.12);
  --accent-border: rgba(94,106,210,0.25);
  --green: #4caf50;
  --green-bg: rgba(76,175,80,0.12);
  --amber: #f5a623;
  --amber-bg: rgba(245,166,35,0.12);
  --red: #ef5350;
  --red-bg: rgba(239,83,80,0.12);
  --sidebar-bg: #151518;
  --shadow: 0 0 0 1px var(--border), 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 0 0 1px var(--border), 0 8px 32px rgba(0,0,0,0.5);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
}

[data-theme="light"] {
  --bg: #d4d4d4;
  --bg-surface: #ffffff;
  --bg-elevated: #ebebeb;
  --bg-hover: #e0e0e0;
  --bg-card: #f5f5f5;
  --border: rgba(0,0,0,0.06);
  --border-subtle: rgba(0,0,0,0.03);
  --border-hover: rgba(74,74,74,0.2);
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-muted: #9e9e9e;
  --accent: #4a4a4a;
  --accent-hover: #333333;
  --accent-bg: rgba(74,74,74,0.08);
  --accent-border: rgba(74,74,74,0.2);
  --green: #2e7d32;
  --green-bg: rgba(46,125,50,0.08);
  --amber: #e65100;
  --amber-bg: rgba(230,81,0,0.08);
  --red: #c62828;
  --red-bg: rgba(198,40,40,0.08);
  --sidebar-bg: #ebebeb;
  --shadow: 0 0 0 1px var(--border), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 0 0 1px var(--border), 0 4px 16px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* === Sidebar === */
.sidebar {
  width: 260px;
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header .logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.sidebar-header .logo-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--accent); font-weight: 700;
}
.sidebar-header .logo-icon svg { stroke: var(--accent); }
.sidebar-header h1 {
  font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
}
.sidebar-header .subtitle {
  font-size: 12px; color: var(--text-muted); margin-top: 2px; padding-left: 38px;
}

/* Search — Enhanced Butterfly Style */
.sidebar-search {
  padding: 0;
  margin: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.sidebar-search:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  border-color: var(--border-hover);
}
.sidebar-search:focus-within {
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  border-color: var(--accent-border);
}
.search-header {
  padding: 12px 14px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-header svg {
  width: 16px; height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}
.search-input-wrap {
  padding: 0 14px 12px;
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.search-wrapper {
  position: relative;
}
.search-wrapper::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: var(--text-muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
}
.search-results {
  margin: 0;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.search-results.active { display: block; }
.search-result-item {
  display: block;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--border-subtle);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover {
  background: var(--accent-bg);
  color: var(--text);
}
.search-result-item .highlight {
  color: var(--accent);
  font-weight: 600;
}
.search-result-count {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
}

/* Sidebar Sections — Butterfly Card Style */
.sidebar-section {
  padding: 16px;
  margin: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}
.sidebar-section:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.section-title svg {
  width: 16px; height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}

/* Tag Cloud — Butterfly variable-size style */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  line-height: 1.8;
}
.tag-item {
  display: inline-block;
  padding: 2px 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  position: relative;
}
.tag-item:hover {
  color: var(--accent);
  transform: scale(1.1);
}
.tag-item.active {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-bg);
}
.tag-item .tag-count {
  font-size: 0.7em;
  color: var(--text-muted);
  margin-left: 2px;
  vertical-align: super;
}
.tag-item.active .tag-count { color: var(--accent); opacity: 0.7; }

/* Theme Toggle — Card Style */
.theme-toggle {
  padding: 12px 14px;
  margin: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: 6px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  border-color: var(--border-hover);
}
.theme-btn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.theme-btn:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.theme-btn.active {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Site Info — Butterfly Card Style */
.site-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.info-label svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2; }
.info-value {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Calendar */
.calendar { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.calendar-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.calendar-nav span { font-size: 13px; font-weight: 600; }
.calendar-nav button { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: var(--radius-sm); transition: all 0.15s; font-family: inherit; }
.calendar-nav button:hover { background: var(--bg-hover); color: var(--text); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.calendar-grid .day-header { font-size: 10px; color: var(--text-muted); padding: 4px 0; font-weight: 500; }
.calendar-grid .day { font-size: 12px; padding: 5px 0; border-radius: var(--radius-sm); cursor: default; color: var(--text-muted); transition: all 0.15s; }
.calendar-grid .day.current-month { color: var(--text-secondary); }
.calendar-grid .day.has-content { color: var(--accent); font-weight: 600; cursor: pointer; background: var(--accent-bg); }
.calendar-grid .day.has-content:hover { background: var(--accent); color: #fff; }
.calendar-grid .day.today { box-shadow: inset 0 0 0 1px var(--accent); }

/* Archives (Monthly) */
.archive-group { margin-bottom: 4px; }
.archive-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); transition: all 0.15s;
}
.archive-header:hover { background: var(--bg-hover); color: var(--text); }
.archive-header .arrow { font-size: 9px; transition: transform 0.2s; color: var(--text-muted); display: inline-block; }
.archive-header .archive-count { font-size: 11px; color: var(--text-muted); }
.archive-group.open .archive-header .arrow { transform: rotate(90deg); }
.archive-group.open .archive-header { color: var(--accent); }
.archive-days { display: none; padding-left: 20px; }
.archive-weeks { display: none; padding-left: 8px; }
.archive-group.open .archive-weeks { display: block; }
.archive-week { margin-bottom: 2px; }
.archive-week-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--text-muted); transition: all 0.15s;
}
.archive-week-header:hover { background: var(--bg-hover); color: var(--text-secondary); }
.archive-week-header .arrow { font-size: 8px; transition: transform 0.2s; color: var(--text-muted); display: inline-block; }
.archive-week-header .archive-count { font-size: 11px; color: var(--text-muted); }
.archive-week.open .archive-week-header .arrow { transform: rotate(90deg); }
.archive-week.open .archive-week-header { color: var(--accent); }
.archive-week .archive-days { display: none; padding-left: 12px; }
.archive-week.open .archive-days { display: block; }
.day-link {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary);
  text-decoration: none; transition: all 0.15s;
}
.day-link:hover { background: var(--accent-bg); color: var(--accent); }
.day-link .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.6; }

/* === Main Content === */
.main {
  flex: 1;
  margin-left: 260px;
  padding: 32px 40px;
  min-height: 100vh;
}

.main-header {
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.main-header h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px;
}
.main-header .meta { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

/* View Toggle — Category Filter Tabs */
.view-toggle { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.view-btn {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); font-size: 12px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.view-btn.active { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); }
.view-btn:hover:not(.active) { border-color: var(--border-hover); color: var(--text); }

/* Feed — Timeline Layout */
.feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Timeline Date Group */
.timeline-date-group {
  position: relative;
  padding-left: 90px;
  margin-bottom: 8px;
}

.timeline-date-header {
  position: relative;
  padding: 16px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}
.timeline-date-header:hover { opacity: 0.8; }
.timeline-date-header .collapse-arrow {
  transition: transform 0.3s;
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--accent);
}
.timeline-date-group.collapsed .collapse-arrow {
  transform: rotate(-90deg);
}
.timeline-date-group.collapsed .timeline-items {
  display: none;
}
.timeline-date-header::before {
  content: '';
  position: absolute;
  left: -90px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent));
  opacity: 0.4;
}

/* Timeline vertical line */
.timeline-date-group::before {
  content: '';
  position: absolute;
  left: 56px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--border) 100%);
  opacity: 0.3;
  border-radius: 1px;
}

/* Timeline items container */
.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
}

/* Timeline Item wrapper */
.timeline-item {
  position: relative;
}

/* Time node on the left */
.timeline-node {
  position: absolute;
  left: -90px;
  top: 20px;
  width: 90px;
  display: flex;
  align-items: center;
  gap: 0;
}
.timeline-node .time-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
  margin-right: 10px;
}
.timeline-node .time-dot {
  position: absolute;
  left: 57px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent-bg);
  z-index: 2;
}
.timeline-item:first-child .timeline-node .time-dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 3px var(--accent-bg), 0 0 8px rgba(94,106,210,0.3);
}
.timeline-item.hidden { display: none; }

/* Cards — Full Width */
.item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}
.item.hidden { display: none; }
.item .item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.item .item-cat-badge { font-size: 11px; color: var(--text-muted); background: var(--bg-elevated); padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.item .item-date { font-size: 11px; color: var(--text-muted); }
.item .item-source { display: inline-flex; align-items: center; gap: 6px; }
.item .item-source .source-name { font-size: 13px; font-weight: 600; color: var(--text); }
.item .item-source .source-id { font-size: 11px; color: var(--text-muted); background: var(--bg-elevated); padding: 2px 8px; border-radius: 4px; }
.item .item-title { font-size: 15px; font-weight: 600; line-height: 1.5; margin-bottom: 4px; }
.item .item-title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.item .item-title a:hover { color: var(--accent); }
.item .item-metrics { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.item .item-brief { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.item .item-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.item .item-significance { font-size: 12px; color: var(--green); padding: 8px 12px; border-left: 2px solid var(--green); background: var(--green-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.item .item-media { display: block; margin: 10px 0; border-radius: var(--radius-sm); overflow: hidden; text-decoration: none; width: 12.5%; }
.item .item-media img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; transition: opacity 0.2s; }
.item .item-media:hover img { opacity: 0.85; }
.item .item-tags .tag {
  background: var(--accent-bg);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.item .item-tags .tag:hover {
  background: var(--accent);
  color: #fff;
}

/* Light theme overrides */
[data-theme="light"] .sidebar { border-right: none; }
[data-theme="light"] .sidebar-section { background: #ffffff; }
[data-theme="light"] .sidebar-search { background: #ffffff; }
[data-theme="light"] .theme-toggle { background: #ffffff; }

/* Hot Topics Module */
.hot-topics {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all 0.2s;
}
.hot-topics:hover {
  border-color: var(--border-hover);
}
.hot-topics:empty {
  display: none;
}
.hot-topics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.hot-topics-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hot-topics-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}
.hot-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}
.hot-topic-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.hot-topic-item:first-child {
  padding-top: 0;
}
.hot-topic-rank {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}
.hot-topic-rank.rank-1 {
  background: var(--red-bg);
  color: var(--red);
}
.hot-topic-rank.rank-2 {
  background: var(--amber-bg);
  color: var(--amber);
}
.hot-topic-rank.rank-3 {
  background: var(--accent-bg);
  color: var(--accent);
}
.hot-topic-content {
  flex: 1;
  min-width: 0;
}
.hot-topic-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-topic-text a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.hot-topic-text a:hover {
  color: var(--accent);
}
.hot-topic-meta {
  flex-shrink: 0;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--accent); text-decoration: none; }

/* No Results */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
  display: none;
}
.no-results.active { display: block; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; padding: 60px 16px 20px; }
  .mobile-toggle { display: flex !important; }
  .timeline-date-group { padding-left: 60px; }
  .timeline-node { left: -60px; width: 60px; }
  .timeline-node .time-label { font-size: 10px; width: 30px; margin-right: 6px; }
  .timeline-node .time-dot { left: 48px; }
  .timeline-date-group::before { left: 48px; }
  .timeline-date-header::before { left: -60px; width: 46px; }
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 200;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: -46px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(94,106,210,0.4);
  transition: right 0.3s ease, opacity 0.3s ease, transform 0.2s ease;
  opacity: 0;
  z-index: 200;
}
.back-to-top.visible {
  right: 5px;
  opacity: 1;
}
.back-to-top:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(94,106,210,0.5);
}

/* Filter active state highlight */
.filter-active .main-header h2::after {
  content: ' (筛选中)';
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.clear-filter-btn {
  display: none;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.clear-filter-btn:hover { border-color: var(--border-hover); color: var(--text); }
.filter-active .clear-filter-btn { display: inline-flex; align-items: center; gap: 4px; }

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 20px;
}
.back-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-bg);
}
