* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #acacac;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #dbdbdb;
    border-radius: 40px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    color: #000;
    margin-bottom: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 150px);
    grid-template-rows: repeat(3, 150px);
    gap: 10px;
    margin-bottom: 20px;
    visibility: visible;
}

.cell {
    background-color: #afa7a7;
    border: 2px solid rgb(88, 65, 65);
    border-radius: 15px;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.cell:hover {
    background-color: #807c7c;
    transform: scale(1.03);
}

.result-overlay {
    display: none;
    position: absolute;
    top: 100px;
    width: 450px;
    height: 450px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    border-radius: 10px;
    z-index: 1;
}

.result-overlay .message {
    text-align: center;
    font-weight: bold;
}

.refresh {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: gray;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.refresh:hover {
    background-color: #8f8585;
}

@media (max-width: 500px) {
    .grid {
        grid-template-columns: repeat(3, 100px);
        grid-template-rows: repeat(3, 100px);
    }
    .cell {
        font-size: 1.5rem;
    }
    .result-overlay{
        top: 130px;
    }
}
