$primary: #282828;
$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;

PauseMenu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgb(0, 0, 0) 0%, rgba(0, 0, 0, 0.902) 50%);
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-direction: column;
    pointer-events: all;
    transition: opacity 0.2s;
    z-index: 200;

    .title {
        position: relative;
        height: 200px;
        align-items: center;
        justify-content: center;
        font-family: Poppins;
        color: rgb(0, 0, 0);
        font-size: 124px;
        padding-bottom: 50px;
        text-shadow:0px 0px 20px rgb(126, 255, 131);
        text-stroke: 12px rgba(0, 120, 14, 0.269);
    }

    .buttons {
        height: 600px;
        width: 400px;
        justify-content: center;
        color: white;
        font-family: Poppins;
        flex-direction: column;
        gap: 12px;

        .button {
            width: 100%;
            font-size: 42px;
            height: 80px;
            border-radius: 4px;
            border: 4px rgb(0, 0, 0);
            background-color: $primary;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease; 

            &:hover {
                sound-in: ui.button.over;
                transition: all 0.2s ease;
                transform: scale(1.1);
                cursor: pointer;
                border: 4px rgb(61, 129, 63);
            }

            &:active {
                background-color: rgb(61, 129, 63);
                sound-in: ui.button.press;
                cursor: pointer;
            }
        }
    }

    .about {
        position: absolute;
        color: white;
        right: 24px;
        font-family: Poppins;
        width: 500px;
        height: 800px;
        background-color: $primary;
        flex-direction: column;
        border-radius: 4px;

        padding: 24px;
        border-radius: 4px;
        pointer-events: all;
        gap: 21px;
        font-size: 26px;
        align-items: flex-start;
        justify-content: center;

        > label {
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        > .close {
            position: absolute;
            top: 12px;
            right: 12px;
            align-items: center;
            justify-content: center;
            font-family: Material Icons;
            background-color: $secondary;
            width: 32px;
            height: 32px;
            font-size: 32px;
            cursor: pointer;
            border-radius: 4px;

            &:hover {
                background-color: red;
                color: black;
            }

            &:active {
                background-color: $secondary;
            }
        }
    }

    .leaderboard {
        position: absolute;
        right: 24px;
        color: white;
        font-family: Poppins;
        width: 650px;
        height: 800px;
        background-color: $primary;
        flex-direction: column;
        border-radius: 4px;
        padding: 24px;
        pointer-events: all;
        gap: 12px;

        .header {
            font-size: 30px;
            align-items: center;
            justify-content: center;
            padding: 12px 0 12px 0;
        }

        .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: darken($primary, 30%);
                align-items: center;
                justify-content: center;
                border-radius: 4px;
                cursor: pointer;
                text-align: center;

                &.selected {
                    background-color: rgb(61, 129, 63);
                    color: black;
                }

                &:hover {
                    background-color: rgb(61, 129, 63);
                    
                    &.selected {
                        background-color: rgb(61, 129, 63);
                    }
                }

                &:active {
                    background-color: darken($secondary, 10%);
                    
                    &.selected {
                        background-color: darken($secondary, 10%);
                    }
                }
            }
        }

        .leaderboard-holder {
            flex: 1;
            flex-direction: column;
            overflow-y: scroll;
            gap: 4px;

            .info {
                align-items: center;
                justify-content: center;
                font-size: 24px;
                color: #ccc;
            }

            .entry {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                background-color: darken($secondary, 20%);
                padding: 8px 12px;
                border-radius: 4px;
                min-height: 40px;

                &.me {
                    background: linear-gradient(135deg, rgb(108, 134, 109) 0%, rgb(85, 137, 86) 25%, rgb(61, 129, 63) 70%, rgb(61, 129, 63) 100%);
                    color: black;
                    font-weight: bolder;
                }

                .name {
                    font-size: 18px;
                    flex: 1;
                }

                .value {
                    font-size: 18px;
                    font-weight: bold;
                }
            }
        }

        .sort {
            justify-content: center;
            margin-top: 12px;

            .button {
                width: 150px;
                height: 40px;
                font-size: 18px;
                background-color: darken($secondary, 20%);
                align-items: center;
                justify-content: center;
                border-radius: 4px;
                cursor: pointer;

                &:hover {
                    background-color: rgb(61, 129, 63);
                }

                &:active {
                    background-color: rgb(61, 129, 63);
                }
            }
        }

        .close {
            position: absolute;
            top: 12px;
            right: 12px;
            align-items: center;
            justify-content: center;
            font-family: Material Icons;
            background-color: darken($secondary, 20%);
            width: 32px;
            height: 32px;
            font-size: 32px;
            cursor: pointer;
            border-radius: 4px;

            &:hover {
                background-color: red;
                color: black;
            }

            &:active {
                background-color: $secondary;
            }
        }
    }
}