body {
    position: relative;
    margin: 0;
    line-height: 0;
    font-size: 16px;
}

.hidden {
    display: none !important;
}

.rolesPopupContainer {
    user-select: none;
    line-height: initial;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;

    .rolesChoiceContainer {
        box-sizing: border-box;
        background: linear-gradient(145deg, #1b1b1b, #101010);
        border: 1px solid #303030;
        border-radius: 10px;
        box-shadow: 0 0 18px rgba(0, 255, 160, 0.05), 0 0 4px rgba(0, 255, 160, 0.1);
        color: #ccc;
        padding: 1rem;
        max-width: 90%;
        width: 600px;
        position: relative;
        font-family: 'Courier New', monospace;
        display: flex;
        flex-direction: column;

        .rolesTitleText {
            display: inline-block;
            width: 100%;
            text-align: center;
        }

        .roleContainer {
            display: flex;
            border-top: 1px solid #ccc;
            padding: 8px;
            cursor: pointer;
            flex-direction: column;

            .roleTitleText {
                font-weight: bold;
                width: 200px;
                flex-shrink: 0;
                flex-grow: 0;
            }

            .roleDescriptionContainer {
                display: flex;
                flex-direction: column;
            }
        }

        .roleContainer:hover {
            background-color: #66f2ff;
            color: #000;
            box-shadow: 0 0 8px #66f2ff44;
        }
    }

}

#infoPopupContainer {
    user-select: none;
    line-height: initial;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;

    #infoPopupCard {
        box-sizing: border-box;
        background: linear-gradient(145deg, #1b1b1b, #101010);
        border: 1px solid #303030;
        border-radius: 10px;
        box-shadow: 0 0 18px rgba(0, 255, 160, 0.05), 0 0 4px rgba(0, 255, 160, 0.1);
        color: #ccc;
        padding: 1rem;
        max-width: 90%;
        width: 600px;
        position: relative;
        font-family: 'Courier New', monospace;

        #infoPopupCloseButton {
            position: absolute;
            top: 0.5rem;
            right: 0.75rem;
            background: none;
            border: none;
            font-size: 1.2rem;
            color: #777;
            cursor: pointer;
            transition: color 0.2s;
        }

        #infoPopupCloseButton:hover {
            color: #0fa;
        }

        #infoPopupHeader {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;

            img {
                width: 48px;
                height: 48px;
                background: #222;
                border-radius: 4px;
                border: 1px solid #333;
            }

            #infoPopupTitle {
                #infoPopupBigTitle {
                    margin: 0;
                    font-size: 16px;
                    color: #0fa;
                    text-shadow: 0 0 3px #0fa2;
                }

                #infoPopupSubtitle {
                    margin: 0;
                    font-size: 16px;
                    color: #999;
                }
            }
        }

        #infoPopupContent {

            #infoPopupDescription,
            #infoPopupVrac {
                font-size: 16px;
                line-height: 1.45;
                color: #aaa;
                margin-bottom: 0.75rem;
            }

            #continueButton {
                display: block;
                background: transparent;
                border: 1px solid #2a3a4d;
                color: #66f2ff;
                font-size: 0.85rem;
                padding: 0.3rem 0.3rem;
                border-radius: 6px;
                cursor: pointer;
                transition: all 0.3s ease;
                font-family: 'Orbitron', sans-serif;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                height: 31px;
                margin: 6px;
                /* margin-left: 200px; */
                margin: auto;
            }

            #continueButton:hover {
                background-color: #66f2ff;
                color: #000;
                box-shadow: 0 0 8px #66f2ff44;
            }
        }
    }
}

#game {
    #pingSendContainer {
        position: absolute;
        display: flex;
        flex-direction: column;
        line-height: initial;

        .pingSendText {
            background-color: white;
            cursor: pointer;
            padding: 4px;
            border-bottom: #FFD54F 1px solid;
        }

        .pingSendText:hover {
            background-color: wheat;
        }
    }

    #waveNotification {
        line-height: initial;
        position: absolute;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        user-select: none;

        .waveNotifierText {
            font-size: 100px;
            color: white;
            text-align: center;
        }
    }

    #feedbackText {
        background-color: aliceblue;
        position: absolute;
        color: white;
        background-color: darkred;
        margin: 0;
        padding: 2px;
        line-height: initial;
        border: 1px solid wheat;
    }

    #feedbackText.successful {
        background-color: darkgreen;
    }

    #gameHeader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: linear-gradient(to right, #121a24, #0a0f17);
        border-bottom: 1px solid #2a3a4d;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        z-index: 999;
        box-shadow: 0 2px 6px rgba(0, 255, 255, 0.05);

        #deckDisplayerButton:hover,
        /* #handButton:hover, */
        #shopButton:hover,
        #playersButton:hover,
        #nextWaveButton:hover,
        #fullscreenButton:hover,
        #deckDisplayerButton.selectedMenuElement,
        /* #handButton.selectedMenuElement, */
        #shopButton.selectedMenuElement,
        #playersButton.selectedMenuElement,
        #nextWaveButton.selectedMenuElement,
        #fullscreenButton.selectedMenuElement {
            background-color: #66f2ff;
            color: #000;
            box-shadow: 0 0 8px #66f2ff44;
        }

        #deckDisplayerButton,
        /* #handButton, */
        #playersButton,
        #shopButton,
        #nextWaveButton,
        #fullscreenButton {
            transition: background-color 0.5s;
            background-color: #0a0f17;
            border: 1px solid #2a3a4d;
            color: #66f2ff;
            font-size: 0.85rem;
            padding: 0.3rem 0.3rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Orbitron', sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            height: 31px;
            margin: 6px;
        }

        #playersButton.animateButton {
            background-color: #ff0000;
        }

        #readyDisplayer {
            border: 1px solid black;
            margin: 0;
            padding: 0;
            background-color: darkgreen;
            color: white;
            padding-left: 12px;
            padding-right: 12px;
        }
    }

    #multiPlayerInfoContainer {
        background: rgba(10, 20, 30, 0.8);
        color: #66f2ff;
        position: absolute;
        display: flex;
        flex-direction: column;
        line-height: initial;
        top: 40px;
        padding: 4px;

        #playerNameContainer {
            padding: 4px;
        }

        #playerListContainer {
            #playerList {
                display: flex;
                flex-direction: column;
                padding: 0;
                margin: 0;

                .playerListElementLi {
                    font-weight: bold;
                    border: 1px solid red;
                    padding: 3px;
                    margin: 4px;
                    list-style-type: none;
                    background-color: rgb(41, 8, 13);

                    .playerGiveMoneyButton {
                        margin-left: 8px;
                        border: 1px solid wheat;
                        background: none;
                        color: wheat;
                        cursor: pointer;
                        vertical-align: middle;
                    }

                    .playerGiveMoneyButton:hover {
                        border: 1px solid wheat;
                        color: black;
                        background: wheat;
                    }
                }
            }
        }

        #loreListContainer {
            height: 60vh;
            overflow-y: scroll;

            .loreButtonContainer:hover {
                background-color: rgb(51, 44, 45);
            }

            .loreButtonContainer {
                background-color: rgb(41, 8, 13);
                padding: 4px;
                border-bottom: solid 1px rgb(51, 44, 45);
                cursor: pointer;

                .loreButtonText {
                    display: inline-block;
                    padding-left: 8px;
                }

                .loreImage {
                    vertical-align: middle;
                }

            }
        }
    }

    #resourcesContainer {
        position: fixed;
        top: 40px;
        right: 0px;
        background: rgba(10, 20, 30, 0.8);
        border: 1px solid #2a3a4d;
        border-radius: 8px;
        padding: 0.5rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        color: #66f2ff;
        font-size: 0.9rem;
        font-family: 'Orbitron', sans-serif;
        z-index: 998;
        box-shadow: 0 0 10px #00f2ff22;

        #myResources {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
    }

    #deckDisplayerContainer {
        position: absolute;
        line-height: initial;
        left: 0;
        top: 40px;
        background: rgba(10, 20, 30, 0.8);
        color: #66f2ff;
        min-width: 200px;

        #deckDisplayerHandTitle,
        #deckDisplayerDeckTitle,
        #deckDisplayerDiscardTitle {
            background-color: rgb(41, 8, 13);
            padding: 4px;
            margin: 0;
            border-top: 1px solid darkblue;
            border-bottom: 1px solid darkblue;
        }

        #deckDisplayerHandContainer,
        #deckDisplayerDeckContainer,
        #deckDisplayerDiscardContainer {
            padding: 8px;
            font-weight: bold;
        }
    }

    #shopContainer.shopBlocked {
        background-color: black;
    }

    #shopContainer {
        top: 40px;
        left: 0;
        position: absolute;
        line-height: initial;
        background: rgba(10, 20, 30, 0.8);
        color: #66f2ff;

        #shopHandText,
        #shopContentText {
            margin: 0;
            padding: 0;
        }

        #shopHandContainer,
        #shopContentContainer {
            display: flex;
            flex-wrap: wrap;
            padding-top: 4px;

            .shopCardContainer {
                transition: top 0.3s;
                top: 0px;
                border-radius: 6px;
                position: relative;
                box-sizing: border-box;
                line-height: initial;
                width: 90px;
                height: 110px;
                margin: 4px;
                cursor: pointer;
                user-select: none;
                text-align: center;
                padding: 12px;
                border-radius: 12px;
                box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
                font-family: 'Orbitron', sans-serif;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                color: #fff;
                border: 2px solid #444;
                background: linear-gradient(145deg, #1a1a1a, #2c2c2c);

            }

            .shopCardContainer:hover {
                top: -8px;
            }
        }
    }

    #cardsContainer {
        background: rgba(10, 20, 30, 0.8);
        position: absolute;
        bottom: 0px;
        margin: auto;
        left: 50%;
        transform: translateX(-50%);
        max-width: 100vw;

        #handContainer.handFull {
            background-color: rgba(250, 0, 0, 0.7);
        }

        #handContainer {
            display: flex;
            width: 100vw;
            flex-wrap: wrap;
            justify-content: center;

            .cardContainer {
                transition: bottom 0.3s;
                bottom: 0px;
                position: relative;
                box-sizing: border-box;
                line-height: initial;
                width: 90px;
                height: 110px;
                margin: 4px;
                cursor: pointer;
                user-select: none;
                text-align: center;
                padding: 12px;
                border-radius: 12px;
                box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
                font-family: 'Orbitron', sans-serif;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                color: #fff;
                border: 2px solid #444;
                background: linear-gradient(145deg, #1a1a1a, #2c2c2c);

                .cardImageContainer {

                    .cardImage {
                        width: 16px;
                        height: 16px;
                    }
                }
            }

            .cardContainer:hover {
                bottom: 16px;
            }

            .unattached,
            .unattached:hover {
                bottom: 16px;
            }
        }
    }

    #gameCanvas {
        background: #74952F;
    }
}