/* Базовые стили для приложения Tests */

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

.tests-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.tests-header h1 {
    margin: 0 0 20px 0;
    color: #333;
}

.tests-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.tests-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Стили для списка вопросов */
.question-list-container {
    padding: 20px;
}

.search-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filters-section h3 {
    margin-top: 0;
    color: #333;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.topics-filter {
    margin-bottom: 20px;
}

.topics-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.topics-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

/* Стили для тем */
.topics-section {
    margin-bottom: 40px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.topic-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.topic-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.topic-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.topic-description {
    color: #666;
    margin-bottom: 15px;
}

.topic-stats {
    margin-bottom: 15px;
}

.questions-count {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    color: #495057;
}

/* Стили для вопросов */
.questions-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.question-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.question-header h3 {
    margin: 0;
    flex: 1;
    color: #333;
}

.question-meta {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.difficulty-badge,
.type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

.type-single {
    background: #cce5ff;
    color: #004085;
}

.type-multiple {
    background: #d1ecf1;
    color: #0c5460;
}

.type-text {
    background: #e2e3e5;
    color: #383d41;
}

.question-topics {
    margin-bottom: 15px;
}

.topic-tag {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}

.topic-tag.no-topic {
    background: #6c757d;
}

.question-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8em;
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #333;
}

.question-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 12px;
    background: #f8f9fa;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    background: #e9ecef;
    color: #0056b3;
    text-decoration: none;
}

.current-page {
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border-radius: 4px;
}

/* Сообщения */
.no-topics,
.no-questions {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .tests-nav {
        flex-direction: column;
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .question-meta {
        justify-content: flex-start;
    }
    
    .question-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

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

.test-card,
.category-card {
    animation: fadeIn 0.6s ease-out;
}

/* Дополнительные стили для результатов */
.result-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-score {
    font-size: 2rem;
    font-weight: 700;
}

.score-passed {
    color: #28a745;
}

.score-failed {
    color: #dc3545;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.result-detail {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-detail-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.result-detail-value {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
} 

.answer-option.correct-selected {
    border-color: #28a745;
    background: #e6f9ec;
    color: #155724;
}
.answer-option.incorrect-selected {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}
.answer-option.correct-answer {
    border-color: #28a745;
    background: #e6f9ec;
    color: #155724;
}
.answer-correct {
    color: #28a745;
    font-weight: bold;
    margin-left: 8px;
}
.answer-incorrect {
    color: #dc3545;
    font-weight: bold;
    margin-left: 8px;
}
.answer-feedback {
    margin-top: 15px;
    font-size: 1.1em;
} 