/* ========== 全局变量与重置 ========== */
:root {
  /* 浅色扁平化主题 */
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4ff;
  --bg-input: #f0f2f5;
  --bg-modal: #ffffff;
  --border-color: #e4e8ee;
  --border-hover: #c0c8d8;
  --text-primary: #1a1a2e;
  --text-secondary: #5a6070;
  --text-muted: #9ca3b0;
  --accent-gold: #6366f1;
  --accent-gold-dim: #4f46e5;
  --accent-blue: #3b82f6;
  --accent-blue-dim: #2563eb;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --tag-bg: #f0f2ff;
  --tag-text: #5b63d3;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========== 顶部标题栏 ========== */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px 10px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

.title-icon {
  display: inline-block;
  margin: 0 6px;
  font-size: 14px;
  opacity: 0.7;
}

.header-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-secondary);
}

.header-update-time {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== 筛选搜索区域 ========== */
.filter-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  position: sticky;
  top: var(--header-nav-height, 125px);
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.filter-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* 搜索框 */
.filter-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 10px 40px 10px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

#search-input:focus {
  border-color: var(--accent-blue);
}

#search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: none;
  transition: color var(--transition);
}

.search-clear:hover {
  color: var(--text-primary);
}

.search-clear.visible {
  display: block;
}

/* 筛选折叠按钮 */
.filter-toggle {
  padding: 6px 14px;
  background: var(--tag-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-toggle:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* 筛选控件区域折叠 */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  opacity: 1;
}

.filter-controls.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

/* 玩法分类、Tag 筛选、奇域类型行各独占一整行 */
.filter-controls > .filter-group:first-child,
.filter-controls > .filter-group:nth-child(2),
.filter-controls > .filter-group:nth-child(3) {
  flex-basis: 100%;
}

.filter-group-inline {
  flex: 0 0 auto;
  min-width: 0;
}

/* 同一行组合筛选（奇域类型 + 数据来源） */
.filter-row-combined {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.filter-row-combined.filter-row-combined-align-end {
  align-items: flex-end;
}

.filter-sub-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 宽度比例：用于 3:3:4 等布局 */
.filter-sub-group-3 {
  flex: 3;
  min-width: 0;
}

.filter-sub-group-4 {
  flex: 5;
  min-width: 0;
}

.filter-sub-group-7 {
  flex: 5;
  min-width: 0;
}

/* filter-sub-group-4 内部：人数范围+必须包含+排序+重置 水平排列 */
.filter-sub-group-4-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-sub-group-4-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 重置按钮容器：靠右对齐 */
.filter-combined-reset {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
}

.filter-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 标签筛选 */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  padding: 4px 12px;
  background: var(--tag-bg);
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--tag-text);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.filter-tag:hover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

.filter-tag.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

/* 筛选标签 badge */
.filter-tag .badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  font-size: 10px;
  line-height: 16px;
  min-width: 16px;
  text-align: center;
  color: inherit;
  opacity: 0.7;
}

.filter-tag.active .badge {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

/* 人数选择器 */
.num-selectors {
  display: flex;
  align-items: center;
  gap: 6px;
}

.num-select, .sort-select {
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.num-select:focus, .sort-select:focus {
  border-color: var(--accent-blue);
}

.num-select option, .sort-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.num-separator {
  color: var(--text-muted);
  font-size: 14px;
}

/* 重置按钮 */
.reset-btn {
  padding: 6px 14px;
  background: var(--tag-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.reset-btn:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ========== 卡片网格 ========== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* 卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-input);
}

.card-cover-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e8ecf5, #f0f2f5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 32px;
}

.card-body {
  padding: 12px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.card-level-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  user-select: all;
  flex-shrink: 0;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.card-tag {
  padding: 2px 8px;
  background: var(--tag-bg);
  border-radius: 12px;
  font-size: 11px;
  color: var(--tag-text);
  white-space: nowrap;
}

.card-tag.type-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-gold);
}

.card-tag.cate-tag {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.card-meta-icon {
  font-size: 12px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* 卡片预估发布时间（与关卡ID同一行） */
.card-publish-time {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-publish-time-icon {
  font-size: 10px;
  flex-shrink: 0;
}

/* 详情页预估发布时间（与更新时间同一行） */
.detail-publish-time {
  font-weight: 500;
  color: var(--text-secondary);
}

/* 卡片作者信息 */
.card-developer {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-developer-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.card-version {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 0 5px;
  border-radius: 8px;
  margin-left: 4px;
  flex-shrink: 0;
}

.card-uid {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

/* 骨架屏 */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8ecf5 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-body {
  padding: 12px;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8ecf5 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.tiny {
  width: 40%;
  height: 10px;
}

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

/* 加载更多 */
.load-more {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.load-more.visible {
  display: flex;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== 详情弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

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

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

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

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

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

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.55);
}

.modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 0;
}

/* 详情内容样式 */
.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.detail-content {
  padding: 24px;
}

.detail-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 4px;
  border-radius: 4px;
  padding: 2px 4px;
  transition: background-color 0.2s, color 0.2s;
}

.detail-name:hover {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.06));
}

.detail-name.copied {
  background-color: #d4edda;
  color: #155724;
}

.detail-level-id {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.detail-level-id-label {
  user-select: none;
}

.detail-level-id-value {
  user-select: all;
  cursor: pointer;
  border-radius: 3px;
  padding: 0 3px;
  transition: background-color 0.2s, color 0.2s;
}

.detail-level-id-value:hover {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.06));
}

.detail-level-id-value.copied {
  background-color: #d4edda;
  color: #155724;
}

.detail-update-times {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-update-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag {
  padding: 4px 12px;
  background: var(--tag-bg);
  border-radius: 16px;
  font-size: 12px;
  color: var(--tag-text);
}

.detail-tag.type-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-gold);
}

.detail-tag.cate-tag {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.detail-info-item {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.detail-info-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-info-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-gold);
}

/* 详情弹窗 - 作者信息卡片 */
.detail-developer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.detail-developer-card.clickable {
  cursor: pointer;
}

.detail-developer-card.clickable:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.detail-developer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

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

.detail-developer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-developer-id {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 详情弹窗 - 版本更新历史 */
.update-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-history-item {
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.update-history-item.latest {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.04);
}

.update-history-version {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.update-history-item.latest .update-history-version {
  color: var(--accent-blue);
}

.update-history-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 评论筛选栏 */
.comment-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.comment-sort-select {
  margin-left: auto;
  padding: 4px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.comment-sort-select:focus {
  border-color: var(--accent-blue);
}

.comment-sort-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* 评论者昵称可点击链接 */
.comment-nickname-link {
  color: var(--accent-blue);
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.comment-nickname-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.comment-filter-btn {
  padding: 5px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.comment-filter-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.comment-filter-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.comment-filter-badge {
  display: inline-block;
  margin-left: 3px;
  padding: 0 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-size: 10px;
  line-height: 16px;
  min-width: 16px;
  text-align: center;
}

.comment-filter-btn.active .comment-filter-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* 评论区样式 */
.comment-list {
  list-style: none;
}

.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-input);
  flex-shrink: 0;
}

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

.comment-nickname {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-recommend-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.comment-not-recommend-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.comment-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.comment-footer-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* 子评论 */
.sub-replies {
  margin-left: 42px;
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--border-color);
}

.sub-reply-item {
  padding: 8px 0;
}

.sub-reply-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

/* 图片画廊 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border-color);
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-blue);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-input);
}

/* 灯箱（lightbox） */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.gallery-lightbox.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  padding: 4px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
}

/* 详情 loading */
.detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-secondary);
  gap: 10px;
}

/* ========== 回到顶部按钮 ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--accent-blue);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-blue-dim);
  transform: translateY(-2px);
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-title {
    font-size: 18px;
  }

  .filter-controls {
    flex-direction: column;
  }

  .filter-group-inline {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .header {
    padding: 10px 14px 8px;
  }

  .header-title {
    font-size: 16px;
  }

  .filter-bar {
    padding: 12px 14px;
  }

  .main-content {
    padding: 12px;
  }

  .card-body {
    padding: 8px;
  }

  .card-name {
    font-size: 12px;
  }

  .card-tag {
    font-size: 10px;
    padding: 1px 6px;
  }

  .card-meta {
    font-size: 10px;
  }

  .card-desc {
    display: none;
  }

  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-md);
  }

  .detail-content {
    padding: 16px;
  }

  .detail-name {
    font-size: 18px;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

/* 搜索关键词高亮 */
.highlight {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-gold);
  padding: 0 2px;
  border-radius: 2px;
}

/* Tag 角标容器 */
.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
  max-width: calc(100% - 16px);
}

.card-latest-badge,
.card-group-badge {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.card-latest-badge {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.card-group-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #c8cdd5;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0a8b4;
}

/* ========== 页面导航 ========== */
.page-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: var(--header-height, 85px);
  z-index: 95;
  padding: 0 20px;
}

.page-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}

.page-nav-btn {
  padding: 10px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.page-nav-btn:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.04);
}

.page-nav-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  font-weight: 600;
}

.page-container {
  display: none;
}

.page-container.active {
  display: block;
}

/* ========== 评论分析页面 ========== */

/* 搜索区 */
.ca-search-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.ca-search-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ca-search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.ca-search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
  pointer-events: none;
}

.ca-search-box input {
  width: 100%;
  padding: 10px 40px 10px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.ca-search-box input:focus {
  border-color: var(--accent-blue);
}

.ca-search-box input::placeholder {
  color: var(--text-muted);
}

.ca-search-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ca-checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ca-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* 时间范围筛选 */
.ca-time-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.ca-time-filter-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.ca-time-filter-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ca-time-btn {
  padding: 4px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.ca-time-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.ca-time-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.ca-time-custom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ca-date-input {
  padding: 4px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition);
}

.ca-date-input:focus {
  border-color: var(--accent-blue);
}

.ca-time-sep {
  color: var(--text-muted);
  font-size: 12px;
}

.ca-search-options-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* 统计面板 */
.ca-stats-panel {
  padding: 20px;
}

.ca-stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.ca-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

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

.ca-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.ca-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ca-stat-positive .ca-stat-value {
  color: var(--accent-green);
}

.ca-stat-negative .ca-stat-value {
  color: var(--accent-red);
}

/* 分析面板 */
.ca-analysis-panels {
  padding: 0 20px 20px;
}

.ca-panels-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ca-panel-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.ca-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.ca-panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-input);
}

.ca-panel-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.ca-panel-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.ca-panel-body {
  padding: 0 18px;
  max-height: 420px;
  overflow-y: auto;
}

.ca-panel-body-wide {
  max-height: 480px;
  overflow-x: auto;
  overflow-y: visible;
}

.ca-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-size: 13px;
}

/* 高频评论者列表 */
.ca-user-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ca-user-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition);
  border-radius: var(--radius-sm);
  padding-left: 6px;
  padding-right: 6px;
  margin: 0 -6px;
}

.ca-user-rank-item:hover {
  background: var(--bg-card-hover);
}

.ca-user-rank-item:last-child {
  border-bottom: none;
}

.ca-user-rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ca-user-rank-item:nth-child(1) .ca-user-rank-num {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.ca-user-rank-item:nth-child(2) .ca-user-rank-num {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #fff;
}

.ca-user-rank-item:nth-child(3) .ca-user-rank-num {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
}

.ca-user-rank-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-input);
}

.ca-user-rank-info {
  flex: 1;
  min-width: 0;
}

.ca-user-rank-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ca-user-rank-stats {
  font-size: 11px;
  color: var(--text-muted);
}

.ca-user-rank-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
  flex-shrink: 0;
}

/* IP 地区分布 */
.ca-ip-bar-list {
  list-style: none;
}

.ca-ip-bar-item {
  margin-bottom: 8px;
}

.ca-ip-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.ca-ip-bar-name {
  color: var(--text-primary);
  font-weight: 500;
}

.ca-ip-bar-count {
  color: var(--text-muted);
}

.ca-ip-bar-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.ca-ip-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* 高频词汇（词云标签） */
.ca-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px 0;
}

.ca-keyword-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-weight: 500;
  cursor: default;
  transition: all var(--transition);
  white-space: nowrap;
}

.ca-keyword-tag:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-sm);
}

.ca-keyword-tag.size-1 { font-size: 11px; background: rgba(99,102,241,0.06); color: var(--tag-text); }
.ca-keyword-tag.size-2 { font-size: 13px; background: rgba(99,102,241,0.10); color: var(--tag-text); }
.ca-keyword-tag.size-3 { font-size: 15px; background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.ca-keyword-tag.size-4 { font-size: 18px; background: rgba(59,130,246,0.16); color: var(--accent-blue); font-weight: 600; }
.ca-keyword-tag.size-5 { font-size: 22px; background: rgba(99,102,241,0.18); color: var(--accent-gold); font-weight: 700; }

/* 时间线图表（按天） */
.ca-timeline-chart {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 180px;
  padding: 30px 0 40px;
  position: relative;
}

.ca-timeline-bar-wrap {
  flex: 0 0 auto;
  width: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.ca-timeline-bar {
  width: 100%;
  background: var(--accent-blue);
  border-radius: 2px 2px 0 0;
  min-height: 0;
  transition: height 0.6s ease, background 0.15s;
  position: relative;
  cursor: default;
}

.ca-timeline-bar:hover {
  background: var(--accent-gold);
}

.ca-timeline-bar-tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
  /* 固定在 wrap 顶部，不随柱子高度溢出容器 */
  top: 0;
}

.ca-timeline-bar-tooltip.align-left {
  left: 0;
  transform: none;
}

.ca-timeline-bar-tooltip.align-right {
  left: auto;
  right: 0;
  transform: none;
}

.ca-timeline-bar-wrap:hover .ca-timeline-bar-tooltip {
  opacity: 1;
}

.ca-timeline-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  transform-origin: top left;
  transform: rotate(45deg);
}

/* 全量评论列表 */
.ca-comment-list-section {
  padding: 0 20px 40px;
}

.ca-comment-list-inner {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ca-comment-list-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ca-comment-list-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.ca-comment-count {
  font-size: 12px;
  color: var(--text-muted);
}

.ca-comment-list {
  list-style: none;
  padding: 0;
}

.ca-comment-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}

.ca-comment-item:hover {
  background: var(--bg-card-hover);
}

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

.ca-comment-sub-list {
  margin-top: 8px;
  margin-left: 38px;
  border-left: 2px solid var(--border-color);
  padding-left: 12px;
}

.ca-comment-sub-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  opacity: 0.85;
}

.ca-comment-sub-item:last-child {
  border-bottom: none;
}

.ca-comment-sub-item .ca-comment-avatar {
  width: 22px;
  height: 22px;
}

.ca-comment-sub-item .ca-comment-nickname {
  font-size: 12px;
}

.ca-comment-sub-item .ca-comment-content {
  font-size: 12.5px;
}

.ca-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ca-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-input);
}

.ca-comment-user-info {
  flex: 1;
  min-width: 0;
}

.ca-comment-nickname {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.ca-comment-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ca-comment-level-link {
  font-size: 11px;
  color: var(--accent-blue);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ca-comment-level-link:hover {
  text-decoration: underline;
}

.ca-comment-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 6px;
  padding-left: 38px;
}

.ca-comment-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 38px;
}

/* 加载更多 */
.ca-load-more {
  padding: 16px;
  text-align: center;
}

.ca-load-more-btn {
  padding: 8px 24px;
  background: var(--accent-blue);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.ca-load-more-btn:hover {
  background: var(--accent-blue-dim);
  transform: translateY(-1px);
}

.ca-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.ca-empty .empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.ca-empty p {
  font-size: 14px;
}

/* 评论者详情分析弹窗 */
.ca-user-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.ca-user-modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.ca-user-modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.ca-user-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.ca-user-modal-close:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.ca-user-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 24px;
}

/* 用户详情 - 头部信息卡 */
.ca-user-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.ca-user-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
}

.ca-user-detail-info {
  flex: 1;
  min-width: 0;
}

.ca-user-detail-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ca-user-detail-uid {
  font-size: 11px;
  color: var(--text-muted);
}

/* 用户详情 - 统计卡片 */
.ca-user-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.ca-user-detail-stat {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.ca-user-detail-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}

.ca-user-detail-stat-value.positive {
  color: var(--accent-green);
}

.ca-user-detail-stat-value.negative {
  color: var(--accent-red);
}

.ca-user-detail-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 用户详情 - 评论过的奇域列表 */
.ca-user-levels-list {
  list-style: none;
  margin-bottom: 20px;
}

.ca-user-levels-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
  border-radius: var(--radius-sm);
}

.ca-user-levels-item:hover {
  background: var(--bg-card-hover);
}

.ca-user-levels-item:last-child {
  border-bottom: none;
}

.ca-user-levels-name {
  color: var(--accent-blue);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

.ca-user-levels-count {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 用户详情 - 评论列表 */
.ca-user-detail-section {
  margin-bottom: 16px;
}

.ca-user-detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.ca-user-comment-list {
  list-style: none;
}

.ca-user-comment-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.ca-user-comment-item:last-child {
  border-bottom: none;
}

.ca-user-comment-level {
  font-size: 11px;
  color: var(--accent-blue);
  cursor: pointer;
  margin-bottom: 3px;
}

.ca-user-comment-level:hover {
  text-decoration: underline;
}

.ca-user-comment-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.ca-user-comment-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.ca-user-comment-recommend {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.ca-user-comment-recommend.positive {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.ca-user-comment-recommend.negative {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 560px) {
  .ca-user-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-md);
  }

  .ca-user-modal-body {
    padding: 16px;
  }

  .ca-user-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .ca-user-levels-name {
    max-width: 180px;
  }
}

/* 评论分析响应式 */
@media (max-width: 900px) {
  .ca-panels-inner {
    grid-template-columns: 1fr;
  }

  .ca-search-inner {
    flex-direction: column;
  }

  .ca-search-box {
    min-width: 100%;
  }

  .page-nav-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .ca-stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .ca-stat-value {
    font-size: 20px;
  }

  .ca-comment-content,
  .ca-comment-footer {
    padding-left: 0;
  }
}

/* 复制成功 Toast 提示 */
.copy-toast {
  position: fixed;
  z-index: 10001;
  background: #155724;
  color: #fff;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

.copy-toast-show {
  opacity: 1;
}

.copy-toast-hide {
  opacity: 0;
  transform: translate(-50%, -120%);
}

/* ========== 奇域查询页面样式 ========== */

/* 查询搜索栏：不需要 sticky 定位，覆盖通用 .filter-bar 的 top 值 */
#page-query .filter-bar {
  position: relative;
  top: auto;
  z-index: 90;
}

#page-query .filter-top-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 0;
}

#page-query .search-box {
  flex: 1;
}

/* 查询输入框：确保左侧 padding 足够，不与搜索图标重叠 */
#query-input {
  width: 100%;
  padding: 10px 40px 10px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

#query-input:focus {
  border-color: var(--accent-blue);
}

#query-input::placeholder {
  color: var(--text-muted);
}

/* 查询按钮 */
.query-submit-btn {
  background: var(--accent-blue);
  color: #fff;
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 24px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.query-submit-btn:hover {
  background: var(--accent-blue-dim);
  border-color: var(--accent-blue-dim);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.query-submit-btn:active {
  transform: scale(0.97);
}

.query-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 查询提示 */
.query-hint-bar {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.query-hint-bar .query-status {
  color: var(--accent-blue);
  font-weight: 500;
}

/* 查询加载状态 */
.query-loading-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.query-loading-state .loading-spinner {
  display: inline-block;
  margin-bottom: 12px;
}

.query-loading-state p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 查询结果区域 */
#page-query .main-content {
  padding-top: 12px;
}

#page-query .card-grid {
  gap: 20px;
}

/* 批次容器透明化，让子卡片直接参与外层 grid 布局 */
#page-query .query-batch-container {
  display: contents;
}

/* 查询结果卡片增加微妙的左边框色彩 */
#page-query .card {
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

#page-query .card:hover {
  border-left-color: var(--accent-blue);
}

/* 查询失败卡片样式 */
#page-query .card[style*="opacity: 0.6"] {
  border-left-color: var(--accent-red);
}

/* 查询空状态 */
#query-empty {
  padding: 80px 20px;
}

#query-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

/* 查询结果状态指示条 */
.query-result-status {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  display: none;
  align-items: center;
  gap: 8px;
}

.query-result-status.visible {
  display: flex;
}
