.game-instruction {
    margin: 0 50px;
    font-size: 1.2em;
}

/* General styles for the game board */
#gameBoard {
    display: grid;
    grid-template-columns: repeat(10, 50px);
    grid-template-rows: repeat(10, 50px);
    border: 2px solid #000;
    margin: 0 auto;
    width: fit-content;
    height: fit-content;
    box-sizing: content-box; /* don't include border in content size */
}

#doorwayLink {
    display: inline-block;
}

#doorwayImage {
    width: 80px;
    height: auto;
    display: block;
}

/* Laptop screens: Position doorway at top-right of .game-intro */
@media (min-width: 769px) {
    .game-intro {
        position: relative;
    }

    #doorwayLink {
        position: absolute;
        top: 0;
        right: 0;
    }
}

/* Small screens: Move doorway below .control-container */
@media (max-width: 768px) {
    #doorwayLink {
        display: block;
        text-align: center;
        margin-top: 20px;
    }
}

#bigCursor {
    position: absolute;
    width: 50px;
    height: 50px;
    background: url('cupcakeanimation/cupcakepointer.png') no-repeat center;
    background-size: contain;
    pointer-events: none;
    display: none;
    z-index: 1000;
}

/* Only show the big cursor when hovering over the doorway button */
#doorwayLink:hover #bigCursor {
    display: block;
}

/* Individual cell styles */
.cell {
    width: 50px;
    height: 50px;
    background-color: white;
}

/* Adjust game board for mobile screens */
@media (max-width: 768px) {
    #gameBoard {
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        grid-template-rows: repeat(10, 1fr);
        width: 90vw;           /* scales with viewport */
        max-width: 400px;      /* optional limit */
        aspect-ratio: 1/1;     /* ensures square */
        border: 2px solid #000;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .cell {
        width: 100%;
        height: 0;
        padding-bottom: 100%;
    }
  
    .control-container {
        flex-direction: column;
        gap: 15px;
        justify-content: center;
        align-items: center;
        margin-top: 20px;
        padding: 10px;
    }
}

.bush {
    background-image: url('gameImages/bush.jpg');
    background-size: cover;
}

.delivery-man {
    background-image: url('gameImages/delivery-man-front.jpg');
    background-size: cover;
}

.house {
    background-image: url('gameImages/MazeHome.jpg');
    background-size: cover;
}

.control-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#timer {
    font-size: 1.2em;
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
}

.policeman {
    background-image: url('gameImages/police-front.jpg');
    background-size: cover;
}

.hidden {
    display: none;
}

#resetButton,
#startButton {
    padding: 8px 16px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    background-color: #3E3228; /* Main brown background */
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#resetButton:hover,
#startButton:hover {
    background-color: #d6336c; /* light brown on hover */
}

#startButton:disabled {
    background-color: #ad8c71; /* Disabled button colour */
    color: #fff; 
    cursor: not-allowed; /* Indicate not clickable */
    opacity: 0.8; /* Slightly dim for a disabled look */
}
