/* ===========================================
   PSYCH TEST PLAYER - MAIN STYLES
   =========================================== */

.psych-test-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Header */
.psych-test-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.psych-test-header-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.psych-test-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.psych-test-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

.psych-test-timer.warning {
    background: rgba(255, 193, 7, 0.8);
}

.psych-test-timer.danger {
    background: rgba(220, 53, 69, 0.8);
}

.psych-test-complete-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psych-test-complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

/* Question Card */
.psych-test-question-card {
    padding: 40px 32px;
}

.psych-test-question-number {
    text-align: center;
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.psych-test-question-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #212529;
    text-align: center;
    margin-bottom: 40px;
    min-height: 60px;
}

/* Answer Buttons */
.psych-test-answers {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.psych-test-answer-btn {
    flex: 1;
    max-width: 200px;
    padding: 20px 40px;
    border: 3px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.psych-test-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.psych-test-answer-btn.answer-yes {
    color: #28a745;
    border-color: #28a745;
}

.psych-test-answer-btn.answer-yes:hover {
    background: #d4edda;
}

.psych-test-answer-btn.answer-yes.selected {
    background: #28a745;
    color: #fff;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.psych-test-answer-btn.answer-no {
    color: #dc3545;
    border-color: #dc3545;
}

.psych-test-answer-btn.answer-no:hover {
    background: #f8d7da;
}

.psych-test-answer-btn.answer-no.selected {
    background: #dc3545;
    color: #fff;
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

.psych-test-answer-icon {
    font-size: 1.4rem;
}

/* Progress */
.psych-test-progress-section {
    padding: 20px 32px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.psych-test-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.psych-test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.psych-test-progress-text {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Navigation Row */
.psych-test-navigation-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 20px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    overflow: hidden;
}

/* Question Navigator */
.psych-test-question-grid {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 6px;
}

.psych-test-grid-item {
    width: 36px;
    height: 36px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    color: #495057;
}

.psych-test-grid-item:hover {
    border-color: #3498db;
    background: #e7f3ff;
}

.psych-test-grid-item.current {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.psych-test-grid-item.answered {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.psych-test-grid-item.answered.current {
    background: #495057;
    border-color: #495057;
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.4);
}

.psych-test-grid-item.unanswered {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    animation: psych-test-pulse 2s infinite;
}

.psych-test-grid-item.unanswered:hover {
    background: #ffe69c;
}

/* Nav Buttons */
.psych-test-nav-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.psych-test-nav-btn.nav-prev {
    background: #6c757d;
    color: #fff;
}

.psych-test-nav-btn.nav-prev:hover:not(:disabled) {
    background: #5a6268;
}

.psych-test-nav-btn.nav-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.psych-test-nav-btn.nav-next {
    background: #3498db;
    color: #fff;
}

.psych-test-nav-btn.nav-next:hover:not(:disabled) {
    background: #2980b9;
}

.psych-test-nav-btn.nav-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Instructions Screen */
.psych-test-instructions {
    padding: 40px 32px;
}

.psych-test-instructions-box {
    background-color: #d9edf7;
    border: 1px solid #bce8f1;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.psych-test-instructions-box h4 {
    margin-bottom: 20px;
    color: #31708f;
    font-size: 1.2rem;
}

.psych-test-instructions-box p {
    color: #31708f;
    line-height: 1.8;
    font-size: 1.1rem;
}

.psych-test-start-btn {
    display: block;
    width: 250px;
    margin: 0 auto;
    padding: 18px 40px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.psych-test-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

/* Animations */
@keyframes psych-test-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 768px) {
    .psych-test-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .psych-test-header-title {
        font-size: 1.1rem;
    }

    .psych-test-question-card {
        padding: 24px 16px;
    }

    .psych-test-question-text {
        font-size: 1.1rem;
    }

    .psych-test-answers {
        flex-direction: column;
        align-items: center;
    }

    .psych-test-answer-btn {
        max-width: 100%;
        width: 100%;
    }

    .psych-test-navigation-row {
        padding: 12px 8px;
    }

    .psych-test-nav-btn {
        min-width: 40px;
        padding: 10px;
    }

    .psych-test-grid-item {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* ===========================================
   RESULTS SECTION (unchanged from original)
   =========================================== */

.psych-test-results {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.psych-test-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.psych-test-results-summary {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.psych-test-results-summary h4 {
    margin-bottom: 15px;
}

.psych-test-results-level {
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 4px;
    display: inline-block;
}

.psych-test-results-level.level-low {
    background-color: #dff0d8;
    color: #3c763d;
}

.psych-test-results-level.level-elevated {
    background-color: #fcf8e3;
    color: #8a6d3b;
}

.psych-test-results-level.level-high {
    background-color: #f2dede;
    color: #a94442;
}

.psych-test-results-percent {
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

.psych-test-factors {
    margin-top: 30px;
}

.psych-test-factors h4 {
    margin-bottom: 20px;
}

.psych-test-factor-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.psych-test-factor-row:last-child {
    border-bottom: none;
}

.psych-test-factor-name {
    flex: 1;
    font-weight: 500;
}

.psych-test-factor-percent {
    width: 80px;
    text-align: right;
    font-weight: bold;
}

.psych-test-factor-level {
    width: 150px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 15px;
}

.psych-test-factor-level.level-low {
    background-color: #dff0d8;
    color: #3c763d;
}

.psych-test-factor-level.level-elevated {
    background-color: #fcf8e3;
    color: #8a6d3b;
}

.psych-test-factor-level.level-high {
    background-color: #f2dede;
    color: #a94442;
}

/* ===========================================
   LIST ROW COLORS BY DANGER LEVEL
   =========================================== */

tr.list-row.psych-level-high {
    background-color: #ffcdd2;
}

tr.list-row.psych-level-elevated {
    background-color: #fff9c4;
}
