/* HtmlHub 首页 — 时间线流 + 分类导航 */

/* ========== 首页 Header ========== */
.home-header {
  text-align: center;
  padding: 32px 0 8px;
}
.home-header h1 {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-header .subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
}

/* ========== Section 标题 ========== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .icon { font-size: 18px; }
.section-title .more {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
}

/* ========== 分类卡片网格 ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-bottom: 12px;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.category-card:hover, .category-card:active {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
  text-decoration: none;
}

.card-icon { font-size: 28px; margin-bottom: 6px; }
.card-name { font-size: 14px; font-weight: 600; }
.card-count { font-size: 11px; color: var(--accent); margin-top: 3px; }
.card-desc { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.3; }

/* ========== 时间线流 ========== */
.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
}
.feed-item:hover, .feed-item:active {
  border-color: rgba(108, 99, 255, 0.3);
  background: var(--card-hover);
  text-decoration: none;
}

.feed-date {
  min-width: 44px;
  text-align: center;
  flex-shrink: 0;
}
.feed-date .day {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1.2;
}
.feed-date .month {
  font-size: 11px;
  color: var(--text-dim);
}

.feed-body { flex: 1; min-width: 0; }

.feed-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.feed-category-badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
}
.badge-daily   { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.badge-news    { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.badge-video   { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-article { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.badge-ops     { background: rgba(248, 113, 113, 0.15); color: #f87171; }

/* ========== 子分类列表 ========== */
.sub-section {
  margin-bottom: 16px;
}
.sub-section h3 {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding-left: 4px;
}

/* ========== Back bar ========== */
.back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 12px;
}
.back-bar button {
  background: var(--card-bg);
  color: var(--text);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.back-bar h2 { font-size: 18px; }

/* ========== 文件列表 ========== */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.file-item:hover, .file-item:active {
  border-color: var(--accent);
  background: var(--card-hover);
  text-decoration: none;
}
.file-title { font-size: 14px; font-weight: 500; }
.file-meta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ========== Footer ========== */
.home-footer {
  text-align: center;
  margin-top: 40px;
  padding: 16px 0;
  color: var(--text-dim);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ========== 桌面端 ========== */
@media (min-width: 768px) {
  .home-header h1 { font-size: 30px; }
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
  }
  .timeline-feed, .file-list {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
  }
}
