/*
API View Page Styles
Complete styling for individual API detail pages
*/

/* Main Layout */
.api-view-main {
    /* No margin-top since hero extends to top */
}

/* Hero Section */
.api-hero {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 85px 0 28px; /* Account for fixed header at top */
    position: relative;
    overflow: visible; /* Allow dropdowns to extend beyond hero */
}

.api-hero .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.api-hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.8125rem;
}

.breadcrumb-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    color: var(--color-text-tertiary);
    margin: 0 8px;
}

.breadcrumb-current {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* API Header */
.api-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.api-header-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.api-icon-large {
    font-size: 2.5rem;
    line-height: 1;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.api-icon-img {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
    border-radius: var(--radius-sm);
    max-width: 100%;
    max-height: 100%;
}

.api-header-info {
    flex: 1;
    max-width: 700px;
}

.api-description-inline {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin: 18px 0;
}

.api-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.api-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.api-category-hero {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.api-category-link {
    text-decoration: none;
    transition: color 0.2s ease;
}

.api-category-link:hover {
    color: var(--color-primary);
}

.api-status {
    background: var(--color-success-bg);
    color: var(--color-success);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

[data-theme="dark"] .api-status {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.api-rating .stars {
    display: flex;
    gap: 2px;
}

.api-rating .star {
    font-size: 1rem;
    color: var(--color-text-tertiary);
    transition: color 0.2s ease;
}

.api-rating .star.filled {
    color: #fbbf24;
}

/* CTA Buttons */
.api-cta-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.api-cta-buttons .btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}


/* Hero Metrics */
.api-metrics-hero {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 12px;
}

/* Desktop metrics (inside header) - show on desktop, hide on mobile */
.api-metrics-desktop {
    display: flex;
}

.api-metrics-mobile {
    display: none;
}

/* Performance metrics container - subtle inline display */
.perf-metrics-container.api-metrics-desktop {
    display: inline-flex;
}

.perf-metrics-container.api-metrics-mobile {
    display: none;
}

.metric-pill-hero {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.metric-pill-hero:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.metric-pill-hero.excellent {
    border-color: var(--color-success);
    background: var(--color-success-bg);
}

[data-theme="dark"] .metric-pill-hero.excellent {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
}

.metric-pill-hero.excellent .metric-icon {
    color: var(--color-success);
}

.metric-pill-hero .metric-icon {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
}

.metric-pill-hero .metric-label {
    font-weight: 500;
}

.metric-pill-link {
    text-decoration: none;
    cursor: pointer;
}

.metric-pill-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.metric-pill-link .metric-icon {
    color: var(--color-text-tertiary);
}

/* Live Test Section */
.live-test-section {
    padding: 40px 0 60px 0;
    background: var(--color-background);
}

.live-test-section .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.live-test-header {
    text-align: center;
    margin-bottom: 36px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.section-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Live Test Content */
.live-test-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start; /* Let each panel size to its content, JS will sync heights */
    min-width: 0; /* Prevent grid items from overflowing */
}

/* Request Panel */
.test-request-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-self: start; /* Size to content */
}

.test-response-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-width: 0; /* Prevent overflow */
    overflow: hidden; /* Contain content */
    box-sizing: border-box;
    /* Height set by JS to match request panel */
}

[data-theme="dark"] .test-request-panel,
[data-theme="dark"] .test-response-panel {
    background: var(--color-surface);
    border-color: var(--color-border);
}

.request-header,
.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.request-header h3,
.response-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.method-badge {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Request URL */
.request-url {
    margin-bottom: 12px;
}

.url-input-group {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-background);
}

.url-base {
    background: var(--color-surface-alt);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    border-right: 1px solid var(--color-border);
    white-space: nowrap;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.url-endpoint {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-primary);
    min-height: 20px;
}

.url-endpoint:focus {
    outline: none;
}

/* Request Options */
.request-options {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-sm);
}

.option-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-group label {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.format-select {
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
    font-size: 0.8125rem;
    color: var(--color-text-primary);
}

/* Try it hint badge with shimmer effect */
.format-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 6px;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid #3b82f6;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    animation: formatHintShimmer 8s ease-in-out infinite;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.format-hint.fade-out {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

.format-hint i {
    font-size: 0.8rem;
}

@keyframes formatHintShimmer {
    0%, 30%, 100% {
        border-color: #3b82f6;
        color: #3b82f6;
    }
    5% {
        border-color: #8b5cf6;
        color: #8b5cf6;
    }
    10% {
        border-color: #6366f1;
        color: #6366f1;
    }
    15% {
        border-color: #ec4899;
        color: #ec4899;
    }
    20% {
        border-color: #06b6d4;
        color: #06b6d4;
    }
    25% {
        border-color: #8b5cf6;
        color: #8b5cf6;
    }
}

[data-theme="dark"] .format-hint {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: #60a5fa;
}

[data-theme="dark"] .format-hint {
    animation: formatHintShimmerDark 8s ease-in-out infinite;
}

@keyframes formatHintShimmerDark {
    0%, 30%, 100% {
        border-color: #60a5fa;
        color: #60a5fa;
    }
    5% {
        border-color: #a78bfa;
        color: #a78bfa;
    }
    10% {
        border-color: #818cf8;
        color: #818cf8;
    }
    15% {
        border-color: #f472b6;
        color: #f472b6;
    }
    20% {
        border-color: #22d3ee;
        color: #22d3ee;
    }
    25% {
        border-color: #a78bfa;
        color: #a78bfa;
    }
}

.execute-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
}

/* Auth Notice */
.auth-notice {
    background: rgba(59, 130, 246, 0.02);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: auto;
}

[data-theme="dark"] .auth-notice {
    background: rgba(59, 130, 246, 0.03);
    border-color: rgba(59, 130, 246, 0.15);
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.auth-header i {
    color: var(--color-primary);
    font-size: 1rem;
}

[data-theme="dark"] .auth-header i {
    color: #60a5fa;
}

.auth-header > span {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.875rem;
}

.auth-description {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin: 6px 0 12px 0;
    line-height: 1.4;
}

/* CTA Benefits */
.cta-benefits {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.benefit-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

[data-theme="dark"] .benefit-pill {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
}

.benefit-pill i {
    font-size: 0.6875rem;
    color: var(--color-primary);
}

[data-theme="dark"] .benefit-pill i {
    color: #60a5fa;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Response Panel */
.response-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background: none;
    border: 1px solid var(--color-border);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.tab-btn:hover:not(.active) {
    background: var(--color-surface-alt);
}

/* Response Content */
.response-content {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100% - 50px); /* Account for response-header */
}

.response-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-code {
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-mono);
}

.status-code.success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

[data-theme="dark"] .status-code.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.api-view-main .copy-btn {
    background: none;
    border: 1px solid var(--color-border);
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
}

.api-view-main .copy-btn:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.api-view-main .copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
    transition: all 0.3s ease;
}

.api-view-main .copy-btn.copied:hover {
    background: #059669;
    border-color: #059669;
    color: white;
}

.api-view-main .copy-btn .copy-text {
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Response Body */
.response-body {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow-y: auto;
    overflow-x: auto;
    height: calc(100% - 40px); /* Account for response-status */
    padding-bottom: 7px;
}

[data-theme="dark"] .response-body {
    background: var(--color-surface);
    border-color: var(--color-border);
}

/* API View Response Code Block - scoped to prevent affecting other pages */
.response-body .code-block {
    margin: 0;
    padding: 14px;
    padding-bottom: 24px;
    overflow-x: auto;
    overflow-y: auto;
    background: transparent;
    min-height: 100%;
    width: 100%;
    box-sizing: border-box;
    font-size: 11px !important;
    display: flex;
}

.response-body .code-block .line-numbers {
    user-select: none;
    text-align: right;
    padding-right: 8px;
    margin-right: 10px;
    border-right: 1px solid var(--color-border);
    color: var(--color-text-tertiary, #aaa);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.77;
    min-width: 1.5em;
    opacity: 0.7;
}

.response-body .code-block .line-numbers span {
    display: block;
}

[data-theme="dark"] .response-body .code-block .line-numbers {
    color: #6b7280;
    border-color: var(--color-border);
}

#requestBody {
    font-size: 13px !important;
}

.response-body .code-block code {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 11px !important;
    line-height: 1.77;
    color: var(--color-text-primary);
    white-space: pre;
    word-break: break-all; /* Prevent long lines from overflowing */
    overflow-wrap: break-word;
}

[data-theme="dark"] .response-body .code-block code {
    color: #e2e8f0;
}

/* CSV Table Display */
.csv-table-container {
    overflow-x: auto;
    overflow-y: auto;
    min-height: 250px;
    max-height: 300px;
    background: var(--color-code-bg);
    border-radius: var(--radius-sm);
}

.csv-table {
    min-width: 100%;
    width: max-content;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--font-mono);
}

.csv-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.csv-table th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border: none;
    white-space: nowrap;
}

.csv-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.csv-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    white-space: nowrap;
}

.csv-table tbody tr:hover {
    background: var(--color-background-hover);
}

.csv-table tbody tr:nth-child(even) {
    background: var(--color-background-alt);
}

.csv-table tbody tr:nth-child(even):hover {
    background: var(--color-background-hover);
}

/* Field column styling */
.csv-table td:first-child {
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-background-alt);
}

/* Empty rows to fill space */
.csv-table tbody tr.empty-row td {
    height: 32px;
    border-bottom: 1px solid var(--color-border);
}

[data-theme="dark"] .csv-table th {
    background: var(--color-primary);
}

[data-theme="dark"] .csv-table td {
    border-bottom-color: var(--color-border);
}

[data-theme="dark"] .csv-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive Design */
@media (max-width: 768px) {
    .api-hero {
        padding: 100px 0 35px;
    }

    .api-hero .container,
    .live-test-section .container {
        padding: 0 16px;
    }

    .breadcrumb {
        margin-bottom: 18px;
    }

    .api-header {
        flex-direction: column;
        gap: 24px;
    }

    .api-header-main {
        flex-direction: row;
        gap: 14px;
        text-align: left;
    }

    .api-icon-large {
        width: 64px;
        height: 64px;
    }

    .api-icon-img {
        width: 52px !important;
        height: 52px !important;
    }

    .api-title {
        font-size: 1.35rem;
    }

    .api-cta-buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .api-metrics-desktop {
        display: none !important;
    }

    .api-metrics-mobile {
        display: flex !important;
    }

    .perf-metrics-container.api-metrics-mobile {
        display: inline-flex !important;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .live-test-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .test-response-panel {
        max-height: 400px;
        height: auto !important; /* Override JS height on mobile */
    }

    .url-input-group {
        flex-direction: column;
    }
    
    .url-base {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    
    .request-options {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .option-group {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .api-hero {
        padding: 90px 0 30px;
    }

    .api-hero .container,
    .live-test-section .container {
        padding: 0 12px;
    }

    .breadcrumb {
        margin-bottom: 16px;
    }

    .api-header-main {
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
    }

    .api-icon-large {
        font-size: 2rem;
        width: 56px;
        height: 56px;
    }

    .api-icon-img {
        width: 48px !important;
        height: 48px !important;
    }

    .api-title {
        font-size: 1.15rem;
    }

    .api-meta {
        gap: 6px;
        flex-wrap: wrap;
    }

    .api-rating .star {
        font-size: 0.85rem;
    }

    .api-cta-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .api-cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .api-cta-buttons .ai-dropdown-container {
        width: 100%;
    }

    .api-cta-buttons .ai-dropdown-container .btn {
        width: 100%;
        justify-content: center;
    }

    .api-metrics-mobile {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .perf-metrics-container.api-metrics-mobile {
        display: inline-flex !important;
        grid-template-columns: unset;
    }

    .metric-pill-hero {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .metric-pill-hero .metric-icon {
        font-size: 0.875rem;
    }

    .test-request-panel,
    .test-response-panel {
        padding: 16px;
    }
}

/* Color Definitions */
:root {
    --color-success: #10b981;
    --color-success-bg: #f0fdf4;
    --color-warning: #f59e0b;
    --color-warning-bg: #fefce8;
    --color-code-bg: #f8fafc;
}

[data-theme="dark"] {
    --color-success: #34d399;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-warning: #fbbf24;
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-code-bg: #1e293b;
}

/* Prism.js Overrides - Remove default backgrounds */
.code-block pre[class*="language-"],
.code-block code[class*="language-"],
.response-body pre[class*="language-"],
.response-body code[class*="language-"] {
    background: transparent !important;
    text-shadow: none !important;
}

.code-block .token,
.response-body .token {
    background: transparent !important;
}

/* Light mode Prism token colors */
.code-block .token.property,
.response-body .token.property {
    color: #6f42c1;
}

.code-block .token.string,
.response-body .token.string {
    color: #22863a;
}

.code-block .token.number,
.code-block .token.boolean,
.response-body .token.number,
.response-body .token.boolean {
    color: #005cc5;
}

.code-block .token.null,
.response-body .token.null {
    color: #d73a49;
}

.code-block .token.punctuation,
.response-body .token.punctuation {
    color: #6a737d;
}

.code-block .token.operator,
.response-body .token.operator {
    color: #d73a49;
}

/* Dark mode Prism token colors */
[data-theme="dark"] .code-block .token.property,
[data-theme="dark"] .response-body .token.property {
    color: #d2a8ff;
}

[data-theme="dark"] .code-block .token.string,
[data-theme="dark"] .response-body .token.string {
    color: #a5d6ff;
}

[data-theme="dark"] .code-block .token.number,
[data-theme="dark"] .code-block .token.boolean,
[data-theme="dark"] .response-body .token.number,
[data-theme="dark"] .response-body .token.boolean {
    color: #79c0ff;
}

[data-theme="dark"] .code-block .token.null,
[data-theme="dark"] .response-body .token.null {
    color: #ff7b72;
}

[data-theme="dark"] .code-block .token.punctuation,
[data-theme="dark"] .response-body .token.punctuation {
    color: #8b949e;
}

[data-theme="dark"] .code-block .token.operator,
[data-theme="dark"] .response-body .token.operator {
    color: #ff7b72;
}

[data-theme="dark"] .code-block code,
[data-theme="dark"] .response-body code {
    color: #e2e8f0;
}

/* Clickable URLs in JSON responses */
.json-url-link {
    color: #0969da;
    text-decoration: underline;
    text-decoration-color: rgba(9, 105, 218, 0.4);
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.json-url-link:hover {
    color: #0550ae;
    text-decoration-color: #0550ae;
}

[data-theme="dark"] .json-url-link {
    color: #58a6ff;
    text-decoration-color: rgba(88, 166, 255, 0.4);
}

[data-theme="dark"] .json-url-link:hover {
    color: #79c0ff;
    text-decoration-color: #79c0ff;
}

/* XML Syntax Highlighting */
.xml-tag {
    color: #0066cc;
    font-weight: 500;
}

[data-theme="dark"] .xml-tag {
    color: #60a5fa;
}

/* YAML Syntax Highlighting */
.yaml-key {
    color: #0066cc;
    font-weight: 500;
}

.yaml-string {
    color: #22c55e;
}

.yaml-number {
    color: #f59e0b;
}

.yaml-boolean {
    color: #8b5cf6;
    font-weight: 500;
}

[data-theme="dark"] .yaml-key {
    color: #60a5fa;
}

[data-theme="dark"] .yaml-string {
    color: #34d399;
}

[data-theme="dark"] .yaml-number {
    color: #fbbf24;
}

[data-theme="dark"] .yaml-boolean {
    color: #a78bfa;
}

/* Developer Packages Section */
.developer-packages {
    padding: 60px 0;
    background: var(--color-background);
}

.developer-packages .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary-bg);
    color: var(--color-primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 16px;
}

[data-theme="dark"] .dev-badge {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.accent-text {
    color: var(--color-primary);
}

[data-theme="dark"] .accent-text {
    color: #60a5fa;
}

.section-header p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.sdk-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.sdk-all-link:hover {
    gap: 0.75rem;
}

.sdk-all-link i {
    font-size: 0.75rem;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.package-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: all 0.3s ease;
}

.package-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.package-tech {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

.nuget .tech-icon {
    color: #512bd4;
}

.pypi .tech-icon {
    color: #3776ab;
}

.npm .tech-icon {
    color: #cb3837;
}

.tech-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 2px 0;
}

.tech-info span {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.package-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-dot.available {
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1);
    }
    100% {
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    }
}

.package-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.action-btn.primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border: 1px solid var(--color-primary);
}

.action-btn.primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.action-btn.secondary {
    background: var(--color-background);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.action-btn.secondary:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-primary);
}

/* Other Languages */
.other-languages {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.other-lang-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.lang-text {
    flex: 1;
}

.lang-text strong {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.lang-text span {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-sm i {
    margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .developer-packages {
        padding: 60px 0;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .other-lang-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .package-actions {
        flex-direction: column;
    }
    
    .action-btn {
        flex: none;
    }
}

/* Similar APIs Section */
.similar-apis {
    padding: 80px 0 60px 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
}

.similar-apis .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.similar-apis-header {
    text-align: center;
    margin-bottom: 48px;
}

.similar-apis-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.similar-apis-header p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Reuse existing API cards grid styles */
.similar-apis .api-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

/* Explore All Section */
.explore-all-section {
    text-align: center;
    padding-top: 24px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-lg i {
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .similar-apis {
        padding: 60px 0;
    }
    
    .similar-apis-header h2 {
        font-size: 1.75rem;
    }
    
    .similar-apis .api-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* FAQ Section Spacing Fix */
.faq {
    padding-top: 80px !important;
}

/* Human Verification Section */
.verification-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cf-turnstile {
    /* Turnstile widget will be centered within this container */
}

/* Execute button disabled state when not verified */
.execute-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.execute-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive formats grid */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .formats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        max-width: 600px !important;
    }
}

/* Hide Multiple Access Methods section on mobile */
@media (max-width: 768px) {
    .supported-formats-section {
        display: none;
    }
}

/* Theme-aware Scrollbars for Response Types */
.response-body,
.code-block,
.csv-table-container {
    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Light theme scrollbar colors */
:root {
    --scrollbar-thumb: #c1c1c1;
    --scrollbar-thumb-hover: #a8a8a8;
    --scrollbar-track: #f1f1f1;
}

/* Dark theme scrollbar colors */
[data-theme="dark"] {
    --scrollbar-thumb: #4a5568;
    --scrollbar-thumb-hover: #5a6a7e;
    --scrollbar-track: #1e293b;
}

/* Webkit browsers (Chrome, Safari, Edge) scrollbar styling */
.response-body::-webkit-scrollbar,
.code-block::-webkit-scrollbar,
.csv-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.response-body::-webkit-scrollbar-track,
.code-block::-webkit-scrollbar-track,
.csv-table-container::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

.response-body::-webkit-scrollbar-thumb,
.code-block::-webkit-scrollbar-thumb,
.csv-table-container::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
    border: 1px solid var(--scrollbar-track);
}

.response-body::-webkit-scrollbar-thumb:hover,
.code-block::-webkit-scrollbar-thumb:hover,
.csv-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Corner styling when both scrollbars are visible */
.response-body::-webkit-scrollbar-corner,
.code-block::-webkit-scrollbar-corner,
.csv-table-container::-webkit-scrollbar-corner {
    background: var(--scrollbar-track);
}