body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    text-align: center;
    background-color: #f0f0f0;
}

/* make the download list horizontal and centered */
ul {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap; /* allows items to wrap on small screens */
    justify-content: center;
    gap: 20px; /* space between items */
    align-items: center;
}

li {
    margin: 0; /* spacing handled by gap */
}

/* style the links to look like buttons */
a {
    display: inline-block;
    text-decoration: none;
    color: #333;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* small responsive tweak for very narrow screens */
@media (max-width: 420px) {
    a { padding: 8px 12px; font-size: 14px; }
}

/* modern page container */
main, body > .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

/* categories layout: three columns on wide screens, stacked on small */

.categories {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    width: 100%;
    padding: 8px;
}

.category {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(31,41,55,0.06);
    width: 100%;
    max-width: 760px; /* keep cards reasonably narrow on wide screens */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.category h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
}

.category ul {
    margin: 0;
    display: flex;
    flex-direction: column; /* list items stacked in the card */
    gap: 10px;
}

h1 {
    margin: 0;
    font-size: 1.6rem;
    color: #1f2937;
}

img {
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(31,41,55,0.08);
}

/* link hover and focus */
a:hover, a:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(31,41,55,0.12);
    outline: none;
}

/* focus ring for accessibility */
a:focus-visible {
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15), 0 6px 18px rgba(31,41,55,0.12);
}

/* modal styles */
#download-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.5);
    z-index: 9999;
}

#modal-content {
    background: #fff;
    padding: 20px 22px;
    border-radius: 10px;
    min-width: 280px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(15,23,42,0.2);
    text-align: center;
}

#modal-close {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: #ef4444;
    color: #fff;
    cursor: pointer;
}

#modal-close:hover { opacity: 0.95 }

#fallback a { color: #2563eb; text-decoration: underline }