* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Стили для боковой панели */
.sidebar {
    width: 280px;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .text,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.sidebar.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-btn {
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.toggle-btn:hover {
    background-color: #34495e;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

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

.nav-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background-color: #34495e;
}

.nav-item.active {
    background-color: #34495e;
    border-left-color: #3498db;
}

.nav-item .icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.nav-item .text {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Стили для основного контента */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #fff;
}

.content-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.expand-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #3498db;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.expand-btn:hover {
    background-color: #f0f0f0;
}

.content-body {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.content-section h3 {
    color: #34495e;
    margin: 25px 0 15px;
}

.content-section h4 {
    color: #34495e;
    margin: 25px 0 15px;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.content-section ul, .content-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.content-section li {
    margin-bottom: 8px;
}

.content-section pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
}

.content-section code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 3px;
}

.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-section table th,
.content-section table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.content-section table th {
    background-color: #f2f6fc;
    font-weight: 600;
}

.content-section table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-item h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.content-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    background-color: #f9f9f9;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        z-index: 1000;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.collapsed.show {
        transform: translateX(0);
    }

    .sidebar.collapsed .text,
    .sidebar.collapsed .sidebar-footer,
    .sidebar.collapsed .sidebar-header h2 {
        display: block;
    }

    .expand-btn {
        display: block;
    }

    .content-header h1 {
        font-size: 1.5rem;
    }

    .content-body {
        padding: 20px;
    }
}

/* Стили для подменю */
.with-submenu {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.with-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    background-color: #243342;
    transition: max-height 0.3s ease;
}

.submenu.active {
    max-height: 300px;
}

.submenu ul {
    list-style: none;
}

.submenu-item {
    padding: 12px 20px 12px 55px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 4px solid transparent;
    font-size: 0.95rem;
}

.submenu-item:hover {
    background-color: #34495e;
}

.submenu-item.active {
    background-color: #34495e;
    border-left-color: #3498db;
}

.submenu-item .icon {
    font-size: 0.9rem;
}

/* Стили для свернутой панели с подменю */
.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed .with-submenu .submenu-arrow {
    display: none;
}

/* Стили для контента */
.tech-stack {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.tech-item {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tech-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.tech-label {
    font-weight: 600;
    min-width: 150px;
    color: #2c3e50;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.team-member {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.team-member h3 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.team-member .role {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.team-member .git {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-decoration: none;
}

.glossary-list {
    margin: 25px 0;
}

.term {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.term h3 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.usecase-item, .exception-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

.usecase-item h3, .exception-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.layer {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #9b59b6;
}

.layer h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Адаптивность для подменю */
@media (max-width: 768px) {
    .submenu {
        max-height: none;
        display: none;
    }

    .submenu.active {
        display: block;
        max-height: none;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }
}
