@charset "UTF-8";

.pokemons {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
}

.normal {
    background-color: #a6a877;
}

.grass {
    background-color: #77c850;
}

.fire {
    background-color: #ee7f30;
}

.water {
    background-color: #678fee;
}

.electric {
    background-color: #f7cf2e;
}

.ice {
    background-color: #98d5d7;
}

.ground {
    background-color: #dfbf69;
}

.flying {
    background-color: #a98ff0;
}

.poison {
    background-color: #a040a0;
}

.fighting {
    background-color: #bf3029;
}

.psychic {
    background-color: #f65687;
}

.dark {
    background-color: #725847;
}

.rock {
    background-color: #b8a137;
}

.bug {
    background-color: #a8b720;
}

.ghost {
    background-color: #6e5896;
}

.steel {
    background-color: #b9b7cf;
}

.dragon {
    background-color: #6f38f6;
}

.fairy {
    background-color: #f9aec7;
}

.pokemon {
    display: flex;
    flex-direction: column;
    margin: .5rem;
    padding: 1rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pokemon:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pokemon .number {
    color: #000;
    opacity: .3;
    text-align: right;
    font-size: .625rem;
}

.pokemon .name {
    text-transform: capitalize;
    color: #fff;
    margin-bottom: .25rem;
}

.pokemon .detail {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.pokemon .detail .types {
    padding: 0;
    margin: 0;
    list-style: none;
}

.pokemon .detail .types .type {
    color: #fff;
    padding: .25rem .5rem;
    margin: .25rem 0;
    font-size: .625rem;
    border-radius: 1rem;
    filter: brightness(1.1);
    text-align: center;
}

.pokemon .detail img {
    max-width: 100%;
    height: 70px;
}

.pagination {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem;
}

.pagination button {
    padding: .25rem .5rem;
    margin: .25rem 0;
    font-size: .625rem;
    color: #fff;
    background-color: #6c79db;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
}

@media screen and (min-width: 380px) {
    .pokemons {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (min-width: 576px) {
    .pokemons {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media screen and (min-width: 992px) {
    .pokemons {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

/* Página de favoritos */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.page-header h1 img {
    width: 40px;
    height: 40px;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-back-home,
.btn-clear-all {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-home {
    background-color: #6c79db;
    color: #fff;
}

.btn-back-home:hover {
    background-color: #5a67c9;
}

.btn-clear-all {
    background-color: #ee7f30;
    color: #fff;
}

.btn-clear-all:hover {
    background-color: #d66e28;
}

.pokemon {
    position: relative;
}

.btn-remove-favorite {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ee7f30;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-remove-favorite:hover {
    background: #fff;
    transform: scale(1.1);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state svg {
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #888;
    margin-bottom: 2rem;
}

.btn-browse {
    padding: 0.75rem 1.5rem;
    background-color: #6c79db;
    color: #fff;
    border: none;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-browse:hover {
    background-color: #5a67c9;
    transform: translateY(-2px);
}

.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 1rem;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6c79db;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: #6c79db;
    color: #fff;
    border: none;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #5a67c9;
}

.btn-favorites {
    padding: 0.75rem 1.5rem;
    background-color: #ee7f30;
    color: #fff;
    border: none;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-favorites:hover {
    background-color: #d66e28;
}

.error-message {
    text-align: center;
    color: #ee7f30;
    padding: 2rem;
    font-size: 1rem;
}

.search-info {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 1rem;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.875rem;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #6c79db;
    font-size: 1rem;
}