body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #ffffff;
}

header {
    background-color: #1c1c1c;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

footer {
    background-color: #1c1c1c;
    padding: 1rem;
    text-align: center;
}

footer p {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

nav {
    display: flex;
    justify-content: center; /* Centering the Home button */
    align-items: center;
    position: relative;
}

nav a.home-button {
    color: #fff;
    text-decoration: none;
    font-size: 1rem; /* Make home button smaller */
    transition: color 0.3s;
}

nav a.home-button:hover {
    color: #ff5722;
}

main {
    padding: 2rem;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.filter-container button {
    background-color: #ff5722;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    min-width: 150px; /* Ensure button size consistency */
    flex: 1; /* Allow buttons to scale within the container */
    text-align: center; /* Center text within buttons */
}

.filter-container button:hover {
    background-color: darkred;
}

.filter-container .dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* Ensure the dropdown opens below the button */
    background-color: #282828;
    min-width: 160px;
    max-height: 200px;
    overflow-y: auto; /* Make the dropdown scrollable */
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    border-radius: 5px;
    z-index: 1;
    margin-top: 0.5rem;
}

.filter-container .dropdown-content.show {
    display: block;
}

.filter-container .dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.filter-container .dropdown-content a:hover {
    background-color: #575757;
}

.filter-container .dropdown-content a.selected {
    border-left: 5px solid #ff5722;
}

#results {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 10px;
}

#results p {
    margin-bottom: 1rem;
}

.results-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-grid div {
    flex: 0 0 calc(20% - 1rem); /* 5 items per row on larger screens */
    background-color: #282828;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

.results-grid div:hover {
    transform: scale(1.05);
}

.results-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

@media (max-width: 1024px) {
    .results-grid div {
        flex: 0 0 calc(33.33% - 1rem); /* 3 items per row on smaller screens */
    }
}

.no-results {
    text-align: center;
    font-size: 1.5rem;
    color: #ff5722;
    margin-top: 2rem;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}