/* Health Quiz Plugin Styles */
#health-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.health-quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.health-quiz-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 600;
}

.health-quiz-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.quiz-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-section h3 {
    color: #2c3e50;
    font-size: 1.4em;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.personal-info {
    background: #f8f9fa;
}

.sleep-section {
    border-left: 4px solid #9b59b6;
}

.nutrition-section {
    border-left: 4px solid #27ae60;
}

.exercise-section {
    border-left: 4px solid #e74c3c;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.question-group {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.question-label {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

.option-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.option-label input[type="radio"] {
    margin-right: 12px;
    width: auto;
}

.option-label input[type="radio"]:checked + .option-text {
    font-weight: 600;
    color: #3498db;
}

.option-label:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background: #e3f2fd;
}

.option-text {
    flex: 1;
    font-size: 1em;
    line-height: 1.4;
}

.quiz-submit {
    text-align: center;
    margin-top: 30px;
}

#submit-quiz {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

#submit-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

#submit-quiz:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#quiz-results {
    margin-top: 30px;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 10px;
}

.diagnosis-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 5px solid #3498db;
}

.diagnosis-section.sleep {
    border-left-color: #9b59b6;
}

.diagnosis-section.nutrition {
    border-left-color: #27ae60;
}

.diagnosis-section.exercise {
    border-left-color: #e74c3c;
}

.diagnosis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.diagnosis-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
}

.diagnosis-score {
    font-size: 1.1em;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    background: #ecf0f1;
    color: #2c3e50;
}

.diagnosis-level {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.diagnosis-level.excellent {
    background: #d5f4e6;
    color: #27ae60;
}

.diagnosis-level.good {
    background: #fff3cd;
    color: #856404;
}

.diagnosis-level.regular {
    background: #f8d7da;
    color: #721c24;
}

.diagnosis-level.needs-improvement {
    background: #f5c6cb;
    color: #721c24;
}

.diagnosis-message {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.5;
}

.diagnosis-tip {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    font-style: italic;
    color: #5a6c7d;
    line-height: 1.5;
}

.diagnosis-tip::before {
    content: "💡 ";
    font-style: normal;
}

#quiz-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    display: inline-block;
}

.loading-spinner::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1em;
    color: #7f8c8d;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    #health-quiz-container {
        padding: 15px;
    }
    
    .health-quiz-header h2 {
        font-size: 1.8em;
    }
    
    .quiz-section {
        padding: 20px 15px;
    }
    
    .question-group {
        padding: 15px;
    }
    
    .option-label {
        padding: 10px 12px;
    }
    
    #submit-quiz {
        padding: 12px 30px;
        font-size: 1.1em;
    }
    
    .diagnosis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .health-quiz-header {
        padding: 15px;
    }
    
    .health-quiz-header h2 {
        font-size: 1.5em;
    }
    
    .health-quiz-header p {
        font-size: 1em;
    }
    
    .quiz-section {
        padding: 15px 10px;
    }
    
    .diagnosis-section {
        padding: 20px 15px;
    }
}
