/* API文档专用样式 */

/* 页面布局 */
.api-container {
    display: flex;
	width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    gap: 30px;
}

.api-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 20px;
    background-color: #f5f7fa;
	width: 20%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.api-content {
	flex: 1;
}

.api-search {
    margin-bottom: 20px;
}

.api-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
}

.api-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.api-nav-item {
    margin: 5px 0;
}

.api-nav-item a {
    display: block;
    padding: 8px 15px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.api-nav-item a:hover,
.api-nav-item.active a {
    background-color: rgba(187, 46, 46, 0.1);
    color: #BB2E2E;
}

.api-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5f7fa;
}

/* API端点样式 */
.api-endpoint {
    margin-bottom: 30px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.api-endpoint-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f5f7fa;
    cursor: pointer;
    position: relative;
}

.api-endpoint-header::after {
    content: "\f078"; /* 向下箭头 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.api-endpoint-header.expanded::after {
    transform: translateY(-50%) rotate(180deg);
}

.http-method {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    margin-right: 15px;
}

.post {
    background-color: #49cc90;
    color: white;
}

.get {
    background-color: #61affe;
    color: white;
}

.delete {
    background-color: #f93e3e;
    color: white;
}

.put {
    background-color: #fca130;
    color: white;
}

.api-endpoint-path {
    font-family: monospace;
    font-size: 14px;
    color: #3b4151;
}

.api-endpoint-description {
    margin-left: auto;
    padding-right: 30px;
    color: #707070;
}

.api-endpoint-body {
    padding: 20px;
    background-color: white;
}

/* 参数表格 */
.parameters-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.parameters-table th,
.parameters-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.parameters-table th {
    background-color: #f5f7fa;
    font-weight: 600;
}

.parameter-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #e8e8e8;
    font-size: 12px;
    color: #3b4151;
}

.parameter-required {
    color: #e53935;
}

/* 代码示例和响应 */
.tab-container {
    margin-top: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab:hover {
    background-color: #f5f7fa;
}

.tab.active {
    border-bottom-color: #BB2E2E;
    color: #BB2E2E;
}

.tab-content.code-example {
    display: none;
    background-color: #272822;
    color: #f8f8f2;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.tab-content.code-example.active {
    display: block;
}

.tab-content.code-example pre {
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    font-family: monospace;
    line-height: 1.5;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .api-container {
        flex-direction: column;
    }
    
    .api-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 30px;
    }
} 