/* Основные стили layout */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background: #0a0e17;
    overflow-y: auto;
    font-family: 'Exo 2', sans-serif;
    color: #e2e8f0;
}

/* Основной контейнер */
.main-container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
    width: 100%;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.main-container::-webkit-scrollbar {
    width: 8px;
}

.main-container::-webkit-scrollbar-track {
    background: rgba(0, 234, 255, 0.05);
    border-radius: 4px;
}

.main-container::-webkit-scrollbar-thumb {
    background: rgba(0, 234, 255, 0.3);
    border-radius: 4px;
}

.main-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 234, 255, 0.5);
}

/* Grid для карточек */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
    align-items: start;
    grid-auto-rows: min-content;
    transition: grid-template-rows 0.3s ease;
    padding-bottom: 40px;
}

/* Футер */
.main-footer {
    background: linear-gradient(
        180deg, 
        transparent 0%, 
        rgba(15, 23, 42, 0.4) 20%, 
        rgba(15, 23, 42, 0.8) 100%
    );
    padding: 1.5rem 1rem;
    position: relative;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 234, 255, 0.1);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    color: #64748b;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.3;
}

/* Адаптивность */
@media (max-width: 1400px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .main-container {
        max-height: calc(100vh - 350px);
        padding: 0 15px 30px;
    }
    
    .main-footer {
        padding: 0.8rem 0.8rem !important;
        margin-top: 1rem !important;
        background: rgba(15, 23, 42, 0.95) !important;
        border-top: 1px solid rgba(0, 234, 255, 0.05) !important;
    }
    
    .footer-content {
        padding: 0.3rem !important;
    }
    
    .footer-content p {
        font-size: 0.7rem !important;
        line-height: 1.1 !important;
        color: #94a3b8 !important;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 0.6rem 0.6rem !important;
        margin-top: 0.8rem !important;
    }
    
    .footer-content p {
        font-size: 0.65rem !important;
        letter-spacing: 0.1px !important;
    }
}

@media (max-width: 360px) {
    .main-footer {
        padding: 0.5rem 0.4rem !important;
        margin-top: 0.6rem !important;
        min-height: 30px !important;
    }
    
    .footer-content {
        padding: 0.2rem !important;
    }
    
    .footer-content p {
        font-size: 0.6rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }
}


/* ДОБАВЬТЕ В КОНЕЦ layout.css */

/* Общие стили для контейнеров вкладок (Delegate, Mixnet, Manifesto) */
@media (max-width: 768px) {
    .tab-content .guide-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .tab-content .sidebar {
        background: linear-gradient(135deg, rgba(16, 23, 41, 0.95) 0%, rgba(8, 17, 33, 0.95) 100%) !important;
        border-radius: 16px !important;
        padding: 15px !important;
        margin: 0 15px !important;
        border: 1px solid rgba(0, 234, 255, 0.15) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 234, 255, 0.1) !important;
        width: calc(100% - 30px) !important;
    }
    
    /* Гарантируем одинаковую ширину с карточками нод */
    .node-card,
    .tab-content .sidebar {
        margin-left: 15px !important;
        margin-right: 15px !important;
        width: calc(100% - 30px) !important;
    }
}

@media (max-width: 480px) {
    .tab-content .sidebar {
        padding: 12px !important;
        margin: 0 12px !important;
        width: calc(100% - 24px) !important;
    }
    
    .node-card,
    .tab-content .sidebar {
        margin-left: 12px !important;
        margin-right: 12px !important;
        width: calc(100% - 24px) !important;
    }
}