/* Body section */
body {
    background: url('../images/background.png') no-repeat center center fixed;
    background-size: 100% auto;
    background-color: #F0F0F0;
    /* Fallback color */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* Header section */
.header {
    position: relative;
    background-color: #F3E2CB;
    /* Semi-transparent background matching the body's background color */
    padding: 20px;
    /* margin: 20px; */
    margin-top: 0%;
    z-index: 1;
    width: 100%;
    /* Ensure it stays above the background */
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
}

#player-turn {
    background-color: rgba(240, 240, 240, 0.8);
    font-size: larger;
    font-weight: bold;
    z-index: 2;
}

/* Score section */
.score-section {
    background-color: #F8F9FA;
    border: 2px solid #DEE2E6;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.score-section .row {
    margin-bottom: 10px;
}

.score-section .col {
    padding: 5px;
}

/* Game board */
.game-board {
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 20%;
    background-color: white;
}

.cell {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    border: 3px solid black;
    box-sizing: border-box;
}

/* Footer */
footer {
    background-color: #F3E2CB;
    border-top: 2px solid #DEE2E6;
    padding: 10px 0;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    margin-top: auto;
}

/* Media queries */
/* Mobile devices */
@media (max-width: 320px) {

    /* Header section*/
    .header {
        height: 50px;
    }

    #player-turn {
        height: 50px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .score-section {
        margin-bottom: 1px;
        font-size: 0.8rem;
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 60%;
        margin-left: 60px;
    }

    .score-section .col {
        text-align: center;
    }

    /* Game board section */
    .game-board {
        margin-top: 1px;
        margin-bottom: 0%;
    }

    .cell {
        height: 80px;
        font-size: 1.5rem;
        border: 2px solid black;
    }

    /* Help button */
    #help {
        font-size: 0.3rem;
        padding: 0.2rem 0.4rem;
    }

    .custom-button {
        margin-top: 1px;
        margin-bottom: 1px;
    }

    /* Footer section */
    footer {
        font-size: 0.7rem;
        padding: 3px 0;
    }
}

/* Tablet devices */
@media (min-width: 768px) {

    /* Header section*/
    .header h1 {
        font-size: 3rem;
    }

    #player-turn {
        font-size: 3rem;
    }

    /* Score section */
    .score-section {
        margin-bottom: 1px;
        font-size: 0.8rem;
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 80%;
        margin-left: 50px;
    }

    /* Game board section */
    .game-board {
        margin-top: 1%;
    }

    .cell {
        height: 120px;
        font-size: 2.5rem;
        border: 3px solid black;
    }

    /* Help button */
    #help {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .modal-body .row {
        flex-direction: column;
    }

    .modal-body .col-md-4 {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Footer section */
    footer {
        font-size: 0.9rem;
        padding: 5px 0;
    }
}

/* Laptop devices */
@media (min-width: 1280px) {

    /* Header section*/
    .header h1 {
        font-size: 3rem;
    }

    /* Score section */
    .score-section {
        position: absolute;
        top: 42%;
        right: 5%;
        width: 300px;
        font-size: 1.2rem;
        display: flex;
        justify-content: space-between;
    }

    .score-section .col {
        text-align: center;
    }

    .score-section .d-flex {
        justify-content: space-evenly;
    }

    /* Game board section */
    .game-board {
        margin-top: 6%;
        margin-left: 11%;
        padding: 10px;
        width: 80%;
    }

    .cell {
        height: 120px;
        font-size: 2.5rem;
        border: 4px solid black;
    }

    /* Help button */
    #help {
        font-size: 1rem;
        padding: 0.2rem 0.4rem;
    }

    /* Footer section */
    footer {
        font-size: 0.9rem;
        padding: 5px 0;
    }
}

/* Desktop devices */
@media (min-width: 1600px) {

    /* Header section*/
    .header h1 {
        font-size: 3.5rem;
    }

    /* Score section */
    .score-section {
        padding: 5px;
        font-size: 1.5rem;
        width: 400px;
        margin: 0 auto;
        margin-bottom: 1px;
        margin-top: 50px;
    }

    .score-section .col {
        text-align: center;
    }

    .score-section .d-flex {
        justify-content: space-evenly;
    }

    /* Game board section */
    .game-board {
        margin-top: 5%;
        margin-left: 5%;
        padding: 5px;
        width: 90%;
    }

    .cell {
        height: 180px;
        font-size: 3.5rem;
        border: 5px solid black;
    }

    /* Help button */
    #help {
        font-size: 1.2rem;
        padding: 0.4rem 0.8rem;
    }

    /* Footer section */
    footer {
        font-size: 1.1rem;
        padding: 5px 0;
    }
}