/* API详情页样式 */
html, body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%) !important;
    position: relative;
}

.api-header {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 12px;
}

.api-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.api-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.api-desc {
    color: #666;
    line-height: 1.6;
    margin: 16px 0;
    font-size: 15px;
}

.api-info {
    color: #666;
    font-size: 14px;
}

.api-info i {
    margin-right: 4px;
}

/* VIP配置样式 */
.vip-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.vip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
}

.vip-level {
    font-weight: 500;
    color: #2c3e50;
}

.vip-limit {
    color: #666;
    font-size: 13px;
}

/* 左侧导航样式 */
.nav-pills {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
}

.nav-pills .nav-link {
    color: #666;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-pills .nav-link:hover {
    background: #f8f9fa;
}

.nav-pills .nav-link.active {
    background: #007bff;
    color: #fff;
}

.nav-pills .nav-link i {
    font-size: 18px;
}

/* 内容区域样式 */
.api-main-content {
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: fit-content;
    min-height: auto;
}

.api-content {
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

.api-content:empty {
    display: none;
}

.api-content p {
    margin-bottom: 12px;
}

.api-content p:last-child {
    margin-bottom: 0;
}

.api-content h1, .api-content h2, .api-content h3 {
    margin-top: 16px;
    margin-bottom: 12px;
}

.api-content h1:first-child,
.api-content h2:first-child,
.api-content h3:first-child {
    margin-top: 0;
}

.card {
    border: none !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: fit-content;
}

.api-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 按钮组样式 */
.action-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 16px;
}

.action-buttons .btn {
    min-width: 120px;
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

#applyBtn {
    background-color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

#applyBtn:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.25);
}

#collectBtn {
    background-color: #fff;
    border-color: #e5e7eb;
    color: #374151;
}

#collectBtn:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#collectBtn.collected {
    background-color: #fff;
    border-color: #2563eb;
    color: #2563eb;
}

/* 接口列表样式 */
.api-nav-item {
    display: block;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    color: #555;
    text-decoration: none !important;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.8);
}

.api-nav-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: #007bff;
}

.api-nav-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-nav-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.api-index {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
    width: 24px;
}

.api-name {
    font-size: 13px;
    color: #333;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-nav-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.api-method {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 123, 255, 0.08);
    color: #007bff;
}

/* VIP配置样式 */
.vip-packages {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.vip-title {
    font-size: 15px;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vip-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.vip-package-item {
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 160px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vip-package-item:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.1);
}

.vip-package-item.selected {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .api-header .row {
        flex-direction: column;
    }
    
    .api-header .col-md-4 {
        text-align: left;
        margin-top: 16px;
    }
    
    .nav-pills {
        margin-bottom: 16px;
        position: static;
    }

    .vip-info {
        margin-top: 16px;
    }
}

/* 动态背景渐变 */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #f5f7fa, #e4ecf7, #f0f4f8, #eef2f7);
    background-size: 400% 400%;
    z-index: -1;
    animation: gradientBG 15s ease infinite;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 对接流程模块样式 */
.integration-process {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.integration-process h4 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.integration-process h4 i {
    margin-right: 10px;
    color: #007bff;
}

.integration-process img {
    max-width: 100%;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

/* 调整左右栏宽度 */
@media (min-width: 992px) {
    .api-sidebar {
        width: 380px !important;
        flex: 0 0 380px !important;
        max-width: 380px !important;
    }
    
    .api-content-wrapper {
        width: calc(100% - 380px) !important;
        flex: 0 0 calc(100% - 380px) !important;
        max-width: calc(100% - 380px) !important;
    }
}

/* 布局调整 */
@media (min-width: 992px) {
    .api-sidebar-col {
        width: 380px !important;
        flex: 0 0 380px !important;
        max-width: 380px !important;
    }
    .api-content-col {
        width: calc(100% - 404px) !important;
        flex: 0 0 calc(100% - 404px) !important;
        max-width: calc(100% - 404px) !important;
        margin-left: 24px !important;
    }
    .api-sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

@media (max-width: 991px) {
    .api-sidebar-col, .api-content-col {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-left: 20 !important;
        padding: 0 15px !important;
    }
}

.api-sidebar::-webkit-scrollbar {
    width: 6px;
}

.api-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.api-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.api-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* 请求方法样式 */
.api-method {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-weight: 500;
}

.api-method.get {
    background: rgba(47, 133, 90, 0.1);
    color: rgb(47, 133, 90);
}

.api-method.post {
    background: rgba(217, 119, 6, 0.1);
    color: rgb(217, 119, 6);
}

.api-method.delete {
    background: rgba(220, 38, 38, 0.1);
    color: rgb(220, 38, 38);
}

.api-method.patch {
    background: rgba(124, 58, 237, 0.1);
    color: rgb(124, 58, 237);
}

.product-advantage {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.product-advantage img {
    max-width: 100%;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}
