/*
Theme Name: WeUI主题（紧凑蓝色版）
Theme URI: 
Author: 您的名字
Description: 蓝色配色、紧凑风格、无圆角（强制浅色模式）
Version: 4.1
*/

:root {
  --weui-blue: #1475ff;
  --weui-blue-dark: #0e5fd4;
  --weui-blue-light: #e8f3ff;
  --bg-gray: #f5f5f7;
  --card-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-gray: #666666;
  --text-light: #999999;
  --border-light: #e8e8ec;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-gray) !important;
  font-family:
    'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB',
    'WenQuanYi Micro Hei', sans-serif;
  color: var(--text-dark) !important;
  line-height: 1.5;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1100px;
  }
}

.site-header {
  background: linear-gradient(
    135deg,
    var(--weui-blue) 0%,
    var(--weui-blue-dark) 100%
  ) !important;
  padding: 14px 0;
  position: relative;
  /* overflow: hidden; */
}

.site-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-branding {
  position: relative;
  z-index: 1;
}

.site-title {
  font-size: 40px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

.site-title a {
  color: #ffffff !important;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-title a:hover {
  opacity: 0.9;
}

.site-description {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 4px;
}

.top-nav {
  position: relative;
  z-index: 1;
}

.top-nav .nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.top-nav .nav-menu li {
  margin: 0;
}

.top-nav .nav-menu a {
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff !important;
  padding: 0;
  transition: all 0.2s;
  position: relative;
}

.top-nav .nav-menu a:hover {
  opacity: 0.9;
}

.top-nav .nav-menu .current-menu-item a::after,
.top-nav .nav-menu .current_page_item a::after,
.top-nav .nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    text-align: center;
  }
  .site-branding {
    text-align: center;
  }
  .top-nav .nav-menu {
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
  }
  /* 搜索框在手机端独立一行，更大 */
  .nav-search {
    margin-top: 8px;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .search-form {
    width: 80%;
    max-width: 280px;
  }
  .search-input {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
  }
  .search-input:focus {
    width: 100%;
  }
  .search-submit {
    padding: 8px 14px;
    font-size: 16px;
  }
}

.nav-search {
  position: relative;
  z-index: 1;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-input {
  padding: 7px 14px;
  font-size: 13px;
  border: none;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  border-radius: 30px;
  outline: none;
  width: 150px;
  transition: all 0.3s;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.3) !important;
  width: 170px;
}

.search-submit {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 16px;
  cursor: pointer;
  margin-left: -35px;
  padding: 6px 10px;
  border-radius: 30px;
  transition: all 0.2s;
}

.search-submit:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

@media (max-width: 600px) {
  /* 搜索框容器居中 */
  .nav-search {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .search-form {
    display: flex;
    justify-content: center;
  }
  .search-input {
    width: 180px;
    padding: 8px 14px;
    font-size: 13px;
  }
  .search-input:focus {
    width: 200px;
  }
  .search-submit {
    font-size: 15px;
    margin-left: -38px;
    padding: 7px 10px;
  }
}

/* 以下样式保持不变，继续使用原来的... */

.category-section {
  margin-bottom: 20px;
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-header {
  padding: 8px 0 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.category-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark) !important;
  position: relative;
  padding-left: 10px;
}

.category-header h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: var(--weui-blue);
}

.category-header .more-link {
  font-size: 11px;
  color: var(--weui-blue);
  text-decoration: none;
  padding: 2px 6px;
}

.category-header .more-link:hover {
  background: rgba(20, 117, 255, 0.08);
}

.category-description {
  font-size: 11px;
  color: var(--text-light) !important;
  margin: -2px 0 8px 10px;
  padding-left: 4px;
  border-left: 2px solid var(--border-light);
}

.weui-cells {
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  border-radius: 0 !important;
  background-color: var(--card-white) !important;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.weui-cells:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.weui-cell {
  transition: background 0.2s ease;
  position: relative;
  padding: 12px 16px !important;
  background-color: var(--card-white) !important;
}

.weui-cell::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 0;
  height: 1px;
  background: var(--border-light) !important;
}

.weui-cell:last-child::after {
  display: none;
}

.weui-cell:active {
  background-color: #f5f5f7 !important;
}

/* 桌面端两列 */

@media (min-width: 768px) {
  .weui-cells {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background-color: transparent !important;
    box-shadow: none;
  }
  .weui-cell {
    background-color: var(--card-white) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    padding: 16px 20px !important;
    display: flex;
    /* flex-direction: column; */
    border-radius: 0 !important;
  }
  .weui-cell::after {
    display: none;
  }
  .weui-cell:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  .weui-cell__ft {
    display: none;
  }
  .weui-cell .post-title {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .weui-cell .post-meta {
    font-size: 12px;
    margin-bottom: 6px;
  }
  .weui-cell .post-excerpt {
    -webkit-line-clamp: 3;
    font-size: 13px;
    margin-top: 8px;
    flex: 1;
  }
  .weui-cell .read-tag {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--weui-blue);
    font-weight: 500;
    text-align: right;
  }
}

/* 三列（大屏） */

@media (min-width: 1200px) {
  .weui-cells {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
  }
}

.post-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text-dark) !important;
}

.post-title a {
  color: var(--text-dark) !important;
  text-decoration: none;
}

.post-title a:hover {
  color: var(--weui-blue);
}

.post-meta {
  font-size: 11px;
  color: var(--text-light) !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.post-meta .category {
  color: var(--weui-blue);
}

.post-meta .category,
.article-meta a[rel='category'] {
  color: var(--weui-blue);
  font-weight: 500;
  text-decoration: none;
}

.article-meta a[rel='category']:hover {
  text-decoration: underline;
}

.post-excerpt {
  font-size: 12px;
  color: var(--text-gray) !important;
  line-height: 1.45;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-tag {
  display: none;
}

.article-card {
  background: var(--card-white) !important;
  overflow: hidden;
  margin: 16px 0 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.article-header {
  padding: 20px 20px 0 20px;
}

.article-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text-dark) !important;
}

.article-meta {
  font-size: 12px;
  color: var(--text-light) !important;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light) !important;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-content {
  padding: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: #2c3e50 !important;
}

.article-content p {
  margin-bottom: 1em;
  color: #2c3e50 !important;
}

.article-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 1.2em 0 0.5em;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--weui-blue);
  display: inline-block;
  color: var(--text-dark) !important;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 1em 0 0.4em;
  color: var(--text-dark) !important;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 12px 0;
}

.article-content ul,
.article-content ol {
  margin: 0.6em 0 1em 0;
  padding-left: 1.6em;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ul ul {
  list-style-type: circle;
  margin: 0.2em 0;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content ol ol {
  list-style-type: lower-alpha;
}

.article-content li {
  margin: 0.3em 0;
  line-height: 1.6;
  color: var(--text-dark) !important;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 13px;
  overflow-x: auto;
  display: block;
}

.article-content thead {
  background: #f5f5f5;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border-light);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  color: var(--text-dark) !important;
}

.article-content th {
  font-weight: 600;
  background: rgba(20, 117, 255, 0.05);
}

.article-content tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.article-content hr {
  margin: 1.5em 0;
  border: none;
  height: 1px;
  background: var(--border-light);
}

.article-content blockquote {
  border-left: 3px solid var(--weui-blue);
  padding: 12px 16px;
  margin: 1em 0;
  color: var(--text-gray) !important;
  background: #f8f8fa;
}

.article-content blockquote p {
  margin-bottom: 0.3em;
  color: var(--text-gray) !important;
}

.article-content blockquote cite {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light) !important;
}

.article-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 14px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.45;
  margin: 1em 0;
}

.article-content code {
  background: #f0f0f0;
  padding: 2px 5px;
  font-size: 0.85em;
  font-family: monospace;
  color: #d14 !important;
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: #d4d4d4 !important;
}

.article-content address {
  font-style: normal;
  background: #f5f5f5;
  padding: 8px 12px;
  margin: 1em 0;
  font-size: 13px;
  color: var(--text-dark) !important;
}

.article-content dl {
  margin: 1em 0;
}

.article-content dt {
  font-weight: 600;
  margin-top: 0.6em;
  color: var(--weui-blue-dark);
}

.article-content dd {
  margin-left: 1.5em;
  margin-bottom: 0.3em;
  color: var(--text-dark) !important;
}

.article-content mark {
  background: rgba(20, 117, 255, 0.2);
  padding: 0 2px;
  color: var(--text-dark) !important;
}

.article-content .alignleft {
  float: left;
  margin: 0.3em 1.2em 0.3em 0;
  max-width: 50%;
}

.article-content .alignright {
  float: right;
  margin: 0.3em 0 0.3em 1.2em;
  max-width: 50%;
}

.article-content .aligncenter {
  display: block;
  margin: 0.8em auto;
  text-align: center;
}

.article-content .wp-block-notice,
.article-content .wp-block-warning {
  background: #fff8e7;
  border-left: 3px solid #f5a623;
  padding: 12px 16px;
  margin: 1em 0;
}

.article-content .wp-block-info {
  background: #e8f4fd;
  border-left: 3px solid #1890ff;
  padding: 12px 16px;
  margin: 1em 0;
}

.article-content .wp-block-button__link {
  background: var(--weui-blue);
  color: #fff !important;
  padding: 8px 20px;
  text-decoration: none;
  display: inline-block;
}

.article-content .wp-block-button__link:hover {
  background: var(--weui-blue-dark);
}

.page-links {
  margin: 20px 0 16px;
  padding: 12px 0;
  text-align: center;
  border-top: 1px solid var(--border-light) !important;
  border-bottom: 1px solid var(--border-light) !important;
}

.page-links-label {
  font-size: 12px;
  color: var(--text-light) !important;
  margin-right: 6px;
}

.page-link {
  display: inline-block;
  min-width: 28px;
  padding: 4px 8px;
  margin: 0 2px;
  font-size: 12px;
  font-weight: 500;
  background: #f0f0f0;
  text-decoration: none;
  color: var(--text-dark) !important;
}

.page-link:hover {
  background: rgba(20, 117, 255, 0.1);
  color: var(--weui-blue);
}

.page-links > span:not(.page-links-label) {
  background: var(--weui-blue);
  color: #fff !important;
}

.article-footer {
  padding: 0 20px 20px 20px;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light) !important;
  font-size: 12px;
}

.post-nav a {
  color: var(--weui-blue);
  text-decoration: none;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-nav a:hover {
  text-decoration: underline;
}

/* ===== 返回首页按钮（居中按钮样式） ===== */

.back-home {
  text-align: center;
  margin: 30px 0 20px;
}

.back-home-link {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--weui-blue) 0%,
    var(--weui-blue-dark) 100%
  );
  color: #ffffff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 28px;
  border-radius: 30px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(20, 117, 255, 0.2);
}

.back-home-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 117, 255, 0.3);
  background: linear-gradient(
    135deg,
    var(--weui-blue-dark) 0%,
    var(--weui-blue) 100%
  );
}

.back-home-link:active {
  transform: translateY(0);
}

.single .back-to-home {
  margin-bottom: 12px;
}

.article-content .post-password-form {
  background: var(--card-white) !important;
  padding: 30px 20px;
  text-align: center;
  margin: 30px 0;
}

.article-content .post-password-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--text-dark) !important;
}

.article-content .post-password-form input[type='password'] {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  width: 200px;
  font-size: 13px;
  background: var(--card-white) !important;
  color: var(--text-dark) !important;
}

.article-content .post-password-form input[type='password']:focus {
  border-color: var(--weui-blue);
  outline: none;
}

.article-content .post-password-form input[type='submit'] {
  background: var(--weui-blue);
  color: #fff !important;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 13px;
}

.article-content .post-password-form input[type='submit']:hover {
  background: var(--weui-blue-dark);
}

.article-content .post-password-form::before {
  content: '🔒';
  display: block;
  font-size: 40px;
  margin-bottom: 12px;
}

.comments-area {
  margin-top: 24px;
  background: var(--card-white) !important;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.comments-title {
  font-size: 16px;
  font-weight: 600;
  padding: 16px 20px;
  margin: 0;
  border-bottom: 1px solid var(--border-light) !important;
  color: var(--text-dark) !important;
}

.comments-title span {
  color: var(--weui-blue);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light) !important;
}

.comment:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.comment-author .fn {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark) !important;
}

.comment-author .fn a {
  color: var(--weui-blue);
  text-decoration: none;
}

.comment-metadata {
  font-size: 11px;
  color: var(--text-light) !important;
}

.comment-metadata a {
  color: var(--text-light) !important;
  text-decoration: none;
}

.comment-metadata a:hover {
  color: var(--weui-blue);
}

.comment-content {
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0;
  padding-left: 36px;
  color: var(--text-dark) !important;
}

.comment-content p {
  margin-bottom: 0.5em;
  color: var(--text-dark) !important;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-reply-link {
  display: inline-block;
  font-size: 11px;
  color: var(--weui-blue);
  text-decoration: none;
  margin-top: 6px;
}

.comment-reply-link:hover {
  text-decoration: underline;
}

.children {
  list-style: none;
  margin-top: 16px;
  margin-left: 36px;
  padding-left: 16px;
  border-left: 2px solid var(--border-light);
}

@media (max-width: 600px) {
  .children {
    margin-left: 16px;
    padding-left: 12px;
  }
}

.comment-navigation {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light) !important;
}

.comment-navigation .nav-links {
  display: flex;
  justify-content: space-between;
}

.comment-navigation a {
  color: var(--weui-blue);
  text-decoration: none;
  font-size: 12px;
}

.nocomments {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-light) !important;
  font-size: 13px;
}

.comment-respond {
  padding: 20px;
  background: var(--card-white) !important;
  border-top: 1px solid var(--border-light) !important;
}

.comment-reply-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light) !important;
  color: var(--text-dark) !important;
}

.comment-reply-title small {
  margin-left: 10px;
}

.comment-reply-title small a {
  color: var(--text-light) !important;
  font-size: 12px;
  text-decoration: none;
}

.comment-reply-title small a:hover {
  color: var(--weui-blue);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-form label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-gray) !important;
}

.comment-form .required {
  color: #e74c3c;
  margin-left: 3px;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  font-size: 13px;
  background: var(--card-white) !important;
  color: var(--text-dark) !important;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--weui-blue);
  outline: none;
}

.comment-form textarea {
  min-height: 80px;
  resize: vertical;
}

.comment-form-cookies-consent {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.comment-form-cookies-consent input {
  width: auto;
  margin: 0;
}

.comment-form-cookies-consent label {
  font-weight: normal;
  font-size: 11px;
  color: var(--text-gray) !important;
}

.form-submit {
  margin-top: 4px;
}

.submit {
  background: var(--weui-blue) !important;
  color: #fff !important;
  border: none;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.submit:hover {
  background: var(--weui-blue-dark) !important;
}

.comment-notes {
  font-size: 11px;
  color: var(--text-light) !important;
  margin-bottom: 12px;
}

.logged-in-as {
  font-size: 12px;
  color: var(--text-gray) !important;
  margin-bottom: 12px;
}

.logged-in-as a {
  color: var(--weui-blue);
  text-decoration: none;
}

.commentlist {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.commentlist .comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light) !important;
  background: transparent !important;
}

.commentlist .comment:last-child {
  border-bottom: none;
}

.commentlist .comment-body {
  position: relative;
}

.commentlist .comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.commentlist .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  vertical-align: middle;
}

.commentlist .fn {
  font-weight: 600;
  font-size: 14px;
  font-style: normal;
  color: var(--text-dark) !important;
}

.commentlist .fn a {
  color: var(--weui-blue);
  text-decoration: none;
}

.commentlist .says {
  font-size: 12px;
  color: var(--text-light) !important;
  display: none;
}

.commentlist .comment-meta {
  font-size: 12px;
  color: var(--text-light) !important;
  margin-bottom: 12px;
}

.commentlist .comment-meta a {
  color: var(--text-light) !important;
  text-decoration: none;
}

.commentlist .comment-meta a:hover {
  color: var(--weui-blue);
}

.commentlist p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark) !important;
  margin: 0 0 12px 0;
  padding-left: 42px;
}

.commentlist .reply {
  margin-top: 8px;
  padding-left: 42px;
}

.commentlist .comment-reply-link {
  display: inline-block;
  font-size: 12px;
  color: var(--weui-blue);
  background: rgba(20, 117, 255, 0.08);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.commentlist .comment-reply-link:hover {
  background: rgba(20, 117, 255, 0.15);
}

.commentlist .children {
  list-style: none;
  margin-top: 20px;
  margin-left: 42px;
  padding-left: 20px;
  border-left: 2px solid var(--border-light);
}

@media (max-width: 600px) {
  .commentlist .children {
    margin-left: 20px;
    padding-left: 12px;
  }
  .commentlist p,
  .commentlist .reply {
    padding-left: 0;
  }
}

.category-archive-header {
  background: var(--card-white) !important;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.category-archive-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--text-dark) !important;
}

.category-archive-description {
  font-size: 12px;
  color: var(--text-gray) !important;
  line-height: 1.5;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 16px;
  padding: 8px 0;
}

.pagination a {
  color: var(--weui-blue);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 14px;
  background: rgba(20, 117, 255, 0.08);
}

.pagination a:hover {
  background: rgba(20, 117, 255, 0.15);
}

.site-footer {
  text-align: center;
  padding: 20px 0;
  font-size: 11px;
  color: var(--text-light) !important;
  border-top: 1px solid var(--border-light) !important;
  margin-top: 20px;
  background: var(--card-white) !important;
}

.weui-tips {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light) !important;
  font-size: 13px;
  background: var(--card-white) !important;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--weui-blue);
}

@media (min-width: 768px) {
  .category-section {
    margin-bottom: 24px;
  }
  .post-title {
    font-size: 16px;
  }
  .article-card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }
  .article-title {
    font-size: 28px;
  }
  .article-content {
    font-size: 16px;
  }
  .weui-cell {
    padding: 14px 20px !important;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 12px;
  }
  .article-header {
    padding: 16px 16px 0 16px;
  }
  .article-title {
    font-size: 20px;
  }
  .article-content {
    padding: 16px;
  }
  .article-footer {
    padding: 0 16px 16px 16px;
  }
  .post-nav {
    flex-direction: column;
    gap: 8px;
  }
  .post-nav a {
    max-width: 100%;
    white-space: normal;
  }
  .article-content .alignleft,
  .article-content .alignright {
    float: none;
    display: block;
    margin: 0.8em auto;
    max-width: 100%;
  }
}

.comment-success-message {
  background: rgba(7, 193, 96, 0.1);
  border-left: 4px solid #07c160;
  padding: 15px 20px;
  margin: 20px 0;
  font-size: 14px;
  animation: fadeInUp 0.3s ease-out;
  color: #07c160 !important;
}

.comment-error-message {
  background: rgba(231, 76, 60, 0.1);
  border-left: 4px solid #e74c3c;
  padding: 15px 20px;
  margin: 20px 0;
  font-size: 14px;
  animation: fadeInUp 0.3s ease-out;
  color: #e74c3c !important;
}

.comment-submitting {
  opacity: 0.6;
  pointer-events: none;
}

.comment-submitting .submit {
  background: #ccc !important;
  cursor: not-allowed;
}

.comment-highlight {
  animation: highlightFlash 1.5s ease-out;
}

@keyframes highlightFlash {
  0% {
    background: rgba(7, 193, 96, 0.2);
    transform: scale(1.02);
  }
  100% {
    background: transparent;
    transform: scale(1);
  }
}

.comment-moderation-notice {
  background: #fff8e7;
  border-left: 4px solid #f5a623;
  padding: 15px 20px;
  margin: 20px 0;
  font-size: 13px;
  color: #856404 !important;
}

.submit.loading {
  position: relative;
  color: transparent !important;
}

.submit.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-results .category-archive-title {
  word-break: break-all;
}

.search-results .post-excerpt em {
  background: rgba(20, 117, 255, 0.2);
  font-style: normal;
  font-weight: 500;
  color: var(--text-dark) !important;
}

.edit-post-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edit-post-link a {
  color: var(--weui-blue);
  text-decoration: none;
  background: rgba(20, 117, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  transition: all 0.2s;
}

.edit-post-link a:hover {
  background: rgba(20, 117, 255, 0.2);
  text-decoration: none;
}

.article-excerpt {
  background: #f8f8fa;
  padding: 14px 18px;
  margin: 12px 0 16px 0;
  border-left: 3px solid var(--weui-blue);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-gray) !important;
  border-radius: 0 8px 8px 0;
}

/* ===== 底部用户信息 ===== */

.footer-user-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.footer-user-info .user-name {
  font-size: 13px;
  color: var(--text-gray);
}

.logout-btn {
  display: inline-block;
  background: rgba(20, 117, 255, 0.1);
  color: var(--weui-blue);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(20, 117, 255, 0.2);
}

.footer-copyright {
  text-align: center;
}

@media (max-width: 600px) {
  .footer-user-info {
    gap: 12px;
  }
  .footer-user-info .user-name {
    font-size: 12px;
  }
  .logout-btn {
    font-size: 11px;
    padding: 3px 10px;
  }
}

/* 强制文章列表左对齐（覆盖WeUI默认样式） */

.weui-cell__bd {
  text-align: left !important;
}

.weui-cell__bd .post-title,
.weui-cell__bd .post-meta,
.weui-cell__bd .post-excerpt {
  text-align: left !important;
}

/* 阅读文章标签右对齐 */

.weui-cell__bd .read-tag {
  text-align: right !important;
}

/* 确保整个cell左对齐 */

.weui-cell {
  text-align: left !important;
}

/* ===== 相关文章 ===== */

.related-posts {
  background: var(--card-white);
  margin: 24px 0 0 0;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.related-posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.related-posts-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text-dark);
}

.related-posts-header h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--weui-blue);
  margin-right: 8px;
  vertical-align: middle;
}

.related-more {
  font-size: 13px;
  color: var(--weui-blue);
  text-decoration: none;
}

.related-more:hover {
  text-decoration: underline;
}

.related-posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 768px) {
  .related-posts-list {
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
  }
}

.related-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.2s;
}

.related-post-item:hover {
  color: var(--weui-blue);
}

.related-post-item:last-child {
  border-bottom: none;
}

.related-post-title {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}

.related-post-date {
  font-size: 12px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* ===== 多级分类导航 ===== */

.top-nav .nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
  position: relative;
}

.top-nav .nav-menu > li {
  position: relative;
  margin: 0;
}

.top-nav .nav-menu > li > a {
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff !important;
  padding: 0;
  transition: all 0.2s;
  position: relative;
}

.top-nav .nav-menu > li > a:hover {
  opacity: 0.9;
}

/* 下拉菜单 */

/* ===== 多级分类导航 ===== */

.top-nav .nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
  position: relative;
}

.top-nav .nav-menu > li {
  position: relative;
  margin: 0;
}

.top-nav .nav-menu > li > a {
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff !important;
  padding: 0;
  transition: all 0.2s;
  position: relative;
}

.top-nav .nav-menu > li > a:hover {
  opacity: 0.9;
}

/* ===== 下拉菜单 ===== */

.top-nav .nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 4px 0;
  margin: 0;
  z-index: 9999;
  border-radius: 0;
  /* 方角 */
}

.top-nav .nav-menu .sub-menu .sub-menu {
  left: 100%;
  top: 0;
  /* 顶部对齐，防止偏移 */
}

.top-nav .nav-menu li:hover > .sub-menu {
  display: block;
}

.top-nav .nav-menu .sub-menu li {
  position: relative;
  margin: 0;
}

.top-nav .nav-menu .sub-menu a {
  display: block;
  padding: 6px 16px;
  color: #333 !important;
  text-decoration: none;
  font-size: 13px;
  /* 小字号 */
  font-weight: 400;
  transition: background 0.2s;
  white-space: nowrap;
}

.top-nav .nav-menu .sub-menu a:hover {
  background: #f5f5f5;
  color: var(--weui-blue) !important;
}

/* 有子菜单的箭头 */

.top-nav .nav-menu .menu-item-has-children > a::after {
  content: '▾';
  margin-left: 4px;
  font-size: 10px;
}

.top-nav .nav-menu .sub-menu .menu-item-has-children > a::after {
  content: '▸';
  margin-left: 4px;
  font-size: 10px;
}

/* 移动端适配 */

@media (max-width: 768px) {
  .top-nav .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }
  .top-nav .nav-menu > li {
    position: relative;
  }
  .top-nav .nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
  }
  .top-nav .nav-menu .sub-menu .sub-menu {
    left: 100%;
    top: 0;
    transform: none;
  }
  .top-nav .nav-menu .sub-menu a {
    font-size: 12px;
    padding: 5px 12px;
    white-space: nowrap;
  }
}

/* 有子菜单的箭头 */

.top-nav .nav-menu .menu-item-has-children > a::after {
  content: '▾';
  margin-left: 4px;
  font-size: 12px;
}

.top-nav .nav-menu .sub-menu .menu-item-has-children > a::after {
  content: '▸';
  margin-left: 4px;
  font-size: 12px;
}

/* 移动端适配 */

@media (max-width: 768px) {
  .top-nav .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }
  .top-nav .nav-menu > li {
    position: relative;
  }
  .top-nav .nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
  }
  .top-nav .nav-menu .sub-menu .sub-menu {
    left: 100%;
    top: -8px;
    transform: none;
  }
  .top-nav .nav-menu .sub-menu a {
    font-size: 13px;
    padding: 6px 14px;
    white-space: nowrap;
  }
}

/* ===== 打印样式 ===== */

@media print {
  /* A4尺寸设置 */
  @page {
    size: A4;
    margin: 2cm;
    /* 页码 */
    @bottom-center {
      content: '第 ' counter(page) ' 页 / 共 ' counter(pages) ' 页';
      font-size: 12px;
      color: #999;
    }
  }
  /* 隐藏所有不需要打印的元素 */
  .site-header,
  .site-footer,
  .top-nav,
  .nav-search,
  .back-home,
  .sidebar-related-posts,
  .single-sidebar,
  .article-meta,
  .article-excerpt,
  .post-nav,
  .comments-area,
  .related-posts,
  .edit-post-link,
  .single-layout,
  .comment-respond,
  .comment-list,
  .comments-title,
  .comment-navigation,
  .nocomments {
    display: none !important;
  }
  /* 文章卡片重置 */
  .article-card {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .article-header {
    padding: 0 !important;
    margin-bottom: 20px !important;
  }
  .article-title {
    font-size: 24px !important;
    color: #000 !important;
  }
  .article-content {
    padding: 0 !important;
    font-size: 14px !important;
    color: #000 !important;
  }
  .article-content img {
    max-width: 100% !important;
    height: auto !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .page-links {
    display: block !important;
  }
}
