/* General Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background: linear-gradient(to right, #1d2671, #c33764);
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px; /* Adds padding around the content */
}

/* Home, About, and Game Screen Headings */
#home-screen h1, #about-screen h1, #game-screen h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px; /* Adds spacing below headings */
}

#home-screen p, #about-screen p, #game-screen p {
    font-size: 20px;
    margin-bottom: 25px; /* Adds spacing below paragraphs */
}

/* Button Styles */
button {
    background: #fa4949;
    color: white;
    padding: 15px 30px; /* Increases button size */
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    margin: 15px; /* Adds spacing between buttons */
    transition: 0.3s ease;
}

button:hover {
    background: #280a0c;
}

/* Utility Class to Hide Elements */
.hidden {
    display: none;
}

/* Game Board Layout */
#game-board {
    display: grid;
    gap: 5px; /* Increases spacing between tiles */
    margin-top: 25px; /* Adds space between game controls and board */
    justify-content: center;
}

/* Tile Styles */
.tile {
    width: 55px; /* Increases tile size */
    height: 55px;
    background: #222;
    border-radius: 5px;
    color: white;
    font-size: 24px; /* Increases text size in tiles */
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
    line-height: 1.2; /* Adjusts text spacing inside tiles */
}

/* Revealed Tiles */
.tile.revealed {
    background: #ddd;
    color: black;
    cursor: default;
    animation: reveal 0.3s ease-in-out;
    padding: 5px; /* Adds slight spacing inside revealed tiles */
}

/* Bomb Tile - Indicates Mines */
.tile.bomb {
    background: red;
    color: white;
}

/* Flagged Tile */
.tile.flagged {
    background: #ffcc00;
    color: black;
}

/* Tile Reveal Animation */
@keyframes reveal {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
