:root {
    --switch-red: #fd886f;
    --switch-blue: #53b8dc;
    --switch-black: #403f3d;
    --switch-white: #feffff;
    --switch-black-accent: #2b2a28;

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

    /* Normal size: 116mm x 30.7mm */
    /* Dimensies bron: https://www.nintendo.com/nl-nl/Hardware/Nintendo-Switch-2/Nintendo-Switch-2-Specificaties-2785627.html?srsltid=AfmBOoqZBPBSjOMNFwO9OwzFyUoCPXfzVXbFAFblwaFuebyZJF2gZzQ3 */
    --switch-width-controller: 200.2px;
    --switch-height-controller: 696px;

    /* Normaal 200mm x 116mm */
    --switch-width-screen: 1200px;
    --switch-height-screen: 696px;
}

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

    #btn-l,
    #btn-r {
        position: absolute;
        width: 9.5rem;
        height: 8rem;
        background: var(--switch-black-accent);
        top: -0.2rem;
        z-index: -1;
        border: none;
    }

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

    .joystick {
        width: 7rem;
        aspect-ratio: 1;
        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-accent);
            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-black);
        width: var(--switch-width-controller);
        height: var(--switch-height-controller);
        border-radius: 11rem 1rem 1rem 11rem;
        position: relative;
        padding: 6rem 0;

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

            /* &:hover {
                transform: translate(3px, 3px);
            } */
        }


        #btn-minus {
            position: absolute;
            top: 1.5rem;
            right: 1rem;
            width: 2rem;
            height: 0.5rem;
            background: var(--switch-black-accent);
            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-accent);
            font-size: 1.4rem;
            margin-right: -5rem;
            margin-top: -0.8rem;
        }

        .joystick {
            background: var(--switch-blue);
        }
    }

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

        #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-accent);
            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-accent);
            border: none;
            font-size: 1.4rem;
            margin-left: -5rem;
        }

        #btn-online {
            width: 2.8rem;
            width: 2.8rem;
            aspect-ratio: 1;
            border-radius: 3px;
            border: none;
            background: var(--switch-black-accent);
            font-size: 1.8rem;
            margin-left: -5rem;
            margin-top: -0.8rem;
            font-weight: bold;
        }

        .joystick {
            background: var(--switch-red);
        }
    }

    .switch-screen {
        width: var(--switch-width-screen);
        height: var(--switch-height-screen);
        background: var(--switch-black);
        border-radius: 1rem;
        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: 3rem solid black;
            border-top: 1rem solid black;
            border-bottom: 1rem solid black;
            overflow-x: auto;

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

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

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

            .nerd-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;

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

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

                    &:has(.active) {
                        p {
                            opacity: 1;
                        }

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

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

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

            .nerd-screen {
                display: none;
                height: 100%;
                font-family: "Jost";
                padding: 3rem;
                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;
                animation: fadeIn 0.4s ease;
                overflow-y: auto;
                scrollbar-width: none;
                -ms-overflow-style: none;

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

                h2 {
                    font-size: 3.5rem;
                    font-weight: 700;
                    margin-bottom: 0.5rem;
                }

                .subtitle {
                    color: var(--switch-blue);
                    font-size: 1.1rem;
                    font-weight: 600;
                    margin-bottom: 3rem;
                }

                h3 {
                    margin-top: 3rem;
                    margin-bottom: 1rem;
                    font-size: 1.5rem;
                    color: white;
                }

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

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

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