/* Ludo King Style CSS */

/* Game Board Styles */
.ludo-board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    gap: 1px;
    background-color: #8B4513; /* Brown wooden background */
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 6px solid #5D3A1A; /* Darker brown border */
}

.ludo-cell {
    width: 100%;
    height: 100%;
    background-color: #fff;
    position: relative;
    border: 1px solid #ddd;
}

/* Home areas with more vibrant colors */
.ludo-cell.home-area.red { 
    background: linear-gradient(135deg, #ff3333 0%, #ff6666 100%);
    border: 1px solid #ff0000;
}
.ludo-cell.home-area.green { 
    background: linear-gradient(135deg, #33cc33 0%, #66ff66 100%);
    border: 1px solid #00cc00;
}
.ludo-cell.home-area.yellow { 
    background: linear-gradient(135deg, #ffcc00 0%, #ffff66 100%);
    border: 1px solid #ffcc00;
}
.ludo-cell.home-area.blue { 
    background: linear-gradient(135deg, #3333ff 0%, #6666ff 100%);
    border: 1px solid #0000ff;
}

/* Path cells with texture */
.ludo-cell.path {
    background-color: #f5f5f5;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.4' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    border: 1px solid #ddd;
}

/* Home path cells with more vibrant colors */
.ludo-cell.home-path.red { 
    background: linear-gradient(135deg, #ffcccc 0%, #ffdddd 100%);
    border: 1px solid #ffaaaa;
}
.ludo-cell.home-path.green { 
    background: linear-gradient(135deg, #ccffcc 0%, #ddffdd 100%);
    border: 1px solid #aaffaa;
}
.ludo-cell.home-path.yellow { 
    background: linear-gradient(135deg, #ffffcc 0%, #ffffdd 100%);
    border: 1px solid #ffffaa;
}
.ludo-cell.home-path.blue { 
    background: linear-gradient(135deg, #ccccff 0%, #ddddff 100%);
    border: 1px solid #aaaaff;
}

/* Home center with more vibrant gradient */
.ludo-cell.home-center {
    background: linear-gradient(135deg, 
        rgba(255, 51, 51, 0.7) 0%, 
        rgba(51, 204, 51, 0.7) 25%, 
        rgba(255, 204, 0, 0.7) 50%, 
        rgba(51, 51, 255, 0.7) 75%);
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Star cells with better styling */
.ludo-cell.star::after {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFD700; /* Gold color */
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    font-size: 1em;
}

/* Piece styling with 3D effect */
.ludo-piece {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    position: absolute;
    top: 15%;
    left: 15%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 -3px 8px rgba(0, 0, 0, 0.2), inset 0 3px 8px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

/* Piece colors with gradients for 3D effect */
.ludo-piece.red { 
    background: radial-gradient(circle at 30% 30%, #ff6666, #ff0000);
    border: 2px solid #cc0000;
}
.ludo-piece.green { 
    background: radial-gradient(circle at 30% 30%, #66ff66, #00cc00);
    border: 2px solid #009900;
}
.ludo-piece.yellow { 
    background: radial-gradient(circle at 30% 30%, #ffff66, #ffcc00);
    border: 2px solid #cc9900;
}
.ludo-piece.blue { 
    background: radial-gradient(circle at 30% 30%, #6666ff, #0000ff);
    border: 2px solid #0000cc;
}

/* Hover and active states */
.ludo-piece:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 -3px 8px rgba(0, 0, 0, 0.2), inset 0 3px 8px rgba(255, 255, 255, 0.5);
}

.ludo-piece.active {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000, 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Dice styling with 3D effect */
.ludo-dice-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

.ludo-dice {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), inset 0 -3px 8px rgba(0, 0, 0, 0.1), inset 0 3px 8px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid #ddd;
    color: #333;
}

.ludo-dice:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 -3px 8px rgba(0, 0, 0, 0.1), inset 0 3px 8px rgba(255, 255, 255, 0.5);
}

.ludo-dice.rolling {
    animation: ludo-dice-roll 0.5s infinite;
}

@keyframes ludo-dice-roll {
    0% { transform: rotate(0deg) scale(1.1); }
    25% { transform: rotate(90deg) scale(1.15); }
    50% { transform: rotate(180deg) scale(1.1); }
    75% { transform: rotate(270deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1.1); }
}

/* Player info styling */
.ludo-player-info {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.ludo-player-info.red { color: #ff0000; border: 2px solid #ff0000; }
.ludo-player-info.green { color: #00cc00; border: 2px solid #00cc00; }
.ludo-player-info.yellow { color: #ffcc00; border: 2px solid #ffcc00; }
.ludo-player-info.blue { color: #0000ff; border: 2px solid #0000ff; }

/* Dice dots styling */
.ludo-dice[data-value="1"]::after,
.ludo-dice[data-value="2"]::after,
.ludo-dice[data-value="3"]::after,
.ludo-dice[data-value="4"]::after,
.ludo-dice[data-value="5"]::after,
.ludo-dice[data-value="6"]::after {
    content: '';
    position: absolute;
}

.ludo-dice[data-value="1"]::after {
    content: '⚀';
    font-size: 2.5rem;
    color: #333;
}

.ludo-dice[data-value="2"]::after {
    content: '⚁';
    font-size: 2.5rem;
    color: #333;
}

.ludo-dice[data-value="3"]::after {
    content: '⚂';
    font-size: 2.5rem;
    color: #333;
}

.ludo-dice[data-value="4"]::after {
    content: '⚃';
    font-size: 2.5rem;
    color: #333;
}

.ludo-dice[data-value="5"]::after {
    content: '⚄';
    font-size: 2.5rem;
    color: #333;
}

.ludo-dice[data-value="6"]::after {
    content: '⚅';
    font-size: 2.5rem;
    color: #333;
}

/* Game controls styling */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.game-controls button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.game-controls button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.game-controls button:disabled {
    background: linear-gradient(135deg, #cccccc 0%, #bbbbbb 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Game container */
#ludo-container {
    margin: 0 auto;
    max-width: 100%;
    position: relative;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ludo-cell.star::after {
        font-size: 0.8em;
    }
    
    .ludo-dice {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .ludo-player-info {
        font-size: 1rem;
        padding: 6px 12px;
    }
}