@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --red: #fa0000;
    --green: #009a2a;
    --yellow: #fee800;
    --blue: #00acff;
}

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

body{
    background: radial-gradient(circle, rgba(11,64,177,1) 0%, rgba(7,30,78,1) 100%);
}

.ludoContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    width: 100%;
    height: 100vh;
}


#ludoBoard {
    max-width: 500px;
    max-height: 500px;
    width: 100%;
    height: 100%;
    background: #fff;
    display: grid;
    grid-template-areas:
        'red-Board red-Board green-Path green-Board green-Board'
        'red-Board red-Board green-Path green-Board green-Board'
        'red-Path red-Path win-Zone yellow-Path yellow-Path'
        'blue-Board blue-Board blue-Path yellow-Board yellow-Board'
        'blue-Board blue-Board blue-Path yellow-Board yellow-Board';
}

/* Board */
#red-Board {
    grid-area: red-Board;
    background-color: var(--red);
}

#yellow-Board {
    grid-area: yellow-Board;
    background-color: var(--yellow);
}

#blue-Board {
    grid-area: blue-Board;
    background-color: var(--blue);
}

#green-Board {
    grid-area: green-Board;
    background-color: var(--green);
}

/* Path */
#green-Path {
    grid-area: green-Path;
}

#blue-Path {
    grid-area: blue-Path;
}

#yellow-Path {
    grid-area: yellow-Path;
}

#red-Path {
    grid-area: red-Path;
}

#win-Zone {
    grid-area: win-Zone;
}


.verticalPath {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(6, 1fr);
}

.horizontalPath {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
}


.board {
    padding: 12px;
    background: #1212;
    display: flex;
    justify-content: center;
    align-items: center;
}

.board div {
    width: 80%;
    height: 80%;
    background: white;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    justify-items: center;
}

.board div span {
    width: 50%;
    height: 50%;
    border-radius: 50%;
    position: relative;
}


#yellow-Board div span {
    background: var(--yellow);
}

#blue-Board div span {
    background: var(--blue);
}

#red-Board div span {
    background: var(--red);
}

#green-Board div span {
    background: var(--green);
}

.ludoBox {
    border: 1px solid #11111142;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ludoBox .fa-location-pin{
    position: absolute;
    margin: 2px;
    font-size: 2rem;
    transform: translate(0, -40%);
    -webkit-text-stroke-width: 2px;
    z-index: 100;
    animation: animateMyI .08s linear;
    -webkit-text-stroke-color: rgb(255, 255, 255);
}

.ludoBox .fa-star{
    position: absolute;
    color: #222;
    opacity: .6;
}

@keyframes animateMyI {
    0%{
        transform: scale(1.1) translate(0, -40%);
    }
    100%{
        transform: scale(1) translate(0, -40%);
    }
}

.ludoBox .fa-location-pin:nth-child(2){
    transform: translate(10px, -40%);
}

.ludoBox .fa-location-pin:nth-child(3){
    transform: translate(-10px, -40%);
}

.ludoBox .fa-location-pin:nth-child(4){
    transform: translate(0px, -40%) scale(0.8);
}

.redLudoBox {
    background: var(--red);
}

.greenLudoBox {
    background: var(--green);
}

.yellowLudoBox {
    background: var(--yellow);
}

.blueLudoBox {
    background: var(--blue);
}


.board .piece {
    position: absolute;
    -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: rgb(255, 255, 255);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -90%);
    font-size: 2.3rem;
    z-index: 100;
}

.board.active{
    animation: animateBoard .8s linear infinite;
}

@keyframes animateBoard {
    0% {
        filter:brightness(1.4);
    }

    50% {
        filter: brightness(1);
    }

    100% {
        filter: brightness(1.4);
    }
}


.red-piece {
    color: var(--red);
}

.yellow-piece {
    color: var(--yellow);
}

.green-piece {
    color: var(--green);
}

.blue-piece {
    color: var(--blue);
    z-index: 100;
}


.blue-piece::after{
    content: attr(myPieceNum);
    font-weight: 600;
    font-size: 9px;
    color: white;
    background: #00acff;
    border-radius: 50%;
    padding: 3px;
    -webkit-text-stroke-width: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 2px);
}


.rollingDice{
    color: white;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
}

.rollingDice button{
    margin-top: 10px;
    border-radius: 4px;
    outline: none;
    background: white;
    color: #111;
    border: none;
    font-family: 'Poppins';
    cursor: pointer;
    font-size: 1rem;
}

.rollingDice img{
    max-width: 120px;
    border-radius: 14px;
    margin-top: 12px;
    background: #111;
}


#declaredWinner{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    z-index: 9999;
    color: white;
    font-family: 'Poppins';
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas{
    z-index: 99999 !important;
}

#declaredWinner div{
    width: 550px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9999 !important;
    justify-content: center;
    border-radius: 6px;
    padding: 20px 10px;
}

#declaredWinner div button{
    padding: 8px 8px;
    font-family: 'Poppins';
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #2b2b2b;
    color: white;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
}


#homePage{
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 111;
    background: radial-gradient(circle, rgba(11,64,177,1) 0%, rgba(7,30,78,1) 100%);
    color: white;
    font-family: 'Roboto';
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#homePage h1{
    text-transform: uppercase;
    margin: 20px;
    font-size: 3rem;
}

#homePage button{
    border: 1px solid white;
    border-radius: 6px;
    padding: 6px 12px;
    background: transparent;
    color: white;
    margin: 0 12px;
    font-size: 22px;
    cursor: pointer;
}

#homePage button:hover{
    background: #00acff;
    border-color: #00acff;
}

#cp{
    position: absolute;
    bottom: 8px;
    left: 50%;
    z-index: 1000;
    color: white;
    font-family: 'Poppins';
    transform: translateX(-50%);
}