.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

body {
  transition: all 0.3s ease; /* 平滑过渡效果 */
}

/* 日间模式默认样式 */
.page-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}
.page-title {
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.breadcrumb a {
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s;
}
.breadcrumb a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
.breadcrumb span {
  color: #fff;
  opacity: 0.8;
}

.news-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-link {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: 1px solid #e2e8f0;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  color: #4b5563;
  display: inline-block;
  font-size: 0.9rem;
}
.filter-link.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}
.filter-link:hover:not(.active) {
  background-color: #f1f5f9;
}

.news-list-item {
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}
.news-list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
.news-list-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.news-list-content {
  padding: 1rem;
}
.news-list-date {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.news-list-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #1f2937;
}
.news-list-description {
  color: #4b5563;
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 0.9rem;
}
.news-read-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: background-color 0.3s;
  font-size: 0.9rem;
}
.news-read-btn:hover {
  background-color: #2563eb;
}

/* Updated Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination a, 
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem; /* Ensures consistent size */
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background-color: white;
  text-decoration: none;
  color: #4b5563;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}
.pagination a:hover:not(.active) {
  background-color: #f1f5f9;
  transform: translateY(-2px);
}
.pagination a.active { /* Targeting <a> with .active class specifically */
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: default; /* Indicates it's the current page */
}
.pagination span { /* For non-link elements like ellipsis */
  background-color: #f1f5f9;
  color: #6b7280;
  border-color: #e2e8f0;
  cursor: default;
}

/* 夜间模式样式 */
body.night-mode {
  background-color: #1a1a1a; /* 深色背景 */
  color: #e5e7eb; /* 浅灰文字 */
}

body.night-mode .page-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%); /* 夜间渐变调整 */
}

body.night-mode .page-title,
body.night-mode .breadcrumb a,
body.night-mode .breadcrumb span {
  color: #e5e7eb; /* 浅灰文字 */
}

body.night-mode .breadcrumb a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .filter-link {
  background-color: #2d2d2d; /* 深灰背景 */
  color: #d1d5db; /* 浅灰文字 */
  border-color: #4b5563;
}

body.night-mode .filter-link.active {
  background-color: #60a5fa; /* 夜间蓝色 */
  color: #1f2937; /* 深色文字以确保对比度 */
  border-color: #60a5fa;
}

body.night-mode .filter-link:hover:not(.active) {
  background-color: #3f3f3f;
}

body.night-mode .news-list-item {
  background-color: #333333; /* 深灰新闻卡片 */
}

body.night-mode .news-list-date {
  color: #9ca3af; /* 中灰文字 */
}

body.night-mode .news-list-title {
  color: #e5e7eb; /* 浅灰标题 */
}

body.night-mode .news-list-description {
  color: #d1d5db; /* 浅灰文字 */
}

body.night-mode .news-read-btn {
  background-color: #60a5fa; /* 夜间蓝色 */
}

body.night-mode .news-read-btn:hover {
  background-color: #3b82f6;
}

body.night-mode .pagination a,
body.night-mode .pagination span {
  background-color: #2d2d2d; /* 深灰背景 */
  color: #d1d5db; /* 浅灰文字 */
  border-color: #4b5563;
}

body.night-mode .pagination a:hover:not(.active) {
  background-color: #3f3f3f;
}

body.night-mode .pagination a.active {
  background-color: #60a5fa; /* 夜间蓝色 */
  color: #1f2937; /* 深色文字以确保对比度 */
  border-color: #60a5fa;
}

body.night-mode .pagination span {
  background-color: #374151; /* 稍深的灰色 */
  color: #9ca3af; /* 中灰文字 */
}

/* Tablet (min-width: 768px) */
@media (min-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  .breadcrumb {
    font-size: 0.9rem;
  }
  .news-list-item {
    flex-direction: row;
  }
  .news-list-image {
    width: 250px;
    height: 200px;
  }
  .news-list-content {
    padding: 1.5rem;
  }
  .news-list-title {
    font-size: 1.5rem;
  }
  .news-read-btn {
    padding: 0.75rem 1.5rem;
  }
  .pagination a, .pagination span {
    padding: 0.75rem 1.25rem;
  }
}

/* Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
  .page-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }
  .page-title {
    font-size: 2.5rem;
  }
  .news-list-image {
    width: 300px;
    height: 200px;
  }
  .news-filters {
    justify-content: flex-start;
  }
}