body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
}

.container {
    text-align: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(10, 50px);
    grid-template-rows: repeat(10, 50px);
    gap: 1px;
    border: 2px solid #333;
    margin: 20px auto;
    background-color: #ccc; 
}

.cell {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    border: 1px solid #ccc;
    background-color: #f0f0f0; 
}

.cell:nth-child(even) {
    background-color: #e0e0e0; 
}

.cell:nth-child(4n) {
    background-color: rgb(255, 230, 0); 
}

.cell:nth-child(7n) {
    background-color: rgb(132, 255, 132); 
}

.cell:nth-child(11n) {
     background-color: rgb(255, 131, 131); 
}

.cell:nth-child(15n) {
    background-color: rgb(134, 134, 255); 
}

.player {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    background-color: red;
    z-index: 2; /* Ensure players are on top */
}

.player.player2 {
    background-color: blue;
}

.ladder {
    position: absolute;
    background: url('ladder.png');
    background-size: cover;
    z-index: 1; /* Place ladders behind players */
}

.snake {
    position: absolute;
    background: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M3.42857 1.71429C3.42857 1.71429 1.14286 6.28572 1.14286 11.4286C1.14286 16.5714 7.42857 18.2857 11.4286 18.2857C15.4286 18.2857 18.8571 14.8571 18.8571 9.71429C18.8571 4.57143 16.5714 1.71429 11.4286 1.71429C11.4286 1.71429 7.42857 1.71429 7.42857 1.71429C7.42857 1.71429 6.28571 4 3.42857 1.71429Z" fill="green"/%3E%3C/svg%3E');
    background-size: cover;
    z-index: 1; /* Place snakes behind players */
}

.controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
}

.dice-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#roll-dice {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

#dice-result {
    font-size: 20px;
    margin-top: 10px;
}

.player-info {
    display: flex;
    gap: 10px;
}

#current-player-indicator {
    margin-top: 10px;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(10, 30px);
        grid-template-rows: repeat(10, 30px);
    }

    .cell {
        width: 30px;
        height: 30px;
        font-size: 8px;
    }

    .player {
        width: 25px;
        height: 25px;
    }
}

#message-area {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 123, 255, 0.7); 
    color: white;
    padding: 10px 20px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000; 
}

#message-area.active {
    opacity: 1;
    visibility: visible;
}

.highlight {
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.8); /* Yellow glow */
}