.interactive-quiz {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    direction: rtl;
}

.quiz-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: #666;
}

.quiz-question {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.question-title {
    color: #333;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    order: 3; /* move below answers */
    text-align: center;
}

.question-text {
    font-size: 2.25rem;
    line-height: 1.3;
    margin: 10px 0 10px;
    color: #111;
    font-weight: 800;
    text-align: center;
    order: 1;
}

.quiz-answers {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
    width: 100%;
    order: 2;
}

.answer-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    min-height: 96px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.answer-option:hover {
    border-color: #111827;
    background: #f9fafb;
}

.answer-option input[type="radio"] {
    display: none; /* make the whole card feel like a button */
}

.answer-text {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 700;
}

/* highlight selected option (modern browsers supporting :has) */
.answer-option:has(input[type="radio"]:checked) {
    border-color: #0ea5e9;
    background: #e0f2fe;
}
/* fallback: at least color the text when selected */
.answer-option input[type="radio"]:checked + .answer-text {
    color: #0ea5e9;
}

.quiz-navigation {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

/* Always hide Next button when auto-advance is enabled */
#next-btn { display: none !important; }

.quiz-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quiz-next, .quiz-finish {
    background: #4CAF50;
    color: white;
}

.quiz-next:hover, .quiz-finish:hover {
    background: #45a049;
}

.quiz-prev {
    background: #6c757d;
    color: white;
}

.quiz-prev:hover {
    background: #5a6268;
}

.quiz-results {
    text-align: center;
    padding: 40px 20px;
    direction: rtl;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.score-percentage {
    font-size: 2em;
    font-weight: bold;
    color: white;
}

.score-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 30px;
}

.quiz-retake {
    background: #007cba;
    color: white;
}

.quiz-retake:hover {
    background: #005a87;
}

/* Share Section */
.quiz-share-section {
    margin: 32px 0 24px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.quiz-share-section h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: #333;
    text-align: center;
}

.social-share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-btn:active {
    transform: translateY(1px);
}

/* Platform-specific colors */
.facebook-share {
    background: #1877f2;
    color: white;
}
.facebook-share:hover {
    background: #166fe5;
}

.twitter-share {
    background: #1da1f2;
    color: white;
}
.twitter-share:hover {
    background: #0d8bd9;
}

.instagram-share {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}
.instagram-share:hover {
    opacity: 0.9;
}

.snapchat-share {
    background: #fffc00;
    color: #333;
}
.snapchat-share:hover {
    background: #f0ed00;
}

.whatsapp-share {
    background: #25d366;
    color: white;
}
.whatsapp-share:hover {
    background: #1da851;
}

.linkedin-share {
    background: #0077b5;
    color: white;
}
.linkedin-share:hover {
    background: #005e94;
}

.copy-link {
    background: #6c757d;
    color: white;
}
.copy-link:hover {
    background: #5a6268;
}

@media (max-width: 1024px) {
    .quiz-answers {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .question-text {
        font-size: 1.75rem;
    }
    .quiz-answers {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 520px) {
    .interactive-quiz {
        margin: 20px 10px;
        padding: 0;
    }
    .quiz-answers {
        grid-template-columns: 1fr;
    }
    .answer-option {
        min-height: 72px;
        padding: 16px 12px;
    }
    .quiz-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    .social-share-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    .share-btn {
        font-size: 13px;
        padding: 8px 10px;
    }
}