body {
    font-family: 'Poppins', sans-serif;
    background: #f0f7ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}
.bungee-font {
    font-family: 'Bungee', cursive;
}
.game-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    width: clamp(320px, 90vw, 600px);
    height: clamp(320px, 90vw, 600px);
    border: 10px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    background-color: #cceeff;
    /* Add a border to the container to handle outer edges */
    border: 1px solid #a5f3fc;
}
.tile {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    font-weight: 600;
    font-size: clamp(0.6rem, 2vw, 1rem);
    color: #334155;
    position: relative;
    background-color: var(--bg-color);
    /* Add borders for the grid lines */
    border-right: 1px solid #a5f3fc;
    border-bottom: 1px solid #a5f3fc;
}
.tile:nth-child(odd) { --bg-color: #f0f9ff; }
.tile:nth-child(even) { --bg-color: #e0f2fe; }
.tile-number {
    padding: 2px 4px;
}
.snakes-ladders-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.snake, .ladder {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.3));
}
.player {
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.4s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    z-index: 10;
}
.player-token {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 4px 6px rgba(0,0,0,0.2);
    border: 2px solid white;
    position: relative;
    z-index: 11;
    transition: transform 0.3s ease;
}
.player.active .player-token {
    transform: scale(1.2);
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 4px 6px rgba(0,0,0,0.2), 0 0 20px var(--glow-color, #fff);
}
.player-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 5px;
}
.dice-container {
    perspective: 1000px;
}
#dice {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
}
.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #1e293b;
}
.front  { transform: rotateY(  0deg) translateZ(30px); }
.back   { transform: rotateY(180deg) translateZ(30px); }
.right  { transform: rotateY( 90deg) translateZ(30px); }
.left   { transform: rotateY(-90deg) translateZ(30px); }
.top    { transform: rotateX( 90deg) translateZ(30px); }
.bottom { transform: rotateX(-90deg) translateZ(30px); }

.modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.hidden {
    opacity: 0;
    visibility: hidden;
}
