/* 全局变量、自定义样式 */
:root {
  --transition-speed: 0.3s;
  --z-menu: 100;
  --z-sidebar: 40;
  --z-overlay: 35;
  --z-modal: 110;
  --z-floating-btn: 50;
  --z-toc: 45;
  --z-copyright: 25;
  --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition-btn: background-color, border-color, color, fill, stroke;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "sarasa E", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
  margin: 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-bg);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover-bg);
}

/* 标题样式 */
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
  line-height: 1.4;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  scroll-margin-top: 2.5rem;
  font-weight: 500;
  font-family: "LXGW M", "LXGW Marker Gothic", sans-serif;
}
#content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--h1-border-color);
  padding-bottom: 0.2rem;
}
#content h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--h2-border-color);
  padding-bottom: 0.2rem;
}
#content h3 {
  font-size: 1.8rem;
  font-weight: 600;
  padding-left: 1rem;
}
#content h4 {
  font-size: 1.5rem;
  font-weight: 600;
}
#content h5 {
  font-size: 1.25rem;
  font-weight: 600;
}
#content h6 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
@media (max-width: 640px) {
  #content h1 { font-size: 2.2rem; }
  #content h2 { font-size: 1.8rem; }
  #content h3 { font-size: 1.5rem; }
  #content h4 { font-size: 1.3rem; }
  #content h5 { font-size: 1.1rem; }
  #content h6 { font-size: 0.9rem; }

  #content h1,
  #content h2,
  #content h3,
  #content h4,
  #content h5,
  #content h6 {
    margin-top: 1.2em;
    margin-bottom: 0.4em;
  }
  #content p {
    margin-top: 0.7em;
    margin-bottom: 0.7em;
    line-height: 1.5;
  }
  #content h1 {
    border-bottom-width: 2px;
  }
  ::-webkit-scrollbar {
    display: none;
  }
}

/* 动态目录折叠 */
#navigation ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}
#navigation ul ul {
  padding-left: 0.5rem;
}
#navigation li {
  margin: 0;
  padding: 0;
}
#navigation > ul > li {
  margin-bottom: 0.5rem;
}
.category-title {
  font-weight: 600;
  padding: 0.1rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-title:hover {
  background-color: var(--hover-bg-color);
}

.category-icon {
  font-size: 0.75rem;
}
.category-content {
  margin-left: 0.5rem;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}
.category-content.collapsed {
  max-height: 0;
}
.page-link {
  display: block;
  padding: 0.25rem 0.375rem;
  margin: 0;
  border-radius: 4px;
  transition: background-color 0.2s;
  text-decoration: none;
  font-size: 0.875rem;
  color: inherit;
}
.page-link:hover, .page-link.active {
  background-color: var(--hover-bg-color-strong);
  text-decoration: none;
}
.page-link:visited {
  color: inherit;
}

/* 浮动按钮组 - 公共样式 */
#menuToggle,
#searchButton,
#backToTop,
#pageTocToggle {
  position: fixed;
  right: 1rem;
  background-color: var(--primary-color);
  color: var(--btn-primary-text);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  z-index: var(--z-floating-btn);
  transition-property: var(--transition-btn);
  transition-duration: 200ms;
}

#menuToggle:hover,
#searchButton:hover,
#backToTop:hover,
#pageTocToggle:hover {
  background-color: var(--primary-hover-color);
}

/* 移动端菜单按钮 */
#menuToggle {
  bottom: 8rem;
}

/* 搜索按钮 */
#searchButton {
  bottom: 5rem;
}

/* 回到顶部按钮 */
#backToTop {
  bottom: 2rem;
  opacity: 0;
  visibility: hidden;
  transition-property: opacity, visibility, background-color;
  transition-duration: 300ms;
}

/* 页内目录按钮 */
#pageTocToggle {
  bottom: 11rem;
}

/* 桌面端浮动按钮布局 */
@media (min-width: 768px) {
  #menuToggle {
    display: none;
  }
  #searchButton {
    bottom: 6rem;
    width: 3rem;
    height: 3rem;
  }
  #backToTop {
    width: 3rem;
    height: 3rem;
  }
  #pageTocToggle {
    bottom: 10rem;
    width: 3rem;
    height: 3rem;
  }
}

/* 回到顶部、页内目录显隐 */
#backToTop.visible,
#pageToc.visible {
  opacity: 1;
  visibility: visible;
}

/* 页内目录 */
#pageToc {
  position: fixed;
  bottom: 14rem;
  right: 1rem;
  background-color: var(--page-toc-bg);
  box-shadow: var(--shadow-card);
  border-radius: 0.5rem;
  padding: 1rem;
  width: 16rem;
  max-height: 24rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition-property: opacity, visibility, transform;
  transition-duration: 300ms;
  z-index: var(--z-toc);
}

#pageTocList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

/* 页内目录空状态 */
.toc-empty {
  color: var(--page-toc-empty-text);
}

/* 页内目录链接样式 (动态生成) */
#pageToc a {
  display: block;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  text-decoration: none;
}

#pageToc a:hover {
  background-color: var(--hover-bg-color-strong);
}

#pageToc a.active {
  background-color: var(--page-toc-link-active-bg);
  color: var(--page-toc-link-active-text);
  font-weight: 600;
}

/* 版权信息 */
#copyright {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--copyright-bg);
  color: var(--copyright-text);
  text-align: center;
  padding: 0.25rem;
  font-size: 0.75rem;
  z-index: var(--z-copyright);
}

/* 加载状态 & 错误状态 */
.loading-container,
.error-container {
  text-align: center;
  padding: 3rem;
}

.loading-spinner {
  font-size: 2.25rem;
}

.loading-text,
.error-text {
  margin-top: 1rem;
}

.error-icon {
  font-size: 2.25rem;
  color: var(--error-color);
}

/* 搜索结果样式 */
.search-loading,
.search-message {
  text-align: center;
  padding: 2rem;
}

.search-loading-icon {
  font-size: 2.25rem;
}

.search-loading-text,
.search-message-text {
  margin-top: 1rem;
  text-indent: 0;
}

.search-result-count {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--search-count-text);
}

.search-result-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hr-color);
}

.search-result-meta {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.search-result-category {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background-color: var(--search-category-bg);
  color: var(--search-category-text);
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}

.search-result-count-badge {
  font-size: 0.75rem;
  color: var(--search-count-text);
}

.search-result-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.search-result-summary {
  font-size: 0.875rem;
  color: var(--search-summary-text);
}

/* 全文搜索模态框 */
#searchModal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5rem;
}

#searchModalContent {
  background-color: var(--search-modal-content-bg);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 48rem;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#searchModalHeader {
  padding: 1rem;
  border-bottom: 1px solid var(--search-modal-header-border);
  display: flex;
}

#fullTextSearch {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--search-input-border);
  border-radius: 0.375rem;
}

#closeSearchModal {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--search-close-bg);
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
}

#searchResults {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

/* 主内容区 */
#mainContainer {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #mainContainer {
    padding: 2rem;
  }
}

/* 滚动文本 */
#ticker {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background-color: var(--ticker-bg);
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  position: relative;
  white-space: nowrap;
  box-sizing: border-box;
}

.ticker-content {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

/* 页面导航 */
#pageNavigation {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
}

.page-nav-placeholder {
  width: 50%;
}

.prev-page,
.next-page {
  padding: 0.5rem 1rem;
  background-color: var(--page-nav-bg);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--page-nav-text);
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.prev-page {
  gap: 0.5rem;
}

.next-page {
  gap: 0.5rem;
  justify-content: flex-end;
}

.prev-page:hover,
.next-page:hover {
  background-color: var(--page-nav-hover-bg);
  text-decoration: none;
}

/* 注音、黑幕、笔记、标签页等富文本样式 */
ruby {
  position: relative;
  word-spacing: normal;
  line-height: 1.5;
}
rt {
  font-size: 0.9em;
  color: inherit;
  text-align: center;
  line-height: 1;
  margin-left: 0.1em;
}
rp {
  color: transparent;
  font-size: 0.9em;
}
.blackout {
  background-color: var(--text-color);
  color: var(--text-color);
  transition: color 0.3s, background-color 0.3s;
}
.blackout:hover {
  background-color: inherit;
}
.black {
  background-color: var(--text-color);
  color: var(--text-color);
}
.note {
  position: relative;
  border-bottom: 1px dotted var(--note-border-color);
}
.note::after {
  content: attr(data-note);
  position: absolute;
  bottom: 100%;
  left: 0;
  background-color: var(--note-after-bg);
  color: var(--note-after-color);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 100;
  text-indent: 0;
}
.note:hover::after {
  opacity: 1;
  visibility: visible;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.tab-label {
  order: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background-color: var(--tab-label-bg);
  font-weight: bold;
  transition: background-color 0.3s;
  border-radius: 0.5rem 0.5rem 0 0;
}
.tab-label:hover {
  background-color: var(--tab-label-hover-bg);
}
.tab-content {
  order: 99;
  flex-grow: 1;
  width: 100%;
  display: none;
  padding: 1rem;
  border: 1px solid var(--tab-content-border);
  border-radius: 0 0 4px 4px;
}
.tab-input {
  display: none;
}
.tab-input:checked + .tab-label {
  background-color: var(--tab-checked-label-bg);
}
.tab-input:checked + .tab-label + .tab-content {
  display: block;
}

/* 侧边栏 */
#sidebar {
  width: 100%;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  overflow-y: auto;
  transition-property: transform, opacity, visibility;
  transition-duration: 300ms;
}

@media (min-width: 768px) {
  #sidebar {
    width: 16rem;
    position: sticky;
    top: 0;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    background-color: inherit;
  }
  #sidebarOverlay {
    display: none;
  }
}

/* 侧边栏头部 */
#sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--sidebar-header-border);
}

#sidebar-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

#sidebar-title {
  font-size: 1.2rem;
  margin: 0.25rem 0;
}

#titleFilterContainer {
  position: relative;
  margin-bottom: 0.5rem;
}

#titleFilter {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--filter-input-border);
  border-radius: 0.375rem;
  box-sizing: border-box;
  font-size: 0.875rem;
}

#titleFilterContainer i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--filter-icon-color);
  font-size: 0.875rem;
}

/* 导航区域 */
#navigation {
  padding: 1rem;
}

/* 缓存信息 */
#cacheInfo {
  padding: 1rem;
  border-top: 1px solid var(--sidebar-header-border);
  font-size: 0.875rem;
  color: var(--cache-info-color);
}

#cacheStatusRow,
#lastCacheRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

#refreshCache {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.25rem;
  background-color: var(--refresh-cache-bg);
  text-align: center;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  border: none;
  cursor: pointer;
  color: var(--refresh-cache-text);
  transition: background-color 0.2s, color 0.2s;
}

#refreshCache:hover {
  background-color: var(--refresh-cache-hover-bg);
}

/* 移动端侧边栏滑出 */
@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: auto;
    max-height: 70vh;
    border-radius: 0 0 1.5rem 1.5rem;
    box-shadow: 0 10px 25px -5px var(--sidebar-shadow-color);
    z-index: var(--z-sidebar);
    transform: translateY(-100%);
    border-right: none;
  }
  #sidebar.show {
    transform: translateY(0);
  }
  #sidebar-header,
  #navigation,
  #cacheInfo {
    padding-top: 1.25rem;
  }
}

/* 遮罩层 */
#sidebarOverlay {
  position: fixed;
  inset: 0;
  background-color: var(--overlay-bg);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}
#sidebarOverlay.show {
  opacity: 1;
  visibility: visible;
}

/* 侧边栏打开时禁止背景滚动 */
body.sidebar-open {
  overflow: hidden;
}
@media (min-width: 768px) {
  body.sidebar-open {
    overflow: auto;
  }
}

/* 登录模态框 */
#loginModal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
}

#loginModalContent {
  background-color: var(--login-modal-content-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 400px;
  margin: 0 16px;
}

#loginTitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#loginForm div {
  display: flex;
  flex-direction: column;
}

#loginForm label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

#loginForm input {
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--login-input-border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  box-sizing: border-box;
}

#loginError {
  color: var(--error-color);
  font-size: 0.875rem;
  display: none;
}

#loginButton {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--btn-primary-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition-property: var(--transition-btn);
  transition-duration: 200ms;
  font-size: 0.875rem;
  box-sizing: border-box;
}

#loginButton:hover {
  background-color: var(--primary-hover-color);
}

/* 全局链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover-color);
}

a:visited {
  color: var(--primary-color);
}

/* 搜索结果链接 & 页内目录链接 */
.search-result-link,
.toc-link {
  color: inherit;
  text-decoration: none;
}

.search-result-link:hover,
.toc-link:hover {
  text-decoration: underline;
}

/* 按钮基础样式 */
button {
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  outline: none;
}

button:focus {
  outline: 2px solid var(--form-focus-outline);
  outline-offset: 2px;
}

/* 页面容器 */
#pageContainer {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 24px);
}

/*竖排表格*/
.rowtable {
  border-collapse: collapse;
  max-width: 500px;
  font-size: 16px;
}

.rowtable td, .rowtable th {
  border: 1px solid var(--tab-content-border);
  padding: 6px;
  text-align: center;
}

/* 竖排表格第一列背景色 */
.rowtable tr td:first-child,
.rowtable tr th:first-child {
  background-color: var(--table-header-bg);
}

/* 竖排表格其他列背景色 */
.rowtable tr td:not(:first-child),
.rowtable tr th:not(:first-child) {
  background-color: var(--table-bg);
}


/* 代码块 */
pre{
  padding: 16px;
  overflow: auto;
  font-size: 90%;
  line-height: 1.45;
  border-radius: 3px;
  background-color: var(--blockquote-bg);
  border: 1px solid var(--tab-content-border);
}

/* 确保pre内的code标签继承pre的背景颜色 */
pre code {
  background-color: inherit;
  font-family: "sarasa E", "Noto Sans SC", ui-sans-serif, system-ui;
}

/* 段落首行缩进 */
#content p{
  text-indent: 2em;
  margin-top: 0.8em;
  margin-bottom: 0.8em;
  line-height: 1.6;
}
p i {
  text-indent: 0;
}

/* 正文内容字体大小 */
#content {
  font-size: 1.15rem;
}

@media (max-width: 640px) {
  #content {
    font-size: 1rem;
  }
}

/* 退出登录按钮样式 */
#logoutButton {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-border);
  transition-property: background-color, color, border-color;
  transition-duration: 300ms;
}

#logoutButton:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
}

/* 分割线 */
.hr-line {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--hr-color), transparent);
  border: none;
  margin: 2rem 0;
  width: 100%;
  display: block;
  clear: both;
  position: relative;
}

.hr-line::before {
  content: '\f104\f104\f060\f5d2\f061\f105\f105';
  font-family: 'Font Awesome 7 Free';
  font-weight: 900;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--hr-color);
  background-color: var(--bg-color);
}

/* 元素周期表 */
.ptable-container {
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
  max-width: 1111px;
  margin: 0 auto;
}

.ptable{
  font-size: 18px;
  align-items: center;
  white-space: nowrap;
  text-align: center;
  min-width: max-content;
  border-collapse: collapse;
}

.ptable th,
.ptable td {
  width: 60px;
  background-color: var(--table-bg);
  transition: background-color var(--transition-speed);
  box-sizing: border-box;
}

.ptable th:not(:empty),
.ptable td:not(:empty) {
  border: 1px solid var(--table-border-color);
}

.ptable thead tr {
  height: 30px;
}

.ptable thead th:not(:empty) {
  background-color: var(--table-header-bg);
}

.ptable tbody tr {
  height: 60px;
}

.ptable tbody tr:nth-child(8) {
  height: 30px;
}

.ptable th:first-child,
.ptable td:first-child {
  width: 30px;
  font-weight: bold;
}

.ptable th:first-child:not(:empty),
.ptable td:first-child:not(:empty) {
  background-color: var(--table-header-bg);
}

.ptable td:not(:empty) {
  background-color: var(--table-row-even-bg);
}

.ptable td:not(:first-child):not(:empty):hover {
  background-color: var(--table-bg);
}

/* 图片元素周期表 */
.imgtable-container {
  width: 100%;
  overflow: auto;
}

.imgtable {
  flex: 0 0 auto;
  position: relative;
  height: 550px;
  width: 925px;
  background: url('../img/ptable.svg') no-repeat -25px 0 / 975px 550px;
  background-attachment: local;
  margin: 0 auto;
}

.imgelement {
  width: 900px;
  height: 475px;
  position: relative;
  left: 25px;
  top: 50px;
  font-size: 0;
}

.imgelement#laac {
  width: 750px;
  height: 100px;
  left: 150px;
  top: 25px;
}

.imgelement img {
  width: 50px;
  height: 50px;
  position: relative;
  display: inline-block;
}

/* 引用块样式 */
#content blockquote {
  position: relative;
  margin: 1.5em 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--blockquote-border-color, #3b82f6);
  background: linear-gradient(135deg, var(--blockquote-bg, #f8fafc) 0%, var(--blockquote-bg-light, #f1f5f9) 100%);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  color: var(--blockquote-text, #475569);
  quotes: "\201C""\201D""\201C""\201D";
}

#content blockquote::before {
  content: open-quote;
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  font-size: 3rem;
  color: var(--blockquote-quote-color, #cbd5e1);
  line-height: 0.5;
  font-family: "LXGW Marker Gothic", sans-serif;
}

#content blockquote p {
  margin: 0;
  padding-left: 1.5rem;
  text-indent: 0;
}

#content blockquote footer {
  margin-top: 0.75rem;
  padding-left: 1.5rem;
  font-size: 0.875rem;
  color: var(--blockquote-cite, #94a3b8);
  text-align: right;
}

#content blockquote footer::before {
  content: "——";
}

.poem {
  text-align: center;
  white-space: pre-wrap;
  text-indent: 0;
  font-size: 0.9em;
  line-height: 1.2;
  padding: 1rem;
  margin: 0 auto;
  border: 1px dashed var(--poem-border-color, #cbd5e1);
  background: linear-gradient(135deg, var(--poem-bg, #f8fafc) 0%, var(--poem-bg-light, #f1f5f9) 100%);
  color: var(--poem-text-color, #374151);
  max-width: 420px;
}

/* 对话容器 */
.talk-container {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--talk-container-bg, var(--bg-color));
  font-size: 0.9em;
}

/* 选项按钮组 */
.opt-buttons, .sub-opt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* 选项按钮 */
.opt-btn , .sub-opt-btn{
  padding: 0.5rem;
  border: 1px solid var(--opt-btn-border-color, var(--border-color));
  border-radius: 4px;
  background-color: var(--opt-btn-bg, var(--bg-color));
  color: var(--opt-btn-color, var(--text-color));
  cursor: pointer;
  transition: all 0.2s;
}

.opt-btn:hover , .sub-opt-btn:hover {
  background-color: var(--hover-bg-color);
}

.opt-btn.active , .sub-opt-btn.active {
  background-color: var(--opt-btn-active-bg, var(--primary-color));
  color: var(--talk-btn-active-color, white);
  border-color: var(--opt-btn-active-bg, var(--primary-color));
}

/* 选项内容包装器 */
.opt-content-wrapper {
  margin-top: 0.5rem;
}

/* 选项内容 */
.opt-content, .sub-opt-content {
  display: none;
}

.opt-content.active , .sub-opt-content.active {
  display: block;
}

/* 像素动图 */
.pixgif {
  display: block;
  margin: 0 auto;
  height: 150px;
}