/* s_mmpbsa 文档自定义样式 */

/* 全局样式 */
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
    font-size: 16px;
    line-height: 1.5; /* 减小行距，使内容更紧凑 */
    color: #333;
    background-color: #f8f9fa;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 1.2em; /* 减小标题上边距 */
    margin-bottom: 0.6em; /* 减小标题下边距 */
}

h1 {
    font-size: 2.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.3em;
}

h2 {
    font-size: 1.8em;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
}

h3 {
    font-size: 1.5em;
}

h4 {
    font-size: 1.3em;
}

/* 段落样式 */
p {
    margin-bottom: 0.8em; /* 减小段落间距 */
    text-align: justify;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 代码块样式 */
pre, code {
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    background-color: #f6f8fa;
    border-radius: 3px;
}

code {
    padding: 0.2em 0.4em;
    font-size: 0.9em;
    color: #e96900;
}

pre {
    padding: 1em;
    margin-bottom: 1.2em; /* 减小代码块间距 */
    overflow-x: auto;
    border: 1px solid #e1e4e8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 添加轻微阴影 */
}

pre code {
    padding: 0;
    color: inherit;
    background-color: transparent;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em; /* 减小表格间距 */
    font-size: 0.95em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 添加轻微阴影 */
}

th, td {
    padding: 0.75em;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #2c3e50;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 引用样式 */
blockquote {
    margin: 1.2em 0; /* 减小引用块间距 */
    padding: 0.5em 1em;
    border-left: 4px solid #3498db;
    background-color: #f9f9f9;
    color: #666;
    font-style: italic;
}

/* 列表样式 */
ul, ol {
    margin-bottom: 1.2em; /* 减小列表间距 */
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.4em; /* 减小列表项间距 */
}

/* 警告框样式 */
.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1em;
    margin: 1.2em 0; /* 减小警告框间距 */
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 添加轻微阴影 */
}

.tip {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 1em;
    margin: 1.2em 0; /* 减小提示框间距 */
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 添加轻微阴影 */
}

.danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1em;
    margin: 1.2em 0; /* 减小危险框间距 */
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* 添加轻微阴影 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    h3 {
        font-size: 1.3em;
    }
    
    .wy-nav-content {
        max-width: 100%;
        padding: 1.5em;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 0.5em;
    }
}

/* 打印样式 */
@media print {
    body {
        font-size: 12pt;
        background: white;
    }
    
    .wy-nav-side, .wy-nav-top, .wy-side-nav-search, .wy-breadcrumbs {
        display: none;
    }
    
    .wy-nav-content {
        margin: 0;
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}

/* 侧边栏样式优化 */
.wy-menu-vertical a {
    color: #b3b3b3;
    font-size: 0.9em;
    padding: 0.4em 1.618em;
    transition: all 0.2s ease-in-out;
}

.wy-menu-vertical a:hover {
    color: #fff;
    background-color: #3498db;
    padding-left: 1.8em; /* 鼠标悬停时轻微缩进效果 */
}

/* 减少侧边栏色块背景，只在当前项使用较柔和的背景 */
.wy-menu-vertical li.current > a {
    color: #fff;
    background-color: #3498db;
    border-right: 3px solid #2980b9;
}

.wy-menu-vertical li.current ul.submenu li a {
    background-color: transparent; /* 子菜单不使用色块背景 */
    color: #b3b3b3;
}

.wy-menu-vertical li.current ul.submenu li a:hover {
    background-color: rgba(52, 152, 219, 0.2); /* 子菜单悬停时使用半透明背景 */
    color: #fff;
}

.wy-menu-vertical li.current ul.submenu li.toctree-l2.current > a {
    background-color: rgba(52, 152, 219, 0.3); /* 子菜单当前项使用较浅的背景 */
    color: #fff;
}

/* 主页目录样式优化 */
/* 减小主页中toctree-l2元素的样式定义，减小它们之间的间隔 */
.wy-nav-content .toctree-l2 {
    margin-bottom: 0.2em !important;
    line-height: 1.0;
}

.wy-nav-content .toctree-l2 a {
    padding: 0.2em 0;
    display: inline-block;
}

/* 搜索框样式 */
.wy-side-nav-search {
    background-color: #3498db;
    padding: 1.5em 0;
}

.wy-side-nav-search input[type="text"] {
    border-color: #2980b9;
    border-radius: 4px;
    width: 85%;
}

/* 页脚样式 */
.rst-footer-buttons {
    margin-top: 1.5em;
}

footer {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #eaecef;
    color: #666;
    font-size: 0.9em;
}

/* 内容区域优化 */
.wy-nav-content {
    background: #fff;
    max-width: 900px;
    padding: 2em 3em;
}

/* 面包屑导航优化 */
.wy-breadcrumbs {
    padding: 0.6em 0;
    background-color: #f8f9fa;
    font-size: 0.9em;
}

/* 滚动条样式优化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}