:root {
    --switch-red: #fe6054;
    --switch-blue: #01c4e0;
    --switch-black: #403f3d;
    --switch-white: #feffff;

    --switch-red-glow: #fe605438;
    --switch-blue-glow: #01c4e038;

    --switch-screen-color: #2d2d2d;
    --switch-screen-text: #2083ad;

    /* Normal size: 102mm x 33mm */
    /* Dimensies bron: https://www.dimensions.com/element/nintendo-switch */
    --switch-width-controller: 198px;
    --switch-height-controller: 612px;

    /* Normaal 175mm x 102mm */
    --switch-width-screen: 1050px;
    --switch-height-screen: 612px;
}

.switch-controller {
    display: flex;
    /* gap: 4rem; */


    #btn-l,
    #btn-r {
        position: absolute;
        width: 8.9rem;
        height: 5rem;
        background: var(--switch-black);
        top: -0.5rem;
        z-index: -1;
        border: none;
    }

    .switch-left,
    .switch-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .joystick {
        width: 6.5rem;
        aspect-ratio: 1;
        background: #202020;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .stick {
        background: var(--switch-black);
        width: 6.5rem;
        aspect-ratio: 1;
        border-radius: 50%;
        border: 10px solid rgb(53, 53, 53);
        position: relative;

        &::after {
            content: "";
            position: absolute;
            inset: -10px;
            background: var(--switch-black);
            corner-shape: notch;
            border-radius: 45%;
        }
    }

    .btn-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 0.1rem;
        width: 8rem;
        aspect-ratio: 1;

        button {
            border: none;
            width: 2.7rem;
            aspect-ratio: 1;
            background: var(--switch-black);
            border-radius: 50%;
            box-shadow: 0px 5px 0px 0px black;

            &:active {
                box-shadow: 0px 2px 0px 0px black;
                transform: translateY(3px);
            }
        }

        button:first-of-type {
            grid-column: 2;
        }

        button:nth-of-type(2) {
            grid-column: 1;
            grid-row: 2;
        }

        button:nth-of-type(3) {
            grid-column: 3;
            grid-row: 2;
        }

        button:nth-of-type(4) {
            grid-column: 2;
            grid-row: 3;
        }
    }

    .switch-left {
        background: var(--switch-blue);
        width: var(--switch-width-controller);
        height: var(--switch-height-controller);
        border-radius: 8rem 1rem 1rem 8rem;
        position: relative;
        padding: 6rem;

        #btn-l {
            right: 2.5rem;
            border-radius: 90% 0rem 0rem 0rem;
        }

        #btn-minus {
            position: absolute;
            top: 1.5rem;
            right: 1rem;
            width: 2rem;
            height: 0.5rem;
            background: var(--switch-black);
            margin-top: 1rem;
            border: none;
        }

        .btn-container {
            button {
                font-size: 1.6rem;
            }
        }

        #btn-screenshot {
            width: 2.8rem;
            aspect-ratio: 1;
            border-radius: 3px;
            border: none;
            background: var(--switch-black);
            font-size: 1.4rem;
            margin-right: -5rem;
            margin-top: -0.8rem;
        }
    }

    .switch-right {
        background: var(--switch-red);
        width: var(--switch-width-controller);
        height: var(--switch-height-controller);
        border-radius: 1rem 8rem 8rem 1rem;
        position: relative;
        padding: 5rem;

        #btn-r {
            left: 2.5rem;
            border-radius: 0rem 90% 0rem 0rem;
        }

        #btn-plus {
            position: absolute;
            top: 1.5rem;
            left: 1rem;
            width: 2rem;
            aspect-ratio: 1;
            corner-shape: notch;
            border-radius: calc(100%/3);
            background: var(--switch-black);
            border: none;
        }

        .btn-container {
            button {
                font-size: 1.2rem;
                color: var(--switch-white);
            }
        }

        #btn-home {
            width: 2.8rem;
            aspect-ratio: 1;
            border-radius: 50%;
            background: var(--switch-black);
            border: 6px solid #535353;
            font-size: 1.4rem;
            margin-left: -5rem;
            display: flex;
            justify-content: center;
            align-items: center;
            color: black;
        }
    }

    .switch-screen {
        width: var(--switch-width-screen);
        height: var(--switch-height-screen);
        background: var(--switch-black);
        corner-top-left-shape: scoop;
        corner-top-right-shape: scoop;
        border-radius: 1.5rem 1.5rem 2rem 2rem;
        border-left: 2px solid black;
        border-right: 2px solid black;
        padding: 1rem;

        .content {
            width: 100%;
            height: 100%;
            padding: 3rem;
            background:
                radial-gradient(circle at top left,
                    #53b8dc14,
                    transparent 30%),
                radial-gradient(circle at bottom right,
                    #fd886f14,
                    transparent 30%),
                var(--switch-screen-color);
            border-radius: 1rem;
            border: 2rem solid black;
            border-top: 1.5rem solid black;
            border-bottom: 1.5rem solid black;
            overflow-x: auto;

            scrollbar-width: none;
            -ms-overflow-style: none;

            &::-webkit-scrollbar {
                display: none;
            }

            .detail-screen {
                display: none;
                height: 100%;
                overflow-y: auto;
                animation: fadeScreen 0.35s ease;
                font-family: "Jost";
                scrollbar-width: none;
                -ms-overflow-style: none;
                padding: 2rem;
                border-radius: 2rem;
                background: linear-gradient(180deg,
                    rgba(255, 255, 255, 0.04),
                    rgba(255, 255, 255, 0.02));
                backdrop-filter: blur(20px);
                color: white;

                &::-webkit-scrollbar {
                    display: none;
                }

                h2 {
                    font-size: 3rem;
                    color: white;
                    margin-bottom: 0.5rem;
                }

                h3 {
                    color: #7be7ff;
                    font-size: 1.2rem;
                    margin-top: 2rem;
                    margin-bottom: 1rem;
                    line-height: 1.5;

                    span {
                        color: white;
                    }
                }

                p {
                    font-size: 1.05rem;
                    line-height: 1.8;
                    max-width: 85ch;
                    margin-bottom: 1.5rem;
                }
            }

            .detail-screen.active-screen {
                display: block;
            }

            .screen-menu {
                display: flex;
                gap: 0.1rem;
                align-items: center;
                height: 100%;

                div {
                    display: flex;
                    color: var(--switch-screen-text);
                    flex-direction: column;
                    font-family: "Jost";
                    font-weight: bold;
                    font-size: 1.5rem;

                    p {
                        opacity: 0;
                        transition: opacity 0.3s ease;
                    }

                    .button-border {
                        padding: 0.3rem;
                        border: 5px solid transparent;
                        border-radius: 1rem;
                        transition: padding 0.3s ease, border 0.3s ease;
                    }

                    &:has(.active) {
                        p {
                            opacity: 1;
                            transition: opacity 0.3s ease;
                        }

                        .button-border {
                            padding: 0.3rem;
                            border: 5px solid var(--switch-screen-text);
                            border-radius: 1rem;
                            transition: padding 0.3s ease, border 0.3s ease;
                        }
                    }
                }



                .screen-btn {
                    width: 220px;
                    aspect-ratio: 1;
                }
            }

            .screen-menu.hidden {
                display: none;
            }
        }
    }
}


@keyframes fadeScreen {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}