/* Container styling */
.response-structure {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.response-structure h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.1rem;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 10px;
}

/* Tree node spacing and structure */
.structure-tree {
    line-height: 1.6;
}

.tree-node {
    position: relative;
    padding: 6px 0 6px 20px;
    border-left: 2px solid #e2e8f0;
    margin-left: 10px;
}

/* Remove border from the very first node if desired, or keep for root */
.tree-node.root {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
}

/* Horizontal connector line effect */
.tree-node:not(.root)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 12px;
    height: 2px;
    background-color: #e2e8f0;
}

/* Label Styling */
.node-name {
    font-family: 'ui-monospace', 'SFMono-Regular', Menlo, monospace;
    font-weight: 600;
    color: #2563eb; /* Modern Blue */
    background: #eff6ff;
    padding: 2px 6px;
    border-radius: 4px;
}

.node-type {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    margin-left: 8px;
}

.node-type::before {
    content: "<";
}
.node-type::after {
    content: ">";
}

.node-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-left: 12px;
}

/* Nested children indentation */
.tree-children {
    margin-top: 4px;
}

/* Hover effect for better UX */
.tree-node:hover {
    border-left-color: #3b82f6;
}
.tree-node:hover > .node-name {
    color: #1d4ed8;
    background: #dbeafe;
}


/* :root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
} */

.api-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.api-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 60px 40px;
    margin: 40px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.api-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><path d="M20 20 L80 20 L80 80 L20 80 Z" stroke="white" fill="none" stroke-width="2"/><circle cx="50" cy="50" r="10" stroke="white" fill="none" stroke-width="2"/></svg>') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.featured {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.api-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}

.api-short-description {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.trust-badges {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    opacity: 0.8;
}

/* Layout Grid */
.api-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    margin: 40px 0;
}

/* Main Content */
.api-main-content {
    min-width: 0;
}

.api-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.title-icon {
    font-size: 28px;
}

/* Quick Stats */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* API Console */
.api-console {
    background: #1e1e2f;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}

.console-tabs {
    display: flex;
    background: #2d2d3a;
    border-bottom: 1px solid #3d3d4a;
}

.console-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #a0a0b0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.console-tab:hover {
    color: white;
    background: #3d3d4a;
}

.console-tab.active {
    color: white;
    border-bottom: 2px solid var(--primary-color);
}

.console-url {
    display: flex;
    padding: 16px;
    background: #2d2d3a;
    border-bottom: 1px solid #3d3d4a;
}

.url-base {
    color: #a0a0b0;
    padding: 8px 12px;
    background: #1e1e2f;
    border-radius: 6px 0 0 6px;
    font-family: monospace;
}

.url-endpoint {
    flex: 1;
    padding: 8px 12px;
    background: #1e1e2f;
    border: none;
    color: white;
    font-family: monospace;
    border-left: 1px solid #3d3d4a;
    border-right: 1px solid #3d3d4a;
}

.btn-send-request {
    padding: 8px 20px;
    background: var(--primary-color);
    border: none;
    color: white;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-weight: 500;
}

.console-request-options {
    padding: 16px;
    background: #2d2d3a;
}

.request-headers, .request-body {
    margin-bottom: 16px;
}

.request-headers h4, .request-body h4 {
    color: white;
    margin: 0 0 12px;
    font-size: 14px;
}

.header-row {
    display: flex;
    gap: 12px;
}

.header-key, .header-value {
    flex: 1;
    padding: 8px 12px;
    background: #1e1e2f;
    border: 1px solid #3d3d4a;
    border-radius: 6px;
    color: white;
}

.request-body-input {
    width: 100%;
    height: 100px;
    padding: 12px;
    background: #1e1e2f;
    border: 1px solid #3d3d4a;
    border-radius: 6px;
    color: white;
    font-family: monospace;
    resize: vertical;
}

.console-response {
    border-top: 1px solid #3d3d4a;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2d2d3a;
}

.response-header h4 {
    color: white;
    margin: 0;
    font-size: 14px;
}

.response-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.response-status.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.response-pre {
    margin: 0;
    padding: 16px;
    background: #1e1e2f;
    overflow-x: auto;
}

.response-pre code {
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* Fields Table */
.fields-table-container {
    overflow-x: auto;
}

.fields-table {
    width: 100%;
    border-collapse: collapse;
}

.fields-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.fields-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.fields-table td code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.field-type {
    display: inline-block;
    padding: 2px 8px;
    background: #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Code Examples */
.code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.code-tab {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
}

.code-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.code-example {
    display: none;
    background: #1e1e2f;
    border-radius: 8px;
    overflow: hidden;
}

.code-example.active {
    display: block;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #2d2d3a;
    color: white;
}

.copy-code-btn {
    background: none;
    border: none;
    color: #a0a0b0;
    cursor: pointer;
    font-size: 14px;
}

.copy-code-btn:hover {
    color: white;
}

.code-example pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.code-example code {
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* FAQ Grid */
.faq-categories {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.faq-category {
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.faq-category:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.faq-category.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.faq-grid {
    display: grid;
    gap: 16px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    cursor: pointer;
}

.faq-question h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-answer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer pre {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0 0;
    overflow-x: auto;
}

/* Use Cases Grid */
.usecases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.usecase-card {
    text-align: center;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s;
}

.usecase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.usecase-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.usecase-card h4 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.usecase-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Testimonials */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.testimonial-card {
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
}

.testimonial-rating {
    color: #fbbf24;
    font-size: 18px;
    margin-bottom: 12px;
}

.testimonial-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    color: var(--text-primary);
    font-size: 14px;
}

.author-info span {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

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

/* Specs List */
.specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specs-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.specs-list li:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.spec-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.method-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.method-tag.get {
    background: #dbeafe;
    color: #2563eb;
}

.method-tag.post {
    background: #dcfce7;
    color: #16a34a;
}

.method-tag.put {
    background: #fef9c3;
    color: #ca8a04;
}

/* Pricing Card */
.pricing-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pricing-option {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.pricing-option.popular {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.plan-name {
    font-weight: 600;
    color: var(--text-primary);
}

.plan-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.price-period {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.plan-features li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.quick-action:hover {
    background: #f8fafc;
}

.action-icon {
    width: 24px;
    font-size: 18px;
}

.action-text {
    flex: 1;
    font-size: 14px;
}

.action-arrow {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Related Endpoints */
.related-endpoints {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.related-endpoint:last-child {
    border-bottom: none;
}

.related-endpoint .method {
    width: 60px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.related-endpoint .path {
    font-family: monospace;
    font-size: 13px;
}

/* SDK List */
.sdk-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sdk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.sdk-item:hover {
    background: #f8fafc;
}

.sdk-icon {
    font-size: 20px;
    width: 24px;
}

.sdk-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.sdk-version {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Updates Timeline */
.update-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.update-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.update-item:last-child {
    border-bottom: none;
}

.update-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.update-badge.new {
    background: #dbeafe;
    color: #2563eb;
}

.update-badge.fix {
    background: #fee2e2;
    color: #dc2626;
}

.update-badge.feature {
    background: #dcfce7;
    color: #16a34a;
}

.update-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.update-date {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Support Card */
.support-options {
    display: flex;
    gap: 12px;
    margin: 20px 0 16px;
}

.support-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
}

.support-response {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.response-indicator {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Newsletter Card */
.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}

.newsletter-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
    .api-layout-grid {
        grid-template-columns: 1fr 320px;
    }
    
    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .api-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .api-hero {
        padding: 40px 20px;
    }
    
    .api-title {
        font-size: 32px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .quick-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .usecases-grid {
        grid-template-columns: 1fr;
    }
    
    .code-tabs {
        flex-wrap: wrap;
    }
    
    .code-tab {
        flex: 1 1 auto;
    }
    
    .support-options {
        flex-wrap: wrap;
    }
    
    .support-option {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.api-section {
    animation: fadeIn 0.6s ease-out;
}

/* Hover Effects */
.sidebar-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* SEO Content Styling */
.api-description .lead-text {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 30px;
    border-left: 4px solid #2563eb;
    padding-left: 20px;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.seo-feature h3 {
    color: #0f172a;
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.seo-feature p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

.seo-bottom-line {
    background: #f1f5f9;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.seo-bottom-line h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .seo-grid { grid-template-columns: 1fr; }
}


/* Listing page */

/* Modern API Listing Page Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.api-category-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Hero Section */
.api-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 60px 40px;
    margin: 40px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.api-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><path d="M20 20 L80 20 L80 80 L20 80 Z" stroke="white" fill="none" stroke-width="2"/><circle cx="50" cy="50" r="10" stroke="white" fill="none" stroke-width="2"/></svg>') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}


/* Filter Section */
.filter-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    margin: 30px 0;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.filter-container {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: var(--bg-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    padding: 0 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.apply-filters-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.apply-filters-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.clear-filters-btn {
    padding: 12px 24px;
    background: var(--bg-light);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

.clear-filters-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* API Grid */
.api-grid-section {
    margin: 40px 0;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* API Card */
.api-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.api-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

.api-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.api-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.api-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.api-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    background: white;
}

.api-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.api-category-badge {
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-price-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-price-badge.free {
    background: #10b981;
    color: white;
}

.api-price-badge.freemium {
    background: #f59e0b;
    color: white;
}

.api-price-badge.paid {
    background: #6366f1;
    color: white;
}

.api-card-body {
    padding: 20px;
    flex: 1;
}

.api-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.api-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.api-title a:hover {
    color: var(--primary-color);
}

.api-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.api-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #d1d5db;
    font-size: 14px;
}

.star.filled {
    color: #fbbf24;
}

.rating-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.reviews-count {
    color: var(--text-secondary);
    font-size: 12px;
}

.api-metrics {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 13px;
}

.metric svg {
    color: var(--primary-color);
}

.api-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.api-card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light);
}

.btn-view-api {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-view-api:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
}

.btn-quick-view {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-quick-view:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .prev,
.pagination .next {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.no-results-content svg {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.no-results-content h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.no-results-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-reset {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* SEO Content Section */
.seo-content-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
    border: 1px solid var(--border-color);
}

.seo-content h2 {
    font-size: 32px;
    margin: 0 0 20px;
    color: var(--text-primary);
}

.seo-content h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--text-primary);
}

.seo-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.seo-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-content li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
}

.seo-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.use-case {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.use-case h4 {
    margin: 0 0 10px;
    color: var(--text-primary);
}

.use-case p {
    margin: 0;
    font-size: 14px;
}

.code-example {
    background: #1e1e2f;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.code-example pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .api-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .api-hero-section {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .apply-filters-btn,
    .clear-filters-btn {
        width: 100%;
        text-align: center;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .seo-content-section {
        padding: 20px;
    }
    
    .seo-content h2 {
        font-size: 24px;
    }
    
    .seo-content h3 {
        font-size: 20px;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.api-card.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Quick View Modal (to be implemented) */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.quick-view-modal.active {
    display: flex;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}