body {
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
}

.navbar {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

    .navbar.scrolled {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.ad-placeholder {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    border: none;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #4b5563;
    transition: transform 0.3s ease;
    max-width: 100%;
}

    .ad-placeholder:hover {
        transform: translateY(-5px);
    }

    .ad-placeholder ins {
        width: 100% !important;
        max-height: 280px;
    }

.article-icon {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 0.5rem;
    font-size: 3rem;
    color: #4b5563;
}

.btn-primary {
    background: #6366f1;
    border: none;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: #4f46e5;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }

.btn-reset {
    background: #6b7280;
    border: none;
    transition: all 0.3s ease;
}

    .btn-reset:hover {
        background: #4b5563;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
    }

.share-btn {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

    .share-btn:hover {
        transform: translateY(-2px);
    }

.correct-answer {
    color: #10b981;
    font-weight: 600;
}

.incorrect-answer {
    color: #ef4444;
    font-weight: 600;
}

.answer-label.correct {
    background: #ecfdf5;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.answer-label.incorrect {
    background: #fef2f2;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.score-display {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #4b5563;
}

/* Sticky Exercises Section */
.exercises-section {
    position: sticky;
    top: 6rem;
    max-height: 600px; /* Fixed height for desktop */
    overflow-y: auto;
    padding-right: 1rem;
    z-index: 5; /* Lower than share popup */
}

/* Article Section */
.article-section {
    max-height: 600px; /* Same height as exercises for desktop */
    overflow-y: auto;
    padding-right: 1rem;
}

    /* Custom Scrollbar for Article and Exercises */
    .article-section::-webkit-scrollbar,
    .exercises-section::-webkit-scrollbar {
        width: 8px;
    }

    .article-section::-webkit-scrollbar-track,
    .exercises-section::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .article-section::-webkit-scrollbar-thumb,
    .exercises-section::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

        .article-section::-webkit-scrollbar-thumb:hover,
        .exercises-section::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

/* Share Popup */
.share-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    z-index: 1000; /* High z-index to appear above all elements */
    width: 300px;
    max-width: 90%;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

    .share-popup.show {
        display: block;
    }

    .share-popup a, .share-popup button {
        display: flex;
        align-items: center;
        padding: 0.5rem 1rem;
        color: #4b5563;
        text-decoration: none;
        font-size: 0.875rem;
        transition: background-color 0.2s ease;
    }

        .share-popup a:hover, .share-popup button:hover {
            background-color: #f3f4f6;
        }

/* Overlay for Popup */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below popup but above other content */
}

    .overlay.show {
        display: block;
    }

/* Animation for Popup */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.correct-answer-text {
    color: green;
    font-weight: bold;
    margin-top: 8px;
    display: none;
}

.incorrect-answer-text {
    color: red;
    font-weight: bold;
    margin-top: 8px;
    display: none;
}
/* Responsive Adjustments */
@media (max-width: 1023px) {
    .article-section,
    .exercises-section {
        position: static; /* Remove sticky positioning on mobile */
        max-height: none; /* Remove fixed height to allow natural expansion */
        overflow-y: visible; /* Remove scrollbar */
        padding: 0 1rem; /* Balanced padding for centered alignment */
    }
}
