/* LNB-MDT 自定义样式 */

/* 全局样式 */
:root {
    --primary-color: #2980B9;
    --secondary-color: #3498DB;
    --accent-color: #E74C3C;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --info-color: #17A2B8;
    --light-color: #F8F9FA;
    --dark-color: #2C3E50;
}

/* 页面标题样式 */
h1 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

h2 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 8px;
}

h3 {
    color: var(--dark-color);
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 5px;
}

/* 代码块样式 */
.highlight {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.highlight pre {
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
}

/* 代码块标题 */
.code-block-title {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    margin-bottom: 0;
}

/* 复制按钮样式 */
.copybutton {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.copybutton:hover {
    background: var(--secondary-color);
}

/* 警告框样式 */
.admonition {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.admonition-title {
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    margin: 0;
}

.admonition.note {
    border-left: 4px solid var(--info-color);
}

.admonition.note .admonition-title {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.admonition.warning {
    border-left: 4px solid var(--warning-color);
}

.admonition.warning .admonition-title {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.admonition.danger {
    border-left: 4px solid var(--accent-color);
}

.admonition.danger .admonition-title {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

.admonition.tip {
    border-left: 4px solid var(--success-color);
}

.admonition.tip .admonition-title {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #E0E0E0;
}

table tr:nth-child(even) {
    background: var(--light-color);
}

table tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

/* 侧边栏样式 */
.wy-side-nav-search {
    background: var(--primary-color);
}

.wy-side-nav-search input[type="text"] {
    border-radius: 20px;
    border: none;
    padding: 8px 15px;
}

.wy-menu-vertical a {
    color: var(--dark-color);
    transition: color 0.3s;
}

.wy-menu-vertical a:hover {
    color: var(--primary-color);
}

/* 文档目录样式修改 */
.wy-menu-vertical {
    background: white !important;
}

.wy-menu-vertical a {
    color: #333333 !important;
    background: white !important;
    padding: 8px 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.wy-menu-vertical a:hover {
    color: var(--primary-color) !important;
    background: #f8f9fa !important;
}

.wy-menu-vertical a:visited {
    color: #333333 !important;
}

/* 当前页面高亮 */
.wy-menu-vertical a.current {
    background: #e3f2fd !important;
    color: var(--primary-color) !important;
    border-left: 3px solid var(--primary-color) !important;
}

/* 目录标题样式 */
.wy-menu-vertical .caption {
    color: #333333 !important;
    background: #f8f9fa !important;
    font-weight: bold !important;
    padding: 10px 15px !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

/* 子目录缩进 */
.wy-menu-vertical .toctree-l1 > a {
    padding-left: 15px !important;
}

.wy-menu-vertical .toctree-l2 > a {
    padding-left: 30px !important;
}

.wy-menu-vertical .toctree-l3 > a {
    padding-left: 45px !important;
}

.wy-menu-vertical .toctree-l4 > a {
    padding-left: 60px !important;
}

/* 目录整体样式优化 */
.wy-side-scroll {
    background: white !important;
}

.wy-menu-vertical ul {
    background: white !important;
}

.wy-menu-vertical li {
    background: white !important;
}

/* 目录展开/折叠按钮 */
.wy-menu-vertical .toctree-expand {
    color: #666666 !important;
}

.wy-menu-vertical .toctree-expand:hover {
    color: var(--primary-color) !important;
}

/* 目录分隔线 */
.wy-menu-vertical hr {
    border-color: #e0e0e0 !important;
    margin: 10px 0 !important;
}

/* 确保所有目录元素都是白色背景 */
.wy-menu-vertical * {
    background-color: white !important;
}

.wy-menu-vertical a,
.wy-menu-vertical li,
.wy-menu-vertical ul {
    background-color: white !important;
}

/* 隐藏重复的面包屑导航 */
.wy-breadcrumbs {
    display: none !important;
}

.wy-breadcrumbs-aside {
    display: none !important;
}

/* 隐藏重复的导航元素 */
.rst-content .wy-breadcrumbs {
    display: none !important;
}

/* 隐藏页面顶部的重复导航 */
.wy-nav-content-wrap .wy-nav-content .wy-breadcrumbs {
    display: none !important;
}

/* 隐藏所有面包屑相关的元素 */
[class*="breadcrumb"] {
    display: none !important;
}

/* 导航栏样式 */
.wy-nav-top {
    background: var(--primary-color);
}

.wy-nav-top a {
    color: white;
}

/* 内容区域样式 */
.wy-content-for-nav {
    background: white;
}

.wy-content-for-nav .rst-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #229954;
}

.btn-warning {
    background: var(--warning-color);
}

.btn-warning:hover {
    background: #E67E22;
}

.btn-danger {
    background: var(--accent-color);
}

.btn-danger:hover {
    background: #C0392B;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin: 0 5px;
}

.badge-success {
    background: var(--success-color);
}

.badge-warning {
    background: var(--warning-color);
}

.badge-danger {
    background: var(--accent-color);
}

.badge-info {
    background: var(--info-color);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.card-header {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-body {
    color: var(--dark-color);
}

/* 进度条样式 */
.progress {
    background: #E0E0E0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    background: var(--primary-color);
    height: 100%;
    transition: width 0.3s;
    border-radius: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wy-content-for-nav .rst-content {
        padding: 10px;
    }
    
    table {
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 8px;
    }
    
    .highlight pre {
        padding: 15px;
        font-size: 12px;
    }
}

/* 打印样式 */
@media print {
    .wy-side-nav,
    .wy-nav-top {
        display: none;
    }
    
    .wy-content-for-nav {
        margin: 0;
        padding: 0;
    }
    
    .rst-content {
        max-width: none;
        padding: 0;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 搜索框样式 */
.wy-side-nav-search input[type="text"] {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wy-side-nav-search input[type="text"]:focus {
    background: white;
    color: var(--dark-color);
    border: 1px solid white;
}

/* 版本信息样式 */
.version-info {
    background: var(--light-color);
    border: 1px solid #E0E0E0;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
}

/* 页脚样式 */
.footer {
    background: var(--light-color);
    border-top: 1px solid #E0E0E0;
    padding: 20px;
    margin-top: 40px;
    text-align: center;
    color: var(--dark-color);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
