/* Risk Quest Modal Styles */
#riskQuestModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

#riskQuestModal.show {
    display: block;
}

.risk-modal-content {
    background: white;
    margin: 30px auto;
    padding: 0;
    max-width: 700px;
    width: 95%;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideDown 0.4s ease;
}

.risk-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.risk-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

.risk-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.risk-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.risk-modal-body {
    padding: 30px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.4s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

/* Intro Section */
.risk-intro {
    text-align: center;
    padding: 20px;
}

.risk-intro h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.risk-intro ul {
    text-align: right;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.risk-intro li {
    padding: 12px;
    margin: 8px 0;
    background: #f5f5f5;
    border-radius: 10px;
    border-right: 4px solid #667eea;
}

.risk-intro li .bold {
    color: #667eea;
    font-weight: 700;
}

.risk-intro button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 20px;
}

.risk-intro button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Questions */
.risk-question-container {
    display: none;
}

.risk-question-container.active {
    display: block;
    animation: fadeInSlide 0.4s ease;
}

.risk-question {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 25px;
    text-align: center;
}

.risk-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.risk-option {
    position: relative;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.risk-option:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateX(-5px);
}

.risk-option input[type="radio"] {
    margin-left: 15px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #667eea;
}

.risk-option label {
    cursor: pointer;
    flex: 1;
    font-size: 1.05rem;
    margin: 0;
}

.risk-option.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    border-width: 3px;
}

/* Navigation Buttons */
.risk-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.risk-btn {
    flex: 1;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.risk-btn-prev {
    background: #e0e0e0;
    color: #666;
}

.risk-btn-prev:hover {
    background: #d0d0d0;
}

.risk-btn-next, .risk-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.risk-btn-next:hover, .risk-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.risk-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results */
.risk-result {
    display: none;
    text-align: center;
    padding: 20px;
}

.risk-result.show {
    display: block;
    animation: fadeInSlide 0.5s ease;
}

.risk-result-icon {
    font-size: 5rem;
    margin: 20px 0;
}

.risk-result-level {
    font-size: 2rem;
    font-weight: 700;
    margin: 20px 0;
}

.risk-result-level.low {
    color: #4CAF50;
}

.risk-result-level.medium {
    color: #FF9800;
}

.risk-result-level.high {
    color: #F44336;
}

.risk-result-explanation {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    text-align: justify;
    line-height: 1.8;
    color: #333;
    margin: 20px 0;
    border-right: 4px solid #667eea;
}

.risk-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.risk-result-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.risk-result-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.risk-result-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.risk-result-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.risk-result-btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .risk-modal-content {
        margin: 15px auto;
        width: 98%;
    }

    .risk-modal-header {
        padding: 20px;
    }

    .risk-modal-header h2 {
        font-size: 1.4rem;
    }

    .risk-modal-body {
        padding: 20px;
    }

    .risk-question {
        font-size: 1.1rem;
    }

    .risk-option {
        padding: 15px;
    }

    .risk-option label {
        font-size: 0.95rem;
    }

    .risk-result-level {
        font-size: 1.6rem;
    }

    .risk-result-explanation {
        padding: 20px;
        font-size: 0.95rem;
    }

    .risk-navigation {
        flex-direction: column;
    }

    .risk-result-actions {
        flex-direction: column;
    }

    .risk-result-btn {
        width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

