/* 共享接口页面样式 */

.api-share-main {
    min-height: calc(100vh - 200px);
    background-color: #f8f9fa;
}

/* 左侧菜单样式 */
.sidebar {
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    min-height: calc(100vh - 200px);
    padding: 0;
    max-width: 280px;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.sidebar-header h4 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.menu-tree {
    padding: 0;
}

.menu-item {
    border-bottom: 1px solid #f8f9fa;
}

.menu-item-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.menu-item-header:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.menu-item-header.active {
    background-color: #007bff;
    color: white;
}

.menu-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    margin-left: auto;
}

.menu-item-header.active .menu-arrow {
    transform: rotate(90deg);
}

.submenu {
    display: none;
    background-color: #f8f9fa;
}

.submenu.show {
    display: block;
}

.submenu-item {
    border-bottom: 1px solid #e9ecef;
}

.submenu-item-header {
    padding: 10px 15px 10px 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 13px;
}

.submenu-item-header:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.submenu-item-header.active {
    background-color: #007bff;
    color: white;
}

.submenu-arrow {
    transition: transform 0.3s ease;
    font-size: 10px;
    margin-left: auto;
}

.submenu-item-header.active .submenu-arrow {
    transform: rotate(90deg);
}

.sub-submenu {
    display: none;
    background-color: #fff;
}

.sub-submenu.show {
    display: block;
}

.sub-submenu-item {
    padding: 8px 15px 8px 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 12px;
    border-bottom: 1px solid #f8f9fa;
}

.sub-submenu-item:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.sub-submenu-item.active {
    background-color: #007bff;
    color: white;
}

.sub-submenu-item i {
    font-size: 6px;
}

/* 右侧内容区域样式 */
.content-area {
    padding: 20px;
}

.content-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3,
.section-header h4 {
    margin: 0;
    color: #495057;
}

.api-meta {
    display: flex;
    gap: 10px;
}

.api-description {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.api-description p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

.api-example {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.api-example h5 {
    margin-bottom: 15px;
    color: #495057;
}

.api-example pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 0;
    overflow-x: auto;
}

.api-example code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
}

.api-data-sample {
    padding: 20px;
}

.api-data-sample h5 {
    margin-bottom: 15px;
    color: #495057;
}

.api-data-sample pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 0;
    overflow-x: auto;
}

.api-data-sample code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
}

/* 下载区域样式 */
.download-section {
    padding: 20px;
}

.download-form h5,
.download-info h5 {
    margin-bottom: 20px;
    color: #495057;
}

.download-form .form-label {
    font-weight: 500;
    color: #495057;
}

.download-info ul li {
    margin-bottom: 8px;
    color: #6c757d;
}

.download-info .alert {
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .api-meta {
        align-self: flex-end;
    }
}

/* 代码高亮样式 */
.token.comment {
    color: #6c757d;
}

.token.string {
    color: #28a745;
}

.token.keyword {
    color: #007bff;
}

.token.function {
    color: #dc3545;
}

.token.number {
    color: #fd7e14;
}

/* 动画效果 */
.menu-item-header,
.submenu-item-header,
.sub-submenu-item {
    transition: all 0.3s ease;
}

.content-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
