body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    background-image: url(https://www.google.com/logos/fnbx/minesweeper/cta.png);
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: cover;
    text-align: center;
    height: 100dvh;
    overflow-y: hidden;
}

.full-container {
    width: 85%;
    min-width: 300px;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 2rem;
    backdrop-filter: blur(6px);
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.3);
}

.home--container {
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

.game--name {
    font-size: 70px;
    color: white;
    width: 100%;
}

.start--btn {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 2rem;
    font-size: 20px;
    color: white;
    background: transparent;
    border: 4px solid white;
    cursor: pointer;
}

.main--container {
    transition: 1s;
    display: none;
}

.center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#board {
    width: 650px;
    height: 650px;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: #4a742d;
    width: 100%;
    padding: 15px 0px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.playground {
    display: flex;
    /* align-items: center; */
    justify-content: center;
    width: 100%;
    height: 100%;
    box-shadow: 10px 5px 50px rgba(0, 0, 0, 0.3);
}

.playground table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
}

.playground td {
    border: none;
    text-align: center;
}

.playground tr:nth-child(odd) td:nth-child(even),
.playground tr:nth-child(even) td:nth-child(odd) {
    background-color: #A2D148;
}

.playground tr:nth-child(odd) td:nth-child(odd),
.playground tr:nth-child(even) td:nth-child(even) {
    background-color: #ABD750;
}

.playground td:hover {
    background-color: #ace66a;
    cursor: pointer;
}

.playground tr:nth-child(odd) td.revealed:nth-child(odd),
.playground tr:nth-child(even) td.revealed:nth-child(even) {
    background-color: rgb(191, 191, 138) !important;
}

.playground tr:nth-child(even) td.revealed:nth-child(odd),
.playground tr:nth-child(odd) td.revealed:nth-child(even) {
    background-color: rgb(160, 160, 110) !important;
}

.levels select {
    padding: 4px;
    border-radius: 6px;
    border: none;
    background-color: white;
    font-weight: bold;
    font-size: large;
}

.flag {
    font-size: larger;
    color: white;
    font-weight: bolder;
}

.cheat-mode-btn {
    padding: 6px;
    background: transparent;
    border: 1px solid white;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: large;
}

.close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    border: 1px solid white;
    color: white;
    cursor: pointer;
    font-size: large;
}

#reset {
    padding: 5px;
    margin-top: 1rem;
}

.winner-screen, .loser-screen {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: 52%;
    height: 78.5%;
    color: white;
    z-index: 10;
}

.winner-screen::before, .loser-screen::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.5;
    z-index: -1;
}

.playAgain {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    color: white;
    border: 1px solid white;
    padding: 3px 10px;
    border-radius: 3rem;
    font-weight: 700;
    width: 35%;
}

.restart {
    width: 25px;
    padding: 2px 6px;
}

/* Shake animation */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake {
    animation: shake 0.5s;
}

/* Mobile Responsiveness */
@media (max-width: 800px) {
    body {
        background-size: cover;
        height: 100dvh;
        padding: 10px;
    }

    .full-container {
        width: 100%; /* Increased width for better fit */
        min-width: 280px; /* Prevents container from becoming too narrow */
        height: auto; /* Allows flexible height adjustment */
        padding: 15px;
    }

    .main--container{
        width: 90%;
    }

    .game--name {
        font-size: 40px;
    }

    .start--btn {
        font-size: 18px;
        padding: 15px;
        width: 80%;
    }

    #board {
        width: 100%;
        height: 58dvh;
    }

    .playground {
        width: 100%;
        height: 100%;
        box-shadow: none;
    }

    .playground table {
        width: 100%;
        height: 100%;
    }

    .playground td {
        font-size: 14px;
    }

    .winner-screen, .loser-screen {
        width: 100%;
        height: 100%;
        padding: 20px;
    }
    .winner-screen::before, .loser-screen::before {
        width: 75%;
        height: 74.2%;
        margin-bottom: 119px;
    }

    .playAgain {
        width: 50%;
        font-size: medium;
        margin-bottom: 10rem;
        padding: 0px 10px;
    }

    .navbar {
        padding: 10px;
        width: 94%;
    }

    .levels select, .cheat-mode-btn, .close-btn, .restart, .close {
        font-size: x-small;
    }

    .flag{
        font-size: smaller;
    }
}
