* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

body {
    background-color: #030308;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 10px;
}

/* Menu Inicial */
.menu-box {
    background: #0b0b16;
    border: 2px solid #00f3ff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.3);
    max-width: 350px;
    width: 100%;
}

.menu-box h1 { font-size: 2rem; margin-bottom: 10px; text-shadow: 0 0 10px #00f3ff; }
.highlight { color: #ff0055; text-shadow: 0 0 10px #ff0055; }
.menu-box p { color: #aaa; margin-bottom: 20px; font-size: 0.9rem; }

.menu-box button, .controls-area button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(45deg, #00f3ff, #ff00ff);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.menu-box button:active, .controls-area button:active { transform: scale(0.96); }

/* Jogo */
.game-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
}

.header h2 { font-size: 1.1rem; text-shadow: 0 0 8px #00f3ff; }

.board-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    border: 3px solid #00f3ff;
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.4);
    padding: 4px;
}

/* TABULEIRO COM A IMAGEM LUDO.JPG */
.board {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('ludo.jpg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
}

/* Células invisíveis alinhadas ao centro exato de cada casa */
.cell {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Container de Empilhamento Centralizado para evitar desalinhamento */
.cell-stack {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 1px;
}

/* Peões Neon Estilizados e Ajustados */
.pawn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.15s;
    flex-shrink: 0;
}

.pawn:hover { transform: scale(1.3); }

.green-pawn { background: #00ff66; box-shadow: 0 0 8px #00ff66; }
.red-pawn { background: #ff0055; box-shadow: 0 0 8px #ff0055; }
.yellow-pawn { background: #ffcc00; box-shadow: 0 0 8px #ffcc00; }
.magenta-pawn { background: #ff00ff; box-shadow: 0 0 8px #ff00ff; }

/* DADO 3D REALISTA EM NEON */
.controls-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dice-scene {
    width: 50px;
    height: 50px;
    perspective: 400px;
    cursor: pointer;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.cube-face {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #0d0d1a;
    border: 2px solid #00f3ff;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.4), 0 0 8px rgba(0, 243, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff, 0 0 8px #00f3ff;
    display: inline-block;
}

.dot-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

/* Posições das Faces 3D */
.face-1 { transform: rotateY(0deg) translateZ(25px); }
.face-2 { transform: rotateY(90deg) translateZ(25px); }
.face-3 { transform: rotateY(180deg) translateZ(25px); }
.face-4 { transform: rotateY(-90deg) translateZ(25px); }
.face-5 { transform: rotateX(90deg) translateZ(25px); }
.face-6 { transform: rotateX(-90deg) translateZ(25px); }

#status-msg { font-size: 0.85rem; color: #aaa; text-align: center; height: 16px; }