/*
Theme Name: CleanBase Dark
Description: A minimal dark-mode WordPress theme.
Version: 1.0
Text Domain: cleanbase-dark
*/

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  background-color: #1e1e1e; /* 主体背景色 */
  color: #e0e0e0;            /* 主体文字颜色 */
}

header {
  background-color: #121212;
  color: #e0e0e0;
  padding: 12px 0; /* 减少上下间距 */
}

header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px; /* 控制元素之间的间距 */
}

header h1 {
  font-size: 1.5rem;
  margin: 0;
}

header p {
  font-size: 0.9rem;
  margin: 0;
  color: #aaaaaa;
}

footer {
  background-color: #121212;
  color: #e0e0e0;
  padding: 12px 0; /* 减少上下间距 */
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  font-size: 0.75rem; /* 设置文字大小 */
}

main {
  background-color: #2a2a2a; /* 与 header/footer 有区别的主体区域 */
  padding: 8px 16px;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

a {
  color: #90caf9;
  text-decoration: none;
}
a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
  text-decoration: none;
}

/* 样式表添加圆角按钮 + 响应式菜单 */
.site-nav {
  margin-top: 4px;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-buttons li a {
  display: inline-block;
  padding: 6px 14px;
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
}

.nav-buttons li a:hover {
  background-color: #333;
}

/* 下拉菜单样式 */
.nav-dropdown {
  display: none;
  width: 100%;
  padding: 8px;
  font-size: 0.9rem;
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
}

/* 移动端切换显示方式 */
@media screen and (max-width: 768px) {
  .nav-buttons {
    display: none;
  }

  .nav-dropdown {
    display: block;
  }
}


/* 文章标题 */
main h1,
main h2 {
  font-size: 1.4rem; /* 原本可能是 2rem 或更大，适当缩小 */
  margin-bottom: 12px;
}

/* 正文内容 */
.post-content,
.page-content {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 元信息（如作者、日期） */
.post-meta,
.post-footer,
.page-nav {
  font-size: 0.8rem;
  color: #aaaaaa;
}

/* 网格容器 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 桌面端每行4个 */
  gap: 6px;
  padding: 8px 0;
}

/* 移动端每行2个 */
@media screen and (max-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 单个文章卡片 */
.post-card {
  background-color: #2a2a2a;
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: scale(1.02);
}

/* 缩略图容器：保持 16:9 比例 */
.thumbnail-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 比例 = 9/16 = 0.5625 */
  overflow: hidden;
}

.thumbnail-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* 特色图片下面的标题样式 */
.post-title {
  font-size: 0.80rem;       /* 更小字体 */
  font-weight: 500;         /* 保持清晰但不厚重 */
  margin: 6px 8px;          /* 减少上下留白 */
  line-height: 1.2;         /* 紧凑行高 */
  text-align: center;
  color: #e0e0e0;
}

/* 分页按钮样式 */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 所有分页按钮统一样式 */
.page-numbers {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px; /* 矩形圆角 */
  background-color: #1a1a1a; /* 与页面统一的暗色背景 */
  color: #e0e0e0;
  border: 1px solid #444;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.page-numbers:hover {
  background-color: #333;
}

/* 当前页高亮 */
.page-numbers.current {
  background-color: #555;
  color: #fff;
  pointer-events: none;
}

/* 省略号样式 */
.page-numbers.dots {
  cursor: default;
  background-color: transparent;
  border: none;
  color: #888;
}

/* 文章详情页样式 */
.single-title {
  font-size: 1rem;
  margin: 8px 0;
  padding-left: 12px;
  text-align: left;
  line-height: 1.3;
  color: #ffffff;
}

/* 相同分类下相关文章随机展示 */
.related-posts-section {
  margin: 32px 0;
  padding: 0 16px;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-left: 8px;
  color: #e0e0e0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.related-item {
  display: block;
  text-decoration: none;
  color: #ffffff;
  background-color: #1a1a1a;
  border-radius: 0; /* 取消圆角*/
  overflow: hidden;
}

.related-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-caption {
  font-size: 0.75rem;
  padding: 6px;
  text-align: center;
  line-height: 1.4;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

.related-item:hover .related-caption {
  color: #90caf9; /* 悬停时变为橙色，可自定义 */
}


/* 相同分类下相关文章随机展示 移动端适配*/
@media screen and (max-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-caption {
    font-size: 0.8rem;
    padding: 6px;
  }
}

/* 文章内自定义按钮样式 */
.custom-button {
  display: inline-block;
  padding: 6px 12px;
  margin: 12px 0; /* 上下间距 */
  background-color: #1a1a1a;
  color: #90caf9;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s ease;
}

.custom-button:hover {
  background-color: #333333;
}

/* 视频在移动端适配 */
@media screen and (max-width: 768px) {
  .post-content video {
    width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 4px;
  }
}

/* 定义文章内容居中显示样式 */
.centered {
  text-align: center;
  margin: 24px 0; /* 控制上下间距 */
}

/* 定义移动端文章内容居中显示样式 */
@media screen and (max-width: 768px) {
  .centered {
    margin: 4px 0;
  }
}

/* 以下尚不知道是啥 */
.post-thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post-meta,
.post-footer {
  font-size: 0.9em;
  color: #aaaaaa;
}

.page-nav {
  margin-top: 20px;
  font-size: 0.9em;
  color: #cccccc;
}

/* ******************************** */

