/* Estilos específicos del Buscaminas */

.game-controls {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.difficulty-selector label {
    color: var(--text-secondary);
    font-weight: 500;
}

.difficulty-select {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--surface-light);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-select:hover {
    border-color: var(--primary-color);
}

.difficulty-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.game-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-value {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: center;
}

#mine-count {
    color: var(--danger);
}

#timer {
    color: var(--primary-color);
}

.game-status {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    font-weight: 600;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-status.win {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 2px solid var(--success);
}

.game-status.lose {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 2px solid var(--danger);
}

.game-status.hidden {
    display: none;
}

.board-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 1rem 0;
}

.game-board {
    display: inline-grid;
    gap: 2px;
    background: var(--surface-light);
    padding: 2px;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
}

.cell {
    width: 30px;
    height: 30px;
    background: var(--surface);
    border: 2px outset var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    position: relative;
}

.cell:hover:not(.revealed):not(.flagged) {
    background: var(--surface-light);
    transform: scale(0.95);
}

.cell.revealed {
    background: var(--background);
    border: 1px solid var(--surface-light);
    border-style: inset;
    cursor: default;
}

.cell.flagged {
    background: var(--surface);
}

.cell.flagged::before {
    content: "🚩";
    font-size: 1.2rem;
}

.cell.mine {
    background: var(--danger);
}

.cell.mine::before {
    content: "💣";
    font-size: 1.2rem;
}

.cell.exploded {
    background: var(--danger);
    animation: explode 0.3s ease;
}

@keyframes explode {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.cell.number-1 { color: #3b82f6; }
.cell.number-2 { color: #10b981; }
.cell.number-3 { color: #ef4444; }
.cell.number-4 { color: #7c3aed; }
.cell.number-5 { color: #f59e0b; }
.cell.number-6 { color: #ec4899; }
.cell.number-7 { color: #000000; }
.cell.number-8 { color: #6b7280; }

/* Responsive */
@media (max-width: 768px) {
    .game-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .difficulty-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .game-stats {
        justify-content: space-around;
    }

    .cell {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }

    .board-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .cell {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
}

/* Animación de revelación */
.cell.revealing {
    animation: reveal 0.2s ease;
}

@keyframes reveal {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

