/* 热点情报系统 - 统一风格（以 today-hot 为主），支持 data-theme="dark" | "light" */
:root {
  --border: #333;
  --card-border: #333;
  --list-border: #333;
  --bg: #1e1e1e;
  --bg-soft: #333;
  --text: #e0e0e0;
  --text-soft: #888;
}

body {
  background: #1e1e1e;
  color: #e0e0e0;
}

body[data-theme="light"] {
  --border: #e8e8e8;
  --card-border: #e8e8e8;
  --list-border: #eee;
  --bg: #fff;
  background: #fff;
  color: #1a1a1a;
}
  --bg-soft: #f0f0f0;
  --text: #1a1a1a;
  --text-soft: #666;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
body[data-theme="dark"] {
  background: #1e1e1e;
  color: #e0e0e0;
}
body[data-theme="light"] {
  background: #f0f2f5;
  color: #1a1a1a;
}
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
body[data-theme="dark"] .header { background: #252525; border-color: #333; }
body[data-theme="light"] .header { background: #fff; border-color: #e8e8e8; }
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-left a { text-decoration: none; color: inherit; }
.logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: #e53935;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.title-wrap h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
body[data-theme="dark"] .title-wrap h1 { color: #fff; }
body[data-theme="light"] .title-wrap h1 { color: #1a1a1a; }
.title-wrap p {
  margin: 2px 0 0 0;
  font-size: 12px;
}
body[data-theme="dark"] .title-wrap p { color: #aaa; }
body[data-theme="light"] .title-wrap p { color: #666; }
.header-nav { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.header-nav a { color: var(--text-soft); padding: 6px 12px; border-radius: 8px; }
.header-nav a:hover { color: var(--text); background: var(--bg-soft); }
.header-nav a.header-nav-current { color: var(--text); font-weight: 600; }
.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.header-time {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
body[data-theme="dark"] .header-time { color: #e0e0e0; }
body[data-theme="light"] .header-time { color: #333; }
.header-lunar { font-size: 11px; }
body[data-theme="dark"] .header-lunar { color: #888; }
body[data-theme="light"] .header-lunar { color: #888; }
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s, color .2s;
}
body[data-theme="dark"] .header-btn {
  background: #333;
  color: #aaa;
}
body[data-theme="dark"] .header-btn:hover { background: #444; color: #fff; }
body[data-theme="light"] .header-btn {
  background: #f0f0f0;
  color: #555;
}
body[data-theme="light"] .header-btn:hover { background: #e0e0e0; color: #1a1a1a; }
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}
@media (min-width: 768px) { .main { padding: 24px; } }
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.channel-card {
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--card-border);
  height: 280px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body[data-theme="dark"] .channel-card {
  background: #2a2a2a;
  border-color: #333;
}
body[data-theme="light"] .channel-card {
  background: #fff;
  border-color: #e8e8e8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.channel-card-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 0;
  margin-left: -2px;
  margin-right: -2px;
  padding: 4px 2px;
}
body[data-theme="dark"] .channel-card-header:hover { background: rgba(255,255,255,0.06); }
body[data-theme="light"] .channel-card-header:hover { background: rgba(0,0,0,0.04); }
.channel-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.channel-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}
.channel-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-theme="dark"] .channel-name { color: #fff; }
body[data-theme="light"] .channel-name { color: #1a1a1a; }
.channel-badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
body[data-theme="dark"] .channel-badge { color: #888; background: #333; }
body[data-theme="light"] .channel-badge { color: #666; background: #f0f0f0; }
.channel-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.channel-card-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 11px;
  line-height: 1;
}
body[data-theme="dark"] .channel-card-total {
  background: #444;
  color: #ccc;
}
body[data-theme="light"] .channel-card-total {
  background: #e0e0e0;
  color: #555;
}
.channel-list-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.channel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.channel-list li {
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-bottom: 1px solid var(--list-border);
  font-size: 13px;
  line-height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}
body[data-theme="dark"] .channel-list li { border-color: #333; }
body[data-theme="light"] .channel-list li { border-color: #eee; }
.channel-list li:last-child { border-bottom: none; }
.channel-list .item-rank {
  flex-shrink: 0;
  width: 22px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
body[data-theme="dark"] .channel-list .item-rank { color: #888; }
body[data-theme="light"] .channel-list .item-rank { color: #999; }
.channel-list a {
  display: block;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
body[data-theme="dark"] .channel-list a { color: #b0b0b0; }
body[data-theme="dark"] .channel-list a:hover { color: #fff; }
body[data-theme="light"] .channel-list a { color: #333; }
body[data-theme="light"] .channel-list a:hover { color: #e53935; }
.channel-list .loading-line {
  height: 14px;
  min-height: 14px;
  border-radius: 4px;
  margin: 6px 0;
}
body[data-theme="dark"] .channel-list .loading-line { background: #333; }
body[data-theme="light"] .channel-list .loading-line { background: #e8e8e8; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal.modal-large {
  max-width: min(92vw, 900px);
  max-height: calc(100vh - 32px);
}
.modal-title.content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.modal-title.content-head .content-actions { margin: 0; }
.page-bar-inline { margin-bottom: 12px; }
.pagination-info { font-size: 13px; color: var(--text-soft); margin-left: 8px; }
body[data-theme="dark"] .modal { background: #2a2a2a; border: 1px solid #333; }
body[data-theme="light"] .modal { background: #fff; border: 1px solid #e8e8e8; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-title {
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
body[data-theme="dark"] .modal-title { color: #fff; border-color: #333; }
body[data-theme="light"] .modal-title { color: #1a1a1a; border-color: #e8e8e8; }
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.setting-group {
  margin-bottom: 20px;
}
.setting-hint {
  font-size: 12px;
  color: var(--text-soft);
  margin: 4px 0 8px 0;
}
.setting-actions {
  margin-bottom: 12px;
}
.setting-actions .modal-btn { padding: 8px 16px; min-height: 36px; font-size: 13px; }
.setting-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}
body[data-theme="dark"] .setting-label { color: #e0e0e0; }
body[data-theme="light"] .setting-label { color: #333; }
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.setting-row .setting-label { margin-bottom: 0; }
.setting-row-theme .setting-label { flex-shrink: 0; }
.theme-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-soft);
  user-select: none;
}
.theme-switch-row .theme-switch-label { flex-shrink: 0; }
.theme-switch {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.theme-switch-track {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 13px;
  background: #333;
  transition: background .2s;
}
body[data-theme="light"] .theme-switch-track { background: #ccc; }
.theme-switch:checked + .theme-switch-track { background: #e53935; }
.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform .2s;
}
.theme-switch:checked + .theme-switch-track .theme-switch-thumb { transform: translateX(24px); }
.channel-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
body[data-theme="dark"] .channel-list-header { background: #252525; }
body[data-theme="light"] .channel-list-header { background: #fafafa; }
.channel-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-right: 8px;
}
.channel-select-all input { cursor: pointer; accent-color: #e53935; }
.channel-list-header .item-num { min-width: 32px; text-align: center; }
.channel-list-header .header-name { flex: 1; }
.channel-list-header .header-sort-to { margin-left: auto; }
.channel-list-header .header-btns { width: 28px; }
.channel-check-list {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 0 0 0 0;
  padding: 4px;
}
.channel-list-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  font-size: 13px;
}
body[data-theme="dark"] .channel-list-pagination { background: #252525; }
body[data-theme="light"] .channel-list-pagination { background: #fafafa; }
.channel-page-size-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  margin-right: 12px;
}
.channel-page-size-select {
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  min-width: 56px;
}
.channel-page-info { color: var(--text-soft); margin-right: auto; }
.channel-list-pagination .modal-btn { padding: 6px 14px; min-height: 32px; font-size: 13px; }
body[data-theme="dark"] .channel-check-list { background: #1e1e1e; }
body[data-theme="light"] .channel-check-list { background: #f5f5f5; }
.channel-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
}
.channel-check-item .item-num {
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
  font-size: 13px;
}
.channel-check-item .item-name { flex: 1; min-width: 0; }
.channel-check-item .sort-to-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.channel-check-item .sort-to-wrap span { font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.channel-check-item .sort-to-input {
  width: 44px;
  padding: 4px 6px;
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}
.channel-check-item .sort-to-input:focus { outline: none; border-color: #e53935; }
body[data-theme="dark"] .channel-check-item:hover { background: #333; }
body[data-theme="light"] .channel-check-item:hover { background: #eee; }
.channel-check-item input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  accent-color: #e53935;
}
.channel-check-item .channel-sort-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.channel-check-item .sort-btn {
  width: 28px;
  height: 18px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}
.channel-check-item .sort-btn:hover { background: #444; color: #fff; }
body[data-theme="light"] .channel-check-item .sort-btn { background: #eee; }
body[data-theme="light"] .channel-check-item .sort-btn:hover { background: #ddd; color: #1a1a1a; }
.channel-check-item .sort-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
body[data-theme="dark"] .modal-footer { border-color: #333; }
body[data-theme="light"] .modal-footer { border-color: #e8e8e8; }
.modal-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  min-height: 44px;
}
.modal-btn-primary {
  background: #e53935;
  color: #fff;
}
.modal-btn-primary:hover { background: #c62828; }
.modal-btn-secondary {
  background: #333;
  color: #aaa;
}
body[data-theme="light"] .modal-btn-secondary { background: #f0f0f0; color: #555; }
.modal-btn-secondary:hover { color: #fff; }
body[data-theme="light"] .modal-btn-secondary:hover { background: #e0e0e0; color: #1a1a1a; }
.card-error {
  font-size: 12px;
  padding: 8px 0;
}
body[data-theme="dark"] .card-error { color: #e57373; }
body[data-theme="light"] .card-error { color: #c62828; }
.full-list-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.full-list-overlay.open { display: flex; }
.full-list-modal {
  width: max-content;
  min-width: 280px;
  max-width: min(92vw, 720px);
  max-height: calc(100vh - 32px);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body[data-theme="dark"] .full-list-modal { background: #2a2a2a; border: 1px solid #333; }
body[data-theme="light"] .full-list-modal { background: #fff; border: 1px solid #e8e8e8; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.full-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
body[data-theme="dark"] .full-list-title-row { border-color: #333; }
body[data-theme="light"] .full-list-title-row { border-color: #e8e8e8; }
.full-list-title {
  font-size: 18px;
  font-weight: 600;
}
body[data-theme="dark"] .full-list-title { color: #fff; }
body[data-theme="light"] .full-list-title { color: #1a1a1a; }
.full-list-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
}
.full-list-close:hover { background: #333; color: #fff; }
body[data-theme="light"] .full-list-close:hover { background: #f0f0f0; color: #1a1a1a; }
.full-list-body-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.full-list-body-wrap::before,
.full-list-body-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s;
}
.full-list-body-wrap::before {
  top: 0;
  background: linear-gradient(to bottom, var(--full-list-shadow, rgba(42,42,42,0.9)), transparent);
}
body[data-theme="light"] .full-list-body-wrap::before { --full-list-shadow: rgba(255,255,255,0.95); }
.full-list-body-wrap::after {
  bottom: 0;
  background: linear-gradient(to top, var(--full-list-shadow, rgba(42,42,42,0.9)), transparent);
}
body[data-theme="light"] .full-list-body-wrap::after { --full-list-shadow: rgba(255,255,255,0.95); }
.full-list-body-wrap.can-scroll-top::before,
.full-list-body-wrap.can-scroll-bottom::after { opacity: 1; }
.full-list-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 20px 24px;
  -webkit-overflow-scrolling: touch;
}
.full-list-body .full-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--list-border);
  font-size: 14px;
}
body[data-theme="dark"] .full-list-body .full-list-item { border-color: #333; }
body[data-theme="light"] .full-list-body .full-list-item { border-color: #eee; }
.full-list-body .full-list-item:last-child { border-bottom: none; }
.full-list-body .full-list-item .item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.full-list-body .full-list-item .item-rank {
  flex-shrink: 0;
  width: 24px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #888;
  line-height: 1.4;
}
.full-list-body .full-list-item .item-image {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
}
.full-list-body .full-list-item .item-row.has-image .item-main {
  flex: 1;
  min-width: 0;
}
.full-list-body .full-list-item .item-main {
  flex: 1;
  min-width: 0;
}
.full-list-body .full-list-item .item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
}
body[data-theme="dark"] .full-list-body .full-list-item .item-title { color: #b0b0b0; }
body[data-theme="dark"] .full-list-body .full-list-item .item-title:hover { color: #fff; }
body[data-theme="light"] .full-list-body .full-list-item .item-title { color: #333; }
body[data-theme="light"] .full-list-body .full-list-item .item-title:hover { color: #e53935; }
.full-list-body .full-list-item .item-desc {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
body[data-theme="dark"] .full-list-body .full-list-item .item-desc { color: #888; }
body[data-theme="light"] .full-list-body .full-list-item .item-desc { color: #666; }
.full-list-body .full-list-item .item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 12px;
}
body[data-theme="dark"] .full-list-body .full-list-item .item-meta { color: #666; }
body[data-theme="light"] .full-list-body .full-list-item .item-meta { color: #999; }
.full-list-body .full-list-item .item-hot {
  color: #e53935;
  font-weight: 600;
}
.full-list-loading, .full-list-error {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

/* 其他页面共用：卡片、工具栏等 */
.page-card {
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid var(--card-border);
  margin-bottom: 16px;
}
body[data-theme="dark"] .page-card { background: #2a2a2a; border-color: #333; }
body[data-theme="light"] .page-card { background: #fff; border-color: #e8e8e8; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.page-card h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text-soft);
}
.page-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.page-bar select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-width: 140px;
}
.page-bar .btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  background: #e53935;
  color: #fff;
}
.page-bar .btn:hover { background: #c62828; }
.page-bar .btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
}
body[data-theme="light"] .page-bar .btn-secondary { background: #f0f0f0; color: #1a1a1a; }
.page-bar .btn-secondary:hover { opacity: 0.9; }
.file-list, .content-list { list-style: none; padding: 0; margin: 0; }
.file-list li, .content-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--list-border);
  gap: 8px;
}
.file-list li:last-child, .content-list li:last-child { border-bottom: none; }
.file-list a, .content-list a { color: #e53935; text-decoration: none; }
.file-list a:hover, .content-list a:hover { text-decoration: underline; }
.file-list .file-label { font-weight: 600; min-width: 100px; }
.file-list .file-path { font-size: 12px; color: var(--text-soft); margin-left: 8px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .file-view { margin-left: auto; }
.file-list .btn-danger, .file-list button.danger { background: #e53935; color: #fff; border: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.file-list .btn-danger:hover, .file-list button.danger:hover { background: #c62828; }
.status, .muted { font-size: 13px; color: var(--text-soft); }
.error { color: #e57373; }
body[data-theme="light"] .error { color: #c62828; }
.content pre {
  background: var(--bg-soft);
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.85rem;
  max-height: 60vh;
  border: 1px solid var(--border);
}
.content .list-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--list-border);
}
.content .list-item:last-child { border-bottom: none; }
.content .rank { color: var(--text-soft); margin-right: 0.5rem; }
.content-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.content-head h2 { margin: 0; }
.content-actions { display: flex; gap: 8px; }
.content-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tab-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); cursor: pointer; font-size: 14px; }
.tab-btn:hover { background: #444; color: #fff; }
body[data-theme="light"] .tab-btn:hover { background: #e0e0e0; color: #1a1a1a; }
.tab-btn.active { background: #e53935; color: #fff; border-color: #e53935; }
.content-panel { min-height: 120px; }
#rawEditor { width: 100%; min-height: 360px; padding: 12px; font-family: ui-monospace, monospace; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); resize: vertical; box-sizing: border-box; }
#rawEditor:focus { outline: none; border-color: #e53935; }
.page-bar label { font-size: 14px; color: var(--text-soft); }
.page-bar select { min-width: 160px; }

/* tophub-clone：侧栏 + 主区，头部吸顶后下方整块固定高度，左右独立滚动 */
.layout-with-sidebar {
  display: flex;
  height: calc(100vh - 72px);
  min-height: 0;
  overflow: hidden;
}
.layout-with-sidebar .sidebar {
  width: 280px;
  min-width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.layout-with-sidebar .main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar {
  width: 280px;
  min-width: 260px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-title {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.sidebar #menu, .sidebar .menu-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0; }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 4px;
  padding: 0 8px;
}
.menu-item {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s;
}
body[data-theme="dark"] .menu-item:hover { background: #333; }
body[data-theme="light"] .menu-item:hover { background: #eee; }
.menu-item.active {
  background: rgba(229,57,53,0.2);
  color: #e53935;
  font-weight: 600;
}
body[data-theme="light"] .menu-item.active { background: rgba(229,57,53,0.12); }
.platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.platform-title { font-size: 18px; font-weight: 600; }
body[data-theme="dark"] .platform-title { color: #fff; }
body[data-theme="light"] .platform-title { color: #1a1a1a; }
.platform-meta { font-size: 13px; color: var(--text-soft); }
.platform-meta a { color: #e53935; text-decoration: none; }
.platform-meta a:hover { text-decoration: underline; }
.list-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 24px;
}
@media (min-width: 960px) { .list-wrap { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .list-wrap { grid-template-columns: repeat(3, 1fr); } }
.list-wrap .item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--list-border);
  gap: 10px;
}
.list-wrap .item .rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: #e53935;
  border-radius: 8px;
}
.list-wrap .item-content { flex: 1; min-width: 0; }
.list-wrap .item-title { font-size: 15px; line-height: 1.45; margin-bottom: 4px; }
.list-wrap .item-title a { text-decoration: none; color: inherit; font-weight: 500; }
.list-wrap .item-title a:hover { color: #e53935; }
.list-wrap .item-desc { font-size: 13px; color: var(--text-soft); line-height: 1.4; margin-bottom: 6px; }
.list-wrap .item-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-soft); }
.list-wrap .item-hot { color: #e53935; font-weight: 600; }
.loading, .empty { text-align: center; padding: 48px 24px; color: var(--text-soft); }
.preview-img { width: 100%; border-radius: 8px; margin-top: 10px; }
.content-list ul, .page-card ul { padding-left: 20px; }
.content-list a, .page-card ul a { color: #e53935; text-decoration: none; }
.content-list a:hover, .page-card ul a:hover { text-decoration: underline; }

/* 总结对比表格样式 */
.comparison-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 -2px 10px rgba(0,0,0,0.1);
  border: 1px solid var(--card-border);
}
body[data-theme="light"] .comparison-wrap {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 -2px 10px rgba(0,0,0,0.05);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--list-border);
}
.comparison-table th {
  background: var(--bg-soft);
  font-weight: 600;
  white-space: nowrap;
}
body[data-theme="dark"] .comparison-table th { background: #333; }
body[data-theme="light"] .comparison-table th { background: #f5f5f5; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(0,0,0,0.02); }
body[data-theme="light"] .comparison-table tr:hover td { background: #fafafa; }


