@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: "Comfortaa";
    /* border: 2px solid black; */
}



:root {
    font-size: 62.5%;
    /* Default (Laptop - 1024px) */
    --h1: 4.8rem;   /* 48px */
    --h2: 3.6rem;   /* 36px */
    --h3: 3rem;     /* 30px */
    --h4: 2.4rem;   /* 24px */
    --h5: 2rem;     /* 20px */
    --body: 1.8rem; /* 18px */
    --small: 1.4rem; /* 14px */

/* ----------- Color Schemes -------------- */
--dark: #5C4033;    /* Dark Brown */
--mid: #6F4E37;     /* Coffee Brown */
--txt: #FFFFFF;     /* White */
--txt-light: #F5F5DC; /* Beige */

}

body{
    position: relative;
    min-height: 91dvh;
    background-color: rgba(0, 0, 0, 0.726);
}

.bg-background{
    position: absolute;
    right: 0;
    top: 5.5rem;
    width: 100%;
    height: 100%;
    /* border: 2px solid red; */
    z-index: -1;

    video{
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(50%);
        object-position: center;
    }
}


  /* -------------------- header ------------------- */

.txt-color{
    color: var(--txt);
}

header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5em 1.5em;
    min-height: 4.6rem;
    background-color:rgba(228, 76, 6, 0.233);
    backdrop-filter: blur(2.6rem);
    text-shadow: 0 0 8px white;

    a{
        /* border: 2px solid white; */
        color: var(--txt-light);
        font-size: var(--h1);
        text-transform: uppercase;
        font-weight: 900;
        cursor: pointer;
    }

    nav {
        /* border: 2px solid white; */
        display: flex;
        gap: 1.5rem;

        a{
            font-size: var(--h4);
            text-transform: capitalize;
            font-weight: 300;
            cursor: pointer;
        }
    }

    button{
        background-color: transparent;
        outline: none;
        border: none;
        color: var(--txt-light);
        display: none;
        cursor: pointer;
        font-size: var(--h2);
        font-weight: 900;
    }
}

nav.active{
    display: flex;
}



/* ------------------- subject wrapper -------------- */
.sub-wrapper {
    display: flex;
    align-items: center;
    flex-direction: column;
    /* grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); */
    gap: 2rem; /* Space between grid items */
    padding: 2rem 5rem;
    font-size: var(--h4);
    text-transform: capitalize;
    text-align: center;
}

.user-score{
    background-color: #800080;
    color: var(--txt-light);
    font-size: var(--body);
    font-weight: 900;
    border-radius: .2em;
    display: block;
    margin: .4em 0;
    padding: 3em 0;

}

#selected-subject{
    color: var(--txt);
}

.last{
    margin-bottom: 10px;
}

/* General Styling */
.quiz-container{
    h2{
        font-size: var(--h2);
        font-weight: 800;
        color: var(--txt-light);
        padding: .2em 5%;
    }

    .difficulty-container{
        label{
            font-size: var(--h4);
            padding: .2em 5%;
        }
    }

    #start-quiz{
        margin: .2em 5%;
    }

    #difficulty{
        background-color: var(--mid);
        color: var(--txt-light);
        padding: .2em .5em;
        border-radius: .3em;
        font-size: var(--body);
    }
}



/* Container for the Quiz */
#quiz-container {
    width: 80%;
    margin: 1rem auto;
    padding: 20px;

}

/* Quiz Box Styling */
.quiz-box {
    margin-bottom: 3rem;
    /* padding: 15px; */
    border: 1px solid var(--mid);
    border-radius: 8px;
    background-color: #f9f9f9;
    overflow: hidden;
}

.quiz-box h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-wrap:anywhere;
    font-size: var(--h4);
    padding: .5em .8em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--txt);
    background-color: var(--mid);
}

/* Options Styling */
.options {
    display: flex;
    flex-direction: column;
    padding: 1em 2em;
}

.options label {
    font-size: var(--body);
    margin: 5px 0;
    display: flex;
    align-items: center;
    color: var(--mid);
    font-weight: 800;
}

/* Remove the default radio button appearance */
input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #888;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    margin-right: 5px;
}

/* Custom radio button circle */
input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--mid); /* Custom color when selected */
}

/* Change border color when the radio is checked */
input[type="radio"]:checked {
    border-color: var(--mid); /* Custom border color when selected */
}


/* Submit Button Styling */
button {
    padding: .8em .6em;
    font-size: var(--body);
    background-color: var(--mid);
    color: var(--txt-light);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--txt);
    color: var(--mid);
}

/* Loading and Error Messages */
#quiz-container h2,
#quiz-container h3 {
    text-align: center;
    color: #333;
}

h3.error {
    color: red;
}




.sub-box {
    width: 40%;
    min-width: 320px;
    /* background-color: var(--mid); Customize background color */
    background-color:rgba(228, 76, 6, 0.233);
    backdrop-filter: blur(2.6rem);
    text-shadow: 0 0 8px white;
    padding: 2rem;
    text-align: center;
    font-size: var(--h3);
    text-transform: capitalize;
    font-weight: 700;
    color: var(--txt-light); /* Responsive font size based on the root variable */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.178);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: .3px solid rgba(255, 255, 255, 0.322);
}

.sub-box:hover {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

/* --------------------- about section ------------------- */
main {
    padding: 40px 20px;
}

/* About section styling */
.about-section {
    width: 100%;;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--mid);
}

.about-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.about-photo {
    flex: 1 1 300px;
    max-width: 300px;
    text-align: center;
}

.about-photo img {
    width: 50%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 2 1 500px;
    line-height: 2;
}

.about-text p {
    font-size: var(--body);
    margin-bottom: 20px;
}

/* Skills section */
.skills-section {
    background-color: #fff;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--mid);
}

.skills-section h2 {
    font-size: var(--h3);
    margin-bottom: 20px;
    text-align: center;
}

.skills-section ul {
    list-style: none;
    padding: 0;
}

.skills-section ul li {
    font-size: var(--body);
    margin-bottom: 10px;
    text-align: center;
}

/* Contact section */
.contact-section {
    background-color: #fff;
    padding: 30px 20px;
    margin-top: 40px;
    margin-bottom: 50px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--mid);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;

}

.contact-section h2 {
    font-size: var(--h3);
    margin-bottom: 20px;

}
.contact-section p{
    font-size: var(--h5);
    text-align: center;
}

.contact-section ul {
    list-style: none;
    padding: 0;
    margin: 1em 0;

}

.contact-section ul li {
    font-size: var(--body);
    margin-bottom: 10px;
}

.contact-section a {
    color: #ff6f61; /* Accent color */
    text-decoration: none;
    font-weight: bold;
}

/* Footer styles */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 5px;
    background-color: #333;
    color: white;
}

footer p {
    font-size: 1em;
    margin: 0;
    text-align: center;
}




  
  /* Tablet (768px) */
  @media (max-width: 768px) {
    :root {
      --h1: 4rem;   /* 40px */
      --h2: 3.2rem; /* 32px */
      --h3: 2.6rem; /* 26px */
      --h4: 2.2rem; /* 22px */
      --h5: 1.8rem; /* 18px */
      --body: 1.6rem; /* 16px */
      --small: 1.4rem; /* 14px */
    }
    #quiz-container {
        width: 100%;

    
    }
    
  }
  
  /* Mobile Large (640px) */
  @media (max-width: 640px) {
    :root {
      --h1: 3.2rem; /* 32px */
      --h2: 2.6rem; /* 26px */
      --h3: 2.2rem; /* 22px */
      --h4: 2rem;   /* 20px */
      --h5: 1.6rem; /* 16px */
      --body: 1.6rem; /* 16px */
      --small: 1.2rem; /* 12px */
    }

    header{
        position: relative;

        nav{
            display: none;
            position: absolute;
            top: 4.5rem;
            left: 0;
            background-color: var(--dark);
            width: 100%;
            flex-direction: column;
            text-align: center;
            gap: 0;
            a{
                padding: 1em 0;
                /* border: 1px solid var(--txt-light); */

                &:hover{
                    background-color: var(--txt-light);
                    color: var(--dark);
                }
            }
        }

        button{
            display: block;
        }
    }
  }
  
  /* Mobile Medium (425px) */
  @media (max-width: 425px) {
    :root {
      --h1: 2.8rem; /* 28px */
      --h2: 2.4rem; /* 24px */
      --h3: 2rem;   /* 20px */
      --h4: 1.8rem; /* 18px */
      --h5: 1.6rem; /* 16px */
      --body: 1.4rem; /* 14px */
      --small: 1.2rem; /* 12px */
    }
  }
  
  /* Mobile Small (360px) */
  @media (max-width: 360px) {
    :root {
      --h1: 2.4rem; /* 24px */
      --h2: 2rem;   /* 20px */
      --h3: 1.8rem; /* 18px */
      --h4: 1.6rem; /* 16px */
      --h5: 1.4rem; /* 14px */
      --body: 1.4rem; /* 14px */
      --small: 1.2rem; /* 12px */
    }
  }
  