html, body {
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.game {
    display: block;
    width: 100%;
    height: 100%;
}

#quiz-canvas {
    position: absolute;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 10px solid grey;
    box-sizing: border-box;
    background-image: image-set("SubmarineImage.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

#credit {
    position: absolute;
    bottom: 0.1%;
    right: 2%;
    z-index: 1000; /* Ensure it stays on top */
}

.credit {
    font-size: small;
    color: cadetblue;
}

.display-4 {
    font-size: 2vw;
    text-wrap: wrap;
} 

.lead {
    font-size: 1.5vw;
    color: gainsboro;
    z-index: 1000; /* Ensure it stays on top */
}   

.question {
    margin-bottom: 10px;
    align-self: center;
    align-items: center;
    position: absolute;
    background: linear-gradient(to bottom right, #808080, #3a3a3a);
    color: aliceblue;
    text-align: center;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 20%;
    padding: 10px 20px;
    z-index: 1000; /* Ensure it stays on top */
}

.answers {
    margin-bottom: 10px;
    position: absolute;
    align-self: center;
    align-items: center;
    top: 31%;
    left: 8.7%;
    width: 100%;
    height: 7%;
}

.ui-widget-content {
    list-style: none;
    font-size: 1.7vw;
    margin-bottom: 10px;
    align-self: center;
    text-align: center;
    background: linear-gradient(to bottom right, #808080, #3a3a3a);
    color: aliceblue;
    cursor: pointer;
    z-index: 1000; /* Ensure it stays on top */
    width: 80%;
    height: 100%;
}

.ui-widget-content:hover {
    background: linear-gradient(to bottom right, rgb(249, 255, 134), rgb(224, 202, 0));
}

#selectable {
    margin: 0;
    padding: 0;
    width: 80%;
}

#selectable li {
    display: block; /* Ensure each item is block level */
    margin: 3px;
    padding: 0.2em;
    font-size: 1.4em;
    color: rgb(11, 79, 110);
}

#selectable .ui-selecting {
    background: rgb(110, 176, 230);
}

#selectable .ui-selected {
    background: rgb(235, 221, 101);
}

/* class for moble and tablet to allow multiple selection */
.selected {
    background: linear-gradient(to bottom right, rgb(249, 255, 134), rgb(224, 202, 0));
}


.next-button {
    align-self: center;
    align-content: center;
    position: absolute;
    background: linear-gradient(to bottom right, #808080, #3a3a3a);
    font-size: 2vw;
    width: 30%;
    height: 7%;
    top: 80%;
    left: 34%;
    cursor: pointer;
    padding-bottom: 4%;
    z-index: 1000; /* Ensure it stays on top */
}


.next-button:hover {
    background: linear-gradient(to bottom right, rgb(110, 176, 230), #2a2a2a);
}

.next-button.pressed {
    background: linear-gradient(to bottom right, rgb(249, 255, 134), rgb(224, 202, 0));
}

.score {
    font-size: 1rem;
    margin-bottom: 10px;
    align-self: center;
    align-items: center;
    position: absolute;
    background: linear-gradient(to bottom right, #808080, #3a3a3a);
    color: aliceblue;
    text-align: center;
    text-shadow: 3px 3px 6px rgb(26, 89, 141), 0 0 1em rgb(71, 71, 71), 0 0 0.2em rgb(139, 139, 139);
    bottom: 6%;
    right: 6%;
    width: 15%;
    height: 10%;
    padding-top: 1%;
    z-index: 1000; /* Ensure it stays on top */
}

.timer {
    font-size: 1.3rem;
    margin-bottom: 10px;
    align-self: center;
    align-items: center;
    position: absolute;
    background: linear-gradient(to bottom right, #808080, #3a3a3a);
    color: aliceblue;
    text-align: center;
    text-shadow: 3px 3px 6px rgb(26, 89, 141), 0 0 1em rgb(71, 71, 71), 0 0 0.2em rgb(139, 139, 139);
    bottom: 6%;
    left: 6%;
    width: 15%;
    height: 10%;
    padding-top: 1%;
    z-index: 1000; /* Ensure it stays on top */
}

/* Portrait mode for tablets and mobiles */
@media (max-width: 1030px) and (orientation: portrait) {
    .display-4 {
        font-size: 4vw;
    }

    .lead {
        font-size: 3vw;
    }

    .question {
        top: 20%;
        left: 8.5%;
        width: 82%;
        height: 15%;
        font-size: 8vw;
    }

    .answers {
        top: 36%;
        left: 7.5%;
        width: 90%;
        height: auto;
    }

    .ui-widget-content {
        font-size: 4vw;
    }

    .next-button {
        font-size: 4vw;
        width: 30%;
        height: 5%;
        top: 70%;
        left: 34%;
    }

    .score {
        font-size: 6vw;
        text-align: center;
        bottom: 13%;
        right: 6%;
        width: 22%;
        height: 4%;
        padding-top: 2%;
    }

    .timer {
        font-size: 6vw;
        text-align: center;
        bottom: 13%;
        left: 6%;
        width: 22%;
        height: 4%;
        padding-top: 2%;
    }
}

@media (max-width: 1030px) and (orientation: landscape) {
    .display-4 {
        font-size: 1.7vw;
    }

    .lead {
        font-size: 1.5vw;
    }

    .question {
        top: 10%;
        left: 8.5%;
        width: 82%;
        height: 20%;
        font-size: 2vw;
    }

    .answers {
        top: 31%;
        left: 10%;
        width: 90%;
        height: auto;
    }

    .ui-widget-content {
        font-size: 2vw;
    }

    .next-button {
        font-size: 2vw;
        width: 30%;
        height: 5%;
        top: 80%;
        left: 35%;
    }

    .jumbotron {
        padding-top: 1%;
        padding-bottom: 3%;
    }

    .score {
        font-size: 3vw;
        text-align: center;
        bottom: 7%;
        right: 6%;
        width: 22%;
        height: 2%;
    }

    .timer {
        font-size: 3vw;
        text-align: center;
        bottom: 7%;
        left: 6%;
        width: 22%;
        height: 2%;
    }
}