/* 3D模型查看器通用样式 */
/* .btn-3d {
  padding: 14px 32px;
  font-size: 15px;
  background: #f5bef5;
  color: rgb(0, 0, 0);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transition: all 0.25s ease;
}
.btn-3d:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
} */

.btn-3d {
  padding: 8px 20px;
  /* 原 14×32 → 8×20，小了一圈 */
  font-size: 14px;
  /* 原 15px → 14px，更精致 */
  background: #c9d6df;
  color: #000000;
  border: none;
  border-radius: 10px;
  /* 圆角也同步缩小一点 */
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  /* 阴影也相应调小 */
  transition: all 0.25s ease;
  font-weight: 500;
  /* 可选：加粗一点更好看 */
}

/* 鼠标悬停时微微上浮，视觉反馈更明显 */
.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-3d:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0, 0.2);
}

/* 弹窗遮罩层 */
#modelPopup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

/* iframe 模型框 */
#modelPopup iframe {
  width: 94vw;
  height: 90vh;
  max-width: 1100px;
  max-height: 820px;
  border: none;
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  background: #fff;
}

/* 右上角关闭按钮 */
#modelPopup .close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 50px;
  height: 50px;
  background: #ff3b30;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* 表格格式设置 */
#Table01 {
  width: 100%;
  table-layout: fixed;
  background-image: url(../images/table-back.jpg);
  background-size: cover;
  border-collapse: collapse;
  margin: 0 auto;
  position: relative;
  /* 为z-index提供上下文 */
}

/* 用容器包裹表格实现滚动 */
.table-container {
  max-height: 800px;
  overflow-y: auto;
  /* 滚动条样式优化（可选） */
  scrollbar-width: thin;
  width: 100%;
  /* 强制容器宽度100% */
}

#Table01 thead {
  position: sticky;
  top: 0;
  z-index: 2;
  /* 核心：设置层级高于tbody内容 */
}


/* 基础单元格样式 */
#Table01 th {
  background: #92c9f0;
  text-align: center;
  padding: 8px;
  border: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  /* 超出隐藏，避免撑宽 */
  text-overflow: ellipsis;
  /* 超出显示省略号 */
}

#Table01 td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  /* 防止文字换行挤压列宽 */
  overflow: hidden;
  /* 超出隐藏，避免撑宽 */
  text-overflow: ellipsis;
  /* 超出显示省略号 */
}

/* 可选：滚动时表头边框不消失 */
#Table01 th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #ddd;
  z-index: 11;
}


#Table01 tr.header,
#Table01 tr:hover {
  /* 表头及鼠标移动过 tr 时添加背景 */
  background-color: #f1f1f1;
}

/* 搜索框 */

#SearchInput {
  position: absolute;
  right: 150px;
  top: 20px;
  z-index: 100;
  /* 提高层级，避免被遮挡 */
  width: 200px;
  height: 38px;
  padding: 0 10px;
}

/* 导出 */
#export {
  position: absolute;
  right: 10px;
  top: 20px;
  z-index: 100;
  /* 提高层级 */
  height: 38px;
  padding: 0 15px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}


/* 点击放大图片 */
.image-cover-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.9);
  transition: opacity ease 0.3s;
  pointer-events: none;
}

.model-shown {
  pointer-events: all;
  opacity: 1;
}

.image-cover-modal-content {
  display: block;
  max-width: 95%;
  max-height: 95%;
}

#image-cover-caption {
  display: block;
  position: absolute;
  width: 100%;
  height: 3rem;
  bottom: 0;
  line-height: 3rem;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.33);
}

@media only screen and (max-width: 45rem) {
  .image-cover-modal-content {
    max-width: 100%;
    max-height: 100%;
  }
}

/* 点击放大图片 */


/* 夜间模式（io-black-mode）：文字白、边框白、背景黑 */
body.io-black-mode #Table01 {
  color: #fdfdfd;
  /* 文字变白 */
  border-color: #d3d2d2;
  /* 外层边框变白 */
}

body.io-black-mode #Table01 thead {
  background-color: #007bff;
  /* 表头背景变黑 */
}

body.io-black-mode #Table01 tbody {
  background-image: url(../images/table-black.png);
}

body.io-black-mode #Table01 th {
  background: #007bff;
  /* 夜间表头单元格背景（深灰更友好） */
  border-color: #d3d2d2;
  /* 表头边框变白 */
}

body.io-black-mode #Table01 td {
  border-color: #d3d2d2;
  /* 内容单元格边框变白 */
}

/* 日间模式（io-grey-mode） */
body.io-grey-mode #Table01 {
  color: #000;
  border-color: #000;
}

body.io-grey-mode #Table01 th {
  background: #92c9f0;
  border-color: #000;
}

body.io-grey-mode #Table01 td {
  border-color: #000;
}

body.io-black-mode #Table01 tr.header,
body.io-black-mode #Table01 tr:hover {
  /* 表头及鼠标移动过 tr 时添加背景 */
  background-color: #0c0c0c;
}

/* 可选：添加颜色过渡动画，切换更丝滑 */
#Table01,
#Table01 th,
#Table01 td,
#Table01 thead,
#Table01 tbody {
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}



/* markdown样式 */


.container-md {
  display: flex;
  height: 90vh;
  max-width: 100%;
  gap: 5px;
  padding: 10px;

}

body.io-grey-mode #left-panel {
  width: 18%;
  background: #080808;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 20px;
  text-overflow: ellipsis;
}

.left-panel {
  width: 18%;
  background: #eae9e9;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 20px;
  text-overflow: ellipsis;
}


body.io-grey-mode #right-panel {
  flex: 1;
  background: #000000;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

.right-panel {
  flex: 1;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

/* 滚动条样式（保留原有） */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
  width: 8px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
  background: #f6f6f6;
  border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
  background: #bbbbbb;
  border-radius: 4px;
  transition: background 0.2s;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

.left-panel,
.right-panel {
  scrollbar-width: thin;
  scrollbar-color: #bbbbbb #f6f6f6;
}

pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: #f6f6f6;
  border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
  background: #bbbbbb;
  border-radius: 4px;
  transition: background 0.2s;
}

pre::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

pre {
  scrollbar-width: thin;
  scrollbar-color: #bbbbbb #f6f6f6;
}

/* 新增：文件切换样式 */
.file-list {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.file-list h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #2c3e50;
}

.file-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin: 5px 0;
  border: none;
  border-radius: 4px;
  background: #f5f5f5;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.file-btn:hover {
  background: #e8f0fe;
  color: #2c82ff;
}

.file-btn.active {
  background: #2c82ff;
  color: #fff;
}

.toc {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin: 10px 0;
  display: flex;
  align-items: center;
}

.toc .level-tag {
  display: inline-block;
  width: 28px;
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-right: 8px;
}

.toc a {
  text-decoration: none;
  color: #555;
  font-size: 14px;
  transition: color 0.2s;
  cursor: pointer;
}

.toc a:hover {
  color: #2c82ff;
}

.toc .level-2 {
  margin-left: 16px;
}

.toc .level-3 {
  margin-left: 32px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #2c3e50;
  margin: 1.5em 0 0.5em;
  font-weight: 600;
}

h1 {
  font-size: 26px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

h5 {
  font-size: 14px;
}

h6 {
  font-size: 12px;
  color: #777;
}

blockquote {
  margin: 1em 0;
  padding: 10px 15px;
  background: #f9f9f9;
  border-left: 4px solid #2c82ff;
  color: #555;
  border-radius: 4px;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
}

blockquote p {
  margin: 0;
}

ul,
ol {
  padding-left: 24px;
  margin: 1em 0;
}

ul li {
  list-style: none;
  position: relative;
}

ol li {
  margin: 5px 0;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  color: #e96900;
  font-size: 0.9em;
}

pre {
  position: relative;
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #666;
}

p {
  margin: 1.2em 0;
}

a {
  color: #2c82ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.error {
  color: #e74c3c;
  padding: 10px;
}

img {
  max-width: 100%;
}

.loading {
  color: #888;
  font-style: italic;
}

/* 响应式：手机屏幕隐藏左侧面板 */
@media (max-width: 768px) {
  .container-md {
    flex-direction: column;
    /* 改为垂直布局 */
    height: auto;
    /* 高度自适应内容 */
    padding: 10px;
    gap: 10px;
  }

  .left-panel,
  body.io-grey-mode #left-panel {
    display: none;
    /* 默认隐藏左侧面板 */
    width: 100%;
    /* 如果后续显示，则占满宽度 */
    height: auto;
    max-height: 70vh;
    /* 可选：限制高度，避免太长 */
  }

  .right-panel,
  body.io-grey-mode #right-panel {
    width: 100%;
    flex: none;
  }

}