/* ================================================
   Tianya Theme - Home Page Styles (Optimized v3)
   ================================================ */

/* === Hero Section === */
.hero-section {
  padding: 32px 0 16px;
  text-align: center;
}

.hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* === Category Tabs === */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.category-tabs a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.category-tabs a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary-light);
}

.category-tabs a.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* === Post Grid (for card layout) === */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

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

/* === Archive List === */
.archive-year {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--color-primary);
}

.archive-list {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.archive-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

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

.archive-item:hover {
  background: var(--color-primary-bg);
}

.archive-item .archive-date {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
  min-width: 70px;
}

.archive-item .archive-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-item:hover .archive-title {
  color: var(--color-primary);
}

/* === Page Content === */
.page-content {
  background: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  padding: 24px;
}

/* === Links Page === */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.link-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.link-card .link-info {
  flex: 1;
  min-width: 0;
}

.link-card .link-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.link-card .link-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-section {
    padding: 20px 0 8px;
  }

  .hero-title {
    font-size: 22px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .archive-item {
    padding: 12px 16px;
  }

  .archive-item .archive-date {
    min-width: 60px;
    font-size: 11px;
  }

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

  .page-content {
    padding: 16px;
  }
}
