/* Snake and Ladders Game Styles */

.main-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.board-container {
    background: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
}

.board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 5px;
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
    aspect-ratio: 1;
}

.cell {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    min-height: 60px;
    padding: 5px;
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cell.snake {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #e74c3c;
}

.cell.ladder {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #27ae60;
}

.cell.start {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: var(--warning-color);
    font-weight: 700;
}

.cell.finish {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: var(--primary-color);
    font-weight: 700;
}

.snake-icon, .ladder-icon {
    font-size: 1.8rem;
    margin-bottom: 2px;
}

.cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
}

.destination-text {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.players-on-cell {
    position: absolute;
    bottom: 4px;
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.player-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard {
    background: var(--card-background);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.action-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.current-player-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.dice-display {
    font-size: 3.5rem;
    animation: none;
}

.dice-display.rolling {
    animation: dice-roll 0.5s ease-in-out;
}

@keyframes dice-roll {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(90deg) scale(1.2); }
    50% { transform: rotate(180deg) scale(0.8); }
    75% { transform: rotate(270deg) scale(1.2); }
}

.action-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.player-card {
    background: var(--card-background);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
}

.player-card.active {
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.player-card.winner {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
}

.player-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-marker-preview {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-position {
    font-size: 1rem;
    color: var(--text-muted);
}

.position-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.winner-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 8px;
}

/* Online Info */
.online-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.opponent-name {
    font-weight: 600;
    color: var(--text-muted);
}

/* My card highlight for online */
.player-card.my-card {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

/* Game Buttons */
.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .board {
        max-width: 100%;
        gap: 3px;
        padding: 12px;
    }

    .cell {
        min-height: 30px;
        font-size: 0.65rem;
    }

    .cell-number {
        font-size: 0.55rem;
        top: 1px;
        left: 3px;
    }

    .snake-icon, .ladder-icon {
        font-size: 1rem;
    }

    .destination-text {
        font-size: 0.5rem;
    }

    .player-marker {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }

    .action-panel {
        flex-direction: column;
        gap: 15px;
    }

    .dice-display {
        font-size: 2.5rem;
    }

    .current-player-display {
        font-size: 1.1rem;
    }

    .board-container {
        padding: 15px;
    }
}
