body {
    font-family: 'Helvetica Neue', Arial, sans-serif; 
    -webkit-font-smoothing: antialiased;
    background-color: #f4f7f6; 
    color: #333; 
}

#wrapper {
    max-width: 900px; 
    margin: 0 auto;
    padding: 20px;
}

h1 {
    margin: 40px 0 30px 0;
    color: #007bff; 
    font-size: 3.2em; 
    font-weight: 300; 
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}
/* Ensure the colored parts still look good */
h1 font {
    font-weight: 600; 
}

/* --- Buttons (The main filters) --- */
#buttons {
    margin-bottom: 25px;
}

button {
    font-size: 0.95em;
    margin-right: 12px;
    margin-bottom: 12px;
    color: #333;
    padding: 10px 20px;
    background: #e9ecef; 
    border-radius: 6px; 
    border: 1px solid #ced4da; 
    display: inline-block;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

button:hover {
    background: #007bff; 
    color: white;
    transform: translateY(-2px); 
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- List Items (The Currency Images) --- */
#list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; 
    gap: 20px; 
    padding: 0; 
    margin-top: 20px;
}

#list li {
    width: 160px; 
    height: 160px;
    list-style-type: none;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    transition: transform 0.3s ease;
    padding: 5px;
    display: flex; 
    justify-content: center;
    align-items: center;
}

#list li:hover {
    transform: scale(1.05); 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

#list li img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 4px;
}

/* --- Overlay Container (Final Corrected CSS) --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center; 
    align-items: center;      
    z-index: 1000;
    cursor: pointer;
}

/* --- Image Inside Overlay (No changes needed here) --- */
.overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain; 
    display: block;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease-in-out; 
}