/* Базовые стили для приложения Tests с поддержкой темной темы */
.tests-header {
    background: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.tests-header h1 {
    margin: 0 0 20px 0;
    color: var(--text-color);
}

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

.nav-link {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--light-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background: var(--primary-color-dark, #0056b3);
    color: var(--light-color);
    text-decoration: none;
}

/* Кнопки */
.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: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background: var(--primary-color-dark, #0056b3);
    color: var(--light-color);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--light-color);
    text-decoration: none;
}

.btn.active, .difficulty-btn.active, .topic-btn.active, .all-questions-btn.active, .time-limit-btn.active {
    background: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
}

.difficulty-btn, .topic-btn, .all-questions-btn, .time-limit-btn {
    min-width: 90px;
    margin: 2px 4px 2px 0;
    font-weight: 600;
    border-width: 2px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    outline: none;
}
.difficulty-btn:hover, .topic-btn:hover, .all-questions-btn:hover, .time-limit-btn:hover {
    background: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px var(--shadow-color);
    z-index: 2;
}
.difficulty-btn:focus, .topic-btn:focus, .all-questions-btn:focus, .time-limit-btn:focus {
    box-shadow: 0 0 0 3px var(--primary-color, #007bff33);
}

/* Tooltip для кнопок */
.difficulty-btn[data-tooltip]:hover:after,
.topic-btn[data-tooltip]:hover:after,
.all-questions-btn[data-tooltip]:hover:after,
.time-limit-btn[data-tooltip]:hover:after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: 110%;
    transform: translateX(-50%);
    background: var(--primary-color, #007bff);
    color: #fff;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.92em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.93;
    box-shadow: 0 2px 8px var(--shadow-color);
    margin-top: 4px;
    filter: brightness(1.1) saturate(1.1);
    transition: opacity 0.18s, transform 0.18s;
    z-index: 10;
}

.difficulty-btn.active, .topic-btn.active, .all-questions-btn.active, .time-limit-btn.active {
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* Адаптивность */
@media (max-width: 768px) {
    .tests-nav {
        flex-direction: column;
    }
}

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

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

/* --- Стили для страницы test_start --- */
.test-start-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 30px 0;
}

.test-start-form {
    flex: 1 1 350px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 32px 28px;
    min-width: 320px;
    max-width: 420px;
}

.test-start-form h3 {
    margin-top: 0;
    color: var(--text-color);
}

.form-section {
    margin-bottom: 28px;
}

.form-help {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    margin-right: 6px;
    background: var(--card-bg);
}

.test-info {
    flex: 2 1 400px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 32px 28px;
    min-width: 320px;
}

.test-info h3 {
    margin-top: 0;
    color: var(--text-color);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 18px;
}

.info-card {
    background: var(--light-color);
    border-radius: 10px;
    box-shadow: 0 1px 6px var(--shadow-color);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .test-start-container {
        flex-direction: column;
        gap: 24px;
    }
    .test-info, .test-start-form {
        max-width: 100%;
        min-width: 0;
    }
} 

/* --- Стили для страницы статистики пользователя --- */
.statistics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
}

.overall-stats {
    margin-bottom: 36px;
}

.topic-stats-section {
    margin-bottom: 36px;
}

.topic-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.topic-stat-card {
    background: var(--light-color);
    border-radius: 10px;
    box-shadow: 0 1px 6px var(--shadow-color);
    padding: 20px 16px;
}

.topic-header h3 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
}

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

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

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

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