/* Основные стили для опросника ASRS */
.asrs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.asrs-header {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #2196F3;
}

.asrs-header h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.asrs-instructions {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.asrs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.asrs-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #1a252f;
}

.asrs-table td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
}

.asrs-table tr.part-a {
    background-color: #f0f7ff;
}

.asrs-table tr.part-b {
    background-color: #fff;
}

.asrs-table tr:hover {
    background-color: #f8f9fa;
}

.part-label {
    background: #2196F3;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
    font-weight: normal;
}

.asrs-table .text-center {
    text-align: center;
}

.asrs-radio {
    margin: 0;
    transform: scale(1.2);
}

.asrs-table label {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.asrs-form-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.asrs-submit-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.asrs-submit-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.asrs-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Стили результатов */
.asrs-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.asrs-results-header {
    background: #e3f2fd;
    color: black;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px black;
}

.asrs-results-header h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #1565C0;
}

.asrs-disclaimer {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.asrs-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 2px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.result-card.part-a {
    border-top: 6px solid #2196F3;
}

.result-card.part-b {
    border-top: 6px solid #4CAF50;
}

.result-card.total {
    border-top: 6px solid #FF9800;
}

.result-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.score {
    font-size: 32px;
    font-weight: bold;
    margin: 15px 0;
    color: #2c3e50;
}

.level {
    font-size: 20px;
    margin: 10px 0;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
}

.percentile {
    font-size: 18px;
    color: #666;
    margin: 10px 0;
}

.interpretation p.clinical {
    color: #d32f2f;
    background: #ffebee;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #d32f2f;
    font-weight: bold;
}

.asrs-probability {
    margin-bottom: 40px;
}

.asrs-probability h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.probability-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.probability-card.high-probability {
    border: 3px solid #d32f2f;
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
}

.probability-card.moderate-probability {
    border: 3px solid #FF9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
}

.probability-card p {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.recommendation {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 6px solid #2196F3;
    font-size: 16px;
}

.asrs-subscales {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.subscales-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.subscales-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.subscales-table td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    vertical-align: top;
}

.subscales-table tr:nth-child(even) {
    background: #f8f9fa;
}

.subscales-interpretation {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.subscales-interpretation h4 {
    margin-top: 0;
    color: #1565C0;
}

.subscales-interpretation ul {
    margin: 10px 0;
    padding-left: 20px;
}

.subscales-interpretation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.asrs-details {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.details-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.details-table tr:hover {
    background: #f8f9fa;
}

.asrs-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.asrs-retake-btn,
.asrs-print-btn {
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.asrs-retake-btn {
    background: #2196F3;
    color: white;
}

.asrs-retake-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.asrs-print-btn {
    background: #4CAF50;
    color: white;
}

.asrs-print-btn:hover {
    background: #388E3C;
    transform: translateY(-2px);
}

.asrs-clinical-note {
    background: #fff3cd;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #ffeaa7;
}

.asrs-clinical-note h4 {
    margin-top: 0;
    color: #856404;
}

.asrs-clinical-note ul {
    margin: 15px 0;
    padding-left: 20px;
}

.asrs-clinical-note li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Адаптивность */
@media (max-width: 768px) {
    .asrs-table th:nth-child(n+3),
    .asrs-table td:nth-child(n+3) {
        display: none;
    }
    
    .asrs-table th:nth-child(1),
    .asrs-table td:nth-child(1) {
        width: 60%;
    }
    
    .asrs-table th:nth-child(2),
    .asrs-table td:nth-child(2) {
        width: 40%;
    }
    
    .asrs-summary {
        grid-template-columns: 1fr;
    }
    
    .asrs-actions {
        flex-direction: column;
    }
    
    .asrs-table {
        font-size: 14px;
    }
    
    .asrs-table td {
        padding: 10px;
    }
}

/* Стили для админки */
.asrs-admin-wrap {
    padding: 20px;
}

.asrs-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #2196F3;
}

.stat-card h3 {
    margin-top: 0;
    color: #666;
    font-size: 16px;
    font-weight: 600;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #2196F3;
    margin: 15px 0;
}

.high-risk {
    background: #d32f2f;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.moderate-risk {
    background: #FF9800;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.low-risk {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.asrs-chart-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.asrs-results-table {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.asrs-export {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Основные стили для опросника */
.asrs-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.asrs-header {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #2196F3;
}

.asrs-header h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
}

.asrs-instructions {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    line-height: 1.5;
}

/* Контейнер вопросов */
.asrs-questions-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

/* Стили для каждого вопроса */
.asrs-question {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.asrs-question:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.asrs-question.part-a {
    border-left: 4px solid #2196F3;
}

.asrs-question.part-b {
    border-left: 4px solid #4CAF50;
}

/* Заголовок вопроса - номер и текст в одной строке */
.question-header {
    margin-bottom: 20px;
}

.question-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.question-number {
    background: #2c3e50;
    color: white;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.question-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    padding-right: 10px;
}

.part-label {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

/* Варианты ответов - в одну строку */
.question-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.option-item {
    flex: 1;
    min-width: 0; /* Важно для предотвращения переполнения */
    position: relative;
}

.option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-label {
    padding: 12px 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 500;
    color: #555;
    height: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-label:hover {
    border-color: #2196F3;
    background: #f0f7ff;
}

.option-item input[type="radio"]:checked + .option-label {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2);
}

.option-text {
    display: inline;
    font-size: 14px;
    line-height: 1.3;
}

/* Нижняя часть формы */
.asrs-form-footer {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.asrs-submit-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: inline-block;
}

.asrs-submit-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.3);
}

.asrs-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    color: #856404;
    font-size: 14px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .asrs-container {
        padding: 15px;
    }
    
    .asrs-header {
        padding: 20px 15px;
    }
    
    .asrs-header h2 {
        font-size: 20px;
    }
    
    .asrs-instructions {
        padding: 12px;
        font-size: 15px;
    }
    
    .asrs-question {
        padding: 15px;
    }
    
    .question-title {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    
    .question-number {
        min-width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .question-text {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .part-label {
        margin-left: 8px;
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .question-options {
        padding: 12px;
    }
    
    /* На мобильных - 2 варианта в строке */
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .option-label {
        padding: 10px 5px;
        min-height: 50px;
        font-size: 13px;
    }
    
    .option-text {
        font-size: 13px;
    }
    
    .asrs-form-footer {
        padding: 20px 15px;
    }
    
    .asrs-submit-btn {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .asrs-header h2 {
        font-size: 18px;
    }
    
    .question-text {
        font-size: 14px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .option-label {
        padding: 12px 10px;
        min-height: 45px;
    }
    
    .option-text {
        font-size: 14px;
    }
}

/* Для планшетов и небольших ноутбуков */
@media (min-width: 769px) and (max-width: 1024px) {
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .option-label {
        min-height: 55px;
    }
}

/* Стили для прогресса заполнения (опционально) */
.asrs-progress {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Стили для выделения отвеченных вопросов */
.asrs-question.answered {
    background-color: #f8fff9;
    border-color: #4CAF50;
}

.asrs-question.part-a.answered {
    background-color: #f0f9ff;
}

/* Стили для ошибок валидации */
.asrs-question.error {
    border-color: #f44336;
    animation: pulse-error 0.5s ease-in-out;
}

@keyframes pulse-error {
    0%, 100% { border-color: #f44336; }
    50% { border-color: #ff7961; }
}

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.asrs-question.error .error-message {
    display: block;
}