.test-title {
    font-size: 32px;
    color: #19191B;
    margin: 60px auto 20px;
    max-width: 1000px;
    padding: 0 50px;
}
.test-subtitle {
    color: #6B7280;
    max-width: 1000px;
    margin: 0 auto 30px;
    padding: 0 50px;
}
.test-cards {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 50px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.test-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    transition: 0.2s;
}
.test-card:hover {
    border-color: #19191B;
    transform: translateY(-2px);
}
.test-card__title {
    color: #19191B;
    font-size: 18px;
    margin-bottom: 8px;
}
.test-card__count {
    color: #6B7280;
    font-size: 14px;
}

/* ==========================================
   КАРТОЧКА ВОПРОСА
   ========================================== */
.question-block {
    max-width: 800px;
    margin: 0 auto 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}
.question-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 16px;
}
.question-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    display: block;
    margin: 16px auto;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
}

.test-submit {
    display: block;
    margin: 20px auto;
    background-color: #19191B;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.test-result {
    max-width: 800px;
    margin: 24px auto;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}
.result-summary {
    font-size: 20px;
    font-weight: 700;
    color: #19191B;
    margin-bottom: 16px;
    text-align: center;
}
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}
.result-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
}
.result-cell--correct {
    background-color: #22C55E;
}
.result-cell--incorrect {
    background-color: #EF4444;
}
.result-cell--empty {
    opacity: 0.6;
}

.timer {
    max-width: 200px;
    margin: 0 auto 24px;
    padding: 0 50px;
    font-size: 24px;
    font-weight: 800;
    color: #19191B;
    text-align: right;
    background-color: #ffffff;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}
.timer--warning {
    color: #EF4444;
}

/* ==========================================
   MATCHING (вопросы 33–35)
   ========================================== */
.matching-context {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #1e40af;
    margin-bottom: 20px;
}
.matching-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}
.matching-item:hover {
    border-color: #cbd5e1;
}
@media (min-width: 640px) {
    .matching-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .matching-item .sub-question-text {
        margin-bottom: 0;
        padding-right: 16px;
    }
}
.sub-question-text {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.4;
    margin: 0;
}
.matching-select {
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f172a;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 220px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2019191B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}
.matching-select:hover {
    border-color: #94a3b8;
}
.matching-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ==========================================
   ОТКРЫТЫЕ ВОПРОСЫ (36–45)
   ========================================== */
.sub-question-item {
    margin-top: 14px;
}
.sub-question-input {
    width: 100%;
    max-width: 300px;
    padding: 10px 14px;
    font-size: 15px;
    color: #19191B;
    background-color: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s ease;
}
.sub-question-input::placeholder {
    color: #9CA3AF;
}
.sub-question-input:focus {
    border-color: #19191B;
    background-color: #ffffff;
}

/* ==========================================
   ПОДСВЕТКА РЕЗУЛЬТАТОВ ПОСЛЕ ПРОВЕРКИ
   ========================================== */
.question-block.question-correct {
    border-color: #22c55e;
    background-color: #f0fdf4;
}
.question-block.question-incorrect {
    border-color: #ef4444;
    background-color: #fef2f2;
}
.option-label.correct-answer {
    background-color: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
    font-weight: 600;
}
.option-label.wrong-answer {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}
.correct-hint {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #15803d;
    font-weight: 600;
    background-color: #dcfce7;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-left: 15px;
}

/* ==========================================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ (480px)
   ========================================== */
@media (max-width: 480px) {
    .test-title {
        font-size: 26px;
        margin: 30px auto 12px;
        padding: 0 20px;
        white-space: normal;
    }
    .test-subtitle {
        padding: 0 20px;
        margin: 0 auto 20px;
        font-size: 14px;
    }
    .test-cards {
        padding: 0 20px;
        grid-template-columns: 1fr;
        margin-top: 16px;
    }
    .question-block {
        margin: 0 16px 16px;
        padding: 16px;
    }
    .question-text {
        font-size: 0.95rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;

    }
    .test-submit {
        width: calc(100% - 32px);
        margin: 20px 16px;
    }
    .test-result {
        margin: 24px 16px;
        padding: 16px;
    }
    .timer {
        max-width: none;
        margin: 0 16px 16px;
        padding: 8px 16px;
        font-size: 18px;
        text-align: center;
    }
    .matching-select {
        min-width: 0;
        width: 100%;
    }
    .sub-question-input {
        max-width: 100%;
    }
    .correct-hint {
        display: block;
        margin-left: 0;
        margin-top: 8px;
    }
    .result-grid {
        grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    }
    .filter-container {
        padding: 0 20px 10px;
        gap: 6px;
    }
    .filter-btn {
        padding: 9px 18px;
        font-size: 14px;
    }
}