:root {
    --primary-blue: #1a73e8;
    --primary-dark: #174ea6;
    --primary-light: #e8f0fe;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #dadce0;
    --text-main: #202124;
    --text-muted: #5f6368;
    --code-bg: #1e2023;
    --code-text: #e8eaed;
    --sidebar-width: 280px;
    --code-panel-width: 400px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-light);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-blue {
    color: var(--primary-blue);
}

.logo-docs {
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-group {
    margin-bottom: 24px;
}

.nav-group-title {
    padding: 0 24px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-item {
    display: block;
    padding: 8px 24px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-blue);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
}

/* Main Content Styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents overflow in flex items */
}

.content-header {
    height: 64px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    background-color: var(--bg-white);
    z-index: 90;
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-light);
}

.docs-container {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.endpoint-section {
    margin-bottom: 80px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.endpoint-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.endpoint-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-get { background-color: #e3f2fd; color: #1976d2; }
.badge-post { background-color: #e8f5e9; color: #388e3c; }
.badge-put { background-color: #fff3e0; color: #f57c00; }
.badge-delete { background-color: #ffebee; color: #d32f2f; }

.path-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-main);
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.param-table th, .param-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.param-table th {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.param-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Code Panel Styling */
.code-panel {
    width: var(--code-panel-width);
    background-color: var(--code-bg);
    color: var(--code-text);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.code-panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid #3c4043;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-select {
    background-color: #3c4043;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    outline: none;
}

.btn-copy {
    background-color: transparent;
    color: #9aa0a6;
    border: 1px solid #3c4043;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    color: white;
    border-color: #5f6368;
}

.code-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.code-container pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.code-panel ::-webkit-scrollbar-thumb {
    background: #3c4043;
}

/* Responsive */
@media (max-width: 1200px) {
    .code-panel {
        display: none; /* Hide code panel on smaller screens or implement a toggle */
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none; /* Mobile menu needed here */
    }
    .content-header {
        padding: 0 20px;
    }
    .docs-container {
        padding: 20px;
    }
}
