* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 100vh;
    color: #37474f;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd54f, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1.5rem 2rem;
    background-color: #fff;
    border-bottom: 2px solid #eee;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.branding {
    max-width: 600px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fbc02d;
    background: linear-gradient(45deg, #ffd54f, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.subheading {
    font-size: 1rem;
    color: #555;
    margin-top: 0.4rem;
}


.favorite-btn {
    background: linear-gradient(45deg, #ffd54f, #ffb300);
    color: #37474f;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    font-family: 'Poppins', sans-serif;
}

.favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.search-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #ffd54f;
    box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.2);
}

.search-btn,
.filter-select {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.search-btn {
    background: linear-gradient(45deg, #42a5f5, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.4);
}

.filter-select {
    background: white;
    border: 2px solid #e0e0e0;
    color: #37474f;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #ffd54f;
}

/* Style dasar dropdown */
select {
    appearance: none;
    /* Hapus style default browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 2px solid #ffcb05;
    border-radius: 999px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140"%3E%3Cpolygon fill="%23666" points="70,90 100,50 40,50"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    background-position: right 0.8rem center;
    transition: all 0.2s ease-in-out;
}

select:hover {
    box-shadow: 0 0 10px rgba(255, 203, 5, 0.3);
}

/* Saat diklik */
select:focus {
    outline: none;
    border-color: #f4b400;
    box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.3);
}


/* Pokemon Cards Grid */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.pokemon-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.pokemon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #ffd54f, #ff9800);
}

.pokemon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.pokemon-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #37474f;
    text-transform: capitalize;
}

.pokemon-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    background: rgba(255, 213, 79, 0.1);
    padding: 10px;
    transition: transform 0.3s ease;
}

.pokemon-card:hover .pokemon-image {
    transform: scale(1.1);
}

.pokemon-types {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.type-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Type Colors */
.type-normal {
    background: linear-gradient(45deg, #a8a878, #6d6d4e);
}

.type-fire {
    background: linear-gradient(45deg, #f08030, #dd6610);
}

.type-water {
    background: linear-gradient(45deg, #6890f0, #386ceb);
}

.type-electric {
    background: linear-gradient(45deg, #f8d030, #f0c108);
}

.type-grass {
    background: linear-gradient(45deg, #78c850, #5ca935);
}

.type-ice {
    background: linear-gradient(45deg, #98d8d8, #69c6c6);
}

.type-fighting {
    background: linear-gradient(45deg, #c03028, #9d2721);
}

.type-poison {
    background: linear-gradient(45deg, #a040a0, #803380);
}

.type-ground {
    background: linear-gradient(45deg, #e0c068, #d4a84a);
}

.type-flying {
    background: linear-gradient(45deg, #a890f0, #9180c4);
}

.type-psychic {
    background: linear-gradient(45deg, #f85888, #f61c5a);
}

.type-bug {
    background: linear-gradient(45deg, #a8b820, #8d9a1b);
}

.type-rock {
    background: linear-gradient(45deg, #b8a038, #9a8b2e);
}

.type-ghost {
    background: linear-gradient(45deg, #705898, #554275);
}

.type-dragon {
    background: linear-gradient(45deg, #7038f8, #4c08ef);
}

.type-dark {
    background: linear-gradient(45deg, #705848, #513f34);
}

.type-steel {
    background: linear-gradient(45deg, #b8b8d0, #9292aa);
}

.type-fairy {
    background: linear-gradient(45deg, #ee99ac, #e76e8a);
}

.pokemon-evolution {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 213, 79, 0.1);
    border-radius: 15px;
    border-left: 4px solid #ffd54f;
}

.evolution-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #37474f;
}

.evolution-chain {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.evolution-pokemon {
    font-weight: 500;
    color: #1976d2;
    text-transform: capitalize;
}

.evolution-arrow {
    color: #ffd54f;
    font-weight: bold;
}

.add-to-team-btn {
    width: 100%;
    background: linear-gradient(45deg, #4caf50, #388e3c);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.add-to-team-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.add-to-team-btn:active {
    transform: translateY(0);
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: #f44336;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 40px 20px;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 800px;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    cursor: pointer;
    color: #444;
    transition: color 0.3s;
}

.close-button:hover {
    color: #f44336;
}

/* Grid di dalam modal */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-grid .pokemon-card {
    padding: 15px;
    font-size: 14px;
}

.team-grid .pokemon-image {
    width: 80px;
    height: 80px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.detail-btn {
    background-color: #42a5f5;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s;
}

.detail-btn:hover {
    background-color: #1e88e5;
}


#modalPokemonDetail {
    text-align: center;
    padding: 1rem 2rem;
}

#modalPokemonDetail h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

#modalPokemonDetail img {
    width: 120px;
    margin-bottom: 1rem;
}

#modalPokemonDetail .type-badge {
    display: inline-block;
    margin: 0.3rem;
    font-size: 0.9rem;
}

#modalPokemonDetail strong {
    color: #222;
    display: inline-block;
    margin-top: 0.8rem;
}

#modalPokemonDetail ul {
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
}

#modalPokemonDetail ul li {
    text-align: left;
    padding: 0.3rem 0;
    font-size: 0.95rem;
    color: #444;
    border-bottom: 1px dashed #ddd;
}



/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 2rem;
    }

    .header-content {
        justify-content: center;
        text-align: center;
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: 100%;
    }

    .search-btn,
    .filter-select {
        width: 100%;
    }

    .pokemon-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-section {
        padding: 20px;
    }

    .evolution-chain {
        flex-direction: column;
        gap: 5px;
    }

    .evolution-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .pokemon-card {
        padding: 20px;
    }

    .pokemon-image {
        width: 100px;
        height: 100px;
    }

    .pokemon-name {
        font-size: 1.3rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pokemon-card {
    animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}