body {
    background-color: #f5f5f5;
    background-image: radial-gradient(#ddd 2px, transparent 2px);
    background-size: 40px 40px;
    font-family: 'Arial Black', sans-serif;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0px;
}
#pokedexContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}
.pokedexUnit {
    background: white;
    border-radius: 50px; 
    border: none;
    display: flex;
    flex-direction: row; 
    align-items: center;
    padding: 10px 30px;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1); 
}

.pokedexUnit img {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 50%; 
    padding: 10px;
}
.pokedexUnit:hover {
    transform: scale(1.05); /* A tiny "pop" when you hover */
}
.type-container {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 5px;
}

.type-tag {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-transform: uppercase;
}

.grass { background-color: #78C850; }
.poison { background-color: #A040A0; }
.fire { background-color: #F08030; }
.water { background-color: #6890F0; }
.flying { background-color: #90AAD7; }

#searchArea {
    background: linear-gradient(90deg, #e60012 0%, #ff4d4d 100%);
    padding: 40px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-wrapper {
    background: white;
    border: 3px solid #00aeef;
    border-radius: 10px;
}

#searchBar {
    width: 300px;
    padding: 12px 20px;
    border-radius: 30px;
    border: 4px solid #00aeef; /* Rotom Blue */
    font-family: 'Arial Black', sans-serif;
    text-align: center;
    outline: none;
}

#searchBar::placeholder {
    color: #ccc;
    text-transform: uppercase;
}

input#searchBar {
    padding: 10px;
    border-radius: 8px;
    border: none;
    width: 250px;
    margin-right: 10px;
}
button {
    background: #444;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 2px;
}

button:hover {
    background: #666;
}
.pokedex-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-items: flex-start;
    margin-left: 15px;
    margin-right: 20px;
    flex-grow: 1;
}
.pokedex-info h3 {
    color: #333; 
    margin: 0;
    font-size: 1.1rem;
    font-family: 'Arial Black', sans-serif;
}

.poke-number {
    color: #888; 
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.type-container {
    display: flex;
    gap: 5px;
    justify-content: center; 
    flex-wrap: wrap;
}
#typeFilters {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

#typeFilters button {
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 0px rgba(0,0,0,0.2); 
    transition: all 0.1s;
}

#typeFilters button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px rgba(0,0,0,0.2);
}
#typeFilters button.active-filter {
    outline: 3px solid white;
    outline-offset: -3px;
    box-shadow: none; 
    transform: translateY(2px);
    filter: brightness(1.2);
}
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 30px;
    padding: 30px;
    position: relative;
    border: 5px solid #00aeef;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-family: 'Arial Black', sans-serif;
    background: #444; /* Dark circular button */
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: 0.2s;
}

.close-btn:hover {
    background: #e60012; /* Turns red when you hover to close */
    transform: rotate(90deg); /* Cool little animation effect */
}
#modalBody {
    color: #333;
}

#modalBody ul {
    list-style-type: none; 
    padding: 0;
}

#modalBody li {
    background: #eee;
    margin: 5px 0;
    padding: 8px;
    border-radius: 10px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
}