body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.main-content {
    flex: 1;
    padding: 20px;
    background-image: url('./img/pokedex-backgroundd.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}



.glass-header,
.glass-footer {
    background: #000000;
    color: white;
    text-align: center;
    box-sizing: border-box;
}

.glass-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0px 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 30px rgba(255, 255, 255, 0.6);
}

.header-wrapper {
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header-logo {
    width: 250px;
    height: auto;
}

.search-container {
    display: flex;
    gap: 10px;
}

#search-input {
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    outline: none;
    font-size: 1rem;
}

#search-btn {
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    background-color: #707070;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#search-btn:hover {
    transform: scale(1.05);
}

#reset-btn {
    padding: 12px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#reset-btn:hover {
    background: rgba(255, 50, 50, 0.6);
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
}


#search-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);    
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 30px 60px;
    border-radius: 20px;
    border: 2px solid #808080;  
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    z-index: 5000;
      pointer-events: none;
    text-align: center;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

#loading-screen.show {
    display: flex;
}

#loading-screen img {
    width: 250px;
    height: auto;
    animation: loaderPulse 0.5s infinite alternate;
}

.glass-footer {
    padding: 50px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -5px 30px rgba(255, 255, 255, 0.6);
}

.glass-footer p {
    margin: 0;
    font-size: 1rem;
    color: #cccccc;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}



.load-more-container {
    text-align: center;
    margin: 40px 0;
}

#load-more-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1.2rem;
    padding: 15px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#load-more-btn:hover {
    background: rgba(40, 40, 40, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
}



#pokedex h2 {
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);
    margin-bottom: 5px;
    text-transform: capitalize;
}

#pokedex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    max-width: 1440px;
    margin: 0 auto;
}



.pokemon-card {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 250px;
    box-sizing: border-box;
}

.pokemon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    text-transform: capitalize;
}

.pokemon-id {
    font-weight: bold;
    opacity: 0.8;
}

.card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 15px;
}

.types-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pokemon-card .type-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgb(255 255 255 / 43%);
    padding: 6px;
    object-fit: contain;
}

.card-body img {
    height: 112px;
    width: 140px;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(255, 255, 255, 0.9));
}



.bg-normal {
    background-color: #A8A77A;
}

.bg-fire {
    background-color: #EE8130;
}

.bg-water {
    background-color: #6390F0;
}

.bg-electric {
    background-color: #F7D02C;
}

.bg-grass {
    background-color: #7AC74C;
}

.bg-ice {
    background-color: #96D9D6;
}

.bg-fighting {
    background-color: #C22E28;
}

.bg-poison {
    background-color: #A33EA1;
}

.bg-ground {
    background-color: #E2BF65;
}

.bg-flying {
    background-color: #A98FF3;
}

.bg-psychic {
    background-color: #F95587;
}

.bg-bug {
    background-color: #A6B91A;
}

.bg-rock {
    background-color: #B6A136;
}

.bg-ghost {
    background-color: #735797;
}

.bg-dragon {
    background-color: #6F35FC;
}

.bg-dark {
    background-color: #705746;
}

.bg-steel {
    background-color: #B7B7CE;
}

.bg-fairy {
    background-color: #D685AD;
}



#pokemon-overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pokemon-overlay.d-none,
.d-none {
    display: none;
}

#dialog-content {
    width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    padding: 0;
}

.dialog-top {
    height: 180px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    border-radius: 30px;
}

.dialog-pokemon-image {
    height: 180px;
    margin-bottom: -30px;
    z-index: 10;
}

.close-dialog {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    cursor: pointer;
}

.dialog-bottom {
    background: white;
    padding: 40px 20px 20px 20px;
    border-radius: 30px 30px 30px 30px;
    position: relative;
    margin-top: -20px;
    z-index: 5;
}

.dialog-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-arrow {
    font-size: 1.5rem;
    cursor: pointer;
}

.text-grey {
    color: #888;
}

.dialog-types {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dialog-types .type-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    padding: 6px;
}

.stats-title {
    text-align: center;
    color: #555;
}

.stats-table {
    width: 100%;
    text-transform: capitalize;
    border-collapse: collapse;
}

.stats-table td {
    border-bottom: 1px solid #ccc;
    padding: 5px 0;
}

.stat-name {
    color: #888;
}

.stat-number {
    text-align: right;
}


@media (max-width: 720px) {
    .glass-header {
        padding: 15px 10px;
    }

    .header-wrapper {
        flex-direction: column;
        gap: 0px;
        justify-content: center;
        margin-top: -20px;

    }

    #header-logo {
        width: 250px;
        height: auto;
        margin-top: -25px;
        margin-bottom: -35px;
    }
}

@media (max-width: 500px) {

    body {
        background-color: #000;
    }

    .glass-footer {
        padding: 15px 10px;
    }

    .search-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    #search-input,
    #search-btn {
        width: 80%;
        box-sizing: border-box;
    }
}