:root {
    --primary-color: #0066B3;      /* Symphony Blue - consistent with React frontend */
    --secondary-color: #005299;    /* Darker blue for hover states */
    --accent-color: #F7F7F7;       /* Light gray for backgrounds */
    --text-color: #333333;         /* Symphony Gray */
    --light-text: #666666;         /* Secondary text color */
    --background-color: #FFFFFF;    /* White background */
    --sidebar-width: 15vw; /* Sidebar width */
    --header-height: 80px;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --success-color: #28A745;
    --warning-color: #FFC107;
    --error-color: #DC3545;
    --websocket-color: #17A2B8;    /* WebSocket connection color */
    --yolov8-color: #2196F3;       /* YOLOv8 model color */
    --yolov11-color: #9C27B0;      /* YOLOv11 model color */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Documentation Container */
.documentation-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--background-color);
    border-right: 1px solid #E5E7EB;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

/* Sidebar Header Styles */
.sidebar-header {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sidebar-header .logo {
    height: 50px;
    width: auto;
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.25rem;
}

.menu-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
}

.nav-links {
    list-style: none;
    padding: 1rem 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-links li a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    max-width: calc(100% - var(--sidebar-width));
}

/* Header Styles */
.header {
    background-color: var(--background-color);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #E5E7EB;
}

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

.search-box {
    position: relative;
    max-width: 400px;
    margin-top: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

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

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Content Section Styles */
.content-section {
    max-width: 100%;
}

.card {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Code Block Styles */
.code-block {
    position: relative;
    background-color: #1e293b;  /* Slightly lighter background */
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid #334155;  /* Adding border for better definition */
}

.code-block pre {
    padding: 1.25rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    color: #f8fafc;  /* Lighter text color for better contrast */
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    background: transparent;  /* Remove background from inline code within blocks */
}

/* API Documentation Code Blocks */
.endpoint-content .code-block {
    background-color: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.endpoint-content .code-block pre {
    padding: 1.25rem;
}

.endpoint-content .code-block code {
    color: #f8fafc;
    display: block;
}

/* Syntax Highlighting */
.code-block .method { color: #93c5fd; }         /* Light blue */
.code-block .string { color: #86efac; }         /* Light green */
.code-block .keyword { color: #f472b6; }        /* Pink */
.code-block .property { color: #fcd34d; }       /* Yellow */
.code-block .comment { color: #94a3b8; }        /* Gray */

/* Request/Response Labels */
.code-block-label {
    position: absolute;
    top: -12px;
    left: 10px; /* Move label to the left */
    right: auto;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

/* Error Message Code */
.error-message code {
    background: #fee2e2;
    color: #dc2626;  /* Darker red for better readability */
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Inline Code */
code {
    font-family: 'Fira Code', monospace;
    background: #f1f5f9;
    color: #1e293b;  /* Dark color for inline code */
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* API Code Blocks - Remove White Background */
.api-endpoint .code-block code {
    background: transparent;
    color: #f8fafc;
    padding: 0;
}

.endpoint-header code {
    background: transparent;
    padding: 0;
}

/* Code Block Headers */
.code-header {
    background: #334155;
    padding: 0.5rem 1rem;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    color: #f8fafc;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid #475569;
}

/* Response Examples */
.response-example {
    margin-top: 1rem;
}

.response-example .code-block {
    margin-top: 0.5rem;
}

/* Copy Button Enhancement */
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .code-block pre {
        padding: 1rem;
        font-size: 0.8125rem;
    }
    
    .code-block {
        margin: 0.75rem 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    /* Mobile overlay for sidebar */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }

    .sidebar-header .logo {
        height: 40px;
        margin-bottom: 0;
    }

    .menu-toggle {
        display: block;
        position: static;
    }
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

ul, ol {
    padding-left: 1.5rem;
}

/* Utility Classes */
.mb-4 {
    margin-bottom: 1rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray {
    color: #6b7280;
}

/* New Styles for User Guide */

.subtitle {
    color: var(--text-color);
    opacity: 0.8;
}

/* Workflow Steps */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.step {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.step-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.step-number {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Image Container */
.image-container {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.guide-image {
    width: 100%;
    height: auto;
    display: block;
}

.caption {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

/* Confidence Bars */
.confidence-example {
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
}

.confidence-bar {
    width: 150px;
    height: 8px;
    border-radius: 4px;
    margin-right: 1rem;
}

.confidence-bar.high {
    background: var(--success-color);
}

.confidence-bar.medium {
    background: var(--warning-color);
}

.confidence-bar.low {
    background: var(--error-color);
}

/* Notes and Tips */
.note {
    background: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.note i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* FAQ Items */
.faq-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.faq-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

/* Issues in Troubleshooting */
.issue {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.issue h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.issue ul {
    margin-top: 0.5rem;
}

/* Best Practices */
.best-practices ul {
    list-style: none;
    padding: 0;
}

.best-practices li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

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

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

.method {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.method:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.method i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.method h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Result Examples */
.result-example {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.result-example i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.result-example.valid i {
    color: var(--success-color);
}

.result-example.invalid i {
    color: var(--error-color);
}

.result-text {
    flex: 1;
}

.result-text h4 {
    margin-bottom: 0.25rem;
}

/* Material Design Inspired Elements */
.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Symphony Specific Styles */
.header h1 {
    color: var(--primary-color);
}

/* SVG Diagram Styles */
.diagram-card {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #E5E7EB;
}

.svg-container {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    text-align: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
    padding: 1rem;
    position: relative;
    cursor: grab;
}

.svg-container.dragging {
    cursor: grabbing;
}

.svg-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.responsive-svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    min-height: 60vh;
    max-height: 75vh;
    transition: transform 0.2s ease;
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

.fallback-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 4px;
}

/* Responsive SVG adjustments */
@media (max-width: 768px) {
    .svg-container {
        padding: 0.5rem;
    }
    
    .responsive-svg {
        min-height: 200px;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .svg-container {
        padding: 0.25rem;
    }
    
    .responsive-svg {
        min-height: 150px;
        max-height: 300px;
    }
}

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

    .workflow-steps {
        grid-template-columns: 1fr;
    }

    .step {
        margin-bottom: 2rem;
    }

    .result-example {
        flex-direction: column;
        text-align: center;
    }

    .result-example i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Analytics Dashboard Styles */
.analytics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.analytics-card {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.analytics-header h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin: 0;
}

.analytics-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 1rem 0;
}

.analytics-trend {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.analytics-trend.positive {
    color: var(--success-color);
}

.analytics-trend.negative {
    color: var(--error-color);
}

.analytics-trend i {
    margin-right: 0.25rem;
}

/* Model Performance Chart */
.performance-chart {
    height: 250px;
    margin: 1.5rem 0;
    position: relative;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.legend-color.nano {
    background-color: #4CAF50;
}

.legend-color.small {
    background-color: #2196F3;
}

.legend-color.medium {
    background-color: #FFC107;
}

.legend-color.large {
    background-color: #9C27B0;
}

/* Version Badge */
.version-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.version-badge.new {
    background-color: var(--success-color);
}

/* API Method Tags */
.api-method {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.api-method.get {
    background-color: #61affe;
    color: white;
}

.api-method.post {
    background-color: #49cc90;
    color: white;
}

.api-method.put {
    background-color: #fca130;
    color: white;
}

.api-method.delete {
    background-color: #f93e3e;
    color: white;
}

.api-method.ws {
    background-color: var(--websocket-color);
    color: white;
}

/* API Endpoint Styles */
.api-endpoint {
    margin-bottom: 2rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}

.endpoint-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #E5E7EB;
}

.endpoint-header .method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
    min-width: 60px;
    text-align: center;
}

.endpoint-header .method.get {
    background-color: #61affe;
    color: white;
}

.endpoint-header .method.post {
    background-color: #49cc90;
    color: white;
}

.endpoint-header .method.ws {
    background-color: var(--websocket-color);
    color: white;
}

.endpoint-header code {
    font-family: 'Fira Code', monospace;
    color: var(--text-color);
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
}

.endpoint-content {
    padding: 1.5rem;
}

.endpoint-content h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.endpoint-content h5 {
    color: var(--text-color);
    margin: 1.5rem 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.endpoint-content p {
    color: var(--light-text);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

/* Code Block Enhancements */
.code-block {
    position: relative;
    margin: 1rem 0;
}

.code-block-label {
    position: absolute;
    top: -12px;
    left: 10px; /* Move label to the left */
    right: auto;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

/* Responsive API Styles */
@media (max-width: 768px) {
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .endpoint-header .method {
        margin-right: 0;
    }
    
    .endpoint-content {
        padding: 1rem;
    }
}

/* Focus Styles for Accessibility */
.nav-links a:focus,
.menu-toggle:focus,
.search-box input:focus,
.search-clear:focus,
.zoom-btn:focus,
.back-to-top:focus,
.footer-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0052CC;
        --secondary-color: #003D99;
        --text-color: #000000;
        --background-color: #FFFFFF;
    }
    
    .card {
        border: 2px solid var(--text-color);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .back-to-top:hover {
        transform: none;
    }
    
    .step:hover {
        transform: none;
    }
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Error Examples */
.error-example {
    background: #fef2f2;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.error-message {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--error-color);
}

.error-message i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.error-message code {
    font-family: 'Fira Code', monospace;
    background: #fee2e2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* API Documentation */
.api-endpoint {
    margin-bottom: 2rem;
}

.endpoint-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 4px;
}

.endpoint-header .method {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 1rem;
    font-size: 0.875rem;
}

.endpoint-header code {
    font-family: 'Fira Code', monospace;
    color: var(--text-color);
}

.endpoint-content {
    padding-left: 1rem;
}

.endpoint-content h4 {
    color: var(--text-color);
    margin: 1rem 0 0.5rem 0;
}

.api-notes ul {
    list-style: none;
    padding: 0;
}

.api-notes li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.api-notes li:before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Response Formatting */
.endpoint-content .code-block pre {
    line-height: 1.4;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .endpoint-header .method {
        margin-bottom: 0.5rem;
    }

    .endpoint-content {
        padding-left: 0;
    }
}

/* Update button styles */
.button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button:hover {
    background-color: var(--secondary-color);
}

/* Rate Limits Section */
.limit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.limit {
    background-color: var(--accent-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

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

.limit i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.limit h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.limit p {
    color: var(--light-text);
    font-size: 0.875rem;
}

.limit-info {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.limit-info h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.limit-info ul {
    list-style: none;
    padding-left: 0;
}

.limit-info li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.limit-info li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Model Architecture Updates */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.model {
    background-color: var(--accent-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.model:after {
    content: "→";
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.5rem;
    display: none;
}

.model:not(:last-child):after {
    display: block;
}

/* Sequential model flow indicator */
.model:nth-child(1) { border-left: 4px solid #4CAF50; }
.model:nth-child(2) { border-left: 4px solid #2196F3; }
.model:nth-child(3) { border-left: 4px solid #FF9800; }
.model:nth-child(4) { border-left: 4px solid #9C27B0; }
.model:nth-child(5) { border-left: 4px solid #F44336; }
.model:nth-child(6) { border-left: 4px solid #8E24AA; }

/* Model type indicators */
.model:nth-child(1) .model-sequence,
.model:nth-child(2) .model-sequence,
.model:nth-child(3) .model-sequence {
    background: var(--yolov8-color);
}

.model:nth-child(4) .model-sequence,
.model:nth-child(5) .model-sequence,
.model:nth-child(6) .model-sequence {
    background: var(--yolov11-color);
}

/* Model sequence numbers */
.model-sequence {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.model:nth-child(1) .model-type,
.model:nth-child(2) .model-type,
.model:nth-child(3) .model-type {
    background: var(--yolov8-color);
}

.model:nth-child(4) .model-type,
.model:nth-child(5) .model-type,
.model:nth-child(6) .model-type {
    background: var(--yolov11-color);
}

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

.model i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.model h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.model p {
    color: var(--light-text);
    font-size: 0.875rem;
}

.model-features {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.model-features h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.model-features ul {
    list-style: none;
    padding-left: 0;
}

.model-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.model-features li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* API Overview Updates */
.api-overview {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.api-overview h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.api-overview ul {
    list-style: none;
    padding-left: 0;
}

.api-overview li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.api-overview li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.api-overview code {
    display: block;
    background-color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .limit-grid,
    .model-grid {
        grid-template-columns: 1fr;
    }

    .model:after {
        content: "↓";
        right: 50%;
        bottom: -1.5rem;
        top: auto;
        transform: translateX(50%);
    }
    
    .diagram-card {
        margin-bottom: 1.5rem;
    }

    .limit,
    .model {
        margin-bottom: 2rem;
    }
}

/* Troubleshooting Section Styles */
#troubleshooting {
    padding: 0;
}

.error-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 4px solid #dc3545;
}

.error-message {
    background: #f8d7da;
    border-radius: 4px;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message code {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.error-details h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
}

.error-details ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.error-details li {
    position: relative;
    padding: 0.25rem 0;
}

.error-details li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: -1rem;
}

.best-practices {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    border-left: 4px solid #2196f3;
}

.best_practices h3 {
    color: #1565c0;
    margin-bottom: 1rem;
}

.best-practices ul {
    list-style-type: none;
    padding-left: 1.5rem;
}

.best-practices li {
    position: relative;
    padding: 0.5rem 0;
    color: #2c3e50;
}

.best-practices li::before {
    content: "✓";
    color: var(--success-color);
    position: absolute;
    left: -1.5rem;
    font-weight: bold;
}

/* Icon styles */
.fas {
    margin-right: 0.5rem;
}

.fa-exclamation-circle {
    color: #dc3545;
}

.fa-check-circle {
    color: #1565c0;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.zoom-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.zoom-btn:active {
    transform: translateY(0);
}

/* Endpoint Notes */
.endpoint-note {
    display: block;
    font-size: 0.8rem;
    color: var(--light-text);
    font-style: italic;
    margin-top: 0.25rem;
    padding-left: 1rem;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Model Type Indicators */
.model-type {
    position: absolute;
    bottom: -10px;
    right: -10px;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    z-index: 1;
}

/* Technology Badges */
.tech-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.online {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-indicator.processing {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-indicator.offline {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Footer Styles */
.footer {
    background-color: var(--accent-color);
    border-top: 1px solid #E5E7EB;
    padding: 2rem 0;
    margin-top: 3rem;
    margin-left: var(--sidebar-width);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-brand p {
    color: var(--light-text);
    margin: 0;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 102, 179, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 179, 0.4);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Search Clear Button */
.search-clear {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: var(--primary-color);
}

/* Status Badges */
.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--light-text);
}

.no-results i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Mobile Footer Adjustments */
@media (max-width: 768px) {
    .footer {
        margin-left: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-brand {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Feature Badges for new features */
.feature-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    margin-right: 0.5em;
    margin-bottom: 0.25em;
    vertical-align: middle;
}
.admin-feature { background: #e3f2fd; color: #1976d2; border-color: #1976d2; }
.env-feature { background: #f1f8e9; color: #388e3c; border-color: #388e3c; }
.log-feature { background: #fff3e0; color: #f57c00; border-color: #f57c00; }
.security-feature { background: #fce4ec; color: #c2185b; border-color: #c2185b; }
.yolo-feature { background: #ede7f6; color: #512da8; border-color: #512da8; }
.cleanup-feature { background: #e0f7fa; color: #00838f; border-color: #00838f; }
.ratelimit-feature { background: #f9fbe7; color: #afb42b; border-color: #afb42b; }
.fault-tolerance { background: #e8f5e8; color: #2e7d32; border-color: #2e7d32; }
.file-storage { background: #fff8e1; color: #f57f17; border-color: #f57f17; }
.websocket-reconnect { background: #e3f2fd; color: #0288d1; border-color: #0288d1; }
.parallel-processing { background: #f3e5f5; color: #7b1fa2; border-color: #7b1fa2; }

/* .env Example Block - improve visibility */
.env-example {
    background: #23272e;
    border: 1px solid #388e3c;
    border-radius: 6px;
    padding: 1em;
    margin: 1em 0;
    font-family: 'Fira Code', monospace;
    font-size: 1em;
    color: #e8ffea;
    position: relative;
    overflow-x: auto;
    white-space: pre-wrap;
}
.env-example code {
    background: transparent;
    color: #e8ffea;
    font-size: 1em;
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
}

/* Cleanup Protection Styles */
.cleanup-protection {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.cleanup-protection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.cleanup-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.cleanup-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cleanup-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

.cleanup-item h4 {
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.cleanup-item p {
    color: var(--light-text);
    margin: 0;
    font-size: 0.9rem;
}

.cleanup-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cleanup-info h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.cleanup-info ul {
    list-style: none;
    padding-left: 0;
}

.cleanup-info li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-color);
}

.cleanup-info li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Recovery System Styles */
.recovery-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 2px solid #2e7d32;
    position: relative;
    overflow: hidden;
}

.recovery-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #388e3c);
}

.recovery-features h4 {
    color: #2e7d32;
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.recovery-features ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.recovery-features li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-color);
}

.recovery-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2e7d32;
    font-weight: bold;
}

.recovery-note {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid #2e7d32;
}

.recovery-note i {
    color: #2e7d32;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.recovery-note p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Responsive Cleanup and Recovery Styles */
@media (max-width: 768px) {
    .cleanup-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cleanup-item {
        padding: 1rem;
    }
    
    .cleanup-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .recovery-features li {
        font-size: 0.9rem;
    }
    
    .recovery-note {
        flex-direction: column;
        text-align: center;
    }
}





/* Model Performance Table */
.model-performance {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
}

.performance-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.performance-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.performance-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-color);
}

.performance-table tr:hover {
    background: rgba(0, 102, 179, 0.05);
}

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

.performance-table strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Performance Styles */
@media (max-width: 768px) {
    .performance-table {
        font-size: 0.875rem;
    }
    
    .performance-table th,
    .performance-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Admin Dashboard Styles */
.dashboard-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.dashboard-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.dashboard-features {
    margin: 2rem 0;
}

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

.dashboard-feature {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    text-align: center;
}

.dashboard-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.dashboard-feature h4 {
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.dashboard-feature p {
    color: var(--light-text);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Enhanced Dashboard Feature Styles */
.dashboard-feature.enhanced {
    border-left: 4px solid #4CAF50;
    position: relative;
}

.dashboard-feature.enhanced::after {
    content: 'NEW';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-feature.enhanced .feature-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* Enhanced Feature Grid for New Features */
.enhanced-features {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 1px solid #b3e5fc;
}

.enhanced-features h3 {
    color: #0277bd;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enhanced-features h3 i {
    color: #4CAF50;
}

.dashboard-access {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-access h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

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

.access-method h5 {
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.access-method p {
    color: var(--light-text);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.access-method .code-block {
    margin: 0;
}

.access-method .code-block pre {
    padding: 1rem;
    font-size: 0.875rem;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 6px;
    margin: 0;
}

/* Responsive Admin Dashboard Styles */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-feature {
        padding: 1rem;
    }
    
    .dashboard-feature.enhanced::after {
        top: 5px;
        right: 5px;
        font-size: 0.6rem;
        padding: 1px 6px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .access-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .access-method .code-block pre {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
    
    .enhanced-features {
        padding: 1rem;
        margin-top: 1.5rem;
    }
    
    .enhanced-features h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}