/* Reset and base styles */
* {
    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: #333;
    background-color: #f8f9fa;
}

/* Header */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Container layout */
.container {
    display: flex;
    margin-top: 60px; /* Account for fixed header */
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #e9ecef;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 12px 24px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-link.active {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left-color: #1976d2;
}

/* Main content */
.content {
    flex: 1;
    margin-left: 250px; /* Account for fixed sidebar */
    padding: 40px;
    max-width: calc(100% - 250px);
}

#content-area {
    max-width: 800px;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Typography for content */
#content-area h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 24px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
}

#content-area h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #34495e;
    margin: 32px 0 16px 0;
}

#content-area h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #34495e;
    margin: 24px 0 12px 0;
}

#content-area p {
    margin-bottom: 16px;
    color: #495057;
}

#content-area strong {
    font-weight: 600;
    color: #2c3e50;
}

#content-area code {
    background-color: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #d63384;
}

#content-area pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

#content-area pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

/* Blockquotes */
#content-area blockquote {
    border-left: 4px solid #1976d2;
    background-color: #f8f9fa;
    margin: 16px 0;
    padding: 12px 16px;
    font-style: italic;
    color: #495057;
}

/* Tables */
#content-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9em;
}

#content-area table th,
#content-area table td {
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    text-align: left;
}

#content-area table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

#content-area table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Lists */
#content-area ol,
#content-area ul {
    margin: 16px 0;
    padding-left: 24px;
}

#content-area ol li,
#content-area ul li {
    margin-bottom: 8px;
    color: #495057;
}

#content-area ol {
    counter-reset: step-counter;
}

#content-area ol li {
    counter-increment: step-counter;
    position: relative;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .content {
        margin-left: 0;
        max-width: 100%;
        padding: 20px;
    }
    
    .container {
        flex-direction: column;
    }
    
    #content-area {
        padding: 20px;
    }
    
    .header-content {
        padding: 0 16px;
    }
}