body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* --- ГЛАВНОЕ ИСПРАВЛЕНИЕ --- */
    /* Путь /img/clouds.jpg означает: public_html/img/clouds.jpg */
    background-image: url('/img/clouds.jpg');
    /* ----------------------------- */
    
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #f4f6f9;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
    padding-bottom: 40px;
    position: relative;
}

/* Полупрозрачная подложка поверх фото для читаемости текста */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(244, 246, 249, 0.85); /* 85% непрозрачности */
    z-index: 0;
    pointer-events: none;
}

/* Контент должен быть поверх подложки */
.start-screen, .container, .site-footer {
    position: relative;
    z-index: 1;
}

/* --- СТИЛИ ДЛЯ СТАРТОВОГО ЭКРАНА --- */
.start-screen {
    width: 100%;
    max-width: 600px;
    padding: 40px 20px;
    text-align: center;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-top: 6px solid #0056b3;
}

.doc-title {
    font-size: 18px;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-meta {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.test-title {
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 30px;
    font-weight: 600;
}

.primary-btn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
}

.primary-btn:hover {
    background-color: #004494;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.4);
}

/* --- ОБЩИЕ СТИЛИ ДЛЯ ТЕСТА --- */
.container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 500px;
    text-align: center;
    margin-bottom: 20px;
}

.question-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: bold; 
}

.options-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.answer-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
    text-align: left;
}

.answer-btn:hover {
    background-color: #e9ecef;
}

.answer-btn.selected {
    background-color: #0056b3;
    color: white;
    border-color: #004494;
}

.option-main-text {
    font-weight: bold;
    white-space: nowrap;
}
.option-hint {
    font-weight: normal;
    color: #666;
    font-size: 0.9em;
    margin-left: 6px;
}

.action-btn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.action-btn:hover {
    background-color: #004494;
}

.stats {
    margin: 30px 0;
    text-align: left;
    color: #555;
}

.stats strong {
    color: #0056b3;
}

.timer-box {
    background-color: #eef2f5;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 30px;
}

.question-counter {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 20px;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    width: 100%;
}

.action-btn-restart {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}
.action-btn-restart:hover {
    background-color: #004494;
}

.action-btn-finish {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}
.action-btn-finish:hover {
    background-color: #5a6268;
}

.errors-block ul {
    margin-top: 10px;
    padding-left: 0;
}

.errors-block li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ffeeba;
    color: #333;
    line-height: 1.5;
    text-align: left;
}

.err-question-num {
    color: #0056b3; 
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.err-question-context {
    color: #6c757d;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 10px;
    display: block;
}

.err-label-user {
    color: #8b0000; 
    font-weight: 500;
    margin-right: 5px;
}

.err-user-answer {
    color: #dc3545; 
    font-weight: bold;
}

.err-label-correct {
    color: #2e8b57; 
    font-weight: 500;
    margin-right: 5px;
}

.err-correct-answer {
    color: #28a745; 
    font-weight: bold;
}

.err-answer-text {
    font-size: 1.15rem; 
    font-weight: 700;   
    font-family: 'Courier New', Courier, monospace; 
    padding: 2px 4px;   
}

.site-footer {
    width: 100%;
    background-color: #f1f1f1;
    color: #555;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    margin-top: auto;
    box-sizing: border-box;
}
