* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('/static/img/layer1.jpg');
    background-size: cover;
    background-position: center;
    line-height: 1.8;
    color: #ffffff;
}

.wrapper {
    margin-top: 80px;
    padding: 2.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(8, 2, 22, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(118, 205, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(118, 205, 255, 0.3);
    line-height: 1.8;
    position: relative; /* Добавлено для позиционирования кнопки */
}

.faq-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(30, 10, 60, 0.7);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(118, 205, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.faq-question:hover {
    background: rgba(118, 205, 255, 0.1);
}

.faq-question h3 {
    margin: 0;
    flex: 1;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.6;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.faq-answer-content {
    max-height: 800px;
    overflow-y: auto;
    padding: 1.8rem;
    color: #ffffff;
    line-height: 2.0;
    font-size: 1.05rem;
    margin: 0;
}

.faq-answer-content p, 
.faq-answer-content ul, 
.faq-answer-content ol {
    margin: 0 0 1.8rem 0;
    line-height: 2.0;
    color: #ffffff;
}

.faq-answer-content ul, 
.faq-answer-content ol {
    padding-left: 2.8rem;
    padding-right: 1.8rem;
    margin: 0 0 1.8rem 0;
    color: #ffffff;
}

.faq-answer-content li {
    margin-bottom: 1.2rem;
    line-height: 2.0;
    padding-right: 0;
    color: #ffffff;
}

code {
    background: rgba(118, 205, 255, 0.2);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-family: monospace;
    color: #76cdff;
    line-height: 1.8;
    font-size: 1rem;
    display: inline-block;
    margin: 0.2rem 0;
}

.faq-item.active .faq-answer {
    max-height: 1500px;
    padding: 0 1.8rem 1.8rem;
}

.faq-item.active .faq-question {
    background: rgba(118, 205, 255, 0.2);
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-toggle {
    transition: transform 0.3s ease;
    color: #ffffff;
}

/* Изменения для вкладок и кнопки загрузки */
.tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    justify-content: flex-start; /* Изменено с center на flex-start */
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
    order: 1;
    flex-grow: 1;
}

.download-section {
    order: 2;
    margin: 0;
    margin-left: 1rem;
}

.download-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(118, 205, 255, 0.2);
    color: #76cdff;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(118, 205, 255, 0.5);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.download-btn:hover {
    background: rgba(118, 205, 255, 0.4);
    box-shadow: 0 0 15px rgba(118, 205, 255, 0.3);
}

.download-btn i {
    margin-right: 8px;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(30, 10, 60, 0.7);
    color: #76cdff;
    border: 1px solid rgba(118, 205, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0.2rem 0 0;
}

.tab-btn:hover {
    background: rgba(118, 205, 255, 0.1);
}

.tab-btn.active {
    background: rgba(118, 205, 255, 0.2);
    color: #fff;
    border-color: rgba(118, 205, 255, 0.5);
    box-shadow: 0 0 10px rgba(118, 205, 255, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Mobile styles */
@media (max-width: 768px) {
    .wrapper {
        margin-top: 70px;
        padding: 1.8rem;
    }

    .faq-item {
        margin-bottom: 1.2rem;
    }

    .faq-question {
        padding: 1.2rem;
    }

    .faq-item.active .faq-answer {
        max-height: 2000px;
        padding: 0 1.2rem 1.2rem;
    }
    
    .faq-answer-content {
        max-height: 1500px;
        padding: 1.2rem;
        line-height: 2.1;
    }
    
    .faq-answer-content p, 
    .faq-answer-content ul, 
    .faq-answer-content ol {
        margin-bottom: 1.6rem;
        line-height: 2.1;
    }
    
    .faq-answer-content li {
        margin-bottom: 1.1rem;
        line-height: 2.1;
    }

    .download-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tabs {
        flex-direction: row;
        justify-content: flex-start;
        margin-bottom: 1rem;
        order: 1;
    }

    .download-section {
        order: 2;
        margin-left: 0;
        align-self: flex-end;
        margin-bottom: 1rem;
    }

    .tab-btn {
        margin: 0.2rem 0.2rem 0.2rem 0;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .download-buttons .download-btn {
        width: 100%;
    }
}