﻿html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
abbr,
acronym,
address,
cite,
code,
del,
dfn,
font,
ins,
kbd,
q,
s,
samp,
small,
strike,
sub,
sup,
tt,
var,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
caption,
tbody,
tfoot,
thead,
figure {
  border: 0;
  font-size: 14px;
  font-style: inherit;
  font-weight: inherit;
  outline: 0;
  padding: 0;
  margin: 0;
  vertical-align: baseline;
}

/* ========== 全站颜色变量（主题系统基础） ========== */
:root {
  --bg:          #f5f5f5;
  --bg-card:     #ffffff;
  --text:        #333333;
  --text-meta:   #666666;
  --border:      #d8d8d8;
  --link:        #008000;
  --link-hover:  #ff8f00;
}

body {
  font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif, "宋体";
  background-color: var(--bg);
}

ul,
li,
ol {
  list-style: none;
  background: transparent;
  margin-bottom: 0;
}

b,
strong {
  font-weight: bold;
}

.btn-success {
  color: #fff;
  background-color: #008000;
  border-color: #398439;
}

.btn-info {
  color: #fff;
  background-color: #337ab7;
  border-color: #46b8da;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:focus {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

a,
button,
input {
  outline: none;
}

img {
  max-width: 100%;
  /* height: auto; */
  vertical-align: top;
  -ms-interpolation-mode: bicubic;
  border: 0;
}

textarea {
  resize: vertical;
}

.alignleft {
  display: inline;
  float: left;
  margin-right: 1.625em;
}

.alignright {
  display: inline;
  float: right;
  margin-left: 1.625em;
}

.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#header {
  position: relative;
}

.header-logo {
  max-height: 50px;
  width: auto;
  margin-right: 20px;
}

.header-logo > a {
  display: block;
  font-size: 24px;
  font-weight: bold;
  position: relative;
  top: -3px;
}

.header-logo > h1 > a {
  font-size: 24px;
  font-weight: bold;
  position: relative;
  top: 1px;  /* 向上移动2像素，可根据需要调整 */
}

.search-box .text {
  float: left;
  width: 250px;
  height: 34px;
  padding: 0 10px 0 18px;
  border: 2px solid #008000;
  border-right: none;
  border-radius: 100px 0 0 100px;
  background: 0 0;
}

.search-box {
  /* margin-left: 20px; */
  line-height: 2;
  position: relative;
}

.search-box .btn-search {
  float: left;
  width: 44px;
  height: 34px;
  border: 2px solid #008000;
  border-left: none;
  border-radius: 0 100px 100px 0;
  background: 0 0;
}

.search-box .btn-search i {
  font-size: 18px;
  display: block;
  width: 18px;
  margin: 0 auto;
  color: #008000;
  -webkit-text-stroke-width: 0.4px;
}


.header-menu {
  position: relative;
  z-index: 20;
  background: #008000;
}

.header-menu ul li {
  font-size: 16px;
  line-height: 50px;
  position: relative;
  z-index: 1;
  float: left;
  height: 47px;
  margin-right: 23px;
  cursor: pointer;
  transition: border-bottom 0.3s;
  border-bottom: 3px solid #008000;
}

.header-menu li.active {
  border-bottom: 3px solid #fff;
}

.header-menu ul li:hover {
  height: 47px;
  border-bottom: 3px solid #fff;
}

.header-menu ul li.right {
  float: right;
}

.header-menu ul li a {
  display: block;
  color: #fff;
}

.inner {
  padding: 20px;
  border-radius: 6px;
  background: var(--bg-card);
}

.inner h1 {
  font-size: 24px;
  font-weight: bold;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
}

.inner h2 {
  font-size: 20px;
  font-weight: bold;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
}

.inner h3 {
  font-size: 18px;
  font-weight: bold;
  padding-bottom: 6px;
}

.inner h4 {
  font-size: 14px;
  font-weight: 550;
  padding-bottom: 3px;
}

.section1 ul {
  overflow: hidden;
}

.section1 ul li {
  width: 100%;
  float: left;
  padding: 14px 1%;
  border-bottom: 1px solid var(--border);
}

.book-img {
  float: left;
  margin-right: 6px;
  border: 1px solid #e6e6e6;
}

.section1 .book-img img {
  max-height: 100px;
  max-width: 80px;
  overflow: hidden;
}

.section2 .book-img img {
  max-height: 100px;
  max-width: 80px;
  overflow: hidden;
}

/* .book-info {
    overflow: hidden;
} */

.book-info h2 a {
  display: block;
  overflow: hidden;
  font-size: 16px;
  line-height: 21px;
  height: 21px;
  margin-top: -3px;
  margin-bottom: 8px;
}

.book-info p {
  font-size: 12px;
  overflow: hidden;
  height: 50px;
  color: var(--text);
}

.book-detail-info p {
  font-size: 14px;
  overflow: hidden;
  height: 24px;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.book-info .type {
  overflow: hidden;
  height: 18px;
  padding: 0 3px;
  text-align: center;
  color: #a6a6a6;
  border-radius: 1px;
}

.book-info .author {
  overflow: hidden;
  height: 20px;
  margin: 1px;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
}

.book-info .author i {
  margin-right: 5px;
}

.section2 {
  overflow: hidden;
}

.section2 div.type {
  width: 25%;
  float: left;
  padding: 0 1% 24px;
}

.section2 .top .book-info h2 a {
  display: block;
  overflow: hidden;
  font-size: 16px;
  line-height: 21px;
  height: 21px;
  margin-top: -3px;
  margin-bottom: 8px;
}

.section2 ul li {
  overflow: hidden;
}

.section2 ul li.top {
  margin-top: 15px;
  padding-bottom: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section2 ul li.btm {
  height: 30px;
  line-height: 30px;
}

.section3 table tr td {
  height: 32px;
  line-height: 40px;
  padding: 2px;
}

#footer {
  background: var(--bg-card);
  padding: 20px 0;
}

.friend-link a,
.friend-link em {
  font-size: 12px;
  display: inline-block;
}

.friend-link a,
.footer-menu ul li a {
  font-size: 12px;
  line-height: 18px;
  margin-right: 16px;
  margin-bottom: 10px;
  color: var(--text);
  display: inline-block;
}

.footer-menu ul li {
  display: inline-block;
}

.footer-menu ul li a {
  color: #666;
}

.friend-link em {
  color: #1a1a1a;
  margin-right: 16px;
}

.copy-right p {
  overflow: hidden;
  line-height: 1.8;
  color: var(--text-meta);
}

.wechat {
  max-width: 150px;
  margin: auto;
}

.book-main {
  overflow: hidden;
}

.book-main .book-img {
  float: left;
  border: none;
}

.book-main .book-info h1 {
  font-size: 28px;
  line-height: 38px;
  font-weight: 800;
  overflow: hidden;
  height: 38px;
  margin-bottom: 8px;
}

.book-main .book-info h1 em {
  font-weight: 400;
  line-height: 38px;
  margin-left: 3px;
}

.tag-box a {
  border: 1px solid #008000;
  display: inline-block;
  padding: 0px 2px;
  text-align: center;
  margin-top: 2px;
  margin-bottom: 2px;
}

.book-main .book-info .total {
  margin-bottom: 5px;
}

.total span {
  font: 16px/18px Arial;
  margin-top: -2px;
  margin-right: 5px;
  color: #1a1a1a;
}

.total em {
  font: 12px/20px PingFangSC-Regular, "-apple-system", Simsun;
}

.total i {
  font-size: 16px;
  margin: -3px 10px 0;
  color: #a6a6a6;
  font-style: normal;
}

.intro {
  /* overflow: hidden;
    height: 72px; */
  /* margin-bottom: 20px; */
  font: 14px/24px PingFangSC-Regular, "-apple-system", Simsun;
}

.green-btn {
  font: 14px/34px PingFangSC-Regular, "-apple-system", Simsun;
  display: inline-block;
  width: 120px;
  height: 34px;
  margin-right: 20px;
  text-align: center;
  vertical-align: middle;
  border-width: 1px;
  border-style: solid;
  color: #fff;
  border-radius: 100px !important;
  background: #008000;
}

.green-btn:hover {
  background: #489f38;
  color: #fff;
}

.book-nav {
  overflow: hidden;
  padding-left: 8px;
}

.book-nav ul li {
  line-height: 48px;
  float: left;
  overflow: hidden;
  height: 47px;
  text-align: center;
}

.book-nav ul li.act {
  margin-bottom: -1px;
  border-bottom: 2px solid #008000;
}

.book-nav ul li a {
  font-size: 18px;
  display: block;
  overflow: hidden;
  padding: 0 20px;
}

.book-catalog {
  overflow: hidden;
}

.book-catalog h3 {
  border-bottom: 1px solid var(--border);
}

.book-catalog ul li {
  float: left;
  width: 33.33%;
  float: left;
  overflow: hidden;
  line-height: 40px;
  height: 40px;
  padding-right: 20px;
  border-bottom: 1px solid var(--border);
}

/* .singe-bg {
    background: #ede7da url(images/bg.png) repeat;
} */

.content article {
  padding: 60px;
  min-height: 600px;
  /* margin-bottom: 24px; */
  margin-top: 24px;
  border: 1px solid var(--border);
  /* background: url(images/basic_bg.edf95.png) repeat; */
}

.single-header {
  position: relative;
  z-index: 5;
  margin-bottom: 20px;
}

.single-header h1 {
  font: 24px/32px PingFangSC-Regular, HelveticaNeue-Light,
    "Helvetica Neue Light", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  height: 32px;
  margin-bottom: 12px;
}

.single-meta span {
  font-family: PingFangSC-Regular, HelveticaNeue-Light, "Helvetica Neue Light",
    "Microsoft YaHei", sans-serif;
  margin-right: 16px;
  color: var(--text-meta);
  font-size: 12px;
}

.entry-content p {
  font-size: 18px;
  line-height: 1.8;
  overflow: hidden;
  margin: 0.8em 0;
  text-indent: 2rem;
}

.nav-single {
  height: 70px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  /* background: url(images/basic_bg.edf95.png) repeat; */
}

.nav-single a {
  text-align: center;
  font: 18px/70px PingFangSC-Regular, HelveticaNeue-Light,
    "Helvetica Neue Light", "Microsoft YaHei", sans-serif;
  width: 30%;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: normal;
  word-spacing: normal;
}

.nav-single a:hover {
  background: #ede9e1;
  background: rgba(0, 0, 0, 0.03);
}

.nav-single a.none {
  cursor: default;
  color: #ccc;
  background: 0 0;
}

.page-nav {
  text-align: center;
  line-height: 28px;
}

.page-nav a,
.page-nav span {
  display: inline-block;
  height: 28px;
  border: 1px solid var(--link);
  padding: 0 10px;
  font-size: 14px;
  color: var(--text);
  margin: 0 1px;
  vertical-align: top;
}

.page-nav .current {
  background: #008000;
  color: #fff;
  text-decoration: none;
  height: 28px;
  line-height: 28px;
  border: 1px solid #008000;
}

.page-content p {
  margin: 0 0 10px;
  line-height: 1.75;
}

.page-content p strong {
  margin: 0 0 10px;
  line-height: 1.75;
}

.page-content h2 {
  font-size: 18px;
  font-weight: bold;
  margin: 20px 0px 15px;
}

.page-content h2:first-child {
  margin: 0px 0px 15px;
}

.page-content h3 {
  font-size: 16px;
  font-weight: bold;
  margin: 20px 0px 15px;
}

.page-content h3:first-child {
  margin: 0px 0px 15px;
}

.page-content a {
  color: #ed5565;
  text-decoration: none;
}

.page-content ul {
  list-style: disc;
  margin-bottom: 1rem;
  margin: 0 0 15px 40px;
}

.page-content ul li {
  list-style: disc;
  color: #31424e;
  font-size: 16px;
  line-height: 1.6;
}

.page-content ol {
  list-style: disc;
  margin-bottom: 1rem;
  margin: 0 0 15px 40px;
}

.page-content ol li {
  list-style: disc;
  color: #31424e;
  font-size: 16px;
  line-height: 1.6;
}

.page-content blockquote {
  border-left: 5px solid #eee;
  margin: 20px;
  padding: 5px 10px;
  clear: both;
}

p.wp-caption-text {
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
}

#header .button {
  position: absolute;
  padding: 10px;
  right: 15px;
  top: 20%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}

.button .menu-toggle {
  width: 18px;
  height: 14px;
  display: block;
  position: relative;
}

.button .menu-toggle span {
  position: absolute;
  top: 50%;
  margin-top: -1px;
  width: 100%;
  height: 2px;
  background-color: #4c5462;
  transition: -webkit-transform 0.14s ease;
  transition: transform 0.14s ease;
  transition: transform 0.14s ease, -webkit-transform 0.14s ease;
}

.button .menu-toggle span:after,
.button .menu-toggle span:before {
  content: "";
  width: 18px;
  height: 2px;
  background-color: #4c5462;
  border-radius: 0px;
  position: absolute;
}

.button .menu-toggle span:before {
  top: -6px;
}

.button .menu-toggle span:after {
  bottom: -6px;
}

.button .menu-toggle span:before {
  transition: top 0.14s ease 0.14s;
}

.button .menu-toggle span:after {
  transition: bottom 0.14s ease 0.14s, -webkit-transform 0.14s ease;
  transition: transform 0.14s ease, bottom 0.14s ease 0.14s;
  transition: transform 0.14s ease, bottom 0.14s ease 0.14s,
    -webkit-transform 0.14s ease;
}

.button.active .menu-toggle span {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  transition: -webkit-transform 0.14s ease 0.14s;
  transition: transform 0.14s ease 0.14s;
  transition: transform 0.14s ease 0.14s, -webkit-transform 0.14s ease 0.14s;
}

.button.active .menu-toggle span:after {
  bottom: 0;
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
  transition: bottom 0.14s ease, -webkit-transform 0.14s ease 0.14s;
  transition: bottom 0.14s ease, transform 0.14s ease 0.14s;
  transition: bottom 0.14s ease, transform 0.14s ease 0.14s,
    -webkit-transform 0.14s ease 0.14s;
}

.button.active .menu-toggle span:before {
  top: 0;
  transition: top 0.14s ease;
}

.collect-btn {
  position: fixed;
  bottom: 500px;
  z-index: 1000;
  font-size: 24px;
  color: red !important;
  background: transparent !important;
  border: none !important;
  opacity: 0.9;
  transition: all 0.3s;
}

.collect-btn.collected {
  color: #ff4444 !important;
}

.collect-btn.collected > .fa {
  display: inline-block;
  animation: heartBeat 0.6s;
}

.collect-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.spinning {
  animation: spin 1s infinite linear;
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.3);
  }

  30% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.15);
  }

  60% {
    transform: scale(1);
  }
}

.error-page {
  text-align: center;
  padding: 100px 20px;
}

.error-code {
  font-size: 150px;
  color: #e74c3c;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.error-title {
  color: #2c3e50;
  margin: 20px 0;
}

.error-content {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.filter {
  padding: 20px;
  border-radius: 6px;
  background: var(--bg-card);
  margin-bottom: 10px;
}

.filter > ul {
  margin-bottom: 6px;
}

.filter > ul > li {
  float: left;
}

.nav > li > a {
  position: relative;
  display: block;
  padding: 5px 8px;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  color: #fff;
  background-color: #008000;
  font-size: 12px;
}

.title {
  font: 24px/32px PingFangSC-Regular, HelveticaNeue-Light,
    "Helvetica Neue Light", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  height: 32px;
  margin-bottom: 12px;
}

.list-inline {
  display: flex;
  flex-wrap: wrap;
}

.list-inline a {
  display: block;
  padding-top: 12px;
  padding-left: 2px;
  text-decoration: none;
  font-size: 16px;
}

.book-img {
  border-radius: 3px;
}

.book-img img {
  border-radius: 3px;
}

.glyphicon {
  padding-right: 5px;
}

.a-login {
  color: #fff;
  background-color: #5cb85c;
}

.a-register {
  color: #fff;
  background-color: #5cb85c;
}

/* 全站通知容器 */
.site-notice {
  width: auto;
}

/* 滚动动画 */
.marquee {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.marquee-content {
  color: orange;
  display: inline-block;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  padding-left: 100%;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.chapter-many {
  float: right;
  padding-top: 8px;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: 15%;
  right: 20px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  color: white;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.3s;
  z-index: 999;
  display: none;
}

.back-to-top:hover {
  background: rgba(0, 0, 0, 0.8);
}

.back-to-top::after {
  content: "↑";
  font-size: 24px;
  line-height: 30px;
}

.reading-controls {
  padding: 10px 0;
}

.entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}


/* ========== 字号控制（同时作用于 .entry-content 和内部的 p） ========== */
html.font-smaller .entry-content,
html.font-smaller .entry-content p {
  font-size: 16px !important;
  line-height: 1.6 !important;
}

html.font-default .entry-content,
html.font-default .entry-content p {
  font-size: 20px !important;
  line-height: 2.2 !important;
}

html.font-bigger .entry-content,
html.font-bigger .entry-content p {
  font-size: 24px !important;
  line-height: 2.4 !important;
}

#chapter-emotion {
  border-top: 1px solid #eee;
}

.emotion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.emotion-list li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* 左对齐 */
  gap: 4px;
  /* emoji 和文字间距，可改小到 2px */
  padding: 8px 8px;
  border: 1px solid #eee;
  border-radius: 6px;
  font-size: 14px;
  background: #fafafa;
  cursor: pointer;
}

.emotion-list li.active {
  border-color: #ff7a18;
  background: #fff3e8;
  color: #ff7a18;
}

.emotion-list li.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.emotion-list em {
  font-style: normal;
  color: #999;
}

.emotion-tip {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.book-detail-chapter-list {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
}


/* ========== 公告中心 ========== */
.announce-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.announce-header {
  margin-bottom: 6px;
  position: relative;
}
.announce-time {
  float: right;
  font-size: 12px;
  color: var(--text-meta);
}
.announce-content {
  color: var(--text-meta);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-top: 4px;
}

/* ========== 全站主题系统 ========== */

/* --- 各主题变量定义 --- */
html.theme-eye {
  --bg:        #f5ede2;
  --bg-card:   #f9f3ea;
  --text:      #4a3e32;
  --text-meta: #7a6c5e;
  --border:    #ddd0c0;
  --link:      #7a5c3a;
  --link-hover:#c07840;
}
html.theme-night {
  --bg:        #18191a;
  --bg-card:   #242526;
  --text:      #d0cdc8;
  --text-meta: #9a9896;
  --border:    #3a3a3a;
  --link:      #7ea8c9;
  --link-hover:#e8a055;
}
html.theme-blue {
  --bg:        #e8edf5;
  --bg-card:   #f0f4fa;
  --text:      #2c3a50;
  --text-meta: #5a6a80;
  --border:    #c8d4e8;
  --link:      #3a6099;
  --link-hover:#1a4070;
}
html.theme-brown {
  --bg:        #1e160e;
  --bg-card:   #261c12;
  --text:      #c8b49a;
  --text-meta: #9a8870;
  --border:    #3a2e22;
  --link:      #c49a6c;
  --link-hover:#e8c090;
}

/* --- 通用结构规则（一次覆盖全部主题） --- */
html[class*="theme-"] body {
  background-color: var(--bg);
  color: var(--text);
}
html[class*="theme-"] #header,
html[class*="theme-"] #footer,
html[class*="theme-"] .site-notice,
html[class*="theme-"] .copy-right {
  background-color: var(--bg) !important;
}
html[class*="theme-"] .inner,
html[class*="theme-"] .filter,
html[class*="theme-"] .book-main,
html[class*="theme-"] .content article,
html[class*="theme-"] .section1 ul li,
html[class*="theme-"] .book-catalog ul li,
html[class*="theme-"] .single-header,
html[class*="theme-"] .nav-single,
html[class*="theme-"] .reading-controls,
html[class*="theme-"] #chapter-emotion,
html[class*="theme-"] #chapter-emotion ul li,
html[class*="theme-"] .empty-list-wrap,
html[class*="theme-"] #toc-drawer,
html[class*="theme-"] #settings-drawer {
  background-color: var(--bg-card) !important;
}
html[class*="theme-"] p,
html[class*="theme-"] span,
html[class*="theme-"] h1,
html[class*="theme-"] h2,
html[class*="theme-"] h3,
html[class*="theme-"] h4,
html[class*="theme-"] li,
html[class*="theme-"] button {
  color: var(--text);
}
html[class*="theme-"] .entry-content,
html[class*="theme-"] .entry-content p {
  color: var(--text) !important;
}
html[class*="theme-"] .single-meta span { color: var(--text-meta); }
html[class*="theme-"] .copy-right p     { color: var(--text-meta); }
html[class*="theme-"] .announce-time    { color: var(--text-meta); }
html[class*="theme-"] .announce-content { color: var(--text); }
html[class*="theme-"] a:not(.btn):not([class*="btn"]):not(:hover) { color: var(--link); }
html[class*="theme-"] a:hover { color: var(--link-hover); }
html[class*="theme-"] .section1 ul li,
html[class*="theme-"] .book-catalog ul li,
html[class*="theme-"] .nav-single,
html[class*="theme-"] .content article,
html[class*="theme-"] .announce-item { border-color: var(--border) !important; }
html[class*="theme-"] .search-box .text,
html[class*="theme-"] .search-box .btn-search { border-color: var(--link); }
html[class*="theme-"] .search-box .btn-search i { color: var(--link); }
html[class*="theme-"] .tag-box a { border-color: var(--link); }
html[class*="theme-"] .table > tbody > tr > td,
html[class*="theme-"] .table > tbody > tr > th { color: var(--text); border-color: var(--border); }
html[class*="theme-"] .nav-pills > li.active > a,
html[class*="theme-"] .nav-pills > li.active > a:hover,
html[class*="theme-"] .nav-pills > li.active > a:focus { background-color: var(--link); color: #fff !important; }
html[class*="theme-"] .btn-success { background-color: var(--link); border-color: var(--link); color: #fff !important; }
html[class*="theme-"] .btn-success:hover,
html[class*="theme-"] .btn-success:focus { background-color: var(--link-hover); border-color: var(--link-hover); color: #fff !important; }
html[class*="theme-"] .nav > li > a { color: var(--text-meta); }
html[class*="theme-"] .inner h1,
html[class*="theme-"] .inner h2 { border-color: var(--border); }
html[class*="theme-"] .page-nav .current {
  background: var(--link);
  border-color: var(--link);
  color: #fff;
}

/* --- 深色主题（夜间/暖棕）特殊元素处理 --- */
/* 所有主题：header-menu 背景跟随主题链接色，文字强制白色（避免 a:color 规则导致背景同色不可见） */
html[class*="theme-"] .header-menu { background: var(--link) !important; }
html[class*="theme-"] .header-menu ul li { border-bottom-color: var(--link) !important; }
html[class*="theme-"] .header-menu ul li:hover,
html[class*="theme-"] .header-menu li.active { border-bottom-color: #fff !important; }
html[class*="theme-"] .header-menu ul li a,
html[class*="theme-"] .header-menu ul li a:hover { color: #fff !important; }
/* 深色主题（夜间/暖棕）用卡片色覆盖上方通用规则 */
html.theme-night .header-menu,
html.theme-brown .header-menu {
  background: var(--bg-card) !important;
}
html.theme-night .header-menu ul li,
html.theme-brown .header-menu ul li {
  border-bottom-color: var(--bg-card) !important;
}
html.theme-night .header-menu ul li:hover,
html.theme-night .header-menu li.active,
html.theme-brown .header-menu ul li:hover,
html.theme-brown .header-menu li.active {
  border-bottom-color: var(--link) !important;
}
html.theme-night .dropdown-menu,
html.theme-brown .dropdown-menu {
  background-color: var(--bg-card);
  border-color: var(--border);
}
html.theme-night .dropdown-menu > li > a,
html.theme-brown .dropdown-menu > li > a { color: var(--text); }
html.theme-night .dropdown-menu > li > a:hover,
html.theme-brown .dropdown-menu > li > a:hover { background-color: var(--border); }
html.theme-night .page-nav .current,
html.theme-brown .page-nav .current {
  background: var(--bg-card);
  border-color: var(--link);
  color: var(--link);
}
html.theme-night .btn-default,
html.theme-brown .btn-default {
  background-color: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
html.theme-night .toc-list li a,
html.theme-brown .toc-list li a { color: var(--text); border-color: var(--border); }
html.theme-night #toc-drawer-header,
html.theme-brown #toc-drawer-header { border-color: var(--border); color: var(--text); }
html.theme-night #toc-close,
html.theme-brown #toc-close { color: var(--text-meta); }

/* ========== 行距辅助类 ========== */
html.lh-compact .entry-content,
html.lh-compact .entry-content p { line-height: 1.6 !important; }

html.lh-loose .entry-content,
html.lh-loose .entry-content p { line-height: 2.6 !important; }

/* ========== 正文宽度辅助类 ========== */
html.width-narrow .entry-content { max-width: 560px; margin-left: auto; margin-right: auto; }
html.width-wide   .entry-content { max-width: 100%; }

/* ========== 主题适配：Bootstrap table-striped & text-muted ========== */
/* Bootstrap table-striped 对奇数行用硬编码 #f9f9f9，主题下统一覆盖 */
html[class*="theme-"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--bg) !important;
}
html[class*="theme-"] .table-striped > tbody > tr:nth-of-type(even) {
  background-color: var(--bg-card) !important;
}
html[class*="theme-"] .table-striped > tbody > tr:hover > td {
  background-color: var(--border) !important;
}
/* Bootstrap .text-muted 用硬编码 #777，主题下跟随变量 */
html[class*="theme-"] .text-muted { color: var(--text-meta) !important; }

