:root {
    /* Colors */
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --background: #ffffff;
    --surface: #f8fafc;
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --text-primary: #0f172a;
    --text-light: #ffffff;
    --border-dark: #475569;
    
    /* Effects */
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --sidebar-width: 280px;
}

/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    display: flex;
    height: 100vh;
    background: var(--surface);
    overflow: hidden;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--border-dark);
    position: relative;
}

/* Sidebar Icon/Header */
.sidebar .icon {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .icon img {
    width: 40px;
    height: 40px;
}

.sidebar .icon::after {
    content: "CloudQA";
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Navigation Styles */
.sidebar nav {
    padding: 1.5rem 0;
    flex: 1;
}

.sidebar nav ul {
    list-style-type: none;
    padding-left: 0;
}

.sidebar nav ul li {
    margin: 0.25rem 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    position: relative;
}

/* Common Interactive Element Styles */
.sidebar nav .toggle,
.sidebar nav .submenu li a {
    text-decoration: none;
    cursor: pointer;
}

.sidebar nav .toggle:hover,
.sidebar nav .submenu li a:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.08);
}

/* Toggle/Menu Item Styles */
.sidebar nav .toggle {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    width: 100%;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-right: 1rem;
    border: none;
    background: none;
}

.sidebar nav .toggle.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-light);
}

/* Submenu Styles */
.sidebar nav .submenu {
    width: 100%;
    font-size: 0.875rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.2);
    margin-top: 0.25rem;
}

.sidebar nav .submenu.active {
    max-height: 500px;
}

.sidebar nav .submenu li {
    margin: 0;
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
}

.sidebar nav .submenu li a {
    color: #cbd5e1;
    display: block;
    padding: 0.625rem 2.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-right: 1rem;
    font-size: 0.875rem;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex-grow: 1;
    overflow-y: auto;
    height: 100vh;
    background: var(--surface);
}

.content {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    background: var(--surface);
}

/* Markdown Body Container */
.markdown-body {
    padding: 1.5rem;
    background: var(--background);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
    body {
        overflow-x: hidden;
    }
    .content {
        padding: 1rem;
    }
    .markdown-body {
        padding: 1.5rem;
        margin-top: 0.5rem;
    }
    .log-viewer-section {
        padding: 1rem;
    }
    .log-viewer-btn {
        padding: 0.875rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 0.75rem;
    }
    .markdown-body {
        padding: 1rem;
    }
}

/* Log Viewer Button Styles */
.log-viewer-section {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.log-viewer-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
}

.log-viewer-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}