/* ============================================
导入第三方主题样式
============================================ */
@import "asserts/css/morecho.css";
@import "asserts/css/theme-green.css";
@import "asserts/css/theme-orange.css";
@import "asserts/css/theme-none.css";

/* ============================================
2. 全局基础样式
============================================ */
* {
  scroll-behavior: smooth;
}
body {
  min-width: 320px;
  background-color: #eee;
}
.feather {
  width: 1rem;
  height: 1rem;
}

/* ============================================
3. 侧边栏 (Sidebar)
============================================ */
.sidebar {
  position: fixed;
  width: calc(100% + 20px);
  height: 100%;
  padding-right: 20px;
  padding-bottom: 1rem;
  overflow-y: scroll;
}
.sidebar .card {
  margin-top: 1rem;
}

/* ============================================
4. 控制按钮 (侧边栏开关 & 全屏控制)
============================================ */
.card-sidebar-control,
.card-fullscreen-control {
  position: absolute;
  right: 1rem;
  display: none;
  padding: 1rem;
  text-align: center;
  line-height: 1rem;
  cursor: pointer;}
.card-sidebar-control {
  box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.15) !important;
}
.card-sidebar-control .feather,
.card-fullscreen-control .feather {
  width: 1rem;
  height: 1rem;
}

/* ============================================
5. 响应式: 平板及以上 (≥768px)
============================================ */
@media (min-width: 768px) {
  /* 全屏控制按钮 */
  .card-fullscreen-control {
    top: 1rem;
    display: block;
    width: 3rem;
    height: 3rem;
  }
  .card-fullscreen-control [data-control="off"] {
    display: none;
  }
  body.fullscreen .card-fullscreen-control [data-control="off"] {
    display: unset;
  }
  body.fullscreen .card-fullscreen-control [data-control="on"] {
    display: none;
  }

  /* 侧边栏动画 */
  .sidebar {
    transition: transform 0.3s ease 0s;
  }
  body.fullscreen .sidebar {
    transform: translateY(-100%);
  }

  /* 内容区布局 */
  .content .container > .row {
    justify-content: flex-end;
  }
  .col-content {
    transition: all 0.3s ease 0s;
  }
  body.fullscreen .col-content {
    max-width: 100%;
    flex: 100%;
  }}

/* ============================================
6. 响应式: 桌面端 (≥992px)
============================================ */
@media (min-width: 992px) {
  .content .container > .row {
    justify-content: center;
  }
  .col-content {
    transition: all 0.3s ease 0s;
  }
  body.fullscreen .col-content {
    max-width: 75%;
    flex: 75%;
  }
  .content .container > .row > div:first-child,
  .content .container > .row > div:last-child {
    transition: all 0s ease 0.3s;
  }
  body.fullscreen .content .container > .row > div:first-child,
  body.fullscreen .content .container > .row > div:last-child {
    width: 12.5%;
    flex: 12.5%;
    transition: unset;
  }
}

/* ============================================
7. 响应式: 移动端 (≤767px)
============================================ */
@media (max-width: 767px) {
  /* 侧边栏开关按钮 - 固定在屏幕右上角 */
  .card-sidebar-control {
    display: flex !important;
    position: fixed !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    z-index: 10001 !important;
    width: 3rem !important;
    height: 3rem !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.15) !important;
    cursor: pointer !important;
  }

  /* 隐藏侧边栏内的原始按钮容器 */  .sidebar .card-sidebar-control-container {
    display: none !important;
  }

  /* 主内容区域 - 降低层级 */
  .content {
    position: relative;
    z-index: 1 !important;
  }

  /* 侧边栏 - 收起状态 */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999 !important;
    width: 70%;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease 0s;
  }

  /* 侧边栏 - 展开状态 */
  .sidebar.active {
    transform: translateX(0);
  }

  /* 遮罩层 */
  .sidebar-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998 !important;
    display: none;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
  }
  
  .sidebar.active ~ .sidebar-mask {
    display: block !important;
  }

  /* 侧边栏内容容器 */
  .sidebar > .container {
    height: 100%;
    padding: 0;    overflow-y: auto;
  }

  /* ========== 强制所有列占满宽度 ========== */
  .sidebar .row-nav > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  /* 可选：隐藏控制按钮那一列（已在屏幕右上角独立显示） */
  .sidebar .row-nav > .card-sidebar-control-container {
    display: none !important;
  }

  /* 导航链接样式重置 */
  .sidebar .flex-column.nav-pills .nav-link.active,
  .sidebar .flex-column.nav-pills:hover .nav-link:hover,
  .sidebar.active .flex-column.nav-pills .nav-link.active,
  .sidebar.active .flex-column.nav-pills:hover .nav-link:hover {
    transform: translateX(0);
  }

  /* 按钮图标切换 */
  .card-sidebar-control [data-control="close"] {
    display: none;
  }
  .sidebar.active ~ .card-sidebar-control [data-control="open"] {
    display: none;
  }
  .sidebar.active ~ .card-sidebar-control [data-control="close"] {
    display: unset;
  }
}

/* ============================================
8. 站点元信息 (Site Meta)
============================================ */
.dynamic-hide.active .card {
  box-shadow: none !important;
}
.site-control .title,
.card-site-meta .title,
.card-post-meta .title {
  padding: 0.75rem 0 0 0.75rem;
  font-size: 0.8rem;
  color: #555;
}
.card-post-meta .tags {
  margin: -0.25rem 1rem 0.25rem 1rem;}
.site-meta {
  padding: 10px 20px;
  font-size: 0.9rem;
}
.site-meta > div {
  padding: 0;
}
.site-meta div div:first-child {
  font-weight: 600;
}

/* ============================================
9. 搜索框 (Search)
============================================ */
.search {
  position: relative;
}
.search .form-control,
.search .input-group-text {
  border: unset;
  background-color: unset;
}
.search:after {
  position: absolute;
  bottom: 0;
  left: 3px;
  width: 0;
  height: 1px;
  background-color: #007bff;
  border-radius: 3px;
  content: "";
  transition: all 0.3s ease 0s;
}
.search:hover:after {
  width: calc(100% - 6px);
}
.search.active:after {
  width: calc(100% - 6px);
  height: 3px;
}

/* ============================================
10. 站点控制 (Site Controls)
============================================ */
.site-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;  height: 75px;
  padding: 10px;
  background-color: #fff;
  border-radius: 0.5rem;
}
.site-controls .row a {
  font-weight: 600;
  color: #666;
  cursor: pointer;
}
.site-controls a:hover {
  color: #000;
  text-decoration: none;
}
.site-controls .row > div .feather {
  transition: all 0.2s ease 0s;
}
.site-controls div.active span {
  font-size: 0;
}
.site-controls div.active .feather {
  width: 2rem;
  height: 2rem;
  margin-top: 0.5rem;
}
.site-control > div {
  display: none;
}
.site-control > div.active {
  display: unset;
}

/* ============================================
11. 主题控制 (Theme Control)
============================================ */
.theme-control {
  padding: 1rem;
}
.theme-control div div {
  position: relative;
  width: 2.5rem;
  height: 4rem;
  margin: 1rem auto;
  border: solid 1px rgba(0, 0, 0, 0.2);
  border-radius: 0.25rem;
  cursor: pointer;
}
.theme-control div div:before {
  position: absolute;
  top: 0.5rem;  left: 0.25rem;
  width: 2rem;
  height: 0.25rem;
  background-color: #007bff;
  content: "";
}
.theme-control div div:after {
  position: absolute;
  top: 1rem;
  left: 0.25rem;
  width: 1.75rem;
  height: 0.2rem;
  background-color: #007bff;
  content: "";
}

/* ============================================
12. 音乐播放器 (Music Box)
============================================ */
.card-musicbox {
  padding: 16px;
}
.music-controls .feather {
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
}
.music-controls .play,
.music-controls.paused .pause {
  display: none;
}
.music-controls.paused .play {
  display: unset;
}
.music-controls .progress {
  height: 4px;
  margin-top: 12px;
  transition: all 0.3s ease 0s;
}
.music-controls:hover .progress {
  height: 8px;
  margin-top: 8px;
}
@keyframes spining {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(90deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg); }
  100% { transform: rotate(360deg); }
}.music-controls .loading .feather {
  animation: spining 4s linear infinite;
}

/* ============================================
13. 头像/所有者区域 (Owner)
============================================ */
.owner {
  padding: 15px 30px;
}
.owner img {
  max-width: 100%;
  border-radius: 100%;
}
.owner-name {
  margin: 10px 0;
  font-weight: 600;
  text-align: center;
}

/* ============================================
14. 内容区 (Content)
============================================ */
.content h1.title {
  margin: 3em 0;
  text-align: center;
}
.content > .container > .row,
.content > .container > .row > div {
  height: 0;
}

/* ============================================
15. 文章列表卡片 (Card Post List)
============================================ */
.card-post-list {
  padding: 16px;
  margin-bottom: 24px;
}
.card-post-list a:hover {
  text-decoration: none;
}
.post-subtitle,
.post-content-preview,
.post-meta,
.card-post-list a {
  color: #666;
}
article .post-meta {
  margin-bottom: 1rem;  text-align: center;
}
.post-meta .feather {
  margin-left: 1rem;
}
.post-meta .feather:first-child {
  margin-left: 0;
}
.post-title {
  margin-bottom: 0.3em;
  font-size: 1.3em;
  font-weight: 500;
  color: #333;
}
.post-subtitle {
  margin-bottom: 0.3em;
}
.card-post-list hr {
  margin: 0.5rem 0;
}
.Page-navigation {
  padding: 24px 0;
}

/* ============================================
16. 文章详情 (Article)
============================================ */
article {
  position: relative;
  padding: 1rem;
  font-size: 0.9rem;
}
article * {
  max-width: 100%;
}
article h1,
article h2,
article h3,
article h4,
article h5 {
  position: relative;
  margin-bottom: 1rem;
}
article h1:before,
article h2:before,
article h3:before,
article h4:before,
article h5:before {
  position: absolute;
  left: -1.2rem;  width: 0.2rem;
  height: 100%;
  background-color: #007bff;
  content: "";
}
article h2:before {
  background-color: rgba(0, 123, 255, 0.8);
}
article h3:before {
  background-color: rgba(0, 123, 255, 0.6);
}
article h4:before {
  background-color: rgba(0, 123, 255, 0.4);
}
article h5:before {
  background-color: rgba(0, 123, 255, 0.2);
}
article code.cover {
  color: #555;
  background-color: #555;
  text-shadow: none !important;
  transition: all 0.1s ease 0s;
}
article code.cover:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
article thead,
article tbody {
  width: 100%;
}
article .table-responsive {
  position: relative;
  left: -1rem;
  width: calc(100% + 2rem);
  max-width: unset;
}
article table td:first-child {
  padding-left: 1rem;
}
article table td:last-child {
  padding-right: 1rem;
}
/* 表格滚动条 */
article table::-webkit-scrollbar {
  width: 1rem;
  background-color: transparent;
}
article table::-webkit-scrollbar-thumb {
  border-radius: 0.5rem;
  background-color: #555;}
article table::-webkit-scrollbar-track {
  border-radius: 0.5rem;
  background-color: transparent;
}

/* ============================================
17. 代码高亮 (Highlight.js)
============================================ */
.hljs {
  font-size: 0.8rem;
}
code.hljs {
  border-radius: 0;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  background-color: #21252a;
  word-wrap: normal;
  word-break: keep-all;
}
code.hljs::-webkit-scrollbar {
  width: 1rem;
  background-color: transparent;
}
code.hljs::-webkit-scrollbar-thumb {
  border-radius: 0.5rem;
  background-color: #555;
}
code.hljs::-webkit-scrollbar-track {
  border-radius: 0.5rem;
  background-color: transparent;
}
article pre.hljs {
  position: relative;
  padding: 0;
  border-radius: 0.5rem;
}
article pre.hljs-line-numbered code {
  margin-left: 3em;
}
article pre .hljs-line-number {
  position: absolute;
  width: 3em;
  height: 100%;
  margin-bottom: 0;
  color: #a0a0a0;
  list-style-type: none;
  text-align: right;
  background-color: #272c33;
  border-top-left-radius: 0.5rem;  border-bottom-left-radius: 0.5rem;
}
article pre.hljs.control-bar {
  padding-top: 30px;
}
article pre.hljs.control-bar:before {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 12px;
  height: 12px;
  background: #fc625d;
  border-radius: 50%;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
  content: " ";
}
article code.hljs .copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 18px;
  line-height: 18px;
  cursor: pointer;
}
article pre.control-bar .hljs-line-number {
  height: calc(100% - 30px);
}

/* 图片 alt 说明 */
article .alt {
  position: relative;
  padding-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #777;
  text-align: center;
}
article .alt:after {
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 0.2rem;
  background-color: #ddd;
  border-radius: 0.1rem;
  content: "";
}
.task-list-item.custom-checkbox {
  list-style-type: none;}

/* 引用卡片 (METACARD) */
article blockquote.card-meta {
  position: relative;
  min-height: 8rem;
  padding: 1rem;
  font-size: 0.9rem;
}
article blockquote.card-meta:before {
  display: none;
}
article blockquote.card-meta h1,
article blockquote.card-meta h2,
article blockquote.card-meta h3,
article blockquote.card-meta h4,
article blockquote.card-meta h5 {
  font-size: 1.2em;
}
article blockquote.card-meta h1:before,
article blockquote.card-meta h2:before,
article blockquote.card-meta h3:before,
article blockquote.card-meta h4:before,
article blockquote.card-meta h5:before {
  display: none;
}
article blockquote.card-meta * {
  position: relative;
  z-index: 5;
  text-shadow: 0 0 10px #fff;
}
article blockquote.card-meta img {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  height: 100%;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* ============================================
18. 标签 (Tags)
============================================ */
.tags a,
.tags .tag {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.1rem 0.6rem;
  font-size: 0.6rem;  color: #777;
  text-decoration: none;
  border: 1px solid rgba(120, 120, 120, 0.8);
  border-radius: 1rem;
  cursor: pointer;
}
.tags a > sup,
.tags .tag > sup {
  margin-left: -2px;
  font-weight: 700;
}
.tags a:hover,
.tags .tag:hover,
.tags a:active,
.tags .tag:active {
  color: #000;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.2);
  border-color: #000;
}
#tag_cloud {
  margin: 5rem 0 15px;
}
#tag_cloud a,
#tag_cloud .tag {
  margin-right: 0.4rem;
  padding: 0.2rem 0.9rem;
  font-size: 0.8rem;
  color: #fff;
  background: #f3f5f5;
  border: none;
  transition: all 0.4s ease 0s;
}
#tag_cloud a:hover,
#tag_cloud .tag:hover,
#tag_cloud a:active,
#tag_cloud .tag:active,
#tag_cloud a.focus,
#tag_cloud .tag.focus {
  background-color: #0085a1 !important;
}
#tag_cloud a.focus,
#tag_cloud .tag.focus {
  box-shadow: rgba(0, 0, 0, 0.117647) 0 1px 6px,
              rgba(0, 0, 0, 0.239216) 0 1px 4px;
}
#tag_cloud a.tag-button--all,
#tag_cloud .tag.tag-button--all {
  font-weight: 700;
  color: #0085a1 !important;}
#tag_cloud a.tag-button--all:hover,
#tag_cloud .tag.tag-button--all:hover,
#tag_cloud a.tag-button--all:active,
#tag_cloud .tag.tag-button--all:active,
#tag_cloud a.tag-button--all.focus,
#tag_cloud .tag.tag-button--all.focus {
  background-color: #e4e4e4 !important;
}

/* ============================================
19. 目录 (Table of Contents)
============================================ */
.js-toc-move {
  position: absolute;
  left: 0;
  width: 100%;
  height: 0;
  background-color: #eee;
  transition: all 0.1s ease 0s;
}
.js-toc-move:before {
  position: absolute;
  top: 0;
  left: -3px;
  width: 3px;
  height: 100%;
  background-color: #007bff;
  content: "";
}
.toc {
  padding: 1rem 0.5rem 1rem 0;
  overflow-y: auto;
  font-size: 0.85rem;
}
.toc > .toc-list {
  position: relative;
  overflow: hidden;
}
.toc > .toc-list li {
  padding: 0.25rem 0;
  list-style: none;
}
.toc-list {
  margin: 0;
  padding-left: 10px;
}
a.toc-link {
  height: 100%;
  color: currentColor;}
a.toc-link:hover {
  text-decoration: none;
}
.is-collapsible {
  max-height: 1000px;
  overflow: hidden;
}
.is-collapsed {
  max-height: 0;
}
.is-position-fixed {
  position: fixed !important;
  top: 0;
}