/* Основные стили YSQR */
.ysqr-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Стартовый экран */
.ysqr-start-screen {
    padding: 30px;
}

.ysqr-start-screen h1 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 28px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.ysqr-instructions {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.ysqr-instructions p {
    margin: 0 0 15px 0;
    color: #444;
    line-height: 1.6;
}

.ysqr-answer-scale {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

.ysqr-answer-scale p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #2c3e50;
}

.ysqr-answer-scale ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.ysqr-answer-scale li {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.ysqr-answer-scale li:last-child {
    border-bottom: none;
}

.ysqr-answer-scale strong {
    display: inline-block;
    width: 25px;
    color: #3498db;
    font-weight: 600;
}

/* Личная информация */
.ysqr-personal-info {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid #e0e0e0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.ysqr-personal-info h2 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 22px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.ysqr-form-description {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 15px;
    line-height: 1.5;
}

.ysqr-form-group {
    margin-bottom: 20px;
}

.ysqr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.ysqr-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.ysqr-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.ysqr-input.error {
    border-color: #e74c3c;
    background: #fff5f5;
}

.ysqr-gender-select {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.ysqr-gender-option {
    flex: 1;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s;
}

.ysqr-gender-option:hover {
    border-color: #3498db;
    background: #f0f7ff;
}

.ysqr-gender-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.ysqr-gender-label {
    font-size: 15px;
    font-weight: 500;
    color: #444;
}

.ysqr-gender-select.error {
    border: 2px solid #e74c3c;
    padding: 10px;
    border-radius: 6px;
}

.ysqr-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}

.ysqr-form-note {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}

.ysqr-form-note p {
    margin: 5px 0;
}

/* Кнопки */
#ysqr-start-button,
.ysqr-next-btn,
.ysqr-prev-btn,
.ysqr-pdf-btn,
.ysqr-pdf-summary-btn,
.ysqr-retake-btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    margin: 10px 5px;
    min-width: 120px;
}

#ysqr-start-button {
    background: #3498db;
    color: white;
    font-size: 18px;
    padding: 16px 40px;
    margin: 30px auto;
    display: block;
    width: 100%;
    max-width: 300px;
}

#ysqr-start-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

#ysqr-start-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ysqr-next-btn {
    background: #2ecc71;
    color: white;
}

.ysqr-next-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.ysqr-prev-btn {
    background: #95a5a6;
    color: white;
}

.ysqr-prev-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.ysqr-pdf-btn {
    background: #3498db;
    color: white;
}

.ysqr-pdf-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.ysqr-pdf-summary-btn {
    background: #2ecc71;
    color: white;
}

.ysqr-pdf-summary-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.ysqr-retake-btn {
    background: #95a5a6;
    color: white;
}

.ysqr-retake-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Заголовок теста */
.ysqr-test-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.ysqr-test-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.ysqr-user-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.ysqr-info-label {
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.ysqr-info-value {
    color: #3498db;
    font-weight: 500;
    margin-right: 15px;
}

.ysqr-progress-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ysqr-progress-text {
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.ysqr-progress-counter {
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Прогресс-бар */
.ysqr-progress-bar-container {
    margin-top: 10px;
}

.ysqr-progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.ysqr-progress-fill {
    height: 100%;
    background: #3498db;
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease;
}

/* Контейнер вопросов */
.ysqr-questions-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
}

/* Вопросы */
.ysqr-question {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.ysqr-question:hover {
    border-color: #bdc3c7;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ysqr-question.answered {
    border-color: #2ecc71;
    background-color: #f9fdf9;
}

.ysqr-question-header {
    margin-bottom: 20px;
}

.ysqr-question-title {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.ysqr-question-number {
    background: #3498db;
    color: white;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.ysqr-question-text {
    flex: 1;
    font-size: 17px;
    line-height: 1.5;
    color: #2c3e50;
    font-weight: 500;
}

.ysqr-question-schema {
    font-size: 13px;
    color: #7e57c2;
    font-weight: 500;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* Варианты ответов */
.ysqr-question-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.ysqr-options-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.ysqr-option-item {
    position: relative;
}

.ysqr-option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ysqr-option-label {
    padding: 3px 2px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
    color: #555;
    height: 100%;
    min-height: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ysqr-option-label:hover {
    border-color: #3498db;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.ysqr-option-item input[type="radio"]:checked + .ysqr-option-label {
    background: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.ysqr-option-number {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.ysqr-option-text {
    font-size: 12px;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
}

/* Навигация */
.ysqr-navigation {
    display: flex;
    justify-content: space-between;
    padding: 25px 0;
    margin-top: 20px;
    border-top: 1px solid #eee;
}

/* Сообщения об ошибках */
.ysqr-error-container {
    margin: 20px 0;
}

.ysqr-error-alert {
    background: #e74c3c;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 6px solid #c0392b;
    font-weight: 500;
    text-align: center;
}

/* Результаты */
.ysqr-results-header {
    background: #e3f2fd;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #bbdefb;
}

.ysqr-results-header h1 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #0d47a1;
    text-align: center;
}

.ysqr-user-results-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #bbdefb;
}

.ysqr-user-results-info p {
    margin: 10px 0;
    font-size: 15px;
}

.ysqr-user-results-info strong {
    color: #444;
    margin-right: 10px;
}

.ysqr-disclaimer {
    background: white;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    color: #37474f;
    margin-top: 15px;
    border: 1px solid #bbdefb;
}

/* Сводка результатов */
.ysqr-results-summary {
    margin: 30px 0;
}

.ysqr-summary-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #e0e0e0;
}

.ysqr-summary-card h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 22px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.ysqr-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.ysqr-stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.ysqr-stat-item:hover {
    transform: translateY(-5px);
    border-color: #3498db;
}

.ysqr-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 8px;
}

.ysqr-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Выраженные схемы */
.ysqr-expressed-schemas {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #e0e0e0;
}

.ysqr-expressed-schemas h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 22px;
    border-bottom: 2px solid #2ecc71;
    padding-bottom: 10px;
}

.ysqr-expressed-container {
    padding: 15px;
}

.ysqr-expressed-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ysqr-expressed-list li {
    padding: 12px 20px;
    margin-bottom: 10px;
    background: #f1f8e9;
    border-radius: 6px;
    border-left: 4px solid #2ecc71;
}

.ysqr-expressed-list p {
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

.ysqr-no-expressed {
    text-align: center;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px dashed #bdbdbd;
}

.ysqr-no-expressed p {
    color: #757575;
    font-size: 16px;
    margin: 0;
}

/* Все схемы */
.ysqr-all-schemas {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #e0e0e0;
}

.ysqr-all-schemas h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 22px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.ysqr-schema-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.ysqr-filter-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.ysqr-filter-btn:hover {
    background: #e9ecef;
    border-color: #bdc3c7;
}

.ysqr-filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Таблица схем */
.ysqr-schemas-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.ysqr-schemas-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.ysqr-schemas-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.ysqr-schemas-table tr:nth-child(even) {
    background: #f8f9fa;
}

.ysqr-schemas-table tr:hover {
    background: #f0f7ff;
}

.ysqr-expression-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Интерпретация результатов */
.ysqr-interpretation {
    background: #fff9e6;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid #ffd54f;
}

.ysqr-interpretation h2 {
    color: #5d4037;
    margin: 0 0 20px 0;
    font-size: 22px;
    border-bottom: 2px solid #ffa000;
    padding-bottom: 10px;
}

.ysqr-interpretation-content p {
    margin: 0 0 15px 0;
    color: #5d4037;
    line-height: 1.6;
}

/* Кнопки действий */
.ysqr-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

/* Сохранение прогресса */
.ysqr-save-notice {
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #1565c0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ysqr-save-notice::before {
    content: "&#128190;";
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .ysqr-options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .ysqr-option-label {
        min-height: 90px;
        padding: 15px 8px;
    }
    
    .ysqr-option-text {
        font-size: 11px;
    }
    
    .ysqr-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ysqr-container {
        padding: 15px;
        margin: 15px auto;
    }
    
    .ysqr-start-screen,
    .ysqr-personal-info,
    .ysqr-test-header,
    .ysqr-summary-card,
    .ysqr-expressed-schemas,
    .ysqr-all-schemas {
        padding: 20px;
    }
    
    .ysqr-start-screen h1 {
        font-size: 24px;
    }
    
    .ysqr-gender-select {
        flex-direction: column;
        gap: 10px;
    }
    
    .ysqr-test-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ysqr-user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ysqr-info-value {
        margin-right: 0;
        display: block;
    }
    
    .ysqr-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ysqr-option-label {
        min-height: 85px;
        padding: 12px 6px;
        flex-direction: row;
        text-align: left;
        gap: 15px;
    }
    
    .ysqr-option-number {
        margin-bottom: 0;
        font-size: 18px;
        min-width: 25px;
    }
    
    .ysqr-option-text {
        font-size: 12px;
        text-align: left;
    }
    
    .ysqr-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .ysqr-prev-btn,
    .ysqr-next-btn {
        width: 100%;
    }
    
    .ysqr-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .ysqr-actions {
        flex-direction: column;
    }
    
    .ysqr-pdf-btn,
    .ysqr-pdf-summary-btn,
    .ysqr-retake-btn {
        width: 100%;
    }
    
    .ysqr-schema-filters {
        flex-direction: column;
    }
    
    .ysqr-filter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ysqr-options-grid {
        grid-template-columns: 1fr;
    }
    
    .ysqr-option-label {
        min-height: 70px;
    }
    
    .ysqr-schemas-table {
        display: block;
        overflow-x: auto;
    }
    
    .ysqr-results-header h1 {
        font-size: 22px;
    }
    
    .ysqr-save-notice {
        flex-direction: column;
        text-align: center;
    }
}