/* ========================================
   Стили для интерфейса тестирования
   Jas Talapker — unified-test.css
======================================== */

:root {
    --primary: #2f00ff;
    --button: #2f00ff;
    --dark-blue: #001577;
    --dark-text: #000170;
    --heading: #000170;
    --light-bg: #f8f9ff;
    --border: #e0e8ff;
    --success: #2e7d32;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* === Контейнер теста === */
.test-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.test-header {
    text-align: center;
    margin-bottom: 40px;
}

.test-header h1 {
    color: var(--heading);
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: 800;
}

.test-header p {
    color: var(--dark-blue);
    font-size: 1.1em;
    opacity: 0.8;
    line-height: 1.5;
}

/* === Прогресс-бар === */
.test-progress {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-text);
}

.progress-bar-container {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* === Карточка вопроса === */
.test-question {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.test-question h3 {
    color: var(--heading);
    font-size: 1.4em;
    margin-bottom: 25px;
    line-height: 1.4;
    text-align: center;
}

/* === Варианты ответов === */
.test-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.test-option {
    background: var(--light-bg);
    padding: 18px 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    line-height: 1.5;
}

.test-option:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.test-option.selected {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 0, 255, 0.1);
}

/* === Навигация === */
.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.test-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.btn-prev {
    background: #6c757d;
    color: white;
}

.btn-prev:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.btn-next:hover:not(:disabled) {
    background: #1a00cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 0, 255, 0.3);
}

.btn-finish {
    background: var(--success);
    color: white;
}

.btn-finish:hover:not(:disabled) {
    background: #1b5e20;
    transform: translateY(-2px);
}

.test-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === Экран завершения === */
.completion-screen {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.completion-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.completion-screen h2 {
    color: var(--heading);
    font-size: 2em;
    margin-bottom: 15px;
}

.completion-screen p {
    color: var(--dark-blue);
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.completion-btn {
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.completion-btn:hover {
    background: #1a00cc;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(47, 0, 255, 0.3);
}

/* === Загрузка результатов === */
.loading-results {
    text-align: center;
    padding: 40px 20px;
}

.loading-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .test-page-container {
        padding: 20px 15px;
    }
    
    .test-question {
        padding: 20px;
    }
    
    .test-navigation {
        flex-direction: column;
    }
    
    .test-btn {
        width: 100%;
    }
    
    .test-header h1 {
        font-size: 1.8em;
    }
}