* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333333;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.sidebar-header h1 {
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* External floating toggle button */
.sidebar-toggle-external {
    position: fixed;
    top: 20px;
    left: 300px;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sidebar-toggle-external:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.sidebar-toggle-external:active {
    transform: scale(0.95);
}

.sidebar-toggle-external.sidebar-collapsed {
    left: 20px;
}

.sidebar-toggle-external .toggle-icon {
    transition: transform 0.3s ease;
}

.sidebar-toggle-external:hover .toggle-icon {
    transform: rotate(90deg);
}

.content-area {
    margin-left: 280px;
    flex: 1;
    padding: 40px;
    background: transparent;
    transition: margin-left 0.3s ease;
}

.content-area.sidebar-collapsed {
    margin-left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.show {
        transform: translateX(0);
        opacity: 1;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .sidebar-toggle-external {
        left: 20px;
        top: 20px;
    }

    .sidebar-toggle-external.mobile {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .content-area {
        margin-left: 0;
        padding: 80px 20px 20px 20px;
    }

    .content-area.sidebar-collapsed {
        margin-left: 0;
    }

    /* Overlay for mobile when sidebar is open */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.sidebar-open::before {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 80px 15px 15px 15px;
    }

    .sidebar {
        width: 260px;
    }

    .sidebar-header h1 {
        font-size: 18px;
    }

    .welcome-section {
        padding: 30px 20px;
    }

    .welcome-section h1 {
        font-size: 28px;
    }

    .welcome-section p {
        font-size: 14px;
    }
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.sidebar-header h1 {
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-item {
    padding: 14px 20px;
    color: #555555;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    margin: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: block;
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-left-color: #764ba2;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.content-area {
    margin-left: 280px;
    flex: 1;
    padding: 40px;
    background: transparent;
}

h1 {
    color: #ffffff;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 15px;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

h2 {
    color: #667eea;
    margin-top: 40px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    border-left: 5px solid #764ba2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

h3 {
    color: #764ba2;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.welcome-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 50px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.welcome-section h1 {
    font-size: 42px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    border: none;
    padding: 0;
    font-weight: 800;
    letter-spacing: -1px;
}

.welcome-section p {
    font-size: 20px;
    color: #666666;
    margin: 0;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.diagram-container {
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.mermaid {
    background: transparent;
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100%;
    min-height: 200px;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

.mermaid[data-processed="processing"] {
    opacity: 0.5;
}

.mermaid svg .messageText,
.mermaid svg .noteText,
.mermaid svg .actor-text,
.mermaid svg .nodeLabel,
.mermaid svg .edgeLabel,
.mermaid svg text {
    font-size: 12px !important;
}

.api-endpoint {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 5px solid #4CAF50;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.api-endpoint:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.api-method {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: bold;
    margin-right: 12px;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.method-post {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
}

.api-path {
    color: #667eea;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    font-weight: 600;
}

.api-description {
    color: #555555;
    margin-top: 12px;
    line-height: 1.7;
}

.request-body {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, rgba(46, 125, 50, 0.02) 100%);
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: 8px;
    padding: 18px;
    margin: 18px 0;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #2e7d32;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.response-body {
    background: linear-gradient(135deg, rgba(245, 124, 0, 0.05) 0%, rgba(245, 124, 0, 0.02) 100%);
    border: 1px solid rgba(245, 124, 0, 0.2);
    border-radius: 8px;
    padding: 18px;
    margin: 18px 0;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #f57c00;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.workflow-step {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-left: 4px solid #667eea;
    padding: 16px 20px;
    margin: 12px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    transform: translateX(5px);
}

.workflow-step-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-weight: bold;
    margin-right: 12px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.note {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border-left: 5px solid #FF9800;
    padding: 20px;
    margin: 25px 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.note-title {
    color: #E65100;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 16px;
}

code {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 3px 8px;
    border-radius: 5px;
    color: #667eea;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

ul {
    line-height: 1.8;
    padding-left: 30px;
    margin: 10px 0;
}

li {
    margin: 8px 0;
    padding-left: 10px;
}

.architecture-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.architecture-info h3 {
    color: #667eea;
    margin-top: 0;
    font-size: 24px;
    font-weight: 700;
}

.architecture-info p {
    color: #444444;
    line-height: 1.9;
    margin: 12px 0;
}