/* ===== Qwen API 页面专属样式 ===== */

/* Hero 区域 */
.api-hero {
    position: relative;
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow: hidden;
    min-height: 550px;
    display: flex;
    align-items: center;
}

.api-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(99,102,241,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(168,85,247,0.15) 0%, transparent 50%);
}

.api-hero .container {
    position: relative;
    z-index: 2;
}

.api-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
}

.api-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: #fff;
}

.api-hero .hero-subtitle {
    font-size: 18px;
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 模型区域 */
.models-section {
    padding: 100px 0;
    background: #fafafa;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.model-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 28px;
    position: relative;
    transition: all .3s;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    border-color: #6157f2;
}

.model-card.featured {
    border-color: #6157f2;
    background: linear-gradient(135deg, rgba(97,87,242,0.03) 0%, rgba(118,75,162,0.03) 100%);
}

.model-badge {
    position: absolute;
    top: -10px;
    left: 24px;
    background: linear-gradient(135deg, #6157f2, #764ba2);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
}

.model-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.model-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.model-type {
    font-size: 11px;
    font-weight: 600;
    color: #6157f2;
    background: #eeeffe;
    padding: 3px 10px;
    border-radius: 6px;
}

.model-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.model-specs {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
}

.spec-value {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.model-price {
    margin-bottom: 20px;
}

.price-value {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
}

.price-unit {
    font-size: 13px;
    color: #6b7280;
}

.btn-model {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: linear-gradient(135deg, #6157f2, #764ba2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all .2s;
}

.btn-model:hover {
    background: linear-gradient(135deg, #4f46e5, #6b3fa0);
    transform: translateY(-1px);
}

.btn-model-outline {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #fff;
    color: #6157f2;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #6157f2;
    border-radius: 10px;
    transition: all .2s;
}

.btn-model-outline:hover {
    background: #eeeffe;
}

.models-more {
    text-align: center;
    margin-top: 32px;
}

.models-more .view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
}

.models-more .view-all:hover {
    border-color: #6157f2;
    color: #6157f2;
}

/* 功能区域 */
.api-features {
    padding: 80px 0;
    background: #fff;
}

.api-features .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.api-features .feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: all .3s;
}

.api-features .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: #6157f2;
}

.api-features .feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.api-features .feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.api-features .feature-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* 快速开始 */
.quickstart-section {
    padding: 80px 0;
    background: #fafafa;
}

.quickstart-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin: 48px 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 200px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6157f2, #764ba2);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.step-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #6157f2, #764ba2);
    margin-top: 24px;
    flex-shrink: 0;
}

.quickstart-code {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.code-tabs {
    display: flex;
    background: #252536;
    padding: 0 16px;
}

.code-tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}

.code-tab:hover {
    color: #fff;
}

.code-tab.active {
    color: #fff;
    border-bottom-color: #6157f2;
}

.code-content {
    padding: 24px;
}

.code-block {
    display: none;
    margin: 0;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
}

.code-block.active {
    display: block;
}

.code-block code {
    color: #e2e8f0;
}

/* 定价表格 */
.pricing-section {
    padding: 80px 0;
    background: #fff;
}

.pricing-table {
    max-width: 900px;
    margin: 48px auto 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.pricing-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: #f9fafb;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    transition: background .2s;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row:hover {
    background: #fafafa;
}

.pricing-col {
    font-size: 14px;
    color: #374151;
}

.pricing-col.model-col {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #eeeffe;
    color: #6157f2;
}

.pricing-note {
    text-align: center;
    margin-top: 32px;
}

.pricing-note p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* SDK 区域 */
.sdk-section {
    padding: 80px 0;
    background: #fafafa;
}

.sdk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.sdk-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all .3s;
}

.sdk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: #6157f2;
}

.sdk-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.sdk-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.sdk-card p {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
}

.sdk-link {
    font-size: 12px;
    font-family: monospace;
    color: #6157f2;
    background: #eeeffe;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

/* 统计区域 */
.api-stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.api-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.api-stats .stat-item {
    text-align: center;
}

.api-stats .stat-number {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
}

.api-stats .stat-unit {
    font-size: 20px;
    color: #818cf8;
}

.api-stats .stat-label {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 8px;
}

/* CTA 区域 */
.api-cta {
    padding: 100px 0;
    background: #fff;
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 32px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .api-features .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quickstart-steps {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .step-connector {
        width: 2px;
        height: 40px;
        margin: 0;
        background: linear-gradient(180deg, #6157f2, #764ba2);
    }
    
    .sdk-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .api-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-header,
    .pricing-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .api-hero {
        padding: 80px 0 60px;
        min-height: auto;
    }
    
    .models-section,
    .api-features,
    .quickstart-section,
    .pricing-section,
    .sdk-section {
        padding: 60px 0;
    }
    
    .api-features .features-grid {
        grid-template-columns: 1fr;
    }
    
    .sdk-grid {
        grid-template-columns: 1fr;
    }
    
    .api-stats {
        padding: 60px 0;
    }
    
    .api-stats .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    .pricing-header {
        display: none;
    }
    
    .pricing-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 20px;
    }
    
    .pricing-col {
        width: 100%;
    }
    
    .pricing-col.model-col {
        margin-bottom: 8px;
    }
    
    .api-cta {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta a {
        width: 100%;
    }
    
    .api-stats .stat-number {
        font-size: 36px;
    }
}
