:root{
    --RED:rgb(207, 0, 0);
    --GREEN:rgb(0, 207, 38);
    --BLUE:rgb(0, 114, 207);
    --YELLOW:rgb(230, 242, 0);
    --Header_Footer:rgba(0, 0, 0, 0.444);
}

body,html{
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background-color: black;
    -webkit-tap-highlight-color: transparent;
}
body{
    display: flex;
    align-items: center;
    justify-content: baseline;
    flex-direction: column;
    background-image: url(Images/Other/Table.jpg);
    background-position: center;
    background-size: cover;
}
body header{
    width: 100%;
    height: 7%;
    background-color: var(--Header_Footer);
    display:  grid;
    place-items: center;
    color:white;
}
body section{
    width: 100%;
    height: 86%;
    display: grid;
    place-items: center;
}
body footer{
    width: 100%;
    height: 7%;
    background-color: var(--Header_Footer);
}
.ludo-board{
    width: 600px;
    height: 600px;
    background-color: rgb(82, 24, 24);
    background-image: url(Images/Other/Wood.jpg);
    background-position: center;
    background-size: cover;
    border: 3px solid rgb(0, 0, 0);
    display: grid;
    grid-template-columns: repeat(15,1fr);
    grid-template-rows: repeat(15,1fr);
    padding: 10px;
    box-shadow:10px 10px 10px rgba(0, 0, 0, 0.853);
    border-radius: 10px;
}
.ludo-board > div{
    box-shadow: 0 0 0 .4px rgba(0, 0, 0, 0.936);
    transition: background-color .3s ease-in-out;
    color: transparent;
    background-color: white;
    pointer-events: none;
    display: grid;
    place-items: center;
    font-size: 18px;
}
.ludo-board > div>ion-icon{
    color: black;
}

.ludo-board .home-base{
    grid-row: span 6;
    grid-column: span 6;
    display: grid;
    place-items: center;
}
.ludo-board .home-base p{
    font-family: serif;
    color: black;
}
.ludo-board .home-base .base{
    width: 70%;
    height: 70%;
    display: grid;
    background-color: white;
    grid-template-columns: repeat(2,1fr);
    grid-template-rows: repeat(2,1fr);
}
.ludo-board .home-base .base>div{
    transform: scale(.45);
    border-radius: 100%;
    display: grid;
    place-items: center;
}

.ludo-board .home-base.red, 
.ludo-board .home-base.red .base>div,
.red{
    background-color: var(--RED) !important;
}
.ludo-board .home-base.green, 
.ludo-board .home-base.green .base>div,
.green{
    background-color: var(--GREEN) !important;
}
.ludo-board .home-base.blue, 
.ludo-board .home-base.blue .base>div,
.blue{
    background-color: var(--BLUE) !important;
}
.ludo-board .home-base.yellow, 
.ludo-board .home-base.yellow .base>div,
.yellow{
    background-color: var(--YELLOW) !important;
}
.ludo-board .home-base.red,
.ludo-board .home-base.green,
.ludo-board .home-base.blue,
.ludo-board .home-base.yellow{
    border: 3px solid transparent;
}


.ludo-board .home-base.red.Active,
.ludo-board .home-base.green.Active,
.ludo-board .home-base.blue.Active,
.ludo-board .home-base.yellow.Active{
    animation: blink 2s ease-in-out infinite;    
}

@keyframes blink {
    0%{
        border: 3px solid transparent;
        filter: contrast(100%) brightness(100%);
    }
    50%{
        filter: contrast(90%) brightness(70%);
        border: 3px solid rgb(0, 0, 0);
    }
    100%{
        border: 3px solid transparent;
        filter: contrast(100%) brightness(100%);
    }
}


.winner-base{
    grid-row: span 3;
    grid-column: span 3;
    overflow: hidden;
    border: 1px solid black;
}
.winner-base .win{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    grid-template-rows: repeat(2,1fr);
    transform: rotate(45deg) scale(1.5);
    background-color: black;
}
.winner-base .win div{
    box-shadow: 0px 0px 1px black;
}
.selected-player{
    width: 7px;
    height: 7px;
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgb(0, 0, 0);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0) !important;
    border-top: 1.5px solid rgba(255, 255, 255, 0) !important;
    animation: spin-select 1s linear infinite;
}

@keyframes spin-select {
    from{
        transform: rotate(0deg) scale(1.2);
    }
    to{
        transform: rotate(360deg) scale(1.2);
    }
}
.player{
    height: fit-content;
    width: 27px;
    cursor: pointer;
    position: absolute;
    z-index: 30;
    gap: 20px;
}
.player .player_image{
    width: 100%;
    filter: drop-shadow(2px 2px 1px black);
}
.player.jump{
    transform: scale(1.1) !important;
    z-index: 50;
}
.dice-throw{
    cursor: pointer;
    background-color: red;
    height: 100px;
    width: 100px;
    position: absolute;
    z-index: 30;
    right: 80px;
    bottom: 40px;
    border-radius: 100%;
    border: 5px solid rgb(255, 255, 255);
    display: grid;
    place-items: center;
}
.dice-throw .the-dice{
    height: 60px;
    width: 60px;
    background-color: white;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.dice-throw .the-dice >img{
    width: 90%;
}
.dice-throw >.the-dice.Spin{
    animation: dicespin .01s linear 100;
}
.win-image{
    position: absolute;
    background-image: url(Images/Other/Winner1.png);
    background-position: center;
    display: none;
    background-size: cover;
    z-index: 50;

}

.results-main{
    display: none;
    place-items: center;
    z-index: 99;
    backdrop-filter: blur(10px);
    position: absolute;
    width: 100%;
    height: 100%;
}
.results{
    display: flex;
    align-items: center;
    justify-content: baseline;
    flex-direction: column;
    font-family: sans-serif;
    font-weight: 400;
    height: fit-content;
    padding: 10px 20px 30px 20px;
    width: 250px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 10px 10px 20px black;
}
.results>h5{
    font-size: 30px;
    margin: 10px;
}
.the-result{
    width: 90%;
    border-collapse: collapse;
}
.the-result tr{
    height: 45px;
    border-bottom: 4px solid black;
}
.the-result tr td{
    text-align: end;
}
.the-result tr td:nth-child(2){
    text-align: left;
    padding-left: 20px;
}
.the-result tr td p{
    margin: 0;
}
.the-result tr td img{
    height: 20px;
    margin-right: 8px;
    margin-bottom: -4px;
}
.Player-Create{
    font-family: sans-serif;
    gap: 10px;
    width: 100%;
    height: 100%;
    background-color: rgb(15, 199, 255);
    position: absolute;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.create-menu{
    display: flex;
    align-items: center;
    justify-content: baseline;
    flex-direction: column;
    border-radius: 10px;
    width: 300px;
    height: fit-content;
    background-color: white;
    padding: 10px;
    box-shadow: 5px 5px 0px rgb(5, 81, 135);
}
.create-menu h2{
    margin: 0;
    font-size: 20px;
    height: 40px;
    display: grid;
    place-items: center;
}
.selecter-main{
    width: 90%;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: baseline;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}
.number-player{
    width: 90%;
    padding: 10px;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.number-player>button{
    cursor: pointer;
    width: 75px;
    height: 24px;
    border: 1.5px solid black;
    border-radius: 3px;
    background-color: rgb(218, 247, 255);
    box-shadow: 2px 2px 0px black;
}
.number-player>button:hover{
    background-color: white;
}
.selecter-main >div{
    width: fit-content;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.selecter-main >div>div{
    height: 100%;
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 19px;
}
.select-image{
    cursor: pointer;
    height: 100%;
    transition: all .2s ease-in-out;
}
.select-image.Select{
    transform: scale(1.35);
    filter: drop-shadow(1px 1px 0px black);
}
.selecter-main >div>input{
    height: 100%;
    width: 120px;
    margin: 0;
    padding: 0;
    border: none;
    text-align: center;
    border: 1.3px solid black;
    border-radius: 14px;
}
.selecter-main >div>input:focus {
    outline: none;
    border: 1.3px solid black;
}
.play_game{
    width: 300px;
    border-radius: 5px;
    border: none;
    height: 25px;
    cursor: pointer;
    box-shadow: 5px 5px 0px rgb(5, 81, 135);
}
.play_game:hover{
    background-color: rgb(212, 212, 212);
}
@keyframes dicespin {
    from{
        transform: rotateY(0deg);
    }
    to{
        transform: rotateY(360deg);
    }
    
}

@media (max-width:600px),(max-height:700px) {
    .ludo-board{
        height: 330px;
        width: 330px;
    }
    .player{
        width: 16px;
    }
    .player .player_image{
        filter: drop-shadow(1px 1px 1px black);
    }
    .ludo-board .home-base p{
        font-size: 10px;
    }
    .ludo-board > div{
        font-size: 12px;
    }
    
}
@media (max-width:1000px){
    .dice-throw{
        transform: scale(.9);
        bottom: 10px;
        left: calc(50vw - 55px);
    }
}

@media (max-width: 361px) and (max-height: 560px) {
    .dice-throw{
        transform: scale(.7);
        bottom: -5px;
    }
    
}

