* {
    font-family: Poppins;
}



.navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: #252837;
    width: 100vw;
    color: white;
    padding: 10px 200px;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.2);
}

.wallet-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.wallet-balance {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    background-color: #202332;
    padding: 10px 20px;
    box-shadow: 0px 4px 12px 0px rgba(62, 62, 62, 0.2);
    border-radius: 2px;
}

.wallet-balance img {
    margin-left: 5px;
}

.wallet-button {
    background-color: #1375e0;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    box-shadow: 0px 4px 12px 0px rgba(62, 62, 62, 0.2);
    height: 45px;
    border-radius: 2px;
}

body {
    background-color: #252837;
    margin: 0;
    
}

.main {
    display: flex;
    flex-direction: row;
    margin-right: 20vw;
    margin-left: 20vw;
    margin-top: 50px;
}

.canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #202332;
    padding: 50px 100px;
    border-radius: 5px;
    box-shadow: 0px 4px 12px 0px rgba(62, 62, 62, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.game-canvas {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 10px;
    z-index: 2;
}

.game-canvas-behind {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 10px;
    position: absolute;
    z-index: 1;
}

.grid-item-behind {
    background-color: #333559;
    padding: 20px;
    font-size: 30px;
    text-align: center;
    color: white;
    width: 2.7em;
    height: 2.7em;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    visibility: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease; /* Add transition for transform and background-color */
}

.grid-item-behind img {
    width: 4em;
    display: none;
}

.grid-item-behind:hover {
    transform: translateY(-5px); /* Lift the item up by 10px */
    background-color: #405565; /* Change the background color */
}

.grid-item {
    background-color: #304454;
    padding: 20px;
    font-size: 30px;
    text-align: center;
    color: white;
    width: 2.7em;
    height: 2.7em;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease; /* Add transition for transform and background-color */
}

.grid-item:hover {
    transform: translateY(-5px); /* Lift the item up by 10px */
    background-color: #405565; /* Change the background color */
}

.grid-item img {
    width: 3.7em;
    display: none;
}

.control-panel {
    display: flex;
    flex-direction: column;
    background-color: #304454;
    min-width: 200px;
    max-width: 400px;
    padding: 10px 20px 10px 20px;
    border-radius: 5px;
    box-shadow: 0px 4px 12px 0px rgba(62, 62, 62, 0.2);
    color: #c4c4c4;
}

.input {
    margin-top: 10px;
}

input {
    background-color: #202332;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    width: 100%; /* Make the input span to the right */
    box-sizing: border-box; /* Include padding and border in the total width */
    height: 40px;
    font-size: 14px;
}

.mines-gems .input {
    flex-grow: 1;
}

.profit-con {
    background-color: #202332;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    width: 100%; /* Make the input span to the right */
    box-sizing: border-box; /* Include padding and border in the total width */
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    box-sizing: border-box;
}

.input-total {
    display: none;
}

.profit-con img {
    margin-left: 10px;
    width: 20px;
}

.mines-gems {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.cashout {
    margin-top: 20px;
    background-color: #f5c118;
    color: rgb(0, 0, 0);
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    width: 100%;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove spinner in Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Animation wise */
/* Add keyframes for collapse and expand animations */
@keyframes collapse {
    0% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(0);
    }
}

@keyframes expand-one {
    0% {
        transform: scale(1);
        opacity: 100%;
    }
    100% {
        transform: scale(1.1);
        opacity: 70%;
    }
}

@keyframes expand {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Apply the collapse animation to grid items when clicked */
.grid-item.collapsed {
    animation: collapse 0.5s ease-in-out;
}

.grid-item.expand-one {
    animation: expand-one 0.3s forwards;
}

/* Apply the expand animation to images inside grid items when clicked */
.grid-item img.expanded {
    animation-delay: 0.3s;
    display: block;
    animation: expand 0.3s forwards;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #304454;
    margin: 15% auto;
    color: #c4c4c4;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 5px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#wallet-form input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
}

#wallet-form button {
    background-color: #1375e0;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    box-shadow: 0px 4px 12px rgba(62, 62, 62, 0.2);
    border-radius: 5px;
}

.profit-modal {
    z-index: 1000;
    position: absolute;
    top: 47.5%;
    width: 196px;
    height: 120px;
    box-sizing: border-box;
    display: none;
}


.modal-profit-content {
    /* Positioning and display */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;

    /* Dimensions */
    width: 80%;
    max-width: 150px;
    padding: 20px;

    /* Styling */
    color: #f5c118;
    text-align: center;
    background-color: #304454;

    /* Border */
    border: 3px solid #f5c118;
    border-radius: 5px;

    /* Shadow */
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
    padding: 10px 20px 10px 20px;
}



.modal-profit-content h2 {
    margin: 0;
    font-size: 30px;
}
.modal-profit-content h3{
    margin: 0;
    font-size: 16px;
}

#line {
    border-top: 3px solid #c4c4c4; /* Change color as needed */
    width: 30%;
    margin: 10px; /* Adjust space above and below the line */
}

.cashout-profit {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-content: flex-start;
}


.cashout-profit span {
    color: #f5c118
} 

.cashout-profit img {
    width: 20px;
    margin-left: 10px;
}




@media (max-width: 1296px){
    body {
    }

    .navbar h1, .statistic {
        display: none;
    }


    .main {
        flex-direction: column-reverse;
        width: fit-content;
    }

    .grid-item {
        width: 5vw;
        height: 5vw;
        min-width: 92px;
        min-height: 92px;
        box-sizing: border-box;
    }

    .grid-item-behind {
        width: 5vw;
        height: 5vh;
        min-width: 92px;
        min-height: 92px;
        box-sizing: border-box;
    }

    .grid-item img {
        width: 3em;
    }

    .canvas-container {
        min-width: 572px;
    }


    .control-panel {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 572px;
    }

    #settings-form {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-content: center
    }

    .mines-gems {
        margin-left: 10px;
        flex-grow: 1;
        width: 51%;
    }

    .input-total {
        width: 50%;
    }

    .input {
        flex-grow: 1;
    }

    .mines-gems .input {
        width: 100%;
    }

    .profit-modal {
        top: 37%;
    }
    

}

@media (max-width: 500px) {
    body {
        overflow-x: hidden;

    }

    .navbar {
        justify-content: flex-start !important;
        
        padding: 10px 40px 10px 40px;
    }


    .modal-content {
        width: 70vw;
        margin: 10% 8.6%;
    }

    .main {
        margin: 0;
        width: 100vw;
    }
    .canvas-container {
        min-width: 0;
        box-sizing: border-box;
        padding: 30px;
        display: flex;
        max-width: 100vw;
    }

    .grid-item {
        width: 15vw;
        height: 15vw;
        min-width: 0;
        min-height: 0;
        box-sizing: border-box;
    }

    .grid-item-behind {
        width: 15vw;
        height: 15vw;
        box-sizing: border-box;
        min-width: 0;
        min-height: 0;
    }

    .grid-item img {
        width: 2.2em;
    }



    .control-panel {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    .mines-gems {
        width: 100%;
        margin-left: 0;
    }

    .input-total {
        width: 100%;
    }

    @media (max-width: 480px) {
        .mines-gems {
            margin-left: 0px;
        }
        
    }

    .grid-item img.revealed {
        transform: scale(0.8);
    }
    
}