/* Body Styling */
body {
    font-family: Arial, sans-serif;
    background-image: url('res/BACKGROUND.png');
    background-repeat: no-repeat;
    background-position: top center;
    background-color: #77cdeb;
    background-size: cover;
    line-height: 1.6;
    padding: 20px;
}

#gameCanvas {
    display: flex;
    justify-content: center;
    align-items: center;
}

#buttons {
    width: 696px;
    height: 128px;
    margin: 0 auto;

    background-image: url('res/buttons/ACTION_BAR.png');
    background-repeat: no-repeat;
    background-position: center;

    background-size: auto;

    display: flex;
    justify-content: center;
    align-items: center;
}

#buttons button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
    display: inline-block;
}

#buttons {
    justify-content: space-evenly;
    padding-right: 5px;
}

.piece {
    user-select: none;
}

.piece img {
    width: 128px;
    height: 128px;
}

/*
 * Toolbox Menu Styling
 */
dialog#toolbox-menu {
    position: fixed;
    margin-top: 0px;
    width: 236px;
    height: 396px;
    background-image: url(res/MENU.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: none;
    background-color: transparent;
}

dialog#toolbox-menu::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

dialog#toolbox-menu[open] {
    animation: slideDown 0.2s ease-out;
}

dialog#toolbox-menu.closing {
    animation: slideUp 0.2s ease-out;
}

#close {
    background-color: transparent;
    color: transparent;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 0;
    position: absolute;
    left: 221px;
    top: 106px;
}

#close:hover {
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20%;
    cursor: pointer;
}

#rows {
    position: absolute;
    top: 116px;
    left: 130px;
}

#cols {
    position: absolute;
    top: 156px;
    left: 130px
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 81px;
    height: 38px;
    background-image: url(res/buttons/OFF.png);
    background-repeat: no-repeat;
    background-size: cover;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 188px;
    left: 130px;
    
}

input[type="checkbox"]:checked {
    background-image: url(res/buttons/ON.png);
}

#create {
    width: 125px;
    height: 37px;
    position: absolute;
    top: 268px;
    left: 130px;
    background-color: transparent;
    color: transparent;
    border: none;
}

#create:hover {
    /* border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5%; */
    cursor: pointer;
}

#save {
    width: 93px;
    height: 36px;
    position: absolute;
    top: 318px;
    left: 10px;
    background-color: transparent;
    color: transparent;
    border: none;
}

#save:hover {
    /* border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5%; */
    cursor: pointer;
}

#load {
    width: 95px;
    height: 36px;
    position: absolute;
    top: 341px;
    left: 145px;
    background-color: transparent;
    color: transparent;
    border: none;
}

#load:hover {
    /* border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5%; */
    cursor: pointer;
}

#help {
    width: 95px;
    height: 36px;
    position: absolute;
    top: 390px;
    left: 32px;
    background-color: transparent;
    color: transparent;
    border: none;
}

#help:hover {
    /* border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5%; */
    cursor: pointer;
}

dialog#help-menu {
    width: 600px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', Courier, monospace;
    text-align: left;
}

.help-content {
    padding: 1em;
}

.help-content ul {
    list-style: none;
    padding-left: 0;
}

#help-ok {
    background-color: #555;
    color: #fff;
    border: 1px solid #444;
    padding: 0.5em 1em;
    cursor: pointer;
    margin: 1em auto 0 auto;
    display: block;
}

#help-ok:hover {
    background-color: #777;
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}