body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    text-align: center;
    position: relative;
    padding-bottom: 80px;
    background: #79caf9 url('/static/images/pokemon-background.jpg') no-repeat bottom center;
    background-size: auto;
    background-position: bottom;
    background-color: #79caf9;
    background-attachment: fixed;
}

/* ===== Header v2 (centered + matches cards) ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
    /* minder “lege lucht” */
    margin-bottom: 18px;

    /* echte bar over de volle breedte */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

/* inner container: zelfde max width als je content */
.site-nav {
    max-width: 1150px;
    margin: 0 auto;
    padding: 10px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    /* belangrijk omdat body text-align:center is */
    text-align: left;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
    transition: transform .15s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.05);
}

.brand-text {
    line-height: 1.05;
}

.brand-title {
    font-weight: 800;
    font-size: 18px;
    color: #1f2a37;
}

.brand-subtitle {
    margin-top: 3px;
    font-weight: 600;
    font-size: 12px;
    color: rgba(31, 42, 55, 0.65);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-pill {
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    color: #1f2a37;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(121, 202, 249, 0.35);
    border: 1px solid rgba(121, 202, 249, 0.55);
    transition: transform .15s ease, background .15s ease;
}

.nav-pill.active {
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    color: #1f2a37;
    padding: 9px 14px;
    border-radius: 999px;
    background: #FECB01;
    border: 1px solid #FECB01;
    transition: transform .15s ease, background .15s ease;
}

.nav-pill:hover {
    transform: translateY(-1px);
    background: rgba(121, 202, 249, 0.50);
}

@media (max-width: 520px) {
    .brand-subtitle {
        display: none;
    }

    .nav-actions {
        display: none;
    }
}

.container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.left-section {
    flex: 1;
    max-width: 1150px;
    position: relative;
}

.input-container {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.search-bar {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: none;
    outline: none;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    margin-bottom: 15px;
}

.filter-badge {
    padding: 8px 12px;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-badge.active {
    opacity: 0.4;
}

.pokemon-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: start;
}

.pokemon-card {
    width: 250px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding-top: 20px;
    transition: transform 0.2s ease-in-out;
}

.pokemon-card.hidden {
    display: none;
    /* Kaarten die niet zichtbaar zijn, worden nu echt niet weergegeven */
}

.pokemon-image {
    display: block;
    max-width: 100%;
    /* Zorg ervoor dat de afbeelding niet breder wordt dan de container */
    height: auto;
    /* Zorg ervoor dat de hoogte van de afbeelding in verhouding blijft */
    margin: auto;
    /* Centraal uitlijnen */
    object-fit: contain;
    /* Zorg ervoor dat de afbeelding zijn originele aspect ratio behoudt */
    align-self: center;
    /* Verticaal centreren binnen de beschikbare ruimte */
    max-height: 80px;
}

.pokemon-card:hover {
    transform: scale(1.01);
    /*box-shadow: inset 0 0 0 2px red;
    transition: box-shadow 0.5s ease-in-out;*/
}

.pokemon-id {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    color: gray;
    font-weight: 600;
}

.pokemon-name {
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
    margin-top: auto;
    /* Zorgt ervoor dat de naam altijd onderaan staat */
}

.types {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.right-section {
    position: sticky;
    top: 20px;
    /* Zorgt ervoor dat de rechter sectie bovenaan blijft wanneer je naar beneden scrolt */
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    z-index: 10;
    width: 100%;
    margin-bottom: 10px;
    /* Ruimte onderaan de sectie */
    height: auto;
    /* Zorgt ervoor dat de hoogte zich aanpast op basis van de inhoud */
    overflow: hidden;
    /* Verbergt eventuele inhoud die buiten de sectie valt */
    display: block;
    /* Zorgt ervoor dat de sectie zich gedraagt als een blokelement en de hoogte wordt aangepast op basis van de inhoud */
    flex-shrink: 0;
    /* Voorkomt dat de rechter sectie kleiner wordt dan de inhoud */
    box-sizing: border-box;
    /* Zorgt ervoor dat padding en borders meegerekend worden in de hoogte */
}

.legendary {
    border: 3px solid gold !important;
    box-shadow: 0 0 15px gold;
    background: linear-gradient(135deg, white 0%, gold 100%);
}

.legendary-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    color: black;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 5px;
}

.mythical {
    border: 3px solid pink !important;
    box-shadow: 0 0 15px pink;
    background: linear-gradient(135deg, white 0%, pink 100%);
}

.mythical-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    color: black;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 5px;
}

.big-image {
    width: 200px;
    height: 200px;
    margin-bottom: 10px;
    object-fit: contain;
}

.big-name {
    font-size: 22px;
    font-weight: 700;
    margin-top: 10px;
    text-transform: capitalize;
}

.big-types {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Footer styling */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #555;
    background-color: white;
    padding: 10px 0;
}

/* Modal styling for mobile */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
}

.play-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
}

/* ===== Pokemon detail page ===== */
.detail-wrap {
    max-width: 1150px;
    margin: 0 auto 80px auto;
    padding: 0 12px;
    text-align: left;
    /* body heeft text-align:center; dit fix’t detail layout */
}

.detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 14px 0;
}

.detail-back {
    text-decoration: none;
    font-weight: 700;
    color: rgba(20, 32, 51, 0.85);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-action {
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: inherit;
    font-weight: 800;
    color: rgba(20, 32, 51, 0.85);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.detail-hero {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 18px;
    align-items: start;
}

.detail-hero-left,
.detail-hero-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-id {
    font-weight: 800;
    color: rgba(20, 32, 51, 0.55);
}

.detail-name {
    margin: 0;
    font-size: 36px;
    letter-spacing: 0.2px;
    color: rgba(20, 32, 51, 0.95);
}

.detail-type-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.detail-chip-legendary {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.85) 100%);
    color: #111;
}

.detail-chip-mythical {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 192, 203, 0.85) 100%);
    color: #111;
}

.detail-art {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-art-img {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.18));
}

.detail-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.detail-card-title {
    font-weight: 800;
    color: rgba(20, 32, 51, 0.9);
    margin-bottom: 10px;
}

.detail-kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.kv-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(20, 32, 51, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kv-value {
    font-size: 14px;
    font-weight: 800;
    color: rgba(20, 32, 51, 0.9);
    margin-top: 2px;
}

.detail-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-pill {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(20, 32, 51, 0.9);
    background: rgba(121, 202, 249, 0.28);
    border: 1px solid rgba(121, 202, 249, 0.45);
}

.detail-muted {
    color: rgba(20, 32, 51, 0.6);
    font-weight: 600;
    font-size: 14px;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: grid;
    grid-template-columns: 120px 1fr 46px;
    gap: 10px;
    align-items: center;
}

.stat-name {
    font-size: 12px;
    font-weight: 900;
    color: rgba(20, 32, 51, 0.65);
    letter-spacing: 0.3px;
}

.stat-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(20, 32, 51, 0.10);
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 999px;
    background: rgba(20, 32, 51, 0.55);
}

.stat-value {
    font-weight: 900;
    color: rgba(20, 32, 51, 0.85);
    text-align: right;
}

@media (max-width: 960px) {
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-name {
        font-size: 30px;
    }
}

/* ===== Evolution chain: keep inside card ===== */
.evo-chain {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 2px 4px;
}

.evo-chain::-webkit-scrollbar {
    height: 10px;
}

.evo-chain::-webkit-scrollbar-thumb {
    background: rgba(20, 32, 51, 0.18);
    border-radius: 999px;
}

.evo-chain::-webkit-scrollbar-track {
    background: rgba(20, 32, 51, 0.06);
    border-radius: 999px;
}

/* elk root-blok wordt een “rail” */
.evo-tree {
    display: inline-flex;
    flex-direction: column;
    gap: 14px;
    min-width: 100%;
}

/* één evolution-lijn: nodes + pijlen op één rij */
.evo-line {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    padding: 6px 6px 10px 6px;
}

/* node kleiner zodat het past */
.evo-node {
    width: 150px;
    flex: 0 0 auto;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    padding: 12px 10px 10px 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.15s ease;
    text-align: center;
}

.evo-node:hover {
    transform: translateY(-2px);
}

.evo-img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.14));
}

.evo-name {
    margin-top: 6px;
    font-weight: 800;
    color: rgba(20, 32, 51, 0.92);
}

.evo-id {
    font-weight: 800;
    font-size: 12px;
    color: rgba(20, 32, 51, 0.55);
    margin-top: 2px;
}

/* pijl + tekst compact, niet verticaal */
.evo-edge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
    padding-top: 0;
}

.evo-arrow {
    font-size: 18px;
    font-weight: 900;
    color: rgba(20, 32, 51, 0.55);
}

.evo-edge-text {
    font-size: 11px;
    font-weight: 800;
    color: rgba(20, 32, 51, 0.6);
    white-space: nowrap;
    /* key: voorkomt afbreken */
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* branching: kinderen onder de hoofdlijn, ook scrollbaar */
.evo-branch {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 24px;
}

.evo-lane {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

/* ===== Fix body: dubbele background-color niet nodig ===== */
body {
    background-color: #79caf9;
    /* keep 1 */
}

/* ===== Footer: match glassy style + minder hard ===== */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: rgba(20, 32, 51, 0.75);
    padding: 10px 0;

    background: rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== Favorites button (cards + favorites page) ===== */
.fav-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
    color: rgba(20, 32, 51, 0.65);

    display: flex;
    align-items: center;
    justify-content: center;

    transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.fav-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.95);
}

.fav-btn.active {
    color: #f7b500;
}

/* ===== Detail actions: mooie “active” state voor favorited ===== */
.detail-action.active {
    background: rgba(254, 203, 1, 0.85);
    border-color: rgba(254, 203, 1, 0.95);
    color: rgba(20, 32, 51, 0.95);
}

/* ===== Favorites page title (als je die gebruikt) ===== */
.fav-title {
    text-align: left;
    margin: 10px 0;
    color: rgba(20, 32, 51, 0.9);
}

/* ===== Mobile polish: header minder hoog, cards 2-col grid blijft netjes ===== */
@media (max-width: 520px) {
    .site-header {
        padding: 8px 0;
    }

    .site-nav {
        padding: 8px 12px;
    }
}