:root {
    --question-button-color1: rgb(250, 0, 0);
    --question-button-color1-chosen: rgb(200, 0, 0);
    --question-button-color2: rgb(0, 150, 0);
    --question-button-color2-chosen: rgb(0, 100, 0);
    --question-button-font-color: wheat;
    --question-button-font-color-chosen: burlywood;
    --question-page-background-color: rgb(0, 120, 150);
    --question-page-option-color: rgb(255, 166, 0);
    --question-page-font-color: white;
}

@font-face {
    font-family: "Lyon Arabic Text";
    src: url(../font.otf);
}

* {
    font-family: "Lyon Arabic Text";
    direction: rtl;
    user-select: none;
}

html,
body {
    overflow: hidden;
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
}

body::-webkit-scrollbar {
    display: none;
}

.quizzes h1 {
    top: -20vh;
    position: relative;
}

.body {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
    align-self: center;
    justify-self: center;
    text-align: center;
}

.body {
    z-index: 0;
}

.body>h1 {
    top: -10vh;
    position: relative;
}

.questions {
    direction: ltr;
    display: flex;
    flex-wrap: wrap;
    /* This centers every row, including the last one */
    justify-content: center;
    align-items: center;
    max-width: calc(3.5vw * 7 + 17vw);
    margin: 0 auto;
    font-size: 2.2vh;
}

.questions>.question {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2vw;
    height: 2vw;
    padding: 1vw;
    margin: 1.5vh;
    background-color: var(--question-button-color1);
    color: var(--question-button-font-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.questions>.question:nth-child(2n-1) {
    background-color: var(--question-button-color2);
    color: var(--question-button-font-color);
}

.questions>.question[chosen=true] {
    background-color: var(--question-button-color1-chosen);
    color: var(--question-button-font-color-chosen);
}

.questions>.question:nth-child(2n-1)[chosen=true] {
    background-color: var(--question-button-color2-chosen);
    color: var(--question-button-font-color-chosen);
}

.teams {
    width: 100%;
    display: flex;
    align-items: center;
    justify-items: center;
    align-self: center;
    justify-self: center;
    align-content: center;
    justify-content: center;
}

.teams>div {
    display: block;
    position: relative;
    width: 50vw;
    height: 1vh;
    bottom: -5vh;
}

.teams>div>input.name {
    margin-bottom: 3vh;
    border: none;
    text-align: center;
    height: 5vh;
    width: 15vh;
    font-size: large;
}

.teams>div>input {
    border-radius: 5px;
}

.team1 {
    position: absolute;
    left: 0;
}

.team1>input {
    color: var(--question-button-color1);
}

.team2 {
    right: 0;
}

.team2>input {
    color: var(--question-button-color2);
}

input.points {
    width: 2vw;
    height: 2vw;
    font-size: large;
    align-content: center;
    justify-content: center;
    text-align: center;
    border: none;
}

.reset {
    position: relative;
    bottom: -15vh;
    background-color: var(--question-button-color1);
    padding: 1vw;
    width: 10vw;
    color: white;
    border-radius: 5px;
    font-size: x-large;
    transition: background-color .3s ease-in-out;
}

.reset:hover {
    background-color: var(--question-button-color1-chosen);
    transition: background-color .3s ease-in-out;
}

.logo,
.qism,
.nashat {
    z-index: 100;
    position: fixed;
    align-items: center;
    justify-items: center;
    align-self: center;
    justify-self: center;

}

.logo {
    top: 3vh;
    right: 8vh;
}

.qism {
    top: 3vh;
    left: 8vh;
}

.nashat {
    text-align: center;
    bottom: 3vh;
    left: 6vh;
}

.logo>p,
.qism>p,
.nashat>p {
    align-items: center;
    justify-items: center;
    align-self: center;
    justify-self: center;
    align-content: center;
    justify-content: center;
    position: relative;
    text-align: center;
    top: -2vh;
    font-size: 3vh;
}

.logo>img,
.qism>img,
.nashat>img {
    align-items: center;
    justify-items: center;
    align-self: center;
    justify-self: center;
    align-content: center;
    justify-content: center;
    height: 15vh;
    width: 15vh;
}

.questionPage {
    z-index: 5;
    height: 100%;
    width: 100%;
    background-color: var(--question-page-background-color);
}

.questionPage>h1 {
    padding-top: 5vh;
    align-self: center;
    justify-self: center;
}

.questionPage>.questionContent {
    margin-top: 10vh;
    width: 60vw;
    height: 50vh;
    align-self: center;
    justify-self: center;
    font-size: xx-large;
}

.questionPage>* {
    text-align: center;
    align-content: center;
    justify-content: center;
    color: var(--question-page-font-color);
}

.questionPage>.choices {
    display: grid;
    /* This creates two equal columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 1vh;
    width: 50vw;
    /* Increased width to give choices more room side-by-side */
    margin: 0 auto;
    /* Centers the grid container itself */
    align-items: center;
    justify-items: center;
}

.questionPage>.choices>.choice:nth-child(2n-1):last-child {
    transform: translate(-62.5%);
}

.questionPage>.choices>.choice {
    align-content: center;
    justify-content: center;
    align-self: center;
    justify-self: center;
    height: 3vw;
    width: 20vw;
    margin: 1vw;
    border-radius: 5px;
    font-size: larger;
}
.choice {
    position: relative;
    background-image: var(--choice-bg-img);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* overlay */
.choice::after {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    z-index: 1; /* 👈 overlay layer */
}

/* text/content layer */
.choice {
    position: relative;
    z-index: 2; /* 👈 stays above overlay */
}

.choice.red::after {
    background: red;
    opacity: 0.7;
}

.choice.green::after {
    background: green;
    opacity: 0.7;
}


.questionPage>.timer {
    height: 6vw;
    width: 6vw;
    padding: 2%;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
    text-align: center;
    position: relative;
    bottom: 15vh;
    right: 2.5vw;
    direction: rtl;
    color: white;
    background-image: url(./clock.png);
    background-repeat: no-repeat;
    background-position: 0 center;
    /* Puts the clock on the far left */
    background-size: 100%;
    /* Adjust size */
}

.timer>span {
    position: relative;
    top: 1.5vh;
}

.time[red=true] {
    color: red;
}

/* Ensure backgrounds cover the area properly */
.body,
.questionPage {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Apply the choice background if it exists */
.choice {
    background-image: var(--choice-bg-img);
    background-size: 100% 100%;
    /* Stretch to fit button shape */
}