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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}



/* Header */
header {
    background-color: #000000;
    border-bottom: 1px solid #1a1a1a;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content .logo {
    font-weight: 600;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #999999;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffffff;
}



/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
}



/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 2px;
}

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

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666666;
    margin-bottom: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.sidebar-title:hover {
    color: #999999;
}

.sidebar-title .toggle {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.sidebar-title.collapsed .toggle {
    transform: rotate(-90deg);
}

.sidebar-links {
    list-style: none;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-links.collapsed {
    max-height: 0;
}

.sidebar-links li {
    margin-bottom: 0.5rem;
}

.sidebar-links a {
    color: #999999;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-links a:hover,
.sidebar-links a.active {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* Project selector */
.project-selector {
    margin-bottom: 2rem;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 0.75rem;
}

.project-selector select {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
}

.project-selector option {
    background: #0a0a0a;
    color: #ffffff;
}

/* Content */
.content {
    max-width: 900px;
}

.breadcrumb {
    color: #666666;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ffffff;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 4rem 0;
    color: #ffffff;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Reset text alignment for content */
.content * {
    text-align: left;
}

.content .loading {
    text-align: center;
}

.content .error-message {
    text-align: left;
}

/* Markdown Styles */
.content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: left;
}

.content h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1a1a1a;
    text-align: left;
}

.content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #cccccc;
    text-align: left;
}

.content h4 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #b3b3b3;
    text-align: left;
}

.content p {
    color: #b3b3b3;
    margin-bottom: 1.25rem;
    text-align: left;
}

.content ul, .content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: #b3b3b3;
    text-align: left;
}

.content li {
    margin-bottom: 0.5rem;
    text-align: left;
}

.content a {
    color: #61afef;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.content a:hover {
    border-bottom-color: #61afef;
}

.content code {
    background: #0a0a0a;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e06c75;
}

.content pre {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

.content pre code {
    background: none;
    padding: 0;
    color: #abb2bf;
}



.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    text-align: left;
}

.content th, .content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #1a1a1a;
}

.content th {
    background: #0a0a0a;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
}

.content td {
    color: #b3b3b3;
    text-align: left;
}

.content blockquote {
    border-left: 4px solid #2196f3;
    background: rgba(33, 150, 243, 0.1);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: #90caf9;
    text-align: left;
}

.content blockquote p {
    margin-bottom: 0;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
}

.content strong {
    color: #ffffff;
    font-weight: 600;
}

.content em {
    color: #cccccc;
    font-style: italic;
}

.content hr {
    border: none;
    border-top: 1px solid #1a1a1a;
    margin: 3rem 0;
}

/* Footer */
footer {
    background-color: #000000;
    border-top: 1px solid #1a1a1a;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    color: #666666;
    font-size: 0.9rem;
}

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

.footer-links a {
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #999999;
}

/* Search */
.search-container {
    margin-bottom: 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #333333;
}

.search-input::placeholder {
    color: #666666;
}

/* Error message */
.error-message {
    background: rgba(244, 67, 54, 0.1);
    border-left: 4px solid #f44336;
    padding: 1rem 1.25rem;
    margin: 2rem 0;
    color: #ef5350;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
        max-height: none;
    }

    nav {
        gap: 1rem;
    }

    .content h1 {
        font-size: 2rem;
    }
}