body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-image: url('https://i.pinimg.com/736x/ce/3e/aa/ce3eaae4075199a4b26401742612cb72.jpg');
    background-size: cover; /* Ensures the image covers the entire background */
    background-position: center; /* Centers the image */
    background-attachment: fixed; /* Makes the background image stay in place while scrolling */
    margin: 0;
    padding: 0;
    color: #fff; /* Optional: Adjust text color for better contrast against the background */
}

h1 {
    margin-top: 20px;
    font-size: 2rem;
    color: #fff; /* Text color change for contrast against the background */
}

#game {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    gap: 5px;
    justify-content: center;
    margin: 20px auto;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8); /* Slight transparency to allow background to be visible */
    border: 2px solid #aaa;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

button {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    background-color: #003f8a;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.cell {
    width: 40px;
    height: 40px;
    background-color: #ccc;
    border: 1px solid #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cell:hover {
    background-color: #bbb;
    transform: scale(1.05);
}

.cell.revealed {
    background-color: #eee;
    cursor: default;
    color: #333;
}

.cell.revealed:hover {
    transform: none;
}

.cell.bomb {
    position: relative;
}

.cell.bomb::after {
    content: "💣"; /* Bomb emoji */
    font-size: 20px;
    display: block;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cell.revealed.bomb::after {
    opacity: 1;
    transform: scale(1.5); /* Bomb expands during reveal */
    animation: bombExplosion 0.6s ease forwards;
}

@keyframes bombExplosion {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

button {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    background-color: #003f8a;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
