* {
    --glass: rgba(255, 255, 255, 0.2);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: Arial, sans-serif;

}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, #04041a 0%, #086b76 100%);

}

#main-header,
main,
#site-footer {
    width: 100%;
    background: linear-gradient(135deg,
            #0f172a,
            #111827,
            #1e293b,
            #334155);
    margin: 0 auto;
    box-sizing: border-box;
}

#dexhub-link {
    cursor: pointer;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;

}

#main-header {
    background: linear-gradient(180deg, #0f5821 0%, #020739 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
}

#search-input {
    width: 90%;
    max-width: 400px;
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s, transform 0.2s;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

#pokemon-container {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(135deg,
            #0f172a,
            #111827,
            #1e293b,
            #334155);
}

.pokemon-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px;
    cursor: pointer;
    border-radius: 10px;
    background: #ffcb05;
    width: 160px;
    height: 240px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 0 0 auto;
}

.pokemon-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: #ffd933;
}

.pokemon-card img {
    width: 125px;
    height: 140px;
    object-fit: cover;
}

.pokemon-info {
    color: #42306d;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px;
    pointer-events: none;
}

.pokemon-types,
.pokemon-id,
.pokemon-name {
    position: absolute;
    padding: 2px 5px;
    border-radius: 2px;
    font-weight: bold;
}

.pokemon-types {
    top: 6px;
    right: 6px;
    font-size: 14px;
}

.pokemon-id {
    top: 6px;
    left: 6px;
    font-size: 12px;
    text-align: right;
}

.pokemon-name {
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 14px;
    text-align: center;
}

.pokemon-card.placeholder {
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 160px;
    margin: 15px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.spinner {
    border-radius: 999px;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#modal-container.active {
    visibility: visible;
    opacity: 1;
}

h2 {
    color: darkkhaki;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, #0f5821 0%, #020739 100%);
    padding: 2rem;
    border-radius: 1.5rem;
    width: 380px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-content:hover {
    transform: translateY(-5px);
}

.modal-content img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 10px 0;
}

.modal button {
    background: linear-gradient(180deg, #0f5821 0%, #020739 100%);
    color: rgb(13, 62, 16);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.modal button:hover {
    transform: scale(1.05);
    background: #052345;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

}

#pokemonChart {
    margin: 15px 0;
    max-width: 100%;
    height: 200px;
}

.modal-details {
    font-size: 16px;
    background: linear-gradient(180deg, #0f5821 0%, #020739 100%);
    margin-bottom: 15px;
}

.modal-content .close-btn {
    position: absolute;
    top: 10px;
    right: 8px;
    border-radius: 999px;
    font-size: 24px;
    cursor: pointer;
    background: var(--glass);
    border: none;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(193, 203, 3, 0.923);
    color: rgba(40, 16, 3, 0.9);
}

.modal-content .nav-btns {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 90%;
    left: 0;
    width: 100%;
    padding: 0 6px;
    z-index: 10;
}

.modal-content .nav-btns button {
    color: rgba(40, 16, 3, 0.9);
    font-size: 24px;
    cursor: pointer;
    border-radius: 999px;
    display: flex;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(5px);
    background: var(--glass);
    box-shadow: 0 6px 12px rgba(193, 203, 3, 0.923);
}

#load-more-wrap {
    background: transparent;
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

#load-more-btn,
#back-btn {
    padding: 8px 38px;
    border-radius: 32px;
    border: none;
    background: linear-gradient(180deg, #064b17 0%, #020739 100%);
    color: white;
    cursor: pointer;
    font-weight: bold;
}

#load-more-btn:hover,
#back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

#site-footer {
    background: linear-gradient(180deg, #0f5821 0%, #020739 100%);
    color: white;
    text-align: center;
    padding: 15px 0;
}

@media (max-width: 1024px) {
    #pokemon-container {
        padding: 15px;
    }

    .pokemon-card {
        width: 140px;
        height: 210px;
    }
}

@media (max-width: 768px) {
    #main-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    #search-input {
        width: 100%;
        max-width: 320px;
    }

    .pokemon-card {
        width: 130px;
        height: 200px;
    }

    #pokemon-container {
        padding: 10px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pokemon-card {
        width: 120px;
        height: 180px;
    }

    .pokemon-name {
        font-size: 12px;
    }

    .pokemon-types {
        font-size: 12px;
    }
}