* {
    box-sizing: border-box;
    margin: 0px;
    padding:0px;
}

*::selection{
    background-color: transparent;
}
html{
    height:-webkit-fill-available;
}
body {
    background-color: #0B2434;
    padding: 20px;
    font-family: 'Karla', sans-serif;
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    min-height: -webkit-fill-available;
}

.body--container{
    display:flex;
    flex-direction: column;
    align-items: center;
}

main {
    background-color: #F5F5F5;
    height: 470px;
    max-width: 800px;
    border-radius: 5px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    box-shadow: -2px -2px 5px 2px rgba(0, 0, 0, 0.3),2px 2px 5px 2px rgba(0, 0, 0, 0.3);
}

.dark main{
    color:#1EAE98;
    background-color: rgba(0, 0, 0, 0.9);
}

.score--board{
    display: flex;
    width: 90%;
    justify-content: space-between;
    align-items: center;
    font-size: 3.5vmin;
}

.timer{
    display: flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-end;
    gap:5px;
    margin-top: 15px;
}

.timer span{
    font-size: 2vmin;
}

@keyframes move--forward{
    0%{
        transform: translateX(1px)
    }
    25%{
        transform: translateX(6px)
    }
    50%{
        transform: translateX(12px)
    }
    75%{
        transform: translateX(18px)
    }
    100%{
        transform: translateX(24px)
    }
}

@keyframes move--backward{
    0%{
        transform: translateX(24px)
    }
    25%{
        transform: translateX(18px)
    }
    50%{
        transform: translateX(12px)
    }
    75%{
        transform: translateX(6px)
    }
    100%{
        transform: translateX(1px)
    }
}

.toggle--container{
    position: absolute;
    left:0;
    right:0;
    margin-left: auto;
    margin-right: auto;
    width:40px;
    height:15px;
    background-color:black;
    border-radius: 10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1px;
}

.toggle--ball{
    width:13px;
    height:13px;
    border-radius: 50%;
    background-color: white;
    animation-name:move--backward;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    animation-timing-function:ease-in-out; 
}


.dark .toggle--container{
    background-color:white;
}

.dark .toggle--ball{
    background-color: black;
    animation-name:move--forward;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    animation-timing-function:ease-in-out;
}

.title {
    font-size: 40px;
    margin: 0;
}

.instructions {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    margin-top: 0;
    text-align: center;
    letter-spacing: 2px;
}

.dice-container {
    display: grid;
    grid-template: auto auto / repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.die-face {
    display:flex;
    height: 50px;
    width: 50px;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    cursor: pointer;
    padding:8px;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.die-face:focus{
    outline: none !important;
}
.dark .die-face{
    color:white;
}

.die-face-one{
    justify-content: center;
    align-items: center;
}

.die-face-two{
    justify-content: space-between;
}

.die-face-two .dot:nth-of-type(2){
    align-self: flex-end;
}

.die-face-three{
    justify-content: space-between;    
}

.die-face-three .dot:nth-of-type(2){
    align-self: center;
}

.die-face-three .dot:nth-of-type(3){
    align-self: flex-end;
}

.die-face-four{
    padding:0px;
    display: grid;
    place-items:center;
    grid-template: 1fr 1fr/1fr 1fr;
}


.die-face-five{
    display:grid;
    padding:0px;
    place-items:center;
    grid-template:1fr 1fr 1fr/1fr 1fr;
}

.die-face-five .dot:nth-of-type(3){
    grid-column:span  2 ;
}


.die-face-six{
    display:grid;
    padding:0px;
    grid-template: 1fr 1fr 1fr /1fr 1fr;
    place-items:center;
}

.dot{
    font-size: 1rem;
    font-weight: bolder;
    height: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.roll-dice {
    height: 50px;
    width: 150px;
    border: none;
    border-radius: 6px;
    background-color: #5035FF;
    color: white;
    font-size: 1.4rem;
    font-family: 'Karla', sans-serif;
    cursor: pointer;
}

.dark .roll-dice{
    background-color: #DA0037;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.roll-dice:focus {
    outline: none !important;
}

.roll-dice:active {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-shadow: inset 2px 2px 7px -3px rgba(0, 0, 0, 0.7);
}

footer{
    text-align: center;
    width:95%;
    background-color: #F5F5F5;
    border-radius: 4px;
    position: absolute;
    bottom:10px;
    font-size: 15px;
    letter-spacing: 1px;
    padding-block:2px;
    box-shadow: -1px -1px 1px 1px rgba(0, 0, 0, 0.3),1px 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.dark footer{
    color:#1EAE98;
    background-color: rgba(0, 0, 0, 0.9);
}

@media screen and (max-width:500px){
    main{
        max-height:90vw;
    }
    
    @keyframes move--forward{
        0%{
            transform: translateX(0px)
        }
        25%{
            transform: translateX(4px)
        }
        50%{
            transform: translateX(8px)
        }
        75%{
            transform: translateX(12px)
        }
        100%{
            transform: translateX(13px)
        }
    }

    @keyframes move--backward{
        0%{
            transform: translateX(13px)
        }
        25%{
            transform: translateX(12px)
        }
        50%{
            transform: translateX(8px)
        }
        75%{
            transform: translateX(4px)
        }
        100%{
            transform: translateX(1px)
        }
    }
    
    .toggle--container{
        position: absolute;
        left:0;
        right:0;
        margin-left: auto;
        margin-right: auto;
        width:22px;
        height:10px;
        border-radius: 10px;
        padding: 0px;
    }

    .toggle--ball{
        width:8px;
        height:8px;
        border-radius: 50%;
    }
    
    .instructions{
        font-size: 2.5vw;
    }
    
    .timer{
        margin-top:6px;
        gap:0px;
    }
    
    .title{
        font-size: 8vw;
    }
    
    .dice-container{
        gap:10px;   
        margin-bottom:0px;
        margin-top:10px;
    }
    
    .die-face{
        width:10vw;
        height:10vw;
        border-radius: 6px;
        box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.15);
    } 
    
    .dot{
        font-size: 2.5vw;
        font-weight: bolder;
    }
    
    .roll-dice{
        width:25vw;
        height:9vw;
        font-size: 4vw;
        margin-top:20px;
    }
    
    .roll-dice:active {
        box-shadow: inset 2px 2px 7px -4px rgba(0, 0, 0, 0.7);
    }
    
    footer{
        font-size: 9px;
        padding:1px;
        border-radius: 2px;
    }
}