#space {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #000000, #000011 90%);
    z-index: -1;
}

.primary-nav {
    display: flex;
}

.navigation {
    display: flex;
    gap: 20px;
    list-style: none;
    background: yellow;
    padding: 16px;
    border-radius: 10px;
}

.navigation li {
    padding: 4px;
    cursor: pointer;
    text-decoration: underline;
    text-transform: uppercase;
    font-size: 16px;
}

main {
    padding: 10px;
}

main * {
    color: white;
}

.content {
    margin: 30px 0 40px 0;
}

footer {
    background: yellow;
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Modal */
.topic-wrapper {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
}

.topic-wrapper:last-child {
    margin-bottom: 0;
}

.topic-wrapper:hover {
    background: #e0e7ff;
}

.topic-heading {
    padding: 4px 12px;
}

.topic-heading h2 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 41, 55, 0.75);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    max-height: 80vh;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-scroll-content {
    overflow-y: auto;
    padding-right: 20px;
    max-height: calc(80vh - 30px);
}

/* 🔥 Scrollbar for WebKit browsers (Chrome, Edge, Safari) */
.modal-scroll-content::-webkit-scrollbar {
    width: 10px;
}

.modal-scroll-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 8px;
}

.modal-scroll-content::-webkit-scrollbar-thumb {
    background-color: #9ca3af;
    border-radius: 8px;
    border: 2px solid #f3f4f6;
}

.modal-scroll-content::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}

/* 🦊 Firefox support */
.modal-scroll-content {
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #f3f4f6;
}

#modalBody {
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 6px;
    font-size: 24px;
    cursor: pointer;
    color: white;
    background: black;
    border-radius: 99999px;
    width: 24px;
    height: 24px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-description p,
.topic-description ul,
.topic-description li {
    color: #374151;
    line-height: 1.6;
}

.topic-description ul {
    padding-left: 20px;
}

/* Modal end */

pre {
    background-color: #0f172a;
    /* dark slate */
    color: #f1f5f9;
    /* light text */
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Fira Code', monospace;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    /* allow wrapping if you want it mobile-friendly */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

pre code {
    display: block;
    white-space: pre;
    /* keeps formatting */
}

/* Mobile design */
@media (max-width: 600px) {
    body {
        margin: 20px;
    }

    .modal-content {
        max-width: 75vw;
    }

}

/* Tablet design */
@media (min-width: 601px) and (max-width: 1024px) {
    .modal-content {
        max-width: 75vw;
    }
}

/* Desktop Design */
@media (min-width: 1025px) {
    body {
        max-width: 1200px;
        margin: 0 auto;
    }

    .modal-content {
        max-width: 800px;
    }
}