/* 年度归档页面样式 - 2025 */
/* 基于提供的设计建议实现的简洁、美观的年度归档页面 */

/* ===== CSS 变量定义 ===== */
.page-2025 {
  --gap: 20px;
  --radius: 16px;
  --text: #111827;
  --text-secondary: #374151;
  --muted: #6B7280;
  --muted-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --bg-card: #ffffff;
  --bg-hover: #F9FAFB;
  --primary: #3B82F6;
  --primary-light: #EFF6FF;
  --success: #10B981;
  --success-light: #ECFDF5;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .page-2025 {
    --text: #F9FAFB;
    --text-secondary: #E5E7EB;
    --muted: #9CA3AF;
    --muted-light: #6B7280;
    --border: #374151;
    --border-light: #4B5563;
    --bg-card: #1F2937;
    --bg-hover: #374151;
    --primary: #60A5FA;
    --primary-light: #1E3A8A;
    --success: #34D399;
    --success-light: #064E3B;
  }
}

/* ===== 容器与布局 ===== */
.page-2025 .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.page-2025 .layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1200px) {
  .page-2025 .layout {
    display: block;
  }
  
  .page-2025 .wrap {
    padding: 24px 16px;
  }
}

/* ===== 顶部概览条 ===== */
.page-2025 .topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 15px;
}

.page-2025 .topbar strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
}

.page-2025 .actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.page-2025 .action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 16px;
}

.page-2025 .action-link:hover {
  background: var(--border);
  color: var(--text-secondary);
  transform: translateY(-1px);
}

/* ===== 标签 Chips ===== */
.page-2025 .chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.page-2025 .chip {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.page-2025 .chip:hover {
  background: var(--bg-hover);
  border-color: var(--muted);
}

.page-2025 .chip.is-active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

@media (max-width: 768px) {
  .page-2025 .chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  
  .page-2025 .chips::-webkit-scrollbar {
    height: 4px;
  }
  
  .page-2025 .chips::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 2px;
  }
  
  .page-2025 .chips::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 2px;
  }
}

/* ===== 精选文章区 ===== */
.page-2025 .featured {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1.2fr 1fr;
  margin: 16px 0 32px;
}

@media (max-width: 960px) {
  .page-2025 .featured {
    grid-template-columns: 1fr;
  }
}

/* ===== 月份标题 ===== */
.page-2025 .month {
  margin: 32px 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* ===== 文章栅格 ===== */
.page-2025 .grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .page-2025 .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-2025 .grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 文章卡片 ===== */
.page-2025 .post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-card);
  transition: all 0.2s ease;
  height: fit-content;
  position: relative;
  overflow: hidden;
}

.page-2025 .post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.page-2025 .post-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 精选文章卡片 */
.page-2025 .post-card--featured {
  padding: 24px;
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-card) 100%);
}

.page-2025 .post-card--featured .title {
  font-size: clamp(20px, 2.5vw, 26px);
}

/* ===== 缩略图 ===== */
.page-2025 .thumb {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--border-light);
  position: relative;
}

.page-2025 .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-2025 .post-card:hover .thumb img {
  transform: scale(1.05);
}

.page-2025 .thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--border-light) 0%, var(--bg-hover) 100%);
}

.page-2025 .category-icon {
  font-size: 32px;
  opacity: 0.7;
}

/* ===== 文章标题 ===== */
.page-2025 .title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 8px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-2025 .title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-2025 .title a:hover {
  color: var(--primary);
}

.page-2025 .title a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 文章摘要 ===== */
.page-2025 .excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0;
  flex-grow: 1;
}

/* ===== 元信息 ===== */
.page-2025 .meta {
  margin-top: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.page-2025 .meta time {
  color: var(--muted);
}

.page-2025 .badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ===== 徽标 ===== */
.page-2025 .badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-hover);
  white-space: nowrap;
}

.page-2025 .badge--primary {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.page-2025 .badge--outline {
  background: transparent;
  border-color: var(--muted);
  color: var(--muted);
}

/* ===== 页面浏览量样式增强 ===== */
.page-2025 .pageview-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.page-2025 .pageview-count {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== 右侧月份导航 ===== */
.page-2025 .toc-months {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.page-2025 .toc-months h5 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.page-2025 .month-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-2025 .month-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.page-2025 .month-link.is-current {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.page-2025 .month-link .count {
  font-size: 12px;
  color: var(--muted);
  background: var(--border-light);
  padding: 2px 6px;
  border-radius: 10px;
}

.page-2025 .month-link.is-current .count {
  background: var(--primary);
  color: white;
}

@media (max-width: 1200px) {
  .page-2025 .toc-months {
    display: none;
  }
}

/* ===== 隐藏状态（用于筛选） ===== */
.page-2025 .post-card.hidden {
  display: none;
}

.page-2025 .month.hidden {
  display: none;
}

.page-2025 .grid:empty {
  display: none;
}

/* ===== 无结果状态 ===== */
.page-2025 .no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.page-2025 .no-results h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.page-2025 .no-results p {
  font-size: 16px;
  margin: 0;
}

/* ===== 加载状态 ===== */
.page-2025 .loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-2025 .post-card {
  animation: fadeIn 0.4s ease-out;
}

.page-2025 .post-card:nth-child(1) { animation-delay: 0.1s; }
.page-2025 .post-card:nth-child(2) { animation-delay: 0.2s; }
.page-2025 .post-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== 可访问性增强 ===== */
@media (prefers-reduced-motion: reduce) {
  .page-2025 * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .page-2025 {
    --border: #000000;
    --text: #000000;
    --bg-card: #ffffff;
  }
}

/* 焦点可见性增强 */
.page-2025 *:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== 打印样式 ===== */
@media print {
  .page-2025 .toc-months,
  .page-2025 .chips,
  .page-2025 .actions {
    display: none;
  }
  
  .page-2025 .post-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .page-2025 .layout {
    display: block;
  }
  
  .page-2025 .grid {
    grid-template-columns: 1fr;
  }
}
