/* Frontend Styles for Fun Quiz Builder */

/* Quiz Container */
.fqb-quiz-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Quiz Title */
.fqb-quiz-title {
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #0073aa;
    color: #23282d;
    font-size: 28px;
    font-weight: 600;
}

/* Question */
.fqb-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.fqb-question-text {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.6;
    color: #23282d;
}

.fqb-question-text strong {
    color: #0073aa;
}

/* Answers */
.fqb-answers {
    padding-left: 10px;
}

.fqb-answer {
    margin-bottom: 12px;
}

.fqb-answer label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fqb-answer label:hover {
    background: #f0f8ff;
    border-color: #0073aa;
}

.fqb-answer input[type="radio"],
.fqb-answer input[type="checkbox"] {
    margin: 0 12px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fqb-answer-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

/* Submit Container */
.fqb-submit-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.fqb-submit-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fqb-submit-btn:hover {
    background: #005a87;
}

.fqb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Results */
.fqb-results {
    margin-top: 30px;
}

.fqb-score {
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.fqb-score h3 {
    margin: 0 0 15px 0;
    font-size: 26px;
    font-weight: 600;
}

.fqb-score-text {
    margin: 0;
    font-size: 20px;
}

.fqb-score-text strong {
    font-size: 24px;
    font-weight: 700;
}

/* Detailed Results */
.fqb-detailed-results h4 {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #23282d;
}

.fqb-result-question {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.fqb-result-question.correct {
    background: #f0f9f4;
    border-color: #46b450;
}

.fqb-result-question.incorrect {
    background: #fef7f7;
    border-color: #dc3232;
}

.fqb-result-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.fqb-result-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
}

.fqb-result-question.correct .fqb-result-icon {
    background: #46b450;
    color: #ffffff;
}

.fqb-result-question.incorrect .fqb-result-icon {
    background: #dc3232;
    color: #ffffff;
}

.fqb-result-question-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.6;
}

.fqb-result-answers {
    padding-left: 44px;
}

.fqb-result-answer {
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 16px;
}

.fqb-answer-correct-selected {
    background: #d7f3df;
    border: 2px solid #46b450;
    color: #155724;
    font-weight: 600;
}

.fqb-answer-correct-not-selected {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.fqb-answer-incorrect-selected {
    background: #f8d7da;
    border: 2px solid #dc3232;
    color: #721c24;
    font-weight: 600;
}

.fqb-answer-not-selected {
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #666;
}

/* Retry Container */
.fqb-retry-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.fqb-retry-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fqb-retry-btn:hover {
    background: #005a87;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .fqb-quiz-container {
        padding: 20px 15px;
        margin: 20px 10px;
    }
    
    .fqb-quiz-title {
        font-size: 22px;
    }
    
    .fqb-question-text {
        font-size: 16px;
    }
    
    .fqb-answer-text {
        font-size: 14px;
    }
    
    .fqb-submit-btn,
    .fqb-retry-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .fqb-result-answers {
        padding-left: 0;
    }
}
