* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #222;
    padding-bottom: 100px;

}

header {
    width: 100%;
    padding: 35px 24px;
    background: linear-gradient(
        135deg,
        #ef5350 0%,    
        #ffffff 45%,    
        #ffffff 55%,
        #3b4cca 100% 
    );
    border-bottom: 3px solid #ffcb05;
}

.headerContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo_icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo_icon img {
    height: 164px;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.navLinks,
.search_container {
    display: flex;
    align-items: center;
}

.headerContainer {
    flex-wrap: wrap;
}

.navLinks {
    gap: 16px;
}

.navLinks a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.navLinks a:hover {
    color: #2f6fed;
}

.search_container {
    margin-left: 16px;
}

.search_container input {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    outline: none;
    font-size: 14px;
    transition: border 0.2s ease;
}

.search_container input:focus {
    border-color: #2f6fed;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: #ffe168;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px;
}

.hero_section {
    margin-bottom: 48px;
}

.hero_section h1 {
    font-size: 48px;
    color: #1d2c5e;
    margin-bottom: 16px;
    text-align: center;
}

.hero_section p {
    font-size: 18px;
    color: #555;
}

.card_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(283px, max-content));
    gap: 28px;
    justify-content: center;

}

.pokemon_card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: 0.2s;
}

.pokemon_card:hover {
    transform: translateY(-6px);
}

.pokemon_card img {
    width: 100%;
    height: 340px;
    object-fit: contain;
    padding: 16px;
}

.card_content {
    padding: 20px;
}

.card_content h2 {
    margin-bottom: 12px;
    color: #2a75bb;
}

.card_content p {
    margin-bottom: 8px;
    color: #555;
}

.loading_text {
    font-size: 22px;
    color: #2a75bb;
}

footer {
    height: 96px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1d1d1d;
    color: white;
    padding: 24px;
    z-index: 1000;
}

.footer_container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    padding: 16px 24px;
    text-align: center;
}

.footer_container p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.search_container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

#pokemonSearch {
    width: 220px;
    text-align: center;
}

.pokemon_header {
    text-align: center;
    
}

.pokemon_header h2 {
    margin: 0;
    margin-left: 8px !important;
    font-size: 32px;
    text-transform: capitalize;
}

.pokemon_image {
    display: flex;
    justify-content: center;
}


.pokemon_image img {
    width: 220px;
    max-width: 100%;
}

.pokemon_info {
    display: flex;
    flex-direction: column;
    gap: 12px;
} 

.info_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f3f3f3;
    border-radius: 12px;
    margin: 5px
}

.info_label {
    font-weight: 700;
}

.info_value {
    text-transform: capitalize;
}

.pokemonGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.cardImage {
    width: 100%;
    height: 260px;
    position: relative;
    overflow: hidden;
}

.cardImage img {
    width: 100%;
    height: 90%;
    object-fit: contain;
    display: block;
    margin-top: 15px;
    cursor: pointer;
}

.cardImage .pokemonHp {
    position: absolute;
    left: -83px;
    transform: rotate(-45deg);
    padding: 6px 90px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.cardImage .hpRibbon {
    top: 18px;
    background: linear-gradient(90deg, #e74c3c, #ff5c5c);
}

.cardImage .attackRibbon {
    top: 41px;
    background: linear-gradient(90deg, #f39c12, #ffcc66);
}

.pokemonCard {
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    border-radius: 30px;
}

.pokemonCard:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    filter: saturate(1.2);
}

.pokemonCard:hover .cardImage img {
    transform: scale(1.12);
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.6))
            drop-shadow(0 0 14px rgba(0, 255, 255, 0.35));
}

.cardContent {
    padding: 20px;
    background-color: rgb(215 190 190);
    border-radius: 0px 0px 24px 24px;
}

.pokemonDialog {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.pokemonDialog.open {
    display: flex;
}

.tab_content {
    display: none;
    min-height: 220px;
}

.tab_content.active {
    display: block;
}

.pokemonTypes {
    display: flex;
    gap: 20px;
    margin-top: 14px;
}

.typeIcon {
    width: 48px;
    height: 48px;
    display: flex;
    gap: 24px;
    align-items: center;
}

.typeIcon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.lazyImage {
    opacity: 0;
    transform: scale(0.9);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.lazyImage.loaded {
    opacity: 1;
    transform: scale(1);
}

.loadingSpinner {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loadingSpinner img {
    width: 180px;
    height: 180px;
    animation: spin 1.2s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.pokemon_header {
    position: relative;
    z-index: 2;
    top: 12px !important;
}

.hidden {
    display: none;
}

.evoLine {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.evoCard {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: #f7f7f7;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.evoCard:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.evoImage {
    width: 85px;
    height: 85px;
}

.evoText {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    text-align: center;
}

.evoArrow {
    font-size: 20px;
    font-weight: bold;
    color: #999;
}