/* API Documentation Styles */

/* Hero Section */
.api-hero {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 6rem 0 4rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #6366F1;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.back-link:hover {
    transform: translateX(-4px);
}

.api-version-badge {
    display: inline-block;
    background: #6366F1;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1.5rem;
}

/* Quick Start */
.api-quickstart {
    padding: 4rem 0;
}

.quickstart-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quickstart-step {
    background: #f8f9ff;
    padding: 2rem;
    border-radius: 1rem;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #6366F1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.quickstart-step h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
}

.quickstart-step p {
    color: #64748b;
    margin-bottom: 1rem;
}

/* Code Blocks */
pre {
    background: #1e1e1e;
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

:not(pre) > code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #0f172a;
}

/* Endpoints Section */
.api-endpoints {
    padding: 4rem 0;
    background: #fafbfc;
}

.endpoint-section {
    margin-bottom: 4rem;
}

.endpoint-section h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.endpoint-section > p {
    color: #64748b;
    margin-bottom: 2rem;
}

.endpoint-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9ff;
}

.method {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.method.get {
    background: #10b981;
    color: white;
}

.method.post {
    background: #3b82f6;
    color: white;
}

.method.put {
    background: #f59e0b;
    color: white;
}

.method.delete {
    background: #ef4444;
    color: white;
}

.endpoint-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #0f172a;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.endpoint-body {
    padding: 2rem;
}

.endpoint-body h4 {
    margin: 1.5rem 0 1rem 0;
    color: #1e293b;
    font-size: 1.125rem;
}

.endpoint-body h4:first-child {
    margin-top: 0;
}

/* Models Section */
.api-models {
    padding: 4rem 0;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.model-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
}

.model-card h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-family: 'JetBrains Mono', monospace;
}

.model-badge {
    display: inline-block;
    background: #6366F1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.model-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.model-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.model-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #475569;
}

.model-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Authentication Section */
.api-auth {
    padding: 4rem 0;
    background: #fafbfc;
}

.info-box {
    background: #f0f9ff;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.info-box h4 {
    margin: 0 0 1rem 0;
    color: #1e40af;
}

.info-box ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #1e40af;
}

/* Rate Limits */
.api-limits {
    padding: 4rem 0;
}

.limit-table {
    overflow-x: auto;
    margin: 2rem 0;
}

.limit-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
}

.limit-table th {
    background: #f8f9ff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.limit-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.limit-table tr:last-child td {
    border-bottom: none;
}

/* Error Handling */
.api-errors {
    padding: 4rem 0;
    background: #fafbfc;
}

.error-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.error-code {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.status-code {
    font-weight: bold;
    font-size: 1.25rem;
    color: #ef4444;
}

.status-text {
    color: #1e293b;
    font-weight: 500;
}

.error-code p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* Code Examples */
.api-examples {
    padding: 4rem 0;
}

.example-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: #1e293b;
}

.tab-button.active {
    color: #6366F1;
    border-bottom-color: #6366F1;
}

.example-content h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

/* Support Section */
.api-support {
    padding: 4rem 0;
    background: #f8f9ff;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.support-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.support-card h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
}

.support-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.support-card a {
    color: #6366F1;
    text-decoration: none;
    font-weight: 500;
}

.support-card a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .api-hero {
        padding: 4rem 0 3rem 0;
    }
    
    .quickstart-steps {
        grid-template-columns: 1fr;
    }
    
    .endpoint-header {
        flex-wrap: wrap;
    }
    
    .endpoint-path {
        font-size: 0.875rem;
        word-break: break-all;
    }
    
    .limit-table {
        font-size: 0.875rem;
    }
    
    .example-tabs {
        overflow-x: auto;
    }
}