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

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
    background: #f7f9fc;
    color: #1a2c3e;
    line-height: 1.5;
}

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header / Navbar - светлый вариант */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

.logo p {
    font-size: 0.8rem;
    color: #5b6e8c;
    margin-top: 2px;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    display: flex;
    background: #f1f5f9;
    border-radius: 48px;
    padding: 0.5rem 1rem;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #1e293b;
    font-size: 0.95rem;
    padding: 0.2rem 0;
}

.search-bar input::placeholder {
    color: #94a3b8;
}

.search-icon {
    color: #5b6e8c;
    font-size: 1rem;
}

/* Main container */
.main-container {
    display: flex;
    flex: 1;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    background: #ffffff;
    border-radius: 0;
}

/* Sidebar - светлый */
.sidebar {
    width: 300px;
    background: #fefefe;
    border-right: 1px solid #eef2f6;
    padding: 1.8rem 1.2rem;
    flex-shrink: 0;
    height: calc(100vh - 73px);
    position: sticky;
    top: 73px;
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5b6e8c;
    margin: 1.2rem 0 0.8rem 0;
    font-weight: 600;
}

.sidebar h3:first-of-type {
    margin-top: 0;
}

.category-list, .article-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.category-list li, .article-list li {
    margin-bottom: 0.25rem;
}

.article-link {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #2c3e50;
    display: block;
}

.article-link:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.article-link.active {
    background: #eef2ff;
    color: #2563eb;
    font-weight: 600;
    border-left: 3px solid #3b82f6;
}

/* Content area */
.content {
    flex: 1;
    padding: 2rem 2.5rem;
    background: #ffffff;
    overflow-y: auto;
    min-height: calc(100vh - 73px);
}

/* Typography & wiki styling */
.wiki-page h1 {
    font-size: 2rem;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 0.6rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #0f2b3d;
}

.wiki-page h2 {
    font-size: 1.5rem;
    margin: 1.8rem 0 0.8rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #eef2f6;
    color: #1e3a5f;
}

.wiki-page h3 {
    font-size: 1.25rem;
    margin: 1.3rem 0 0.6rem;
    color: #2c3e50;
}

.wiki-page p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

.wiki-page code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #1e40af;
}

.wiki-page pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 1rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.2rem 0;
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
}

.wiki-page pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.wiki-page ul, .wiki-page ol {
    margin: 0.75rem 0 1rem 1.5rem;
}

.wiki-page li {
    margin: 0.4rem 0;
}

.wiki-page .note {
    background: #fefce8;
    border-left: 4px solid #eab308;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    color: #854d0e;
}

.wiki-page .warning {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    color: #991b1b;
}

.wiki-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #ffffff;
}

.wiki-page th, .wiki-page td {
    border: 1px solid #e2e8f0;
    padding: 0.6rem;
    text-align: left;
}

.wiki-page th {
    background: #f8fafc;
    font-weight: 600;
}

.footer-info {
    margin-top: 3rem;
    font-size: 0.8rem;
    text-align: center;
    color: #7e8b9c;
    border-top: 1px solid #eef2f6;
    padding-top: 1.5rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #5b6e8c;
    background: #fafcff;
    border-radius: 20px;
}

/* Responsive */
@media (max-width: 760px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #eef2f6;
        padding: 1rem;
    }
    .content {
        padding: 1.5rem;
    }
    .navbar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar {
        max-width: 100%;
    }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
