

/* ==================== CSS变量定义 ==================== */
:root {
    --primary-color: #3370FF;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --success-color: #34C724;
    --warning-color: #F5A623;
    --danger-color: #F53F3F;
    --info-color: #00D4AA;
    --bg-color: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ==================== API文档样式 ==================== */
.page-api-docs {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-api-docs .page-header {
    margin-bottom: 32px;
}

.page-api-docs .page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-api-docs .page-header .page-desc {
    font-size: 15px;
    color: var(--text-secondary);
}

.docs-section {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.docs-section:hover {
    box-shadow: var(--shadow-md);
}

.docs-section .section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.docs-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.docs-section .section-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.docs-section .section-content p {
    margin-bottom: 14px;
}

.docs-section .section-content ul,
.docs-section .section-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.docs-section .section-content li {
    margin-bottom: 8px;
}

.docs-section .section-content pre {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: #E2E8F0;
    padding: 20px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.docs-section .section-content pre::before {
    content: '代码示例';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    color: #64748B;
    font-weight: 500;
}

.docs-section .section-content code {
    background: #F1F5F9;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
}

.docs-section .section-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
}

.api-card {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid #E2E8F0;
}

.api-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.api-card .api-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.api-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-method.post {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #059669;
    box-shadow: 0 2px 8px rgba(52, 199, 36, 0.2);
}

.api-method.get {
    background: linear-gradient(135deg, #DBEAFE 0%, #93C5FD 100%);
    color: #1D4ED8;
    box-shadow: 0 2px 8px rgba(51, 112, 255, 0.2);
}

.api-method.delete {
    background: linear-gradient(135deg, #FEE2E2 0%, #FCA5A5 100%);
    color: #DC2626;
    box-shadow: 0 2px 8px rgba(245, 63, 63, 0.2);
}

.api-method.put {
    background: linear-gradient(135deg, #FEF3C7 0%, #FCD34D 100%);
    color: #D97706;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.2);
}

.api-path {
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.api-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #059669;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.api-card .api-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.7;
}

.api-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-card h4::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.param-table th,
.param-table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.param-table th {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-table td {
    color: var(--text-secondary);
}

.param-table tr:hover td {
    background: rgba(51, 112, 255, 0.04);
}

.response-example {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: #E2E8F0;
    padding: 20px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.response-example::before {
    content: '响应示例';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    color: #64748B;
    font-weight: 500;
}

.response-example code {
    background: transparent;
    color: inherit;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.model-item {
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--primary-dark);
    font-weight: 500;
}

.info-box, .success-box, .warning-box, .danger-box {
    padding: 18px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.info-box {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    border-left: 4px solid var(--primary-color);
}

.info-box::before {
    content: 'ℹ';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 24px;
    color: rgba(51, 112, 255, 0.2);
    font-weight: bold;
}

.info-box p {
    margin: 0;
    color: #1E40AF;
    font-size: 14px;
    line-height: 1.6;
}

.success-box {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border-left: 4px solid var(--success-color);
}

.success-box p {
    margin: 0;
    color: #059669;
    font-size: 14px;
}

.warning-box {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-left: 4px solid var(--warning-color);
}

.warning-box::before {
    content: '⚠';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 24px;
    color: rgba(245, 166, 35, 0.2);
    font-weight: bold;
}

.warning-box p {
    margin: 0;
    color: #D97706;
    font-size: 14px;
    line-height: 1.6;
}

.danger-box {
    background: linear-gradient(135deg, #FEE2E2 0%, #FCA5A5 100%);
    border-left: 4px solid var(--danger-color);
}

.danger-box p {
    margin: 0;
    color: #DC2626;
    font-size: 14px;
}

/* 四种模型对比卡片 */
.model-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.comparison-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comparison-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.comparison-card:hover::before {
    transform: scaleX(1);
}

.comparison-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.comparison-card .card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.comparison-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.comparison-card .card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.comparison-card .card-endpoint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(51, 112, 255, 0.08);
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: inline-block;
}

.comparison-card .card-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.comparison-card .feature-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: #F1F5F9;
    color: var(--text-secondary);
    border-radius: 20px;
}

.comparison-card .card-full-example {
    margin-top: 12px;
}

.comparison-card .card-example {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: #E2E8F0;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    text-align: left;
    overflow-x: auto;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comparison-card .card-example code {
    background: transparent;
    color: inherit;
}

/* 指南和提示部分 */
.guide-section,
.tips-section {
    background: #F8FAFC;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.guide-section h3,
.tips-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.guide-section ol,
.tips-section ul {
    padding-left: 20px;
}

.guide-section li,
.tips-section li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.model-change-guide {
    background: #F8FAFC;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 16px;
}

.model-change-guide h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 12px 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-api-docs {
        padding: 16px;
    }
    
    .docs-section {
        padding: 16px;
    }
    
    .model-comparison {
        grid-template-columns: 1fr;
    }
    
    .api-card .api-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .api-badge {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ==================== 支付对话框样式 ==================== */
.payment-dialog-content {
    text-align: center;
}

.payment-amount {
    margin-bottom: 20px;
}

.payment-amount .label {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.payment-amount .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.payment-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-primary);
}

.payment-method i {
    font-size: 24px;
}

.payment-qrcode {
    margin: 20px 0;
}

.payment-qrcode img {
    width: 256px;
    height: 256px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.qrcode-loading {
    width: 256px;
    height: 256px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #F5F6F7;
    border-radius: var(--radius-md);
}

.qrcode-loading i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.qrcode-loading span {
    color: var(--text-secondary);
    font-size: 14px;
}

.payment-tips {
    margin: 20px 0;
    font-size: 13px;
    color: var(--text-tertiary);
}

.payment-tips p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.payment-tips i {
    font-size: 16px;
}

.payment-order {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.payment-order .label {
    color: var(--text-tertiary);
}

.payment-order .value {
    color: var(--text-secondary);
    font-family: monospace;
}

/* ==================== API Key 管理样式 ==================== */
.api-key-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.api-key-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.api-key-item .key-info {
    flex: 1;
    min-width: 0;
}

.api-key-item .key-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.api-key-item .key-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    margin-bottom: 4px;
}

.api-key-item .key-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.api-key-item .status-tag {
    margin-right: 16px;
}

.api-key-item .key-actions {
    display: flex;
    gap: 8px;
}

.create-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-white);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

.key-created-content {
    text-align: center;
}

.key-created-content .key-display {
    margin-bottom: 16px;
}

.key-created-content .key-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.key-created-content .key-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 16px;
    color: var(--primary-color);
    word-break: break-all;
    padding: 12px;
    background: #F8FAFC;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.key-created-content .warning-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--warning-color);
    padding: 12px;
    background: #FFFBEB;
    border-radius: var(--radius-sm);
}
/* ==================== 模型预览页面样式 ==================== */
.page-model-preview {
    padding: 24px;
}

.page-model-preview .page-header {
    margin-bottom: 24px;
}

.page-model-preview .page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-model-preview .page-header .page-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.category-tabs {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.model-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.model-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.model-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.model-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: transparent;
}

.model-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.model-logo.logo-deepseek {
    background: transparent;
    border-color: #00A0E9;
}

.model-logo.logo-qwen {
    background: transparent;
    border-color: #FF6B35;
}

.model-logo.logo-kimi {
    background: transparent;
    border-color: #6366F1;
}

.model-logo.logo-doubao {
    background: transparent;
    border-color: #FF4757;
}

.model-logo.logo-openai {
    background: transparent;
    border-color: #10B981;
}

.model-info {
    flex: 1;
    min-width: 0;
}

.model-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: auto;
}

.model-tags .el-tag {
    font-size: 10px;
    padding: 0 6px;
    height: 20px;
    line-height: 18px;
}

.model-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-provider {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.model-card-body {
    margin-bottom: 16px;
}

.model-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.model-price .price-label {
    color: var(--text-tertiary);
    min-width: 50px;
}

.model-price .price-value {
    color: var(--primary-color);
    font-weight: 600;
}

.model-price .price-unit {
    color: var(--text-tertiary);
    font-size: 12px;
}

.model-card-footer {
    display: flex;
    justify-content: flex-end;
}

/* 模型详情弹窗样式 */
.model-detail-content {
    padding: 0;
}

.model-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.model-detail-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.model-detail-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.model-detail-tags {
    display: flex;
    gap: 8px;
}

.model-detail-section {
    margin-bottom: 24px;
}

.model-detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.price-item {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.price-item .price-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.price-item .price-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.price-item .price-unit {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.code-block {
    background: #1F2329;
    color: #E8E8E8;
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.usage-notes {
    list-style: none;
    padding: 0;
}

.usage-notes li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.usage-notes li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ==================== 语言切换样式 ==================== */
.lang-dropdown {
    margin-right: 16px;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.lang-selector:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.lang-flag {
    font-size: 18px;
}

.lang-name {
    font-weight: 500;
}

.lang-dropdown .el-dropdown-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-dropdown .el-dropdown-menu__item.active {
    color: var(--primary-color);
    font-weight: 600;
}
