body {
    font-family: system-ui, -apple-system, sans-serif;
}

h1,
h2,
h4 {
    text-align: center;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li a {
    padding: 8px 12px;
    display: inline-block;
    text-decoration: none;
}

nav ul li a:visited {
    color: #0000EE;
}

table {
    border-collapse: collapse;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    min-width: 400px;
    background: #ffffff;
    font-size: 14px;
    margin: 0 auto;
}

th {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid #e0dcd0;
}

th,
td {
    padding: 10px 16px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #e0dcd0;
}

tbody tr:last-child {
    border-bottom: none;
}

img {
    width: 30px;
    vertical-align: middle;
}

#tables {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    margin-top: 10px;
    justify-content: center;
    padding: 0 16px;
}

#items-container table {
    margin: 20px auto;
    max-width: 800px;
}

#items-container th:first-child,
#items-container td:first-child {
    text-align: center;
    width: 50px;
}

#tables table {
    flex: 0 1 auto;
    margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    /* Stack tables vertically on small screens */
    #tables {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    /* Make tables take full width but not exceed screen */
    table {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    /* Reduce padding in table cells for small screens */
    th,
    td {
        padding: 8px 10px;
    }

    /* Adjust header font size */
    header h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    /* Make nav items more compact */
    nav ul li a {
        padding: 6px 8px;
    }
}