/* ========================================
   首页特定样式
   ======================================== */

/* 首页欢迎区域 */
.ty-home-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #5b9bd5 100%);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin-bottom: 16px;
  color: #fff;
}

.ty-home-hero h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ty-home-hero p {
  font-size: var(--font-size-base);
  opacity: 0.9;
  line-height: 1.6;
}

/* 博客统计卡片 */
.ty-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.ty-stat-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.ty-stat-card:hover {
  box-shadow: var(--shadow-md);
}

.ty-stat-number {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.ty-stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 6px;
}

/* 文章列表置顶 */
.bbs-table .sticky-post td {
  background-color: var(--bg-table-sticky);
}

.post-sticky-badge {
  display: inline-block;
  background: var(--color-danger);
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  margin-right: 6px;
  vertical-align: middle;
}

/* 热门排行侧栏 */
.ty-hot-posts {
  margin-top: 10px;
}

.ty-hot-list {
  padding: 8px 0;
}

.ty-hot-item {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  gap: 8px;
  font-size: var(--font-size-sm);
}

.ty-hot-rank {
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #699aca;
  flex-shrink: 0;
}

.ty-hot-item:nth-child(1) .ty-hot-rank,
.ty-hot-item:nth-child(2) .ty-hot-rank,
.ty-hot-item:nth-child(3) .ty-hot-rank {
  background: var(--color-warning);
}

.ty-hot-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.ty-hot-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.ty-hot-views {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 趋势箭头 */
.trend-up { color: var(--color-danger); }
.trend-down { color: var(--color-success); }
.trend-stable { color: var(--text-muted); }

/* 响应式统计行 */
@media screen and (max-width: 480px) {
  .ty-stats-row {
    flex-wrap: wrap;
  }

  .ty-stat-card {
    flex: 1 1 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }

  .ty-home-hero {
    padding: 20px 16px;
  }

  .ty-home-hero h2 {
    font-size: 18px;
  }
}
