/* Modern API Documentation Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-accent: #3b82f6;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --sidebar-width: 320px;
    --header-height: 70px;
}

/* Method Badge Styles */
.method-badge {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 6px;
    border: 1px solid;
    min-width: 32px;
    text-align: center;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    flex-shrink: 0;
    pointer-events: none;
}

/* Light mode method badge colors */
.method-badge.get {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.method-badge.post {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.method-badge.put {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.method-badge.patch {
    background-color: #e0e7ff;
    color: #5b21b6;
    border-color: #c4b5fd;
}

.method-badge.delete {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Dark mode specific styles */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-accent: #3b82f6;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
}

/* Dark mode method badge colors */
[data-theme="dark"] .method-badge.get {
    background-color: #064e3b;
    color: #6ee7b7;
    border-color: #047857;
}

[data-theme="dark"] .method-badge.post {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #2563eb;
}

[data-theme="dark"] .method-badge.put {
    background-color: #92400e;
    color: #fcd34d;
    border-color: #d97706;
}

[data-theme="dark"] .method-badge.patch {
    background-color: #5b21b6;
    color: #c4b5fd;
    border-color: #7c3aed;
}

[data-theme="dark"] .method-badge.delete {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #dc2626;
}



[data-theme="dark"] pre[class*="language-"] {
    background: #1e293b !important;
}

[data-theme="dark"] code[class*="language-"] {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .code-inline {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .auth-token {
    background: #0f172a !important;
    color: #10b981 !important;
}

[data-theme="dark"] .nav-auth-badge.required {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .nav-auth-badge.public {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .auth-badge.required {
    background: #7f1d1d;
    color: #fca5a5;
    border-color: #991b1b;
}

[data-theme="dark"] .auth-badge.public {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #047857;
}

/* Dark mode method badges */
[data-theme="dark"] .method-get { 
    background: #064e3b; 
    color: #6ee7b7; 
}

[data-theme="dark"] .method-post { 
    background: #1e3a8a; 
    color: #93c5fd; 
}

[data-theme="dark"] .method-put { 
    background: #92400e; 
    color: #fcd34d; 
}

[data-theme="dark"] .method-delete { 
    background: #7f1d1d; 
    color: #fca5a5; 
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.toggle-btn span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s;
}

.toggle-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.toggle-btn.active span:nth-child(2) {
    opacity: 0;
}

.toggle-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.version {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.toggle-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 1px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: var(--bg-secondary);
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Navigation */
.nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-item.active .nav-arrow {
    color: white;
}

.nav-icon {
    font-size: 1rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: var(--text-muted);
}

.nav-item.expanded .nav-arrow {
    transform: rotate(90deg);
}

.nav-subitems {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-left: 1rem;
    border-left: 2px solid var(--border-light);
    opacity: 0;
}

.nav-subitems.collapsed {
    max-height: 0;
    opacity: 0;
}

.nav-subitems.expanded {
    max-height: 1000px;
    opacity: 1;
}

.nav-item.expandable {
    cursor: pointer;
}

.nav-item.expandable .nav-arrow {
    transition: transform 0.3s ease;
}

.nav-subitem {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    margin: 0.125rem 0;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-subitem .endpoint-text {
    flex: 1;
    text-align: left;
    min-width: 0;
    pointer-events: none;
}



.nav-subitem:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.nav-subitem.active {
    background: var(--primary-color);
    color: white;
}

.nav-auth-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 0.5rem;
    flex-shrink: 0;
    pointer-events: none;
}

.nav-auth-badge.required {
    background: #fee2e2;
    color: #dc2626;
}

.nav-auth-badge.public {
    background: #d1fae5;
    color: #059669;
}

.nav-subitem::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    width: 6px;
    height: 1px;
    background: var(--border-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-secondary);
    transition: margin-left 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}



.main-content.expanded {
    margin-left: 0;
    width: 100%;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

/* Content Sections */
.content-section {
    display: none;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    width: 100%;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Important Notes in Main Content */
.main-content > .important-notes {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Dynamic endpoint sections styling */
#dynamicSections {
    padding: 0 1rem;
}

#dynamicSections .content-section {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 2rem;
}

.content-section.endpoint {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

@media (max-width: 768px) {
    .main-content > .important-notes {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    #dynamicSections {
        padding: 0 0.5rem;
    }
    
    #dynamicSections .content-section {
        padding: 1rem;
        margin: 0 auto 1rem auto;
    }
}

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

.section-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Version label next to title */
.version-label {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.2em 0.8em;
    vertical-align: middle;
    margin-left: 0.25rem;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(59,130,246,0.08);
}

.info-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s;
}

/* Base URL card spans 2 columns to accommodate longer URL */
.base-url-card {
    grid-column: span 2;
}

.base-url-card .code-inline {
    word-break: break-all;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-inline {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.feature-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.feature-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Authentication Flow */
.auth-flow {
    margin-bottom: 2rem;
}

.auth-flow h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.flow-steps {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.flow-step {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Code Examples */
.code-example {
    margin: 1.5rem 0;
}

.code-example h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.code-example pre {
    background: #1e293b;
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.code-example code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* API Endpoint Styles */
.endpoint {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.endpoint-header {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-get { background: #dcfce7; color: #166534; }
.method-post { background: #dbeafe; color: #1d4ed8; }
.method-put { background: #fef3c7; color: #92400e; }
.method-delete { background: #fee2e2; color: #dc2626; }

.endpoint-path {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.endpoint-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: auto;
}

.endpoint-content {
    padding: 2rem;
}

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

.endpoint-section:last-child {
    margin-bottom: 0;
}

.endpoint-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1rem;
}

/* Parameter Tables */
.param-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 1rem 0;
}

.param-table th {
    background: var(--bg-secondary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.param-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

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

.param-name {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.param-type {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.param-required {
    background: var(--error-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.param-optional {
    background: var(--warning-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Response Examples */
.response-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.response-tab {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.response-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.response-tab:hover {
    color: var(--primary-color);
}

.response-content {
    display: none;
}

.response-content.active {
    display: block;
}

.status-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-200 { background: #dcfce7; color: #166534; }
.status-400 { background: #fef3c7; color: #92400e; }
.status-401 { background: #fee2e2; color: #dc2626; }
.status-500 { background: #f3f4f6; color: #374151; }

/* WebSocket Styles */
.ws-connection {
    margin-bottom: 2rem;
}

.ws-connection h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.ws-topics {
    margin-top: 2rem;
}

.ws-topics h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.topic-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.topic-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.topic-item code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.topic-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Error Codes Styles */
.error-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.error-category {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.error-category h3 {
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.error-list {
    padding: 1rem;
}

.error-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}

.error-item:last-child {
    margin-bottom: 0;
}

.error-item code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.error-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .toggle-btn {
        display: flex;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .base-url-card {
        grid-column: span 2;
    }
    
    .flow-diagram {
        flex-direction: column;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .endpoint-main {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .auth-badge {
        margin-top: 0.5rem;
    }
}

/* Sidebar overlay for mobile - outside media query */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

@media (max-width: 1024px) {
    .sidebar-overlay {
        display: block;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0.5rem;
    }
    
    .content-section {
        padding: 1rem;
        margin: 0;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .endpoint-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .endpoint-content {
        padding: 1rem;
    }
    
    .section-header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-header h1 {
        font-size: 1.5rem;
    }
    
    .param-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .param-table th,
    .param-table td {
        padding: 0.5rem;
    }
    
    .quick-start-steps {
        gap: 1.5rem;
    }
    
    .step-header {
        padding: 1rem;
    }
    
    .step-content {
        padding: 1rem;
    }
    
    .important-notes {
        grid-template-columns: 1fr;
    }
    
    .token-info {
        grid-template-columns: 1fr;
    }
    
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-methods {
        grid-template-columns: 1fr;
    }
    
    .header-controls {
        gap: 0.25rem;
    }
    
    .theme-toggle,
    .toggle-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .content-wrapper {
        padding: 0.75rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .endpoint-content {
        padding: 0.75rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .base-url-card {
        grid-column: span 1;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
.nav-item:focus,
.nav-subitem:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Quick Start Guide Styles */
.quick-start-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.step-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.step-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.step-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    backdrop-filter: blur(10px);
}

.step-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.step-content {
    padding: 2rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.auth-header-example {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
}

.header-format {
    text-align: center;
}

.auth-token {
    display: block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    word-break: break-all;
}

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

.note-card {
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    border: 1px solid;
}

.note-card.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.note-card.info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.note-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.note-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.note-content li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Authentication Section Styles */
.auth-overview {
    margin: 2rem 0;
}

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

.auth-method {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.auth-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.method-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-method h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-method p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.flow-arrow.conditional {
    color: var(--warning-color);
}

.flow-step.conditional {
    opacity: 0.7;
    border: 2px dashed var(--warning-color);
}

.token-management {
    margin-top: 3rem;
}

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

.token-details, .token-usage {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.token-details h4, .token-usage h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.token-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.token-details li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.token-details li:last-child {
    border-bottom: none;
}

.token-details strong {
    color: var(--text-primary);
    width: 80px;
    display: inline-block;
}

/* Enhanced Endpoint Styles */
.endpoint-header {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.endpoint-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.auth-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.auth-badge.required {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-badge.public {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.auth-requirement {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.auth-requirement h4 {
    color: #92400e;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.auth-requirement p {
    color: #92400e;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-requirement .auth-header-example {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.auth-requirement .header-format {
    text-align: center;
}

.auth-requirement .header-format strong {
    display: block;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.auth-requirement .auth-token {
    display: block;
    background: #1f2937;
    color: #10b981;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin-top: 0.5rem;
}

.auth-note {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.auth-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-note a:hover {
    text-decoration: underline;
}

/* Authentication Security Features */
.auth-security {
    margin-top: 3rem;
}

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

.security-feature {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.2s;
}

.security-feature:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.security-feature h4 {
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.security-feature p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Print styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-section {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }
    
    .step-card {
        break-inside: avoid;
    }
}

/* Mobile Responsiveness for Quick Start */
@media (max-width: 768px) {
    .flow-diagram {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .important-notes {
        grid-template-columns: 1fr;
    }
    
    .token-info {
        grid-template-columns: 1fr;
    }
    
    .step-header {
        padding: 1rem;
    }
    
    .step-content {
        padding: 1rem;
    }
}

/* Authentication Clarification Styles */
.auth-clarification {
    margin: 2rem 0;
}

.clarification-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

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

.clarification-icon {
    font-size: 1.5rem;
}

.clarification-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.auth-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.auth-type {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.auth-type h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.auth-type p {
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.auth-type p:last-child {
    margin-bottom: 0;
}

.auth-type strong {
    color: var(--text-primary);
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: auto;
}

.workflow-note {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.05) 0%, 
        var(--bg-primary) 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin-top: 1.5rem;
}

.workflow-note p {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.workflow-note ol {
    margin: 0;
    padding-left: 1.5rem;
}

.workflow-note li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.workflow-note code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

/* Mobile responsiveness for auth clarification */
@media (max-width: 768px) {
    .auth-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .auth-divider {
        display: none;
    }
    
    .clarification-card {
        padding: 1.5rem;
    }
    
    .workflow-note {
        padding: 1rem;
    }
}
