.timeline {
    position: relative;
    padding-left: 40px;
    margin: 20px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: #ddd;
}

.step {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.number {
    width: 32px;   /* ✅ 确保宽度和高度相等 */
    height: 32px;
    background-color: #673AB7;
    color: white;
    font-weight: bold;
    font-size: 14px;  /* ✅ 字体大小不超出按钮 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 50%; /* ✅ 确保是圆形 */
    margin-right: 15px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;  /* ✅ 避免按钮被压缩 */
}

.content {
    background: white;
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.step:hover .content {
    background-color: #f5f5f5; /* 悬停时变亮 */
    transition: 0.3s;
}

.note {
    padding: 12px;
    margin-top: 12px;
    border-left: 5px solid #673AB7;
    background: #EDE7F6; /* 柔和的紫色 */
    border-radius: 6px;
}
.md-footer {
  display: none;
}
/* 强制还原 <details> 样式为浏览器默认 */
details {
  all: revert !important;
}

/* 如果用了 Material for MkDocs 的 note 样式，也可以清掉 */
details.note,
.admonition.note {
  all: revert !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 1em 0 !important;
}

/* 还原 summary 图标、颜色等 */
details > summary {
  all: revert !important;
  font-weight: normal !important;
  color: inherit !important;
  cursor: pointer !important;
}

.md-main {
    width: 70vw;                /* ✅ 明确宽度比例 */
    margin-left: auto;
    margin-right: 32vw;
}

/* ✅ 页内布局不要限制宽度，允许横向拉伸 */
.md-grid {
  max-width: 100%;
  width: 100%;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* ✅ 右下角固定代码框区域（等比例） */
.code-floating-box {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 24vw;              /* ✅ 更窄 */
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.55rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: monospace;
}

/* ✅ Tab 顶部样式 */
.code-floating-box .tabs {
  display: flex;
  background: #f5f5f5;
}

.code-floating-box .tab-button {
    width: 25%;                        /* ✅ 四等分 */
    display: flex;                     /* ✅ 让按钮内部能居中对齐 */
    justify-content: center;          /* ✅ 水平居中 */
    align-items: center;              /* ✅ 垂直居中（可选） */
    padding: 0.6rem 0;                /* ✅ 去掉左右 padding，防止内容偏移 */
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    font-family: inherit;
    white-space: nowrap;
    position: relative;
}

.code-floating-box .tab-button.active {
  background: #fff;
  border-bottom: 3px solid #1e88e5;
  color: #1e88e5;
}

/* ✅ 每个代码内容区域 */
.code-tab {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  background: #f8f8f8;
  font-size: 0.75rem;
}
.code-tab.active {
  display: block;
}
.code-tab pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ✅ 小屏自动隐藏代码框 */
@media screen and (max-width: 960px) {
  .code-floating-box {
    display: none;
  }
  .md-main {
    margin-right: 0 !important;
  }
}
.md-sidebar--secondary {
  display: none !important;
}
.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  background-color: #1e88e5;
  transition: left 0.3s ease, width 0.3s ease;
}
.code-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.3rem 0.5rem;
}
.copy-button {
  width: 24px;
  height: 24px;
  background: url('/assets/icons/copy-icon.png') center / 18px 18px no-repeat;
  border: none;
}

.copy-button.done {
  background: url('/assets/icons/check-icon.png') center / 18px 18px no-repeat;
}
.details .detail-content,
details > p,
details > details,
details details > p,
details details .detail-content {
  padding-left: 1.5rem;
}
.detail-content > * {
  padding-left: 1rem;
}
.md-logo img {
  height: 2rem !important;            /* 改大一点更清楚 */
  vertical-align: middle !important;  /* 垂直居中 */
  margin-top: 0 !important;           /* 避免偏下 */
  margin-bottom: 0 !important;
  padding: 0 !important;
  display: inline-block;
}