/* -----Alignment----- */
/* *{border: 1px solid blue;} */

/* body::before{
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    content: "";
    border: 1px solid red;
    width: 0px;
    height: 100vh;
    z-index: 2;
}

body::after{
    position: absolute;
    top: 50%;
    content: "";
    border: 1px solid red;
    width: 100vw;
    height: 0px;
    z-index: 2;
} */
/* ----------Dice Box---------- */
div#box{
    width: 100%;
    max-width: 650px;
    min-width: 300px;
    height: 200px;
    /* border: 1px dashed red; */

    display: flex;
    flex-direction: column;
    align-items: center;

}

div.rollTop{
    height: 40px;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
    /* border: 1px solid red; */

    display: flex;
    justify-content: space-between;
}

/* Yahtzee Mode */
div.yahtzeeGroup{

    display: flex;
    flex-direction: column;
    align-items: center;
}

button.yahtzee{
    border: 2px solid black;
    background: transparent;
    background: rgba(34, 110, 133, 0.5);
    border-radius: 5px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    padding: 4px;
    font-family: sans-serif;
    cursor: pointer;
}

div#switch{
    cursor: pointer;
}

div#track{
    border: 2px solid black;
    background: white;
    border-radius: 30px;
    height: 15px;
    width: 30px;
    margin-top: 5px;
    box-sizing: border-box;
    position: relative;
    transition-delay: .1s;
}

div#slider{
    background: black;
    height: 15px;
    width: 15px;
    border-radius: 30px;
    box-sizing: border-box;
    position: absolute;
    top: -2px;
    left: 0;
    transition: left 0.1s linear;
}
/* # Of Dice Dropdown Menu */
div.dropdown{
    position: relative;
    z-index: +2;
}

button.drop-btn{
    border: 2px solid black;
    background: rgba(34, 110, 133, 0.5);
    border-radius: 5px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    font-family: sans-serif;
    cursor: pointer;
    padding: 4px;
    width: 126px;
    box-sizing: border-box;
}

div.drop-list{
    display: flex;
    flex-direction: column;
    height: 0;
    overflow: hidden;
    transition: height .5s, border 0s;
    background: rgba(34, 110, 133, 0.5);
    border-radius: 5px;
    backdrop-filter: blur(10px);
    margin: 2px 0 0 15px;
    border: none;
}

div.drop-list a{
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 4px;
    width: 126px;
    box-sizing: border-box;
}

div.drop-list a:hover{
    background: rgba(0, 0, 0, 0.3);
}

/* Roll Button */
input[id="roll-btn"]{
    width: 150px;
    height: 50px;
    font-size: 20px;
    background: black;
    color: white;
    border-radius: 10px;
    box-shadow: 10px 10px 10px 2px #395570;
    cursor: pointer;
    border: 2px solid white;
}

input[id="roll-btn"]:active{
    box-shadow: none;
    margin: 10px -10px -10px 10px;
}

/* Dice */
div.cup{
    width: 100%;
    margin-top: 35px;

    display: flex;
}

div.dice{
    position: relative;
    width:75px;
    height: 75px;
    transform-style: preserve-3d;
    transform: rotateX(30deg) rotateY(30deg);
    margin: 0 auto;
    cursor: pointer;
}

.roll{
    animation: roll 1s linear 0s 2;
    /* animation-name: roll;
    animation-duration: 1000ms;
    animation-timing-function: linear;
    animation-delay: 0ms;
    animation-iteration-count: 5;
    animation-direction: normal;
    animation-fill-mode: forwards; */
}

@keyframes roll{
    from{transform: rotateX(0deg) rotateY(0deg);}
    to{transform: rotateX(360deg) rotateY(720deg);}
}

div.dice > div{
    position: absolute;
    width: 75px;
    height: 75px;
    border: 2px solid rgb(255, 255, 255);
    background: black;
    box-sizing: border-box;
    border-radius: 10px;

    display: flex;
    justify-content: center;
    align-items: center;
}

div.dice div p{
    max-width:72px;
    text-align: center;
    padding: 2px;
    color: white;
    font-size: 10px;
    font-weight: 800;
    overflow-wrap: break-word;
}

.front{
    transform: translateZ(37.5px);
}

.back{
    transform: translateZ(-37.5px) rotateY(180deg);
}

.left{
    right: 37.5px;
    transform: rotateY(-90deg);
}

.right{
    left: 37.5px;
    transform: rotateY(90deg);
}

.top{
    bottom: 37.5px;
    transform: rotateX(90deg);
}

.bottom{
    top: 37.5px;
    transform: rotateX(-90deg);
}

.hide{
    display: none;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ----------Form---------- */
form#load-dice{
    margin-top: 15px;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
}

div.inputs{
    border-radius: 10px;
    padding: 10px;
    padding-top: 5px;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

form#load-dice input[type="text"]{
    color: white;
    border: none;
    border-bottom: 1px solid white;
    margin: 2px;
    outline: transparent;
    background: black;
}

div.column:not(.hide){
    margin: 4px;
    background: black;
    border-radius: 10px;
    padding: 10px;
    padding-top: 5px;

    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

form#load-dice input[id="load-btn"]{
    width: 150px;
    height: 40px;
    cursor: pointer;
    border-radius: 10px;
    border: none;
    color: white;
    background: black;
}

form#load-dice input[id="load-btn"]:active{
    box-sizing: border-box;
    border: 2px solid black;
    color: black;
    background: white;
}


/* ------------------------ !!!!!!!!SMALL SCREEN!!!!!!!! ------------------------ */
@media only screen and (max-width: 600px) {
    div.dice{
        height: 56.25px;
        width: 56.25px;
    }

    div.dice div{
        height: 56.25px;
        width: 56.25px;
    }

    div.dice div p{
        max-width:54px;
        font-size: 8px;
    }
    
    .front{
        transform: translateZ(28.1225px);
    }
    
    .back{
        transform: translateZ(-28.1225px) rotateY(180deg);
    }
    
    .left{
        right: 28.1225px;
        transform: rotateY(-90deg);
    }
    
    .right{
        left: 28.1225px;
        transform: rotateY(90deg);
    }
    
    .top{
        bottom: 28.1225px;
        transform: rotateX(90deg);
    }
    
    .bottom{
        top: 28.1225px;
        transform: rotateX(-90deg);
    }

    form#load-dice{
        margin-top: -10px
    }
}

@media only screen and (max-width: 400px) {
    form#load-dice input[type="text"]{
        max-width: 115px;
    }

    div.dice{
        height: 46px;
        width: 46px;
    }

    div.dice div{
        height: 46px;
        width: 46px;
    }

    div.dice div p{
        max-width:45px;
        font-size: 8px;
    }
    
    .front{
        transform: translateZ(23px);
    }
    
    .back{
        transform: translateZ(-23px) rotateY(180deg);
    }
    
    .left{
        right: 23px;
        transform: rotateY(-90deg);
    }
    
    .right{
        left: 23px;
        transform: rotateY(90deg);
    }
    
    .top{
        bottom: 23px;
        transform: rotateX(90deg);
    }
    
    .bottom{
        top: 23px;
        transform: rotateX(-90deg);
    }

    form#load-dice{
        margin-top: -20px
    }
}