/* =============================================
   AI工具导航 - 全局样式
   ============================================= */

/* CSS变量 - 亮色主题 */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f8fc;
  --bg-card: #ffffff;
  --bg-sidebar: #fafbfe;
  --bg-hover: #f0f2ff;
  --bg-active: #ebebff;
  --border-color: #e8eaf6;
  --border-hover: #c5cae9;
  --text-primary: #1a1d2e;
  --text-secondary: #5c6280;
  --text-muted: #9ca3c8;
  --accent: #5c6bc0;
  --accent-light: #e8eaf6;
  --accent-hover: #4a5ab5;
  --accent-glow: rgba(92, 107, 192, 0.15);
  --tag-bg: #f0f2ff;
  --tag-text: #5c6bc0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-card: 0 2px 8px rgba(92,107,192,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --navbar-h: 60px;
  --sidebar-w: 240px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗色主题 */
[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #161924;
  --bg-card: #1c2030;
  --bg-sidebar: #161924;
  --bg-hover: #22293a;
  --bg-active: #252d42;
  --border-color: #252d42;
  --border-hover: #323b55;
  --text-primary: #e8eaf6;
  --text-secondary: #9ca3c8;
  --text-muted: #636b8c;
  --accent: #7986cb;
  --accent-light: #252d42;
  --accent-hover: #8b96d6;
  --accent-glow: rgba(121, 134, 203, 0.2);
  --tag-bg: #252d42;
  --tag-text: #7986cb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; }

/* ========================= NAVBAR ========================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .navbar {
  background: rgba(15, 17, 23, 0.92);
}

.navbar-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar-center { flex: 1; max-width: 560px; margin: 0 auto; }
.navbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 汉堡按钮 */
.sidebar-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-hover); }
.sidebar-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.sidebar-closed .sidebar-toggle span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.sidebar-closed .sidebar-toggle span:nth-child(2) { opacity: 0; }
.sidebar-closed .sidebar-toggle span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Logo */
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700;
  color: var(--text-primary);
}
.logo-img {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 6px;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  flex-shrink: 0 !important;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #9c27b0);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}

/* 申请加入按钮 */
.join-btn {
  display: flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 14px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-radius: 17px;
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
}
.join-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-1px);
}
.join-btn svg { width: 14px; height: 14px; }

/* 搜索框 */
.search-box {
  position: relative;
  display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 12px;
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  height: 38px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 0 80px 0 38px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
}
#searchInput::placeholder { color: var(--text-muted); }
#searchInput:focus {
  border-color: var(--accent);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-kbd {
  position: absolute; right: 12px;
  font-size: 11px; color: var(--text-muted);
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  pointer-events: none;
}

/* 主题切换 */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; position: absolute; transition: opacity 0.3s, transform 0.3s; }
.icon-sun { opacity: 1; transform: rotate(0); }
.icon-moon { opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(0); }

/* 管理按钮 */
.admin-btn {
  display: flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 17px;
  font-size: 13px; font-weight: 500;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.admin-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}
.admin-btn svg { width: 14px; height: 14px; }

/* ========================= LAYOUT ========================= */
.layout {
  display: flex;
  margin-top: var(--navbar-h);
  min-height: calc(100vh - var(--navbar-h));
}

/* ========================= SIDEBAR ========================= */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition), width var(--transition);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* 侧边栏折叠 */
body.sidebar-closed .sidebar { transform: translateX(-100%); }
body.sidebar-closed .content { margin-left: 0; }

.sidebar-header {
  padding: 18px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-title { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-count { font-size: 11px; color: var(--text-muted); }

/* 分类导航 */
.category-nav { padding: 0 8px 16px; }

.cat-group { margin-bottom: 2px; }

.cat-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  color: var(--text-secondary);
  font-size: 14px;
  position: relative;
  user-select: none;
}
.cat-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.cat-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}
[data-theme="dark"] .cat-item.active { background: var(--bg-active); }

.cat-emoji { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-badge {
  font-size: 11px; font-weight: 500;
  background: var(--bg-hover);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 10px;
  transition: background var(--transition);
}
.cat-item.active .cat-badge { background: var(--accent-glow); color: var(--accent); }
.cat-arrow {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.cat-group.expanded .cat-arrow { transform: rotate(90deg); }

/* 子分类 */
.sub-nav { overflow: hidden; max-height: 0; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.cat-group.expanded .sub-nav { max-height: 500px; }

.sub-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.sub-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sub-item.active { color: var(--accent); font-weight: 500; }
.sub-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border-hover);
  flex-shrink: 0;
}
.sub-item.active .sub-dot { background: var(--accent); }

/* ========================= CONTENT ========================= */
.content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px;
  transition: margin var(--transition);
  min-width: 0;
}

/* ========================= HERO ========================= */
.hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 40px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 20%;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(156,39,176,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border-color);
}
.hero-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.highlight {
  background: linear-gradient(135deg, var(--accent), #9c27b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc { font-size: 15px; color: var(--text-secondary); margin-bottom: 20px; }

.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ========================= TOOLS SECTION ========================= */
.tools-section { }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title-wrap { display: flex; align-items: center; gap: 10px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.section-count {
  font-size: 13px; color: var(--text-muted);
  background: var(--bg-hover);
  padding: 2px 10px; border-radius: 10px;
}

.view-controls { display: flex; gap: 4px; }
.view-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.view-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.view-btn.active { background: var(--accent-light); color: var(--accent); }
.view-btn svg { width: 15px; height: 15px; }

/* ========================= TOOL GRID ========================= */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

/* 列表视图 */
.tools-grid.list-view {
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ========================= TOOL CARD ========================= */
.tool-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.3s ease both;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
  transform: translateY(-2px);
}
.tool-card:hover::before { opacity: 1; }

.card-header {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px;
}
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.card-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-icon-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, var(--accent), #9c27b0);
  color: #fff;
  font-weight: 700;
}

.card-meta { flex: 1; min-width: 0; }
.card-name {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 2px;
}
.card-sub { font-size: 11px; color: var(--text-muted); }

.card-hot-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 600;
  color: #e53935;
  background: #ffebee;
  padding: 2px 6px; border-radius: 6px;
  letter-spacing: 0.05em;
}
[data-theme="dark"] .card-hot-badge { background: rgba(229,57,53,0.15); }

.card-desc {
  font-size: 12px; line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 11px; color: var(--tag-text);
  background: var(--tag-bg);
  padding: 2px 7px; border-radius: 6px;
  white-space: nowrap;
}

/* 列表视图卡片 */
.tools-grid.list-view .tool-card {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.tools-grid.list-view .tool-card::before { display: none; }
.tools-grid.list-view .card-header { margin-bottom: 0; flex-shrink: 0; }
.tools-grid.list-view .card-icon { width: 36px; height: 36px; }
.tools-grid.list-view .card-meta-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.tools-grid.list-view .card-desc { margin-bottom: 0; -webkit-line-clamp: 1; flex: 1; }
.tools-grid.list-view .card-tags { flex-shrink: 0; }
.tools-grid.list-view .card-hot-badge { position: static; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================= EMPTY STATE ========================= */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-desc { font-size: 14px; }

/* ========================= MODAL ========================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}
.modal-backdrop.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96); opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
.modal-backdrop.active .modal { transform: scale(1); opacity: 1; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-tool-header {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 20px;
}
.modal-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.modal-icon img { width: 100%; height: 100%; object-fit: cover; }
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.modal-desc { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }

.modal-actions { display: flex; gap: 10px; }
.btn-primary {
  flex: 1; height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 22px;
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-secondary {
  height: 44px; padding: 0 20px;
  border: 1.5px solid var(--border-color);
  border-radius: 22px;
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ========================= BACK TOP ========================= */
.back-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 500;
}
.back-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.back-top svg { width: 18px; height: 18px; }

/* ========================= SEARCH OVERLAY ========================= */
.search-overlay {
  position: fixed; inset: 0;
  background: transparent;
  z-index: 99;
  display: none;
}
.search-overlay.visible { display: block; }

/* ========================= RESPONSIVE ========================= */
@media (max-width: 1400px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .search-kbd { display: none; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .content { margin-left: 0 !important; padding: 16px; }
  .hero { padding: 24px 20px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .navbar-center { max-width: none; }
  /* 移动端侧边栏遮罩 */
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 150;
    display: none;
  }
  body.sidebar-open .sidebar-overlay { display: block; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-stats { gap: 16px; }
  .admin-btn span { display: none; }
}

/* ========================= LOADING SKELETON ========================= */
.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-secondary) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================= SCROLLBAR ========================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ========================= SELECTION ========================= */
::selection { background: var(--accent-glow); color: var(--accent); }

/* ========================= FOOTER ========================= */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  margin-top: 40px;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.copyright {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================= JOIN MODAL ========================= */
.join-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}
.join-modal-backdrop.active {
  opacity: 1; pointer-events: all;
}

.join-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 450px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96); opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
.join-modal-backdrop.active .join-modal {
  transform: scale(1); opacity: 1;
}

.join-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}
.join-modal-close:hover {
  background: var(--bg-hover); color: var(--text-primary);
}

.join-modal-title {
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}

.join-modal-body {
  display: flex; flex-direction: column; gap: 20px;
}

.join-requirements {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
}

.join-requirements p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 8px 0;
}

.join-requirements p:last-child {
  margin-bottom: 0;
  color: var(--accent);
  font-weight: 500;
}

.join-requirements ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.join-requirements li {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
  opacity: 0.85;
}

.join-requirements li::before {
  content: '•';
  color: var(--accent);
  flex-shrink: 0;
}

.join-contact h4,
.join-donation h4 {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.join-contact {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.join-qr-container {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.join-qr-container .join-contact,
.join-qr-container .join-donation {
  flex: 1;
  border-top: none;
  padding-top: 0;
}

.join-donation {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.wechat-info,
.donation-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.qr-box {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-img {
  display: block;
  width: 140px !important;
  height: 140px !important;
  object-fit: contain !important;
  border-radius: 4px;
  /* 防止二维码变形 */
  aspect-ratio: 1 / 1;
}

.wechat-id,
.donation-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.wechat-id strong {
  color: var(--text-primary);
  margin-left: 4px;
}

.donation-text p {
  line-height: 1.5;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .footer-content {
    padding: 0 16px;
  }
  
  .join-modal {
    padding: 24px;
  }
  
  .join-qr-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .wechat-info,
  .donation-info {
    flex-direction: column;
    text-align: center;
  }
  
  .join-btn span {
    display: none;
  }
  
  .join-btn {
    padding: 0 10px;
  }
}
