/* ===== ОСНОВНЫЕ СТИЛИ ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #ff8c00; /* изменен на оранжевый */
    --accent-color: #1abc9c; /* бирюзовый */
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --background-color: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #ff8c00; /* изменен на оранжевый */
    --warning-color: #ff8c00; /* изменен на оранжевый */
    --danger-color: #ff8c00;  /* изменен на оранжевый */
    --info-color: #ff8c00;    /* изменен на оранжевый */
}

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

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== ТИПОГРАФИЯ ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', 'Times New Roman', serif;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* ===== ШАПКА ===== */
header {
    background: var(--accent-color); /* изменен на бирюзовый */
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.header-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.header-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 140px; /* добавлено для одинакового размера */
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #e67e00; /* более темный оранжевый */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-success, .btn-warning, .btn-danger {
    background-color: var(--secondary-color); /* все кнопки оранжевые */
    color: white;
}

.btn-success:hover, .btn-warning:hover, .btn-danger:hover {
    background-color: #e67e00; /* более темный оранжевый */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    padding: 3rem 0;
}

/* ===== СЕКЦИИ ===== */
section {
    padding: 3rem 0;
}

section:nth-child(even) {
    background-color: white;
}

.about-project {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    line-height: 1.8;
}

/* ===== КАРТОЧКИ ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-top: 4px solid var(--secondary-color);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* ===== КОНТЕЙНЕР КНОПОК ДЛЯ ТЕМ ===== */
.buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.buttons-container .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    min-height: 120px; /* добавлено для одинакового размера */
    justify-content: center;
}

.buttons-container .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    text-decoration: none;
}

.btn-title {
    font-weight: 600;
    margin-top: 1rem;
    color: var(--primary-color);
}

.btn-desc {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* ===== ПОДВАЛ ===== */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-link {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .header-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .header-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .buttons-container {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ТЕСТА ===== */
.test-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 2rem auto;
    max-width: 800px;
}

.progress-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin: 2rem auto;
    max-width: 800px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--secondary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.question {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.answers {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.answers label {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.answers label:hover {
    background-color: #e9ecef;
}

.next-btn {
    display: block;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    background-color: var(--secondary-color); /* оранжевый цвет */
    color: white;
    min-width: 140px; /* одинаковый размер */
}

.result {
    text-align: center;
    font-size: 1.2rem;
    margin: 2rem 0;
}

.loader {
    text-align: center;
    padding: 2rem;
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    padding: 1rem;
}

.quiz-container {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.quiz-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
    font-size: 2.5rem;
}

.test-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    margin: 0 auto 3rem;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.test-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent), var(--warning));
}

.progress-bar {
    height: 12px;
    background-color: #e9ecef;
    border-radius: 10px;
    margin: 2.5rem auto;
    max-width: 800px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.question {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
}

.answers {
    display: grid;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.answers label {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.answers label:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.answers input:checked + label {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.next-btn {
    display: block;
    margin: 0 auto;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background: var(--secondary-color); /* оранжевый цвет */
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    min-width: 140px; /* одинаковый размер */
}

.next-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    background-color: #e67e00; /* более темный оранжевый */
}

.result {
    text-align: center;
    font-size: 1.5rem;
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--success-color) 0%, #ffa500 100%); /* оранжевый градиент */
    color: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.loader {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--primary);
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(255, 0, 110, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--danger-color);
}

.feedback {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.feedback.correct {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.feedback.incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

@media (max-width: 768px) {
    .quiz-container {
        padding: 1rem;
    }
    
    .test-container {
        padding: 2rem 1.5rem;
    }
    
    .quiz-container h1 {
        font-size: 2rem;
    }
    
    .question {
        font-size: 1.3rem;
    }
    
    .result {
        padding: 1.5rem;
        font-size: 1.3rem;
    }
}