/* Base styles */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* Allow nav items to wrap on small screens */
    justify-content: center; /* Center nav items when they wrap */
}

nav ul li a {
    padding: 8px 12px; /* Slightly reduced padding for mobile */
    display: inline-block;
}

table, td {
    border-collapse: collapse;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

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

img {
    width: 30px;
}

#tables {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Reduced gap for mobile */
    align-items: flex-start;
    margin-top: 10px;
    justify-content: center; /* Center tables on small screens */
}

/* 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;
    }
    
    /* Reduce padding in table cells for small screens */
    th, td {
        padding: 8px 6px;
    }
    
    /* 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;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Further reduce padding for very small screens */
    th, td {
        padding: 6px 4px;
        font-size: 0.9rem;
    }
    
    /* Single column nav items */
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 2px 0;
    }
}