body {
    background-color: #1a1a1a;
    color: #fff;
    font-family: sans-serif;
    background-image: url('../images/dark-hunter.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* This helps prevent flickering */
    display: flex; /* Use flexbox for centering */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center horizontally */
    min-height: 100vh; /* Ensure body takes full viewport height */
    padding: 20px;
}

.game-button {
    background-color: rgba(0, 0, 0, 0.5); /* Darker, semi-transparent */
    border: 1px solid #7e00d2;
    border-radius: 5px;
    padding: 10px 20px;
    text-decoration: none;
    color: #fff; /* White text */
    margin: 10px;
    display: inline-block;
    transition: background-color 0.3s;
}

.game-button:hover {
    background-color: rgba(0, 0, 0, 0.7); /* Darker on hover */
}

.button-container {
    padding: 20px;
    display: flex; /* Use flexbox for buttons */
    flex-wrap: wrap; /* Allow buttons to wrap */
    justify-content: center; /* Center buttons horizontally */
    width: 100%; /* Take full width */
    max-width: 800px; /* Limit width for better readability */
}

.info-box {
    background-color: rgba(0, 0, 0, 0.5); /* Darker, semi-transparent */
    border: 1px solid #666;
    border-radius: 4px;
    padding: 14px;
    margin: 14px auto;
    width: 35%;
    max-width: 300px;
    height: auto;
    max-height: none;
    color: #7e00d2;
    font-size: 18px;
}

.info-box h2,
.info-box h3,
.info-box p {
    color: #fff; /* White text for info box content */
}

main {
    width: 100%;
    max-width: 1200px; /* Constrain content width for better readability on large screens */
}

/* Table styles for game_pages */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent;
    margin-top: 20px; /* Add spacing above table */
    margin-bottom: 20px; /* Add spacing below table */
    table-layout: auto; /* Allow table to adjust column widths */
}

table th,
table td {
    border: 2px solid #7e00d2; /* Thicker border */
    padding: 12px; /* Increased padding for more spacing */
    text-align: center; /* Center text for better alignment */
    color: red; /* Sets the text color for table cells */
    font-weight: bold;
}

table th {
    background-color: #01d3d3; /* Keep header background */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info-box {
        width: 90%;
        padding: 10px;
        margin: 10px auto;
        font-size: 16px;
    }
    .game-button {
        width: 80%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .table-responsive {
        overflow-x: auto; /* Enable horizontal scrolling for tables */
        width: 100%; /* Ensure it takes full width */
    }
    table {
        min-width: 600px; /* Set a minimum width for the table content to ensure scrollability */
    }
    table th, table td {
        white-space: nowrap; /* Prevent text wrapping in table cells */
    }

img {
    max-width: 100%;
    height: auto;
}

    /* Adjust filter and search input width on small screens */
    #categoryFilter, #pokemonSearch {
        width: calc(100% - 20px); /* Full width minus padding/margin */
        margin: 5px 10px; /* Adjust margin */
    }
}

/* Category Filter and Search Input Styling */
#categoryFilter, #pokemonSearch {
    margin: 10px; /* Add margin around filter and search */
    padding: 10px;
    border: 1px solid #7e00d2;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    font-size: 1em;
    width: 250px; /* Consistent width */
}

#categoryFilter {
    appearance: none; /* Remove default select arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.2-16.1%208.1-3.8%204.9-4.9%2011-3.1%2016.9l128%20160c3.9%204.9%209.8%207.9%2016.1%207.9s12.2-3%2016.1-7.9l128-160c1.8-5.9.7-12-3.1-16.9z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
}

#categoryFilter:hover, #pokemonSearch:hover {
    background-color: #444;
}

#categoryFilter option {
    background-color: #333;
    color: #fff;
}

/* Specific colors for category options */
#categoryFilter .new { color: rgb(190, 6, 6); }
#categoryFilter .raids { color: rgb(123, 10, 210); }
#categoryFilter .events { color: rgb(9, 174, 9); }
#categoryFilter .ditto { color: rgb(41, 135, 207); }
#categoryFilter .eggs { color: rgb(190, 129, 14); }
#categoryFilter .home { color: rgb(205, 205, 81); }

.search-container {
    position: relative;
    display: inline-block; /* Keep it inline with filter */
    margin-bottom: 20px;
}

.autocomplete-dropdown {
    position: absolute;
    border: 1px solid #7e00d2;
    background-color: #333;
    color: #fff;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 100;
    display: none; /* Hidden by default */
}

.autocomplete-dropdown div {
    padding: 10px;
    cursor: pointer;
}

.autocomplete-dropdown div:hover {
    background-color: #555;
}