* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    height:100vh;
    
}

#main {
    margin:30%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    background: linear-gradient(45deg, #fdfdfd, #e9e4f0);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.929);
    
   

}

#board {
    border: 5px solid #3333335b;
    border-radius: 15px;
    width: 560px;
    height: 560px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

#row1, #row2, #row3 {
    display: flex;
    width: 100%;
}

#row1, #row3 {
    height: 40%;
}

#row2 {
    height: 20%;
}

#green, #yellow, #red, #blue {
    width: 40%;
    padding: 20px;
}

#green {
    background: radial-gradient(circle, rgba(0, 128, 0, 1) 0%, rgba(50, 205, 50, 1) 100%);
}

#yellow {
    background: radial-gradient(circle, rgba(255, 255, 0, 1) 0%, rgba(255, 215, 0, 1) 100%);
}

#red {
    background: radial-gradient(circle, rgba(255, 0, 0, 1) 0%, rgba(255, 99, 71, 1) 100%);
}

#blue {
    background: radial-gradient(circle, rgba(0, 0, 255, 1) 0%, rgba(135, 206, 250, 1) 100%);
}

.inner {
    border-radius: 20px;
    background-color: white;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

#upper, #lower {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 5%;
}

.g_green, .g_yellow, .g_red, .g_blue {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10%;
    width: 100%;
    height: 100%;
    margin-right: 10%;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.g_green:hover, .g_yellow:hover, .g_red:hover, .g_blue:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#green_move, #blue_move {
    width: 40%;
    height: 100%;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: repeat(6, 1fr);
}

#yellow_move, #red_move {
    width: 20%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.box {
    width: 100%;
    height: 100%;
    border: 1px solid #333;
    transition: background-color 0.3s, transform 0.3s;
}

.box:hover {
    transform: scale(1.1);
}

.box-y {
    background-color: rgba(255, 255, 0, 0.7);
}

.box-g {
    background-color: rgba(0, 128, 0, 0.7);
}

.box-b {
    background-color: rgba(0, 0, 255, 0.7);
}

.box-r {
    background-color: rgba(255, 0, 0, 0.7);
}

#multicolor {
    width: 20%;
    height: 100%;
    display: flex; /* Resetting margins and paddings */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    body {
        background-color: #f0f8ff;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }

    #main {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px;
        background: linear-gradient(45deg, #d3cce3, #e9e4f0);
        border-radius: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        max-width: 90vw;
        max-height: 90vh;
        overflow: hidden;
    }

    #board {
        border: 5px solid #333;
        border-radius: 15px;
        width: 100%;
        max-width: 700px;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        overflow: hidden;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    }

    #row1, #row2, #row3 {
        display: flex;
        width: 100%;
    }

    #row1, #row3 {
        height: auto;
        flex: 2 1 40%;
    }

    #row2 {
        height: auto;
        flex: 1 1 20%;
    }

    #green, #yellow, #red, #blue {
        flex: 1 1 40%;
        padding: 10px;
    }

    #green {
        background: radial-gradient(circle, rgba(0, 128, 0, 1) 0%, rgba(50, 205, 50, 1) 100%);
    }

    #yellow {
        background: radial-gradient(circle, rgba(255, 255, 0, 1) 0%, rgba(255, 215, 0, 1) 100%);
    }

    #red {
        background: radial-gradient(circle, rgba(255, 0, 0, 1) 0%, rgba(255, 99, 71, 1) 100%);
    }

    #blue {
        background: radial-gradient(circle, rgba(0, 0, 255, 1) 0%, rgba(135, 206, 250, 1) 100%);
    }

    .inner {
        border-radius: 20px;
        background-color: white;
        height: 100%;
        width: 100%;
        display: flex;
        justify-content: space-evenly;
        flex-direction: column;
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    }

    #upper, #lower {
        display: flex;
        width: 100%;
        height: 100%;
        padding: 5%;
    }

    .g_green, .g_yellow, .g_red, .g_blue {
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 10%;
        width: 100%;
        height: 100%;
        margin-right: 10%;
        transition: transform 0.3s, box-shadow 0.3s;
        cursor: pointer;
    }

    .g_green:hover, .g_yellow:hover, .g_red:hover, .g_blue:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    #green_move, #blue_move {
        flex: 1 1 40%;
        display: grid;
        grid-template-rows: repeat(3, 1fr);
        grid-template-columns: repeat(6, 1fr);
    }

    #yellow_move, #red_move {
        flex: 1 1 20%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .box {
        width: 100%;
        height: 100%;
        border: 1px solid #333;
        transition: background-color 0.3s, transform 0.3s;
    }

    .box:hover {
        transform: scale(1.1);
    }

    .box-y {
        background-color: rgba(255, 255, 0, 0.7);
    }

    .box-g {
        background-color: rgba(0, 128, 0, 0.7);
    }

    .box-b {
        background-color: rgba(0, 0, 255, 0.7);
    }

    .box-r {
        background-color: rgba(255, 0, 0, 0.7);
    }

    #multicolor {
        flex: 1 1 20%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: conic-gradient(red, yellow, green, blue);
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }


    #out {
        margin-top: 20px;
        padding: 10px;
        border: 2px dashed #333;
        border-radius: 15px;
        background-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        text-align: center;
        width: 90%;
    }

    @media (max-width:900px) {
        #board {
            width: 100%;
            height: auto;
            border: none;
        }

        .inner {
            padding: 5px;
        }

        #die {
            width: 60px;
            height: 60px;
        }

        .box {
            border: none;
        }

        #out {
            width: 100%;
            padding: 5px;
        }
        
        
        
        
    }
    justify-content: center;
    align-items: center;
    background: conic-gradient(red, yellow, green, blue);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#dice {
    display: inline-block;
    margin-left: 20px;
}

#die {
    border-radius: 10px;
    border-style: hidden;
    cursor: pointer;
    
}

#die:hover {
    transition: transform 0.3s, box-shadow 0.3s;
}
#die:active{
    transform: rotate(360deg) scale(1.2);
    
    
}
#die img{
    width:100px;
    box-shadow: 0 10px 25px rgb(0, 0, 0);
    border-radius: 10px;
}

#b1, #b2, #b3, #b4,
#g1, #g2, #g3, #g4,
#y1, #y2, #y3, #y4,
#r1, #r2, #r3, #r4 {
    border: 1px solid #333;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); 
    border-radius: 50%;
    width: 90%;
    height: 90%;
    margin: auto;
    cursor: pointer;
}

#b1, #b2, #b3, #b4 {
    
    background-image: linear-gradient(blue, rgb(0, 110, 255));
    
}

#g1, #g2, #g3, #g4 {
    background-image: linear-gradient(green, rgb(94, 255, 0));
}

#y1, #y2, #y3, #y4 {
    background-image: linear-gradient(yellow, rgb(255, 166, 0));
}

#r1, #r2, #r3, #r4 {
    background-image: linear-gradient(red, rgb(255, 191, 172));
}

#b1:hover, #b2:hover, #b3:hover, #b4:hover,
#g1:hover, #g2:hover, #g3:hover, #g4:hover,
#y1:hover, #y2:hover, #y3:hover, #y4:hover,
#r1:hover, #r2:hover, #r3:hover, #r4:hover {
    animation: border-blink .7s infinite ease-in-out;
    
    
}
#b1:active, #b2:active, #b3:active, #b4:active,
#g1:active, #g2:active, #g3:active, #g4:active,
#y1:active, #y2:active, #y3:active, #y4:active,
#r1:active, #r2:active, #r3:active, #r4:active {
    
   
    
    
}

#multicolor {
    width: 20%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    
}
/* #multicolor:active{
    animation: spin 1s infinite linear;
} */


.triangle-up {
    width: 0;
    height: 0;
    border-left: 9.5vh solid green;
    border-right: 9.5vh solid blue;
    border-bottom:9.5vh solid red;
    border-top: 9.5vh solid yellow;
    position: absolute;
    z-index: 2;
    
}

@keyframes border-blink {
    50% {
        border-color: rgba(255, 255, 255, 0);
    }
    70%{
        border-color: rgba(255, 255, 255, 0);
        
    }
}
@keyframes spin {
    0% {
        transform: translate(50%, 50%) rotate(0deg);
    }
    50% {
        transform: translate(50%, 50%) rotate(180deg) scale(1.4);
    }
    100% {
        transform: translate(50%, 50%) rotate(360deg);
    }
}
@media (max-width:980px) {

    body {
        background-color: #f0f8ff;
        display: flex;
        justify-content: center;
        align-items: center;
        height:10vh;
        padding:50vh;
        margin-top:90px;
        
    }
    
    #main {
        margin:30%;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
        background: linear-gradient(45deg, #fdfdfd, #e9e4f0);
        border-radius: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.929);
        padding: 100px;
        display: block;
        
    }
    
    #board {
        border: 5px solid #333333a3;
        border-radius: 15px;
        width:790px;
        height:790px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.725);
    }
    #dice {
        padding-top: 20px;
        justify-items: center;
        padding-left:330px;
        
    }
    .triangle-up {
        width: 0;
        height: 0;
        border-left: 9.8vh solid green;
        border-right: 9.8vh solid blue;
        border-bottom:9.8vh solid red;
        border-top: 9.8vh solid yellow;
        position: absolute;
        z-index: 2;
        
    }
}