/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Боковое меню */
#sidebar-menu {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

#sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

#sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

#sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.site-title {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
    text-align: center;
}

.main-menu {
    list-style: none;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-title {
    display: block;
    color: white;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.3s ease;
}

.menu-title:hover {
    background: rgba(255,255,255,0.2);
}

.menu-toggle {
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.3s ease;
    font-size: 0.8em;
    width: 10px;
}

.submenu {
    list-style: none;
    background: rgba(0,0,0,0.2);
}

.submenu li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    display: block;
    color: rgba(255,255,255,0.9);
    padding: 10px 30px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    position: relative;
}

.submenu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    padding-left: 35px;
}

.submenu a.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 500;
}

.submenu a.active::before {
    content: '▶';
    position: absolute;
    left: 15px;
    font-size: 0.7em;
}

/* Основной контент */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    background: #f8f9fa;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 30px;
    background: white;
    min-height: calc(100vh - 80px);
    margin-top: 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* Заголовки */
h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.8em;
    color: #34495e;
    margin: 30px 0 20px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.4em;
    color: #2c3e50;
    margin: 25px 0 15px;
    font-weight: 600;
}

/* Мета информация статьи */
.article-meta {
    margin-bottom: 30px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.meta-item {
    display: inline-block;
    margin-right: 20px;
    font-size: 0.9em;
    color: #555;
}

.meta-item i {
    margin-right: 5px;
    color: #3498db;
}

/* Основной текст */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
}

/* Блоки с информацией */
.info-box {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.warning-box {
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.success-box {
    background: #e8f5e8;
    border-left: 4px solid #27ae60;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

tr:hover {
    background: #e8f4f8;
}

/* Код */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Ссылки */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    #sidebar-menu {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .container {
        flex-direction: column;
    }
}