* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 浅色模式（默认） */
body {
  background-color: #fff8fb;
  color: #333;
  transition: all 0.3s;
}

/* 深色模式 */
body.dark {
  background-color: #1a1a2e;
  color: #f0f0f0;
}

/* 顶部工具栏 */
.top-toolbar {
  position: fixed;
  top: 10px;
  left: 0;
  width: 100%;
  padding: 0 5%;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.theme-btn, .back-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(120deg, #fa2484, #ff9dbd);
  box-shadow: 0 2px 10px rgba(250, 36, 132, 0.3);
  text-decoration: none;
}

/* 搜索+分类栏 */
.search-category-bar {
  max-width: 800px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.blog-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 8px;
}
.blog-search-input {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 2px 10px rgba(250, 36, 132, 0.15);
  font-size: 14px;
  outline: none;
}
body.dark .blog-search-input {
  background-color: #2a2a4a;
  color: #f0f0f0;
}
.blog-search-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(120deg, #fa2484, #ff9dbd);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* 分类标签 */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-tag {
  padding: 8px 15px;
  border: none;
  border-radius: 50px;
  background-color: #ffd1e3;
  color: #fa2484;
  font-size: 13px;
  cursor: pointer;
}
body.dark .category-tag {
  background-color: #3a3a5a;
  color: #ff9dbd;
}
.category-tag.active, .category-tag:hover {
  background: linear-gradient(120deg, #fa2484, #ff9dbd);
  color: #fff;
}

/* 博客主体 */
.blog-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 5% 40px;
}
.blog-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 3px solid #ffd1e3;
}
body.dark .blog-header {
  border-color: #3a3a5a;
}
.blog-title {
  font-size: 28px;
  color: #fa2484;
  margin-bottom: 15px;
}
body.dark .blog-title {
  color: #ff9dbd;
}
.blog-desc {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 20px;
}

/* 文章列表 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.article-item {
  background-color: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 12px rgba(250, 36, 132, 0.1);
  transition: transform 0.3s;
}
body.dark .article-item {
  background-color: #2a2a4a;
  box-shadow: 0 2px 12px rgba(255, 157, 189, 0.1);
}
.article-item:hover {
  transform: translateY(-5px);
}
.article-title {
  font-size: 22px;
  color: #fa2484;
  margin-bottom: 10px;
}
body.dark .article-title {
  color: #ff9dbd;
}
.article-title a {
  color: inherit;
  text-decoration: none;
}
.article-title a:hover {
  text-decoration: underline;
}
.article-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
}
body.dark .article-meta {
  color: #ccc;
}
.article-excerpt {
  line-height: 1.8;
  margin-bottom: 20px;
}
.article-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(250, 36, 132, 0.2);
}
.read-more {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(120deg, #fa2484, #ff9dbd);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 14px;
  transition: all 0.3s;
}
.read-more:hover {
  transform: scale(1.05);
  background: linear-gradient(120deg, #ff5e9c, #fa2484);
}

/* 无结果提示 */
.result-empty {
  color: #999;
  text-align: center;
  padding: 20px;
}
body.dark .result-empty {
  color: #ccc;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 50px;
  font-size: 14px;
  color: #999;
}
body.dark footer {
  color: #ccc;
}

/* 详情页 */
.article-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.8;
}
.article-detail h1 {
  font-size: 28px;
  color: #fa2484;
  text-align: center;
  margin-bottom: 20px;
}
body.dark .article-detail h1 {
  color: #ff9dbd;
}
.article-detail-meta {
  text-align: center;
  color: #999;
  margin-bottom: 30px;
  font-size: 14px;
}
body.dark .article-detail-meta {
  color: #ccc;
}
.article-detail-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}
.back-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 8px 16px;
  background: linear-gradient(120deg, #fa2484, #ff9dbd);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .article-img {
    height: 180px;
  }
  .