/* Styles.css */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
}

.board {
    display: inline-block;
    margin: 20px;
}

.cell {
    width: 30px;
    height: 30px;
    border: 1px solid #8b25b3;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    font-size: 20px;
    cursor: pointer;
    background-color: #c538fd; 
    color: #333; 
    transition: all 0.1s ease;
}

/* Press effect for clickable cells only */
.cell:not(.inactive):not(.revealed):hover {
    transform: translateY(1px);
}

.cell:not(.inactive):not(.revealed):active {
    transform: translateY(2px);
}

.revealed {
    background-color: #5f2d85; 
    color: #ffffff;
}

.cell.inactive {
    cursor: default;
    background-color: #5f2d85;
}

.cell.mine {
    background-color: #ff1a1a;
    color: #fff;
    position: relative; /* needed for glow layering */
}

/* Bomb glow for game over (halved intensity) */
.cell.mine.glow {
    animation: neonPulse 1s infinite alternate;
}

/* Slightly less intense pulsing glow */
@keyframes neonPulse {
    0% {
        box-shadow:
            0 -3px 6px #ff3333,
            3px 0 6px #ff3333,
            0 3px 6px #ff3333,
            -3px 0 6px #ff3333;
    }
    50% {
        box-shadow:
            0 -6px 12px #ff4d4d,
            6px 0 12px #ff4d4d,
            0 6px 12px #ff4d4d,
            -6px 0 12px #ff4d4d;
    }
    100% {
        box-shadow:
            0 -3px 6px #ff3333,
            3px 0 6px #ff3333,
            0 3px 6px #ff3333,
            -3px 0 6px #ff3333;
    }
}

/* Reset button styling */
.reset-button {
    background-color: #ffcc00;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    text-transform: lowercase;
    border: 1px solid #8b25b3;
    user-select: none;
    width: 62px; 
    height: 30px;
}

#gameBoard {
    display: inline-block;
    margin: 0 auto;
    vertical-align: center;
}

/* Game over / bomb popup - no glow */
.game-popup {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #c538fd;
    color: #000000;
    padding: 10px 20px;
    border: 2px solid #8b25b3;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 220px;
    box-shadow: 0 0 5px #8b25b3; /* subtle shadow only */
}

.game-popup .close-popup {
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}
