$primary: #499bc422;
$secondary: #242424;
$tertiary: #fdc418;

$button-primary: #ffffff !default;
$button-primary-fg: #ffffff !default;
$button-secondary: #282828 !default;
$button-secondary-fg: #dadada !default;
$button-size: 45px;

MainMenu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    pointer-events: none;
    font-family: Poppins;
    color: white;

    &:hover {
        cursor: none;
    }

    .buttons {
        position: absolute;
        bottom: 120px;
        left: 64px;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-direction: column;
        gap: 32px;

        .button {
            width: 100%;
            font-size: 32px;
            pointer-events: all;
            border-radius: 4px;
            background-color: rgba(0, 136, 255, 0);
            padding: 20px;
            padding-bottom: 3px;

            &:hover {
                background-color: #3a3a3a2e;
                sound-in: ui.button.over;
                transform: scale(1.05);
                pointer-events: all;
            }

            &:active {
                background-color: #28282839;
                sound-in: ui.button.press;
            }
        }
    }

    .title {
        position: absolute;
        top: 64px;
        left: 64px;
        right: 0;
        bottom: 0;
        width: 960px;
        height: 175px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100%;
    }

    .lobbies {
        position: absolute;
        right: 64px;
        top: 64px;
        height: 90%;
        width: 750px;
        background-color: #282828;
        justify-content: flex-start;
        align-items: center;
        padding: 16px;
        border-radius: 4px;
        flex-direction: column;
        border: 4px rgba(61, 129, 63, 0.5);

        > .header {
            width: 100%;
            height: 100px;
            font-size: 42px;
            align-items: center;
            justify-content: center;
        }

        .lobby-holder {
            width: 100%;
            height: 90%;
            gap: 16px;
            align-items: center;
            justify-content: flex-start;
            background-color: #3a3a3a;
            border-radius: 4px;
            flex-direction: column;
            padding: 6px;
            overflow-y: scroll;
            overflow-x: hidden;
            pointer-events: all;

            .info {
                width: 100%;
                height: 100px;
                font-size: 42px;
                align-items: center;
                justify-content: center;
            }

            .lobby {
                width: 100%;
                flex-shrink: 0;
                font-size: 32px;
                background-color: $button-secondary;
                align-items: flex-start;
                justify-content: center;
                flex-direction: column;
                padding: 12px;
                gap: 6px;

                &:hover {
                    background-color: hsl(0, 0%, 20%);
                    sound-in: ui.button.over;
                    cursor: pointer;
                }

                &:active {
                    background-color: hsl(0, 0%, 15%);
                    sound-in: ui.button.press;
                    cursor: pointer;
                }
            }
        }
    }

    .lobby-creation {
        position: absolute;
        top: 64px;
        left: 20%;
        height: 85%;
        width: 75%;
        background-color: #282828;
        justify-content: center;
        align-items: center;
        border-width: 4px;
        border: 4px rgba(61, 129, 63, 0.5);
        gap: 10px;
        padding-top: 10px;
        border-radius: 4px;
        flex-direction: row;
        pointer-events: all;

        > .header {
            width: 100%;
            height: 100px;
            font-size: 42px;
            align-items: center;
            justify-content: center;
        }

        .test {
            display: flex;
            flex-direction: column;
            text-align: center;
            max-width: 100px;
        }

        h1 {
            font-size: 42px;
            font-weight: bolder;
        }

        .gamemode-list {
            height: 100%;
            width: 40%;
            flex-direction: column;
            align-items: center;
            padding-bottom: 20px;
            border-radius: 1%;

            .gamemode-button {
                width: 90%;
                height: 15%;
                background-color: #333333;
                border-radius: 2%;
                border: 4px rgb(37, 37, 37);
                padding: 12px;
                justify-content: center;
                flex-direction: column;
                transition: all 0.1s ease;

                &.selected-gm {
                    background-color: rgb(61, 129, 63);
                    border-radius: 10px;
                    transform: scale(1.05);
                }
            }
        }

        .map-container {
            width: 90%;
            flex-wrap: wrap;
            height: 45%;
            overflow-y: scroll;
            overflow-x: hidden;
            justify-content: center;
            gap: 5px;
            flex-direction: row;
            display: flex;
            flex-grow: 1;
            align-items: center;
            border: 4px rgb(37, 37, 37);
            background-color: #3a3a3a;
            border-radius: 1%;
            border-bottom: none;
            padding-top: 15px;
        }

        .map-list {
            height: 100%;
            width: 60%;
            flex-direction: column;
            align-items: center;
            justify-content: center;

            .map {
                width: 30%;
                align-items: center;
                justify-content: space-around;
                background-color: black;
                margin: 4px;
                border: 4px rgb(37, 37, 37);
                transition: all 0.1s;
                transform: scale(1);
                border-radius: 1%;
                font-size: 24px;
                display: flex;
                flex-direction: column;
                flex-shrink: 0;

                .map-name {
                    font-size: 24px;
                    white-space: nowrap;
                }

                .team {
                    margin-top: 10px;
                    font-size: 24px;
                    white-space: nowrap;
                }
            }

            .selected {
                border: 4px rgb(61, 129, 63);
                transform: scale(1.05);
                background-color: #333333;
                border-radius: 10px;
            }
        }
    }

    .leaderboard {
        position: absolute;
        top: 64px;
        right: 64px;
        height: 85%;
        width: 750px;
        background-color: #282828;
        justify-content: flex-start;
        align-items: center;
        border-width: 4px;
        border: 4px rgba(61, 129, 63, 0.5);
        gap: 10px;
        padding-top: 10px;
        border-radius: 4px;
        flex-direction: column;
        pointer-events: all;

        > .header {
            font-size: 32px;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }

        .stat-buttons {
            flex-direction: row;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-bottom: 12px;

            .button {
                width: 200px;
                height: 60px;
                font-size: 18px;
                background-color: hsl(0, 0%, 11%);
                align-items: center;
                justify-content: center;
                border-radius: 4px;
                transition: all 0.2s ease;

                &:hover {
                    background-color: hsl(0, 0%, 20%);
                    sound-in: ui.button.over;
                    cursor: pointer;
                    transform: scale(1.02);
                }

                &:active {
                    background-color: hsl(0, 0%, 15%);
                    sound-in: ui.button.press;
                    cursor: pointer;
                }

                &.selected {
                    background-color: rgb(61, 129, 63);
                    border-color: rgb(81, 149, 83);
                    color: white;
                    transform: scale(1.05);

                    &:hover {
                        background-color: rgb(71, 139, 73);
                        transform: scale(1.07);
                    }
                }
            }
        }

        .leaderboard-holder {
            width: 100%;
            flex: 1;
            align-items: center;
            justify-content: flex-start;
            background-color: hsl(0, 0%, 14%);
            border-color: hsl(0, 0%, 20%);
            border-width: 6;
            flex-direction: column;
            padding: 2px;
            overflow-y: scroll;
            overflow-x: hidden;

            .info {
                width: 100%;
                height: 100px;
                font-size: 32px;
                align-items: center;
                justify-content: center;
            }

            .entry {
                width: 100%;
                height: 100px;
                font-size: 42px;
                flex-shrink: 0;
                background-color: hsl(0, 0%, 11%);
                border-color: hsl(0, 0%, 15%);
                border-width: 6;
                align-items: center;
                justify-content: center;
                padding: 12px;

                &.me {
                    background-color: hsl(0, 0%, 19%);
                    color: rgb(61, 129, 63);
                }

                .name {
                    flex-grow: 1;
                    height: 100%;
                    font-size: 28px;
                    align-items: center;
                    justify-content: flex-start;
                    text-overflow: clip;
                }

                &:hover {
                    background-color: hsl(0, 0%, 20%);
                    sound-in: ui.button.over;
                    pointer-events: all;
                }

                &:active {
                    background-color: hsl(0, 0%, 15%);
                    sound-in: ui.button.press;
                }
            }
        }

        .sort {
            width: 100%;
            height: 100px;
            font-size: 42px;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin: 12px;

            .button {
                width: 100%;
                font-size: 42px;
                height: 100px;
                background-color: hsl(0, 0%, 11%);
                border-color: hsl(0, 0%, 15%);
                border-width: 6;
                align-items: center;
                justify-content: center;

                &:hover {
                    background-color: hsl(0, 0%, 20%);
                    sound-in: ui.button.over;
                    cursor: pointer;
                }

                &:active {
                    background-color: hsl(0, 0%, 15%);
                    sound-in: ui.button.press;
                    cursor: pointer;
                }
            }
        }
    }

    .play {
        width: 500px;
        height: 400px;
        background-color: hsl(0, 0%, 11%);
        border-color: hsl(0, 0%, 15%);
        border-width: 6;
        align-items: center;
        justify-content: center;
        padding: 16px;
        gap: 16px;
        flex-direction: column;

        .button {
            width: 100%;
            height: 100%;
            font-size: 42px;
            background-color: hsl(0, 0%, 11%);
            border-color: hsl(0, 0%, 15%);
            border-width: 6;
            align-items: center;
            justify-content: center;

            &:hover {
                background-color: hsl(0, 0%, 20%);
                sound-in: ui.button.over;
                cursor: pointer;
            }

            &:active {
                background-color: hsl(0, 0%, 15%);
                sound-in: ui.button.press;
                cursor: pointer;
            }
        }
    }

    .about {
        position: absolute;
        top: 64px;
        right: 64px;
        height: 90%;
        width: 750px;
        background-color: #282828;
        border-width: 4px;
        border: 4px rgba(61, 129, 63, 0.5);
        padding: 10px;
        font-size: 32px;
        border-radius: 4px;
        flex-direction: column;
        pointer-events: all;

        > label {
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            padding: 20px;
        }
    }

    .music-credit {
        position: absolute;
        bottom: 24px;
        right: 24px;
        font-size: 24px;
        color: rgb(255, 255, 255);
        background-color: rgba(0, 0, 0, 0.3);
        padding: 8px 12px;
        border-radius: 4px;
        pointer-events: all;
        z-index: 1000;
        font-family: Poppins;
        cursor: pointer; // Show it's clickable
        // Sandbox UI transition system
        transition: all 1.2s ease-out;

        &:intro {
            transform: translateY(100px);
        }

        &:hover {
            color: rgba(255, 255, 255, 0.9);
            background-color: rgba(0, 0, 0, 0.5);
            transform: translateY(-2px);
            text-decoration: underline; // Show it's a link on hover
            cursor: none;
        }

        &:active {
            transform: translateY(0px);
            background-color: rgba(0, 0, 0, 0.7);
        }

        &.copied {
            color: rgba(61, 129, 63, 1);
            background-color: rgb(0, 0, 0);
        }
    }
}
