#overlay {
    height: 100dvh;
    width: 100%;
    background: #f2f2f2b3;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    flex-direction: column;
    justify-content: center;
    align-items: center;

    #overlay-container{
        display: flex;
        flex-direction: column;
        width: 40%;
        min-width: 700px;
        height: auto;
        max-height: 96%;
        min-height: 370px;
        background-color: #f1f1f1;
        border: 4px solid #333;
        box-shadow:
            inset -4px -4px 0 #b0b08c,
            inset 4px 4px 0 #50503c,
            4px 4px 0 #222;
        border-radius: 4px;
        max-width: 1536px; /* 80% von 1920px */
        padding: 16px;
        overflow-y: auto;

        @media (max-width: 768px){
            min-width: 80%;
        }

        .close-overlay {
            background: #fff;
            border: 2px solid #000;
            padding: 4px 8px;
            cursor: pointer;
            font-size: 12px;
            box-shadow: 2px 2px 0 #000;
            font-family: 'Pixelify Sans', display;
        }
        #overlay-header{
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
        }
        #overlay-pokemon-details{
            display: flex;

            @media (max-width: 768px){
                flex-direction: column-reverse;
                align-items: center;
                width: 100%;
            }

            #pokemon-visuals{
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: space-between;
                width: 34%;
                min-height: 280px;

                @media (max-width: 768px){
                    min-width: 100%;
                }

                img{
                    width: 112px;
                    height: 112px;
                    object-fit: contain;
                    image-rendering: pixelated;
                }
                .pokemon-type {
                    display: inline-block;
                    padding: 4px 8px;
                    margin: 2px;
                    font-size: 18px;
                    border: 2px solid #000;
                    border-radius: 4px;
                    text-shadow: 1px 1px 0 #000;
                    box-shadow: 2px 2px 0 #000;
                    color: white;
                }
                .overlay-navigation {
                    display: flex;
                    justify-content: center;
                    gap: 1rem;
                    display: flex;
                    justify-content: space-around;
                    width: 100%;

                    @media (max-width: 768px){
                        justify-content: space-between;
                    }

                    .nav-btn {
                        font-size: 16px;
                        background-color: #f1f1f1;
                        border: 2px solid #000;
                        box-shadow: 2px 2px 0 #000;
                        padding: 8px;
                        cursor: pointer;
                        transition: transform 0.1s ease, box-shadow 0.1s ease;
                    }
                    .nav-btn:active {
                        transform: translateY(2px);
                        box-shadow: 0 0 0 #000;
                    }
                }
                .overlay-navigation button {
                    font-size: 1.5rem;
                    background-color: transparent;
                    border: none;
                    cursor: pointer;
                }
                .overlay-navigation button:disabled {
                    opacity: 0.4;
                    cursor: not-allowed;
                }
            }
            #pokemon-info{
                display: flex;
                flex-direction: column;
                width: 66%;
                row-gap: 24px;

                @media (max-width: 768px){
                    min-width: 100%;
                    margin-top: 24px;
                }

                #info-tabs{
                    justify-content: space-around;
                    cursor: pointer;
                    font-size: 18px;

                    @media (max-width: 450px){
                        display: none;
                    }
                }
                #info-tabs > div {
                    margin: 4px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
                .active-tab{
                    font-weight: bold;
                    text-transform: uppercase;
                }
                #info-tabs-dropdown{
                    display: none;
                    width: 100%;
                    padding: 8px;
                    font-size: 16px;
                    border-radius: 4px;
                    border: 4px solid #FFCB05;
                    font-family: 'Pixelify Sans', display;
                    cursor: pointer;

                    @media (max-width: 450px){
                        display: block;
                    }
                }
            }
        }
        #base-stats{
            width: 100%;

            @media (max-width: 768px){
                justify-content: center;
            }
            .stat-bar {
                display: flex;
                align-items: center;
                margin-bottom: 10px;
            }
            .label {
                width: 33%;
                margin-right: 8px;
                color: #333;
            }
            .bar-bg {
                width: 44%;
                background-color: #f4f4f4;
                border: 2px solid #333;
                border-radius: 4px;
                height: 14px;
                position: relative;
                overflow: hidden;
                box-shadow: inset 0 0 4px #aaa;
            }
            .bar-fill {
                height: 100%;
                background: linear-gradient(90deg, #4da6ff, #1e90ff);
                transition: width 0.8s ease-out;
                border-right: 1px solid #0056b3;
            }
        }
        #evo-chain{
            justify-content: space-around;
            align-items: center;

            @media (max-width: 539px){
                flex-direction: column;
                row-gap: 16px;
            }
        }
        .evo-step{
            align-items: center;
            text-align: center;

        }
        #general-info{
            flex-direction: column;
            row-gap: 16px;
        }
    }
}