* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0d0f14;
    color: #e0e2e8;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
}

/* Font weight definitions for Typography Compliance */
body {
    font-weight: 400;
}

.doc-header,
.section-title,
.endpoint-name,
.metric-value {
    font-weight: 600;
}

/* Additional font weight specifications */
.logo {
    font-weight: 700;
}

.code-block {
    font-weight: 400;
}

.code-block-bold {
    font-weight: 500;
}

/* Animation keyframes for smooth transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Color Palette - All Design Colors */
:root {
    --color-dark-bg: #0d0f14;
    --color-main-bg: #111318;
    --color-panel-bg: #181b22;
    --color-alt-bg: #1a1d24;
    --color-success: #22c55e;
    --color-border: #2a2d36;
    --color-teal: #2dd4bf;
    --color-blue: #3b82f6;
    --color-gray: #6b7280;
    --color-purple: #a78bfa;
    --color-light-text: #e0e2e8;
    --color-error: #ef4444;
    --color-warning: #fbbf24;
}

/* Main Layout */
.container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: #0d0f14;
    border-right: 1px solid #2a2d36;
    overflow-y: auto;
    padding: 24px 16px;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2a2d36;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #e0e2e8;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Endpoint sections */
.endpoints-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 0 8px;
}

.endpoint-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 1px solid transparent;
}

.endpoint-item:hover {
    background-color: #181b22;
    border-color: #2a2d36;
}

.endpoint-item.active {
    background-color: #1a1d24;
    border-color: #3b82f6;
    color: #22c55e;
}

.endpoint-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e0e2e8;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sparkline {
    width: 80px;
    height: 20px;
    flex-shrink: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Main Content Area */
.main-content {
    background-color: #111318;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* API Console */
.api-console {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background-color: #2a2d36;
    border: 1px solid #2a2d36;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}

.console-request,
.console-response {
    background-color: #0d0f14;
    padding: 20px;
}

.console-header {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2d36;
}

/* Code blocks */
.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #9ca3af;
}

.code-text {
    color: #9ca3af;
}

.code-keyword {
    color: #8b5cf6;
}

.code-key {
    color: #a78bfa;
}

.code-string {
    color: #2dd4bf;
}

.code-number {
    color: #fbbf24;
}

.code-indent {
    display: block;
    margin-left: 20px;
}

.code-indent-2 {
    display: block;
    margin-left: 40px;
}

/* Inline chart */
.inline-chart {
    width: 100%;
    height: 120px;
    margin-top: 24px;
    border: 1px solid #2a2d36;
    border-radius: 4px;
    padding: 12px;
    background-color: #0d0f14;
}

/* Documentation */
.documentation {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.doc-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.doc-header {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 600;
    color: #e0e2e8;
    letter-spacing: -0.01em;
}

.doc-text {
    color: #9ca3af;
    line-height: 1.7;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: #181b22;
    border: 1px solid #2a2d36;
    border-radius: 4px;
    margin-top: 12px;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 80px;
}

.metric-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0e2e8;
    flex: 1;
}

/* Endpoint Reference */
.endpoint-reference {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.endpoint-detail {
    padding: 24px;
    background-color: #181b22;
    border: 1px solid #2a2d36;
    border-radius: 4px;
}

.endpoint-signature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2d36;
}

.http-method {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.http-method.post {
    background-color: #3b82f6;
    color: #fff;
}

.endpoint-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #2dd4bf;
}

.endpoint-description {
    color: #9ca3af;
    margin-bottom: 16px;
}

.parameters-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.param-row {
    display: grid;
    grid-template-columns: 120px 100px 1fr;
    gap: 16px;
    padding: 12px;
    background-color: #0d0f14;
    border-radius: 2px;
    font-size: 0.875rem;
}

.param-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: #c084fc;
}

.param-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #2dd4bf;
    text-transform: uppercase;
}

.param-desc {
    color: #9ca3af;
}

/* Footer */
.footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #2a2d36;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #6b7280;
}

.footer-content p {
    font-size: 0.9rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2a2d36;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #404450;
}

/* Error state styling */
.error,
.error-state {
    color: #ef4444;
    border-color: #ef4444;
}

/* Success state styling */
.success,
.success-state {
    color: #22c55e;
    border-color: #22c55e;
}

/* Alternate background usage */
.alt-panel {
    background-color: #1a1d24;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .api-console {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 20px;
        gap: 32px;
    }
}
