/* Set the background image */
body {
    margin: 0;
    padding: 0;
    height: 100vh; /* Ensure the body takes the full height of the viewport */
    background-image: url('image_maze.jpg'); /* Replace with the path to your image */
    background-size: cover; /* Ensure the image covers the whole screen */
    background-position: center; /* Center the image */
    background-attachment: fixed; 
}

#container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #4174d3;
    display: grid;
    grid-template-rows: 60% 40%;
}

#maze {
    position: absolute;
    width: 340px;
    height: 240px;
    top: 30vh;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mbox,
.controls {
    height: 100%;
    background: #222;
    display: grid;
}

.buttons {
    width: 210px;
    height: 140px;
    background: #222;
    align-self: center;
    justify-self: center;
    display: grid;
    grid-template-rows: 70px 70px;
    grid-template-columns: 70px 70px 70px;
}

.btn {
    width: 60px;
    height: 60px;
    border: 2px #fff solid;
    border-bottom: 2px #fff solid;
    align-self: center;
    justify-self: center;
    cursor: pointer;
    border-radius: 8px;
    display: grid;
}

.chevron {
    height: 20px;
    width: 20px;
    align-self: center;
    justify-self: center;
    color: #222;
    font-size: 20px;
    line-height: 20px;
    text-align: center;
    color: #fff;
}

#bu {
    grid-column-start: 2;
}

#bd {
    grid-column-start: 2;
    grid-row-start: 2;
}

#bl {
    grid-column-start: 1;
    grid-row-start: 2;
}

#br {
    grid-column-start: 3;
    grid-row-start: 2;
}

#thingie, #home, .barrier {
    display: block;
    position: absolute;
}

.emo {
    position: absolute;
    top: 4px;
    left: 1px;
    width: 13px;
    height: 13px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 15px;
    text-align: left;
}

.barrier {
    position: absolute;
    background: #fff;
}

#top {
    top: 20px;
    left: 20px;
    width: 300px;
    height: 2px;
}

#bottom {
    top: 220px;
    left: 20px;
    width: 302px;
    height: 2px;
}

/* Style reset for buttons */
button {
    display: inline-block;
    border: none;
    padding: none;
    margin: 0;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
}

button:hover,
button:focus {
    -webkit-appearance: none;
}

button:focus {
    outline: none;
}

button:active {
    transform: scale(1);
    -webkit-appearance: none;
}

/* Timer */
#timer {
    position: fixed;  /* Make it fixed, so it doesn't move when the page scrolls */
    top: 20px;
    left: 50%;
    transform: translateX(-50%);  /* Center it horizontally */
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    z-index: 1000;  /* Ensure it's always on top */
}


/* Game Message */
#gameMessage {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8); /* Default background */
    color: white;
    padding: 20px;
    font-size: 24px;
    border-radius: 10px;
    z-index: 999; /* Make sure it stays on top */
    text-align: center;
    font-weight: bold;
}

/* Green background when You Won! */
#gameMessage.won {
    background: green;  /* Green background for the win message */
}

/* Red background when You Lost! */
#gameMessage.lost {
    background: red;  /* Red background for the lose message */
}
