/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: #1890ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* ========== Header ========== */
.header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.header .logo {
  font-size: 20px;
  font-weight: 700;
  color: #1890ff;
  text-decoration: none;
}

.header .logo:hover {
  text-decoration: none;
}

.header nav {
  display: flex;
  gap: 24px;
}

.header nav a {
  color: #666;
  font-size: 15px;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.header nav a:hover,
.header nav a.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
  text-decoration: none;
}

/* ========== Container ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== Stats Bar ========== */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-num {
  font-size: 28px;
  font-weight: 700;
  color: #1890ff;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-item {
  padding: 12px 20px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border: none;
  background: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.tab-item:hover {
  background: #f0f7ff;
  color: #1890ff;
}

.tab-item.active {
  background: #1890ff;
  color: #fff;
}

/* ========== Node Grid ========== */
.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.node-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: #333;
  display: block;
}

.node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.node-card .node-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #f0f7ff;
  color: #1890ff;
  overflow: hidden;
}

.node-card .node-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.node-card .node-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-card .node-count {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.node-card.is-hot {
  border: 1px solid #ff4d4f;
}

.node-card.is-hot .node-name::before {
  content: "HOT ";
  color: #ff4d4f;
  font-size: 10px;
  font-weight: 700;
}

/* ========== Node Detail Layout ========== */
.node-layout {
  display: flex;
  gap: 20px;
}

.node-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.node-main {
  flex: 1;
  min-width: 0;
}

/* ========== Sidebar ========== */
.sidebar-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.sidebar-title {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  border-bottom: 1px solid #f5f5f5;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-list a:hover,
.sidebar-list a.active {
  background: #f0f7ff;
  color: #1890ff;
  text-decoration: none;
}

/* ========== Node Info Card ========== */
.node-info {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.node-info-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.node-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #f0f7ff;
  color: #1890ff;
  flex-shrink: 0;
  overflow: hidden;
}

.node-info-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.node-info-title {
  font-size: 20px;
  font-weight: 700;
}

.node-info-desc {
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
}

.node-info-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #999;
}

.btn-subscribe {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #1890ff;
  background: #fff;
  color: #1890ff;
  transition: background 0.2s, color 0.2s;
}

.btn-subscribe:hover {
  background: #1890ff;
  color: #fff;
}

.btn-subscribe.subscribed {
  background: #1890ff;
  color: #fff;
}

/* ========== Hot List ========== */
.hot-list {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.hot-list-header {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

.hot-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f8f8f8;
  transition: background 0.15s;
}

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

.hot-item:hover {
  background: #fafafa;
}

.hot-rank {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #999;
  background: #f5f5f5;
  flex-shrink: 0;
  margin-right: 12px;
}

.hot-rank.top1 { background: #ff4d4f; color: #fff; }
.hot-rank.top2 { background: #ff7a45; color: #fff; }
.hot-rank.top3 { background: #ffa940; color: #fff; }

.hot-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-title a {
  color: #333;
  text-decoration: none;
}

.hot-title a:hover {
  color: #1890ff;
  text-decoration: none;
}

.hot-value {
  font-size: 12px;
  color: #999;
  margin: 0 12px;
  flex-shrink: 0;
}

.hot-link {
  flex-shrink: 0;
  color: #ccc;
  font-size: 14px;
  transition: color 0.2s;
}

.hot-link:hover {
  color: #1890ff;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px 0;
}

.pagination button {
  padding: 6px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.pagination button:hover:not(:disabled) {
  border-color: #1890ff;
  color: #1890ff;
}

.pagination button.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}

.pagination button:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 13px;
  color: #999;
  margin: 0 8px;
}

/* ========== Subscribe Page ========== */
.subscribe-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subscribe-item {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subscribe-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscribe-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0f7ff;
  color: #1890ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.subscribe-item-name {
  font-size: 15px;
  font-weight: 500;
}

.subscribe-item-count {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.btn-unsubscribe {
  padding: 4px 12px;
  border: 1px solid #ff4d4f;
  border-radius: 4px;
  background: #fff;
  color: #ff4d4f;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-unsubscribe:hover {
  background: #ff4d4f;
  color: #fff;
}

/* ========== History Page ========== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-bar label {
  font-size: 14px;
  color: #666;
}

.filter-bar select {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.filter-bar select:focus {
  border-color: #1890ff;
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #ccc;
}

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

.empty-state .empty-text {
  font-size: 14px;
}

/* ========== Loading ========== */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #999;
}

.breadcrumb a:hover {
  color: #1890ff;
}

/* ========== 瀑布流热搜区域 ========== */
.hotfeed-section {
  margin-top: 30px;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hotfeed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.hotfeed-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.hotfeed-tabs {
  display: flex;
  gap: 8px;
}

.hotfeed-tab {
  padding: 4px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 16px;
  background: #fff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.hotfeed-tab:hover {
  color: #1890ff;
  border-color: #1890ff;
}

.hotfeed-tab.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}

.hotfeed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.hotfeed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: #333;
  transition: background 0.15s;
}

.hotfeed-item:hover {
  background: #fafafa;
}

.hotfeed-item:hover .hotfeed-title {
  color: #1890ff;
}

.hotfeed-rank {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #999;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hotfeed-rank.rank-top1 {
  background: #ff4d4f;
  color: #fff;
}

.hotfeed-rank.rank-top2 {
  background: #ff7a45;
  color: #fff;
}

.hotfeed-rank.rank-top3 {
  background: #ffa940;
  color: #fff;
}

.hotfeed-title {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.hotfeed-heat {
  flex-shrink: 0;
  font-size: 12px;
  color: #999;
}

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 10px;
  color: #aaaaa;
  font-size: 13px;
  margin-top: 10px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .header-inner {
    height: 48px;
    padding: 0 12px;
  }

  .header .logo {
    font-size: 17px;
  }

  .header nav {
    gap: 16px;
  }

  .header nav a {
    font-size: 13px;
  }

  .container {
    padding: 12px;
  }

  .stats-bar {
    flex-direction: column;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card .stat-num {
    font-size: 22px;
  }

  .node-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .node-card {
    padding: 14px 8px;
  }

  .node-card .node-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .node-layout {
    flex-direction: column;
  }

  .node-sidebar {
    width: 100%;
  }

  .sidebar-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
  }

  .sidebar-list a {
    padding: 8px 14px;
    font-size: 13px;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-item {
    padding: 10px 14px;
    font-size: 13px;
  }

  .hot-item {
    padding: 10px 12px;
  }

  .hot-value {
    display: none;
  }

  .subscribe-item {
    padding: 12px 14px;
  }

  .hotfeed-grid {
    grid-template-columns: 1fr;
  }
}
