/* Страница прохождения теста - минималистичный дизайн для концентрации */
:root {
    --bg-primary: #fafbfc;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --accent: #3AA6B9;
    --accent-hover: #007B9E;
    --success: #10b981;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.test-wrapper {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Шапка - минималистичная */
.test-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 32px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo-minimal img {
    height: 32px;
    width: auto;
    opacity: 0.8;
}

.back-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.back-link:hover {
    color: var(--text-primary);
}

.progress-minimal {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    max-width: 300px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* Основной контент - максимум фокуса */
.test-content {
    flex: 1;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.question-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.question-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.question-text {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text-primary);
    min-height: 100px;
    transition: opacity 0.3s ease;
}

.question-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.question-text p {
    margin-bottom: 16px;
}

.question-text p:last-child {
    margin-bottom: 0;
}

/* Область ответа */
.answer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.answer-input-group {
    position: relative;
}

.answer-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.answer-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(58, 166, 185, 0.1);
}

.answer-input:disabled {
    background: var(--bg-primary);
    cursor: not-allowed;
}

.answer-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Сообщение о результате */
.feedback-message {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease;
}

.feedback-message.show {
    display: block;
}

.feedback-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.feedback-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Кнопки - минималистичные */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.btn-check {
    background: var(--accent);
    color: white;
}

.btn-check:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-next {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-next:hover:not(:disabled) {
    background: var(--bg-primary);
    border-color: var(--accent);
    color: var(--accent);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn .shortcut {
    font-size: 0.75em;
    opacity: 0.6;
    margin-left: 8px;
    font-weight: 400;
}

.nav-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-top: 16px;
}

/* Анимации - плавные и ненавязчивые */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Переход между вопросами */
.question-text.fade-out {
    opacity: 0;
}

.question-text.fade-in {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .test-content {
        padding: 32px 20px;
    }
    
    .question-container {
        padding: 32px 24px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .answer-input {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .progress-minimal {
        max-width: 100%;
        width: 100%;
    }
}

/* Улучшенная типографика для чтения */
.question-text h1,
.question-text h2,
.question-text h3 {
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.question-text ul,
.question-text ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.question-text li {
    margin-bottom: 8px;
}

.question-text code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Экран завершения теста */
.test-complete {
    text-align: center;
    padding: 80px 32px;
    max-width: 500px;
    margin: 0 auto;
}

.complete-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: bounceIn 0.6s ease;
}

.test-complete h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.results-summary {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--text-secondary);
    font-size: 15px;
}

.result-value {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
}

.result-percentage {
    font-size: 24px;
    color: var(--accent);
}

.test-complete .btn-primary {
    display: inline-block;
    padding: 16px 32px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.test-complete .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 166, 185, 0.3);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

