/* Reset CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 24px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: 1.2;
}

ul,
ol {
  list-style: none;
}

a {
  color: #333;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  outline: none;
  background: transparent;
}

button {
  cursor: pointer;
}

/* 表格重置 */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* 引用重置 */
blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}

/* 代码重置 */
code,
pre {
  font-family: 'Courier New', Courier, monospace;
}

/* 输入框和按钮的焦点样式 */
input:focus,
button:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* 清除浮动 */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* 确保所有元素的基线对齐 */
* {
  vertical-align: baseline;
}
/* ==================== 自定义滚动条 - 更细更淡 ==================== */

/* WebKit 浏览器 (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  border: none;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(0, 0, 0, 0.35);
}

/* 滚动条角落 */
::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox 浏览器 (版本 64+) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* Firefox 悬停效果 - 需要使用 JS 动态修改 */

/* IE 和 Edge (旧版) */
body {
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* IE 滚动条颜色设置 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  * {
    scrollbar-face-color: rgba(0, 0, 0, 0.15);
    scrollbar-track-color: transparent;
    scrollbar-arrow-color: rgba(0, 0, 0, 0.15);
    scrollbar-shadow-color: transparent;
  }
}

/* ==================== 深色主题滚动条 ==================== */

/* WebKit 深色主题 */
.theme-dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.theme-dark ::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.35);
}

/* Firefox 深色主题 */
.theme-dark * {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* IE 深色主题 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .theme-dark * {
    scrollbar-face-color: rgba(255, 255, 255, 0.15);
    scrollbar-track-color: transparent;
    scrollbar-arrow-color: rgba(255, 255, 255, 0.15);
  }
}

/* ==================== 特定元素滚动条 ==================== */

/* 隐藏滚动条但保留滚动功能 */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* 始终显示滚动条 */
.always-show-scrollbar::-webkit-scrollbar {
  opacity: 1;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* Markdown 样式 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 12px 0 8px 0;
  font-weight: 600;
  border-bottom: 1px solid #dee2e6;
  line-height: 1.4;
}

.markdown-body h1 {
  font-size: 1.4em;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 6px;
}

.markdown-body h2 {
  font-size: 1.25em;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 4px;
}

.markdown-body h3 {
  font-size: 1.1em;
}

.markdown-body p {
  margin: 8px 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 8px 0;
  padding-left: 24px;
}

.markdown-body li {
  margin: 4px 0;
}

.markdown-body code {
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.markdown-body pre {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid #e9ecef;
}

.markdown-body pre code {
  background: none;
  padding: 0;
}

.markdown-body blockquote {
  border-left: 4px solid #dee2e6;
  margin: 10px 0;
  padding-left: 16px;
  color: #6c757d;
}

.markdown-body strong {
  font-weight: 600;
}

.markdown-body em {
  font-style: italic;
}

.markdown-body a {
  color: #007bff;
  text-decoration: none;
}

.markdown-body a:hover {
  text-decoration: underline;
}
