/* Responsive design voor mobiel en tablet */
@media (max-width: 1200px) {
    #pokedex {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    #pokedex {
        grid-template-columns: repeat(3, 1fr);
    }
    .detail-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    body {
        padding: 6px;
    }
    .pokedex-logo-image {
        width: 90vw;
        max-width: 180px;
    }
    #pokedex {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    #pokedex > div {
        padding: 8px;
    }
    .pagination button, button {
        font-size: 14px;
        padding: 8px 10px;
        margin: 0 4px;
    }
    .detail-body {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .detail-card {
        padding: 10px;
    }
    .detail-image {
        max-width: 90vw;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.pokedex-logo-image {
    display: block;
    width: min(280px, 70%);
    height: auto;
    margin: 0 auto 16px;
}

.detail-page .pokedex-logo-image {
    width: min(340px, 80%);
}

#pokedex {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

#pokedex > div {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

#pokedex > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#pokedex h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
}

#pokedex img {
    width: 100%;
    height: auto;
    max-width: 120px;
}

button {
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 16px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #ff5252;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pagination {
    display: flex;
    justify-content: center;
}

.detail-page {
    max-width: 780px;
    margin: 0 auto;
    border: 2px solid #6a9be6;
    padding: 10px;
    background: #f5f5f5;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #ff5252;
    font-weight: bold;
    text-decoration: none;
}

.detail-card {
    background: white;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.loading-text,
.error-state {
    text-align: center;
    color: #666;
}

.detail-header {
    margin-bottom: 30px;
}

.pokemon-number {
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 8px;
}

.type-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.type-badge {
    background-color: #ffe3e3;
    color: #c92a2a;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: bold;
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 30px;
    align-items: start;
}

.detail-image-wrap {
    background: linear-gradient(180deg, #fff5f5 0%, #ffe3e3 100%);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.detail-image {
    width: 100%;
    max-width: 280px;
    height: auto;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.info-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.info-box span {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.detail-section h2 {
    margin-bottom: 12px;
    font-size: 20px;
    color: #333;
}

.abilities-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.abilities-list li {
    background: #fff0f0;
    border-radius: 10px;
    padding: 10px 14px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
}

.detail-pagination {
    margin-top: 24px;
}

.pokedex-logo {
    text-align: center;
    font-size: 52px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    color: #f5cf24;
    text-shadow: 3px 3px 0 #2342a2, -1px -1px 0 #2342a2, 1px -1px 0 #2342a2, -1px 1px 0 #2342a2, 1px 1px 0 #2342a2;
    margin-bottom: 14px;
}

.detail-page #pokedex {
    display: block;
    margin-bottom: 0;
}

.detail-page #pokedex > div {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    text-align: left;
    box-shadow: none;
}

.detail-page #pokedex > div:hover {
    transform: none;
    box-shadow: none;
}

.pokemon-card {
    display: grid;
    grid-template-columns: 1fr 1fr 0.8fr 1.5fr 2.5fr;
    background-color: #9ed884;
    border: 3px solid #60af46;
    border-radius: 10px;
    align-items: stretch;
}

.card-col {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.divider {
    border-left: 2px solid #72c15f;
}

.col-1 {
    gap: 8px;
}

.white-panel {
    background: white;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.txt-id {
    color: #8a96a3;
    font-size: 14px;
}

.font-bold {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

.sprite-panel {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-page #pokedex .pokemon-sprite {
    width: 150px;
    height: auto;
    image-rendering: pixelated;
}

.section-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
    text-align: center;
}

.col-3 {
    align-items: center;
}

.type-badge {
    display: inline-block;
    border: 3px solid white;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    text-transform: lowercase;
    font-weight: 700;
    color: white;
}

.abilities-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 100%;
}

.ability-text {
    font-size: 14px;
    color: #555;
}

.hidden-text {
    color: #8b8b8b;
    font-size: 11px;
    font-style: italic;
    margin-bottom: 6px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: white;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
    padding: 6px 2px;
}

.stat-box span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: #555;
}

.detail-pagination {
    display: flex;
    gap: 18px;
    margin-top: 18px;
}

.detail-pagination button {
    flex: 1;
    margin: 0;
    border: 1px solid #b8b8b8;
    border-radius: 6px;
    background: #e9e9e9;
    color: #666;
    padding: 14px;
    font-size: 16px;
    font-weight: 400;
}

.detail-pagination button:hover {
    background: #dfdfdf;
}

.type-bug {
    background-color: #8cb230;
}

.type-fire {
    background-color: #fd7d24;
}

.type-water {
    background-color: #4592c4;
}

.type-grass {
    background-color: #9bcc50;
}

.type-electric {
    background-color: #eed535;
    color: #333;
}

.type-psychic {
    background-color: #f366b9;
}

.type-normal {
    background-color: #9da0aa;
}

.type-rock {
    background-color: #a38c21;
}

.type-ground {
    background-color: #ab9842;
}

.type-flying {
    background-color: #748fc9;
}

.type-fighting {
    background-color: #d56723;
}

.type-poison {
    background-color: #b97fc9;
}

.type-ice {
    background-color: #9acdc4;
}

.type-ghost {
    background-color: #556aae;
}

.type-dragon {
    background-color: #4a7fe5;
}

.type-dark {
    background-color: #58575f;
}

.type-steel {
    background-color: #9eb7b8;
}

.type-fairy {
    background-color: #ef97e6;
}

.stat-box.hp {
    background-color: #e74c3c;
}

.stat-box.atk {
    background-color: #e67e22;
}

.stat-box.def {
    background-color: #c0b000;
}

.stat-box.spatk {
    background-color: #3498db;
}

.stat-box.spdef {
    background-color: #1abc9c;
}

.stat-box.speed {
    background-color: #2ecc71;
}

/* Horizontale evolutiechain netjes binnen de kaart */
.evo-chain-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px; /* afstand tussen Pokémon */
    flex-wrap: wrap; /* zorgt dat het netjes op kleine schermen blijft */
}

.evo-block {
    display: inline-block;
}

.evo-arrow {
    font-size: 2em;
}

@media (max-width: 900px) {
    #pokedex {
        grid-template-columns: repeat(4, 1fr);
    }

    .detail-body {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .pokemon-card {
        grid-template-columns: 1fr;
    }

    .pokemon-left,
    .pokemon-section {
        border-right: 0;
        border-bottom: 2px solid #7dc76a;
    }

    .stats-section {
        border-bottom: 0;
    }
}

@media (max-width: 600px) {
    body {
        padding: 14px;
    }

    #pokedex {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .detail-card {
        padding: 20px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    button {
        width: 100%;
        margin: 0;
    }

    .pokedex-logo {
        font-size: 52px;
    }

    .pokedex-logo-image {
        width: min(240px, 80%);
    }

    .section-title {
        font-size: 22px;
    }

    .ability-item {
        font-size: 20px;
    }

    .stat-box {
        font-size: 18px;
        min-height: 64px;
    }

    .stat-box span {
        font-size: 13px;
    }

    .detail-pagination button {
        font-size: 20px;
    }
}
