body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0a0a0a;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    box-sizing: border-box;
}

.top-message {
    position: absolute; /* Place it relative to the screen */
    top: 0; /* Stick to the very top */
    left: 50%; /* Move to the center horizontally */
    transform: translateX(-50%); /* Center the text */
    width: 100%; /* Optional, ensures text spans the width */
    text-align: center; /* Center the text horizontally */
    background: #1e1e1e; /* Background color to make it stand out */
    color: #fff; /* Text color */
    font-size: 1.5em; /* Font size for better visibility */
    padding: 10px 0; /* Add padding for spacing */
    z-index: 1000; /* Ensure it appears above other elements */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Optional shadow for styling */
}


.game-container {
    width: 90%;
    max-width: 800px;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.balance-area {
    text-align: center;
    padding: 20px;
    background: #2a2a2a;
    border-bottom: 1px solid #444;
}

.balance-area h3 {
    margin: 0;
    font-size: 18px;
}

.balance-area p {
    margin: 10px 0 0;
    font-size: 22px;
    font-weight: bold;
    color: #4caf50;
}

.play-area {
    padding: 20px;
    text-align: center;
    flex: 1;
}

.play-area h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    justify-content: center;
}

.cell {
    padding-top: 100%;
    background: #444;
    position: relative;
    border-radius: 5px;
    transition: transform 0.5s ease-in-out, background 0.3s ease;
}

.cell:hover {
    background-color: #353535;
}

.cell img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; /* Adjust size of the image inside the cell */
    height: 80%;
    pointer-events: none; /* Prevent image from affecting clicks */
}

.betting-area {
    text-align: center;
    padding: 20px;
    background: #2a2a2a;
    border-top: 1px solid #444;
}

.betting-area h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.betting-area input {
    width: 80%;
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: #fff;
    text-align: center;
}

.betting-area .bet-button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: #4caf50;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.betting-area .bet-button:hover {
    background: #31843c;
}

.betting-area .bet-max {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: #4c93af;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.betting-area .bet-max:hover {
    background: #457aa0;
}

@media (min-width: 769px) {
    .game-container {
        flex-direction: row;
    }

    .betting-area {
        width: 20%;
        min-width: 150px;
        border-top: none;
        border-left: 1px solid #444;
        text-align: center;
        padding: 20px 10px;
    }

    .bet-button {
        margin-bottom: 10px;
    }

    .balance-area {
        border-bottom: none;
        border-right: 1px solid #444;
        width: 20%;
        min-width: 150px;
        text-align: center;
        padding: 20px 10px;
    }

    .play-area {
        width: 80%;
        flex: 1;
        padding: 20px;
        padding-top: 0px;
    }

    .grid {
        gap: 15px;
    }
}
