/* 基础样式 */
:root {
    --ifm-color-primary: #2e8555;
    --ifm-color-primary-dark: #29784c;
    --ifm-color-primary-darker: #277148;
    --ifm-color-primary-darkest: #205d3b;
    --ifm-color-primary-light: #33925d;
    --ifm-color-primary-lighter: #359962;
    --ifm-color-primary-lightest: #3cad6e;
    --ifm-code-font-size: 95%;
    --ifm-font-family-base: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    --ifm-font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --ifm-heading-font-weight: 600;
    --ifm-navbar-height: 3.75rem;
    --ifm-navbar-padding-horizontal: 1.5rem;
    --ifm-navbar-padding-vertical: 0.5rem;
    --ifm-navbar-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --ifm-toc-border-color: #ebedf0;
    --ifm-footer-background-color: #f9f9f9;
    --ifm-background-color: #ffffff;
    --ifm-background-surface-color: #f2f2f2;
    --ifm-color-content: #1c1e21;
    --ifm-color-content-secondary: #606770;
}

/* 暗黑模式变量 */
[data-theme='dark'] {
    --ifm-color-primary: #25c2a0;
    --ifm-color-primary-dark: #21af90;
    --ifm-color-primary-darker: #1fa588;
    --ifm-color-primary-darkest: #1a8870;
    --ifm-color-primary-light: #29d5b0;
    --ifm-color-primary-lighter: #32d8b4;
    --ifm-color-primary-lightest: #4fddbf;
    --ifm-background-color: #1b1b1d;
    --ifm-background-surface-color: #242526;
    --ifm-toc-border-color: #313131;
    --ifm-color-content: #e3e3e3;
    --ifm-color-content-secondary: #a7a7a7;
    --ifm-footer-background-color: #242526;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--ifm-font-family-base);
    color: var(--ifm-color-content);
    background-color: var(--ifm-background-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--ifm-color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--ifm-color-primary-dark);
    text-decoration: none;
}

ul, ol {
    list-style-position: inside;
    padding-left: 1rem;
}

.loadmore {
 margin:0 auto 10px;
 width:100%;
  display: inline-block; /* 使 div 表现得像行内元素，但可以设置宽高和内外边距 */
  padding: 12px 28px;   /* 内边距，上下12px，左右28px */
  background-color: #2e8555; /* 主题蓝色 */
  color: white;             /* 文字颜色为白色 */
  border: 1px solid #fff; /* 边框颜色与背景一致 */
  border-radius: 15px;      /* 圆角大小，可以调整 */
  cursor: pointer;          /* 鼠标悬停时显示手型光标 */
  font-size: 16px;          /* 字体大小 */
  font-weight: bold;        /* 字体加粗 */
  text-align: center;       /* 文字居中 */
  text-decoration: none;    /* 去除可能的下划线（如果用a标签） */
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.1s ease; /* 过渡效果 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 轻微的阴影增加立体感 */
  user-select: none; /* 防止双击选中文字 */
}

.loadmore:hover {
  background-color: #2e8555; /* 鼠标悬停时变暗 */
  border-color: #0056b3;
}
/* 导航栏样式 */
.navbar {
    height: var(--ifm-navbar-height);
    padding: var(--ifm-navbar-padding-vertical) 1rem;
    background-color: var(--ifm-background-color);
    box-shadow: var(--ifm-navbar-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar__items {
    display: flex;
    align-items: center;
}

.navbar__items--right {
    justify-content: flex-end;
}

.navbar__brand {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    color: var(--ifm-color-content);
    font-weight: 600;
}

.navbar__logo {
    height: 2rem;
    margin-right: 0.5rem;
}

.navbar__logo img {
    height: 100%;
}

.navbar__title {
    font-size: 1.2rem;
}

.navbar__toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--ifm-color-content);
    cursor: pointer;
    margin-right: 0.5rem;
    z-index: 1001;
}

/* 移动端样式 */
@media screen and (max-width: 996px) {
    .navbar__toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: var(--ifm-navbar-height);
        left: -300px;
        width: 300px;
        height: calc(100vh - var(--ifm-navbar-height));
        background-color: var(--ifm-background-color);
        box-shadow: var(--ifm-navbar-shadow);
        transition: left 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    .sidebar.show {
        left: 0;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: var(--ifm-navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.15);
        z-index: 89;
        pointer-events: none;
    }
    
    /* 暗黑主题下的遮罩层样式 */
    html[data-theme='dark'] .mobile-overlay {
        background-color: rgba(0, 0, 0, 0.3);
    }

    .mobile-overlay.show {
        display: block;
    }
}

.navbar__link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--ifm-color-content);
    font-weight: 500;
    position: relative;
}

.navbar__link--active {
    color: var(--ifm-color-primary);
}

.navbar__link--active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--ifm-color-primary);
}

.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--ifm-color-content-secondary);
    transition: all 0.2s;
}

.search-button:hover {
    color: var(--ifm-color-primary);
    border-color: var(--ifm-color-primary);
    background-color: rgba(46, 133, 85, 0.05);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--ifm-color-content);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.1rem;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown__menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 10rem;
    background-color: var(--ifm-background-color);
    border-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.dropdown--hoverable:hover .dropdown__menu {
    display: block;
}

.dropdown__link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--ifm-color-content);
}

.dropdown__link:hover {
    background-color: var(--ifm-background-surface-color);
}

/* =================================== */
/* MOBILE LIST STYLES (.main-wrapper-list-m) */
/* =================================== */

.main-wrapper-list-m {
    display: none; /* Hidden by default, shown via media query */
    width: 100%;
    max-width: 1400px; /* Consistent with .main-wrapper if it were visible */
    margin: 0 auto;    /* Center the container */
    padding: 0 var(--ifm-navbar-padding-horizontal); /* Horizontal padding from theme */
    box-sizing: border-box;
}

.mobile-list {
    list-style: none;
    padding: 0; /* Vertical padding for the list itself */
    margin: 0;
}

/* .mobile-list-item doesn't need specific styles if link handles it */

.mobile-list-item-link {
    display: flex;
    align-items: flex-start; /* Align items to the top for better look with multi-line titles */
    text-decoration: none;
    color: var(--ifm-color-content); /* Inherit text color from theme */
    padding: 0.75rem 0; /* Vertical padding for the link, horizontal handled by image margin & content padding */
    border-bottom: 1px solid var(--ifm-toc-border-color);
    transition: opacity 0.2s ease-in-out; /* Subtle hover effect */
}

.mobile-list-item-link:hover {
    opacity: 0.85; /* Example hover effect, adjust as needed */
}

.mobile-list-item:last-child .mobile-list-item-link {
    border-bottom: none; /* Remove border from the last item */
}

.mobile-list-image {
    width: 70px;  /* Slightly larger image */
    height: 70px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 6px; /* Slightly more rounded */
    flex-shrink: 0; /* Prevent image from shrinking */
    margin-top: 0.25rem; /* Small top margin to align better if content wraps */
}

.mobile-list-content {
    flex-grow: 1; /* Allow content to take remaining space */
    background-color: var(--ifm-background-surface-color); /* Background color */
    border: 1px solid var(--ifm-toc-border-color);       /* Border */
    border-radius: 8px;                                 /* Rounded corners */
    padding: 0.75rem 1rem;                              /* Internal padding */
}

.mobile-list-title {
    font-size: 1.05rem; /* Slightly larger title */
    font-weight: 600;
    margin: 0 0 0.4rem 0; /* Adjusted margin */
    line-height: 1.3;
    /* color: var(--ifm-color-primary); /* Optional: if you want titles to be in primary color */
}

.mobile-list-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem; /* Slightly smaller meta */
    color: var(--ifm-color-content-secondary);
}

.mobile-list-meta .fas.fa-clock { /* Target Font Awesome icon */
    margin-right: 0.4rem;
    font-size: 0.75rem; /* Adjust icon size if needed */
}


/* =================================== */
/* MEDIA QUERIES FOR MOBILE DISPLAY    */
/* =================================== */

@media screen and (max-width: 996px) {
    .main-wrapper-list-m {
        display: block; /* Show the mobile list */
    }


    /* Optional: Adjust navbar padding on mobile if needed for the list */
    .navbar__inner {
        /* If you want more space below navbar for the list */
        /* padding-bottom: 0.5rem; */
    }
}

/* HOMEPAGE STYLES - REVISED */
:root {
    /* Define these for the logo background, can be overridden by dark theme */
    --logo-bg-start: #e9e9e9;
    --logo-bg-end: #d0d0d0;
}

[data-theme='dark'] {
    --logo-bg-start: #4a4a4a;
    --logo-bg-end: #303030;
}

/* HOMEPAGE STYLES - REVISED FOR WIDTH & SPACING */
:root {
    --logo-bg-start: #e9e9e9;
    --logo-bg-end: #d0d0d0;
}

[data-theme='dark'] {
    --logo-bg-start: #4a4a4a;
    --logo-bg-end: #303030;
}

/* --- MODIFIED: Align with .main-wrapper --- */
.main-wrapper-home {
    width: 100%;
    max-width: 1200px; /* <<< MATCHES .main-wrapper */
    margin: 0 auto;     /* <<< MATCHES .main-wrapper for centering */
    padding: 0;         /* Keep padding 0, let home-content-container handle it */
    overflow-x: hidden;
}

.home-content-container {
    /* max-width: 1100px;  << This can be removed if .main-wrapper-home dictates the outer width */
    /* We can let it be 100% of its parent (.main-wrapper-home) and use padding for content spacing */
    width: 100%;
    padding: 1.5rem 1rem; /* Reduced top/bottom padding slightly */
}

/* Hero Section */
.home-hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem; /* <<< REDUCED spacing */
    padding: 1rem 0;      /* <<< REDUCED vertical padding within section */
    min-height: auto;     /* Allow height to be more natural */
}

.home-hero-text {
    flex-basis: 60%;
    padding-right: 2rem;
}

.home-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem; /* <<< REDUCED spacing */
    background: linear-gradient(to right, var(--ifm-color-primary), #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.home-subtitle {
    font-size: 1.4rem;
    color: var(--ifm-color-content-secondary);
    margin-bottom: 1rem; /* <<< REDUCED spacing */
}

.home-hero-logo {
    flex-basis: 40%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.pokei-main-logo {
    width: 150px;
    height: 150px;
    max-width: 100%;
    display: block;
}

.pokei-main-logo text {
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        filter: url(#glow) brightness(1);
        text-shadow: 0 0 3px rgba(0, 123, 255, 0.3), 0 0 6px rgba(255, 65, 108, 0.3);
    }
    100% {
        filter: url(#glow) brightness(1.15);
        text-shadow: 0 0 6px rgba(0, 123, 255, 0.5), 0 0 12px rgba(255, 65, 108, 0.5);
    }
}

/* Action Links Section */
.home-action-links-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem; /* <<< REDUCED spacing */
    flex-wrap: wrap;
    justify-content: flex-start;
}

.home-action-link {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--ifm-color-primary-light);
    border-radius: 20px;
    color: var(--ifm-color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.home-action-link:hover {
    background-color: var(--ifm-color-primary-lightest);
    color: var(--ifm-background-color);
    border-color: var(--ifm-color-primary);
}

[data-theme='dark'] .home-action-link:hover {
    color: var(--ifm-color-content);
}

/* Features Section */
.home-features-section {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem; /* <<< REDUCED spacing */
}

.home-feature-block {
    flex: 1 1 30%;
    min-width: 250px;
    background-color: var(--ifm-background-surface-color);
    padding: 1.2rem; /* Slightly reduced padding */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
[data-theme='dark'] .home-feature-block {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

.home-feature-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
[data-theme='dark'] .home-feature-block:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.home-feature-block h3 {
    font-size: 1.25rem;
    color: var(--ifm-color-primary);
    margin-top: 0;
    margin-bottom: 0.5rem; /* <<< REDUCED spacing */
}

.home-feature-block p {
    font-size: 0.95rem;
    color: var(--ifm-color-content-secondary);
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .home-content-container {
        padding: 1rem; /* Consistent padding for mobile */
    }

    .home-hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 0.5rem; /* <<< REDUCED */
        margin-bottom: 1rem; /* <<< REDUCED */
    }

    .home-hero-logo {
        order: 1;
        margin-bottom: 1rem; /* <<< REDUCED */
        flex-basis: auto;
        justify-content: center;
        width: 100%;
    }
    .pokei-main-logo {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .home-hero-text {
        order: 2;
        flex-basis: auto;
        padding-right: 0;
        width: 100%;
    }

    .home-title {
        font-size: 2.2rem;
        margin-bottom: 0.25rem; /* <<< REDUCED */
    }

    .home-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem; /* <<< REDUCED */
    }
    
    .home-action-links-section {
        justify-content: center;
        gap: 0.8rem;
        margin-bottom: 1.5rem; /* <<< REDUCED */
    }
    .home-action-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        flex-grow: 0;
    }

    .home-features-section {
        flex-direction: column;
        gap: 1rem; /* <<< REDUCED gap */
        margin-bottom: 0.5rem; /* <<< REDUCED */
    }

    .home-feature-block {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
        margin-bottom: 0;
        padding: 1rem; /* Consistent padding */
    }
     .home-feature-block h3 {
        margin-bottom: 0.25rem; /* <<< REDUCED */
    }
}

/* SEAL-DICE STYLE HERO SECTION - THEME ALIGNED */
/* SEAL-DICE STYLE HERO SECTION - 绿色主题，带绿色 LOGO 光晕 - 强化光晕显示 */
.seal-style-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
    min-height: auto;
    position: relative;
    overflow: hidden; /* 限制光晕溢出 */
}

.seal-hero-text-content {
    flex: 1 1 55%;
    max-width: 600px;
    z-index: 2; /* 文本在最上层 */
}

.seal-hero-title {
    font-size: 5.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--ifm-color-primary-dark) 0%, var(--ifm-color-primary-lightest) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.seal-hero-subtitle {
    font-size: 1.1rem;
    color: var(--ifm-color-content-secondary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.seal-hero-subtitle .icon-sparkle {
    font-size: 1.3rem;
    margin-right: 0.5rem;
    color: #FFD700;
}

.seal-hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.seal-action-button {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    border: 2px solid transparent;
    font-size: 0.85rem;
}

.seal-action-button.primary {
    background-color: var(--ifm-color-primary);
    color: var(--ifm-button-color);
}

.seal-action-button.primary:hover {
    background-color: var(--ifm-color-primary-dark);
}

.seal-action-button:not(.primary) {
    background-color: var(--ifm-background-surface-color);
    color: var(--ifm-color-content);
    border: 2px solid var(--ifm-toc-border-color);
}

.seal-action-button:not(.primary):hover {
    border-color: var(--ifm-color-primary);
    background-color: var(--ifm-hover-overlay);
}

.seal-hero-image-wrapper {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* 必须有，为 ::before 的 z-index 和绝对定位创建上下文 */
    min-height: 250px;
    z-index: 1; /* 确保 wrapper 本身有一个明确的层叠顺序 */
                /* 如果 ::before 用 z-index: -1; 它会在这个 wrapper 的背景之下，但在 wrapper 的父元素的背景之上 */
}

/* LOGO 周围的光晕/辉光效果 - 绿色 */
.seal-hero-image-wrapper::before {
    content: ""; /* 必须 */
    display: block; /* 确保它是一个块级元素，可以设置宽高 */
    position: absolute; /* 相对于 .seal-hero-image-wrapper 定位 */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* 精确居中 */
    width: 280%;
    padding-bottom: 280%; /* 使用 padding-bottom 技巧创建与宽度相同的“高度”，形成圆形 */
    border-radius: 50%;

    /* --- 初始测试：使用硬编码的绿色 RGB 值 --- */
    /* 将 46, 133, 85 替换为您主绿色的实际 RGB 值 */
    background-image: radial-gradient(
        circle,
        rgba(46, 133, 85, 0.25) 0%,  /* 中心较浓 */
        rgba(46, 133, 85, 0.15) 20%,
        rgba(46, 133, 85, 0.08) 40%,
        rgba(46, 133, 85, 0.02) 65%, /* 边缘很淡 */
        transparent 80%             /* 完全透明淡出 */
    );
    /* 如果上述仍然不显示，可以尝试一个更简单的纯色背景进行极端测试： */
    /* background-color: rgba(46, 133, 85, 0.5) !important; */

    filter: blur(70px); /* 模糊效果 */
    z-index: -1;  /* 将光晕置于其父元素 (.seal-hero-image-wrapper) 的 *内容* 之后，但在父元素的 *背景* 之上 */
                  /* 如果父元素有背景色，光晕会在父元素背景色和父元素内容(图片)之间 */
    opacity: 1;   /* 通过 RGBA 的 alpha 控制透明度，这里保持整体不透明 */
    pointer-events: none; /* 确保光晕不会干扰对 LOGO 的鼠标操作 */
    transition: background-image 0.3s ease-in-out;
}

[data-theme="dark"] .seal-hero-image-wrapper::before {
    /* --- 初始测试：使用硬编码的暗黑模式绿色 RGB 值 --- */
    /* 将 60, 173, 110 替换为您暗黑模式主绿色的实际 RGB 值 */
    background-image: radial-gradient(
        circle,
        rgba(60, 173, 110, 0.30) 0%,
        rgba(60, 173, 110, 0.20) 20%,
        rgba(60, 173, 110, 0.10) 40%,
        rgba(60, 173, 110, 0.03) 65%,
        transparent 80%
    );
    /* background-color: rgba(60, 173, 110, 0.5) !important; */ /* 极端测试 */
    filter: blur(80px);
}

.seal-hero-logo-actual { /* PNG LOGO */
    display: block; /* 移除图片下可能存在的额外空间 */
    width: 200px;
    height: auto;
    max-width: 70%;
    position: relative; /* 确保 LOGO 在光晕之上 */
    z-index: 1; /* 比 ::before 的 z-index (如果是0或未设置) 更高。如果 ::before 是 -1，则这里是 0 或 1 都可以 */
}

/* 响应式设计 - 重点优化移动端 LOGO 空间 */
@media (max-width: 996px) {
    .seal-style-hero { flex-direction: column; text-align: center; padding: 1.5rem 1rem; gap: 1rem; }
    .seal-hero-text-content { order: 2; max-width: 100%; margin-top: 0.5rem; }
    .seal-hero-image-wrapper { order: 1; margin-bottom: 0; width: 100%; min-height: auto; padding-top: 1rem; padding-bottom: 0.5rem; }
    .seal-hero-image-wrapper::before { width: 200%; padding-bottom: 200%; filter: blur(35px); }
    .seal-hero-logo-actual { width: 120px; max-width: 50%; }
    .seal-hero-title { font-size: 2.0rem; margin-bottom: 0.4rem; }
    .seal-hero-subtitle { font-size: 0.95rem; margin-bottom: 1rem; }
    .seal-hero-actions { justify-content: center; }
}

@media (max-width: 768px) {
    .seal-style-hero { padding: 1rem 0.75rem; }
    .seal-hero-image-wrapper { min-height: auto; padding-top: 0.5rem; }
    .seal-hero-image-wrapper::before { width: 180%; padding-bottom: 180%; filter: blur(30px); }
    .seal-hero-logo-actual { width: 100px; max-width: 45%; }
    .seal-hero-title { font-size: 3.8rem; }
    .seal-hero-subtitle { font-size: 0.9rem; }
    .seal-hero-subtitle .icon-sparkle { font-size: 1.1rem; }
    .seal-action-button { padding: 0.5rem 1rem; font-size: 0.75rem; }
}

/* 主要内容区域 */
.main-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    padding: 2rem 0 2rem 2rem;
    position: sticky;
    top: var(--ifm-navbar-height);
    height: calc(100vh - var(--ifm-navbar-height));
    overflow-y: auto;
    flex-shrink: 0;
    /* 默认隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 隐藏 Webkit 浏览器的滚动条 */
.sidebar::-webkit-scrollbar {
    display: none;
}

/* 鼠标悬停时显示滚动条 */
.sidebar:hover {
    scrollbar-width: auto; /* Firefox */
    -ms-overflow-style: auto; /* IE and Edge */
}

.sidebar:hover::-webkit-scrollbar {
    display: block;
    width: 6px;
}

.sidebar:hover::-webkit-scrollbar-track {
    background: var(--ifm-background-surface-color);
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background: var(--ifm-color-content-secondary);
    border-radius: 3px;
}

.sidebar-menu {
    padding-right: 1rem;
}

.sidebar-menu-category {
    margin-bottom: 1.5rem;
}

.sidebar-menu-category-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ifm-color-content-secondary);
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.sidebar-menu-items {
    list-style: none;
    padding-left: 0;
}

.sidebar-menu-item {
    margin-top: 0.25rem;
}

.sidebar-menu-link {
    display: block;
    padding: 0.4rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--ifm-color-content);
    font-size: 0.9rem;
}

.sidebar-menu-link:hover {
    background-color: var(--ifm-background-surface-color);
}

.sidebar-menu-item--active .sidebar-menu-link {
    background-color: var(--ifm-background-surface-color);
    color: var(--ifm-color-primary);
    font-weight: 600;
    border-left: 2px solid var(--ifm-color-primary);
}

/* 文档内容 */
.doc-main-container {
    flex-grow: 1;
    display: flex;
    padding: 2rem;
    min-width: 0;
}

.doc-main-container-pc { /* ADDED THIS RULE */
    flex-grow: 1;
    display: flex;
    padding: 2rem;
    min-width: 0;
}

.doc-content {
    flex-grow: 1;
    max-width: 800px;
}

.doc-header {
    margin-bottom: 2rem;
}

.doc-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.doc-metadata {
    color: var(--ifm-color-content-secondary);
    font-size: 0.9rem;
}

.doc-article {
    margin-bottom: 3rem;
}

.doc-article h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--ifm-toc-border-color);
}
@media (max-width: 768px) {
    .doc-article h2 {
        font-size: 1.3rem; /* Or 1.4rem, 1.6rem - choose what looks best */
        /* You might also want to adjust margins or padding if needed on mobile */
        /* For example:
        margin: 1.5rem 0 0.8rem;
        padding-bottom: 0.2rem;
        */
    }
.doc-main-container-pc{display:none;}
}
.doc-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}

.doc-article p {
    margin-bottom: 1rem;
}

.doc-article ul, .doc-article ol {
    margin-bottom: 1rem;
}

.doc-article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 2. 解决视频元素自适应宽度问题 */
[data-w-e-type="video"],
[data-w-e-type="video"] iframe,
[data-w-e-type="video"] video {
    max-width: 100%;
    height: auto;
}

.doc-pagination {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.pagination-nav {
    display: flex;
    justify-content: space-between;
}

.pagination-nav-item {
    flex: 1;
    max-width: 50%;
}

.pagination-nav-item--next {
    margin-left: auto;
    text-align: right;
}

.pagination-nav-link {
    display: block;
    padding: 0.75rem;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 0.25rem;
    transition: border-color 0.2s;
}

.pagination-nav-link:hover {
    border-color: var(--ifm-color-primary);
}

.pagination-nav-label {
    font-size: 0.8rem;
    color: var(--ifm-color-content-secondary);
}

.pagination-nav-title {
    font-weight: 600;
    color: var(--ifm-color-primary);
}

.doc-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ifm-toc-border-color);
}

.edit-this-page {
    display: inline-flex;
    align-items: center;
    color: var(--ifm-color-primary);
    font-size: 0.9rem;
}

.edit-this-page i {
    margin-right: 0.5rem;
}

/* 代码块 */
.code-block {
    margin: 1rem 0;
    border-radius: 0.25rem;
    overflow: hidden;
    background-color: #f6f8fa;
}

[data-theme='dark'] .code-block {
    background-color: #282c34;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .code-block-header {
    background-color: rgba(255, 255, 255, 0.05);
}

.code-block-language {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ifm-color-content-secondary);
}

.code-block-copy-button {
    background: transparent;
    border: none;
    color: var(--ifm-color-content-secondary);
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.code-block-copy-button:hover {
    opacity: 1;
}

.code-block-content {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--ifm-font-family-monospace);
    font-size: var(--ifm-code-font-size);
    line-height: 1.5;
}

/* 目录 */
.table-of-contents-container {
    position: sticky;
    top: calc(var(--ifm-navbar-height) + 2rem);
    max-height: calc(100vh - var(--ifm-navbar-height) - 2rem);
    overflow-y: auto;
    padding-left: 2rem;
    width: 240px;
    flex-shrink: 0;
}

.table-of-contents {
    border-left: 1px solid var(--ifm-toc-border-color);
    padding-left: 1rem;
}

.table-of-contents-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ifm-color-content-secondary);
    margin-bottom: 0.5rem;
}

.table-of-contents-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
}

.table-of-contents-item {
    margin-top: 0.5rem;
}

.table-of-contents-link {
    display: block;
    color: var(--ifm-color-content-secondary);
    transition: color 0.2s;
}

.table-of-contents-link:hover, 
.table-of-contents-link.active {
    color: var(--ifm-color-primary);
}

/* 移动端目录 */
.mobile-toc-button {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--ifm-color-primary);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 99;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-toc {
    display: none;
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    width: 80%;
    max-width: 300px;
    max-height: 60vh;
    background-color: var(--ifm-background-color);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 99;
    overflow-y: auto;
    padding: 1rem;
}

.mobile-toc-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.mobile-toc.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@media screen and (max-width: 996px) {
    .mobile-toc-button {
        display: flex;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
        background-color: var(--ifm-color-primary);
        color: white;
        border: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 99;
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }
    
    .table-of-contents-container {
        position: fixed;
        bottom: 5rem;
        right: 1.5rem;
        width: 80%;
        max-width: 300px;
        max-height: 60vh;
        background-color: var(--ifm-background-color);
        border-radius: 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 99;
        overflow-y: auto;
        padding: 1rem;
        display: none;
    }

    .table-of-contents-container.show {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}

/* 页脚 */
.footer {
    background-color: var(--ifm-footer-background-color);
    padding: 2rem 0;
    width: 100%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-copyright {
    color: var(--ifm-color-content-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
}

.footer-link {
    color: var(--ifm-color-content-secondary);
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--ifm-color-primary);
}

/* 上一篇/下一篇导航 */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    margin-bottom: 2rem;
    gap: 1rem;
}

.pagination-nav__link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 0.5rem;
    transition: all 0.2s;
    max-width: 48%;
}

.pagination-nav__link:hover {
    border-color: var(--ifm-color-primary);
    text-decoration: none;
}

.pagination-nav__link--prev {
    text-align: left;
}

.pagination-nav__link--next {
    text-align: right;
}

.pagination-nav__sublabel {
    font-size: 0.8rem;
    color: var(--ifm-color-content-secondary);
    margin-bottom: 0.25rem;
}

.pagination-nav__label {
    font-weight: bold;
    color: var(--ifm-color-content);
}

@media (max-width: 576px) {
    .pagination-nav {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .pagination-nav__link {
        max-width: 48%;
    }
}

/* 搜索弹窗 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5rem;
    z-index: 2000;
    overflow-y: auto;
}

.search-modal-body {
    background-color: var(--ifm-background-color);
    border-radius: 0.5rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.search-input-container {
    position: relative;
    padding: 1rem;
}

.search-input-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--ifm-toc-border-color);
}

.search-modal-close {
    background: transparent;
    border: none;
    color: var(--ifm-color-content-secondary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
}

.search-modal-close:hover {
    color: var(--ifm-color-content);
}

.search-input-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ifm-color-content-secondary);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 0.25rem;
    font-size: 1rem;
    background-color: var(--ifm-background-color);
    color: var(--ifm-color-content);
}

.search-input:focus {
    outline: none;
    border-color: var(--ifm-color-primary);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

/* 响应式设计 */
@media (max-width: 996px) {
    .main-wrapper {
        flex-direction: column;
    }

    /* 移动端目录样式 */
    .table-of-contents-container {
        position: fixed;
        top: var(--ifm-navbar-height);
        left: 0;
        width: 100%;
        background-color: var(--ifm-background-color);
        border-bottom: 1px solid var(--ifm-toc-border-color);
        padding: 0;
        margin: 0;
        z-index: 99;
        display: none;
    }

    .table-of-contents-container.toc--open {
        display: block;
    }

    .table-of-contents {
        max-height: 60vh;
        overflow-y: auto;
        padding: 1rem;
    }

    /* 移动端菜单样式 */
    .sidebar {
        position: fixed;
        top: var(--ifm-navbar-height);
        left: -300px;
        width: 300px;
        height: calc(100vh - var(--ifm-navbar-height));
        background-color: var(--ifm-background-color);
        border-right: 1px solid var(--ifm-toc-border-color);
        padding: 1rem;
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 100;
    }

    .sidebar.sidebar--open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--ifm-navbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--ifm-navbar-height));
        background-color: rgba(0, 0, 0, 0.15);
        z-index: 99;
    }

    /* 暗黑主题下的侧边栏遮罩层样式 */
    html[data-theme='dark'] .sidebar-overlay {
        background-color: rgba(0, 0, 0, 0.3);
    }

    .sidebar-overlay.overlay--visible {
        display: block;
    }

    .navbar__toggle {
        display: block;
        z-index: 101;
    }

    .doc-main-container {
        padding: 1rem;
        flex-direction: column;
    }


    .doc-content {
        max-width: 100%;
    }

    /* 隐藏原导航栏项目 */
    .navbar__items--left {
        display: none;
    }

    /* 移动端标题导航下拉列表 */
    .doc-title-nav {
        position: relative;
        margin-bottom: 1rem;
    }

    .doc-title-nav__toggle {
        display: flex;
        align-items: center;
        padding: 0.5rem;
        background: var(--ifm-background-surface-color);
        border: 1px solid var(--ifm-toc-border-color);
        border-radius: 0.25rem;
        cursor: pointer;
    }

    .doc-title-nav__toggle:after {
        content: '';
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid var(--ifm-color-content);
        margin-left: 0.5rem;
    }

    .doc-title-nav__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--ifm-background-color);
        border: 1px solid var(--ifm-toc-border-color);
        border-radius: 0.25rem;
        margin-top: 0.25rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 10;
    }

    .doc-title-nav__menu.show {
        display: block;
    }

    .doc-title-nav__item {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--ifm-toc-border-color);
        color: var(--ifm-color-content);
    }

    .doc-title-nav__item:last-child {
        border-bottom: none;
    }

    .doc-title-nav__item:hover {
        background: var(--ifm-background-surface-color);
    }


    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        margin-top: 1rem;
    }

    .footer-link {
        margin: 0 0.75rem;
    }
    
    /* 移动端搜索框优化 */
    .search-page-container {
        padding: 1rem;
    }
    
    .search-page-title {
        font-size: 1.5rem;
    }
    
    .search-result-title {
        font-size: 1.2rem;
    }
    
    /* 移动端导航菜单优化 - 只显示列表，不显示导航 */
    .mobile-menu {
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }
    
    .mobile-menu .navbar__link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--ifm-toc-border-color);
        width: 100%;
        font-size: 1.1rem;
    }
    
    .mobile-menu .navbar__link:last-child {
        border-bottom: none;
    }
    
    .mobile-menu .dropdown {
        width: 100%;
    }
    
    .mobile-menu .dropdown__menu {
        position: static;
        box-shadow: none;
        border-left: 2px solid var(--ifm-color-primary);
        margin: 0.5rem 0 0.5rem 1rem;
    }
    
    .mobile-menu .dropdown__link {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .navbar__brand {
        font-size: 1rem;
    }

    .navbar__logo {
        height: 1.5rem;
    }

    .doc-title {
        font-size: 2rem;
    }

    .search-button span {
        display: none;
    }

    .search-modal {
        padding-top: 2rem;
    }

    .search-modal-body {
        width: 90%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-modal.search-modal--open {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

/* 暗黑模式切换动画 */
.docusaurus-container {
    transition: background-color 0.3s, color 0.3s;
}

/* 移动端目录切换按钮 */
.toc-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--ifm-color-content);
    padding: 0.5rem;
    cursor: pointer;
}

@media (max-width: 996px) {
    .toc-toggle {
        display: block;
    }
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
}

.overlay.overlay--visible {
    display: block;
}

/* 工具提示 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background-color: var(--ifm-color-content);
    color: var(--ifm-background-color);
    border-radius: 0.25rem;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
}


        .search-container {
            position: relative;
            display: flex;
            align-items: center;
        }
        .search-input {
            border: 1px solid #ccc;
            border-radius: 4px;
            padding: 6px 10px;
            margin-right: 5px;
            font-size: 14px;
            width: 200px;
        }
        .search-results {
            position: absolute;
            top: 100%;
            right: 0;
            width: 250px;
            max-height: 300px;
            overflow-y: auto;
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 1000;
        }
        .search-result-item {
            padding: 8px 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
        }
        .search-result-item:hover {
            background-color: #f5f5f5;
        }
        .search-result-item a {
            color: inherit;
            text-decoration: none;
            display: block;
        }
        .search-highlight {
            background-color: #ffeb3b;
            font-weight: bold;
        }
        .dark-theme .search-results {
            background-color: #1a1a1a;
            border-color: #444;
        }
        .dark-theme .search-result-item {
            border-color: #333;
        }
        .dark-theme .search-result-item:hover {
            background-color: #2a2a2a;
        }
        .dark-theme .search-input {
            background-color: #333;
            color: #fff;
            border-color: #555;
        }
        
    /* 移动端弹出式搜索框样式 */
    .search-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: none;
        justify-content: center;
        align-items: flex-start;
        padding-top: 80px;
        z-index: 2000;
    }
    
    .search-popup-container {
        width: 90%;
        max-width: 500px;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 15px;
        position: relative;
    }
    
    .search-popup-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .search-popup-close {
        background: transparent;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: #666;
    }
    
    .search-popup-input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .search-popup-results {
        max-height: 300px;
        overflow-y: auto;
    }
    
    .dark-theme .search-popup-container {
        background-color: #1a1a1a;
        border-color: #444;
    }
    
    .dark-theme .search-popup-input {
        background-color: #333;
        color: #fff;
        border-color: #555;
    }
    
    .dark-theme .search-popup-close {
        color: #ccc;
    }
    
    @media (max-width: 768px) {
        .search-container .search-input {
            display: none !important;
        }
        
        .search-container .search-results {
            display: none !important;
        }
    }       