*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}
.header{
    min-height:100vh;
    width: 100%;
    background-image: linear-gradient(rgba(4,9,30,0.7),rgba(4,9,30,0.7)),url("images/banner.jpg");
    background-position: center;
    background-size: cover;
    position: relative;
}
nav{
    display: flex;
    padding: 2% 6%;
    justify-content: space-between;
    align-items: center;
}
nav img{
    width: 150px;
}
.nav-links{
    flex: 1;
    text-align: right;
}

.nav-links ul li{
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a{
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}
.nav-links ul li::after{
    content: '';
    width: 0%;
    height: 2px;
    background: #4231d0;
    display: block;
    margin: auto;
    transition: 0.5s;
}
.nav-links ul li:hover::after{
    width: 100%;
}
.text-box{
    width: 90%;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.text-box h1{
    font-size: 62px;
}
.text-box p{
    margin: 10px 0 40px;
    font-size: 14px;
    color: #fff;
}
.hero-btn{
    display: inline-block;
    text-decoration: none;
    color: #fff;
    border: 1px solid #fff;
    padding: 12px 34px;
    font-size: 13px;
    background: transparent;
    position: relative;
    cursor: pointer;
}
.hero-btn:hover{
    border: 1px solid #4231d0;
    background: #4231d0;
    transition: 1s;
}

nav .fas{
    display: none;
}
@media(max-width: 700px){
    .text-box h1{
        font-size: 20px;
    }
    .nav-links ul li{
        display: block;
    }
    .nav-links{
        position: absolute;
        background: #4231d0;
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 2;
        transition: 1s;
    }
    nav .fas{
        display: block;
        color: #fff;
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }
    .nav-links ul{
        padding: 30px;
    }
}

/*----- Welcome! -----*/
.welcome{
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 100px;
}
h1{
    font-size: 36px;
    font-weight: 600;
}
p{
    color: #777;
    font-size: 14px;
    font-weight: 300;
    line-height: 22px;
    padding: 10px;
}

.row{
    margin-top: 5%;
    display: flex;
    justify-content: space-between;
}
.course-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4%; /* Adds spacing between the two boxes */
    margin: 0 auto;
    max-width: 1000px; /* Optional: limits the overall width */
}
.course-col{
    flex-basis: 48%;
    background: #f8f3ff;
    border-radius: 10px;
    margin-bottom: 5%;
    padding: 20px 12px;
    box-sizing: border-box;
    transition: 0.5s;
}
.course-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
h2{
    text-align: center;
    font-weight: 600;
    margin: 10px 0;
}
.course-col:hover{
    box-shadow: 0 0 20px 0px rgba(0,0,0,0.2);
}
@media(max-width: 700px){
    .row{
        flex-direction: column;
    }
}
/*------------ about us page -----------*/
.sub-header{
    height: 50vh;
    width: 100%;
    background-image: linear-gradient(rgba(4,9,30,0.6),rgba(4,9,30,0.6)),url("images/background.jpg");
    background-position: center;
    background-size: cover;
    text-align: center;
    color: #fff;
}

.sub-header h1{
    margin: 0;
}

.about-us{
    width: 80%;
    margin: auto;
    padding-top: 80px;
    padding-bottom: 50px;
}

.about-col{
    flex-basis: 48%;
    padding: 30px 2px;
}

.about-col img{
    width: 100%;
}

.about-col h1{
    padding-top: 0;
}

.about-col p{
    padding: 15px 0 25px;
}

.purple-btn{
    border: 1px solid #4231d0;
    background: transparent;
    color: #4231d0;
}

.purple-btn:hover{
    color: #fff;
}
@media (max-width: 600px) {
    .sub-header {
        height: 30vh; /* shorter height on mobile */
        background-position: center center;
        background-size: cover;
        padding: 20px 10px; /* add padding for text */
    }

    .sub-header h1, 
    .sub-header p {
        font-size: 18px; /* shrink text a bit for small screens */
    }
}

/*------------ algebra 1 page -----------*/
body{
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f4f4f4;
    color: black;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
th, td {
    border: 1px solid #6a0dad; /* Your purple color */
    padding: 10px;
    text-align: center;
    color: black; /* Ensures table text is black */
}

th {
    background-color: #6a0dad;
    color: white;
}
p{
    color: black;
}

.center-image {
    display: block;
    margin: 20px auto;
    width: 80%;
    max-width: 500px;
}
b {
    color: black; /* Ensures all bold text stays black */
}
.fraction {
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  margin: 0 2px;
}
.fraction > .numerator {
  display: block;
  border-bottom: 1px solid;
  padding: 0 2px;
  font-size: 0.9em;
}
.fraction > .denom {
  display: block;
  padding: 0 2px;
  font-size: 0.9em;
}
.math-example {
    font-weight: bold;
    font-size: 1.5em;
}
.example {
    background: #D0CFF7;
    padding: 10px;
    border-left: 5px solid #413494;
    margin-bottom: 10px;
}
.question {
    margin-top: 20px;
}
.main-container {
    display: flex;
    align-items: flex-start;
    width: auto;
}
.highlight {
    font-weight: bold;
    color: #2c3e50;
}
.formula { 
    font-size: 1.2em; 
    font-weight: bold; 
    color: #6a0dad;
}
.sidebar{
    width: 300px;
    height: 100vh;
    background: white;
    color: #413494;
    padding: 20px;
    position: absolute;
    top: 383px;
    left: 0;
}
.right-sidebar {
    width: 300px;
    height: 100vh;
    background: #413494;
    padding: 20px;
    position: absolute;
    top: 383px;
    right: 0;
}
.right-sidebar h2 {
    font-size: 1.5em;
    color: white;
}

.right-sidebar p {
    font-size: 1em;
    color: white;
    line-height: 1.5;
}
.sidebar h2 {
    font-size: 20px;
    text-align: center;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar ul li {
    padding: 12px;
    border-bottom: 1px solid white;
}
.sidebar ul li a {
    color: #413494;
    text-decoration: none;
    display: block;
    transition: 0.4s;
}
.sidebar ul li a:hover {
    background: #f7f6f3;
    padding-left: 10px;
}
.content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.legend {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.legend-item .icon {
    width: 20px;
    height: 20px;
    border: 1px solid black;
}
.unit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
}
.unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}
.unit a {
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    color: black;
    margin-bottom: 10px;
    transition: color 0.1s ease, text-decoration 0.1s ease;
}
.unit a:hover{
    text-decoration: underline;
    color: #4231d0;
}
.question-icons {
    display: flex;
    gap: 5px;
}
.icon {
    width: 20px;
    height: 20px;
    border: 1px solid black;
    position: relative;
    cursor: pointer;
}
.icon.completed {
    background-color: green !important;
    border: 1px solid #ccc;  
}
.icon.incorrect {
    background-color: red !important;
    border: 1px solid #ccc;  
}
.popup {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    width: 200px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    pointer-events: auto;
}
.icon:hover .popup {
    display: block;
}
.separator {
    width: 50%;
    height: 1px;
    background: #ccc;
    margin: 15px auto;
}
.centered-content {
    text-align: center;
}
ul {
    list-style-position: inside; /* Keeps bullet points centered */
    display: inline-block; /* Makes the list behave like an inline element */
    text-align: left; /* Ensures text inside stays aligned */
}
li{
    list-style-position: inside;
}
.question-links {
    list-style-type: none;
    padding: 0;
}
.question-links li {
    margin: 10px 0;
}
.question-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background-color: #6a0dad;
    color: #fff;
    width: 350px;
    height: 60px;
    padding: 0px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 1.1em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.question-links a:hover {
    background-color: #413494;
}
.question-button .btn-icon {
    width: 40px; /* Adjust size as needed */
    height: 40px;
    margin-right: 10px;
}
 /* Icon container mimicking the Algebra page structure */
.question-button .icon {
  width: 40px; /* Adjust as needed */
  height: 40px;
  margin-right: 10px;
  flex-shrink: 0;
}
.question-button span {
  display: inline-block;
  line-height: 1.2;
}
.step {
    margin: 10px 0;
}
.tip {
    background-color: #D0CFF7;
    border-left: 5px solid #6a0dad;
    padding: 10px;
    font-style: italic;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}
@media (max-width: 1200px) {
    .sidebar {
        display: none;
    }
    .right-sidebar{
        display: none;
    }
    .content {
        margin-left: 0;
    }
    .content {
        padding: 10px; /* Reduces padding */
    }

    .unit a {
        font-size: 14px; /* Smaller font size for better readability */
    }

    .question-links a {
        width: 100%; /* Make links full width */
        max-width: none; /* Remove max width on small screens */
    }

    .legend {
        flex-direction: column; /* Stack legend items vertically */
        align-items: flex-start;
    }

    .popup {
        width: 180px; /* Smaller popup for mobile */
    }
    .question-links a {
        width: 300px;
    }
}

/*------------ sign up page -----------*/
.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: white;
}

.form-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px; /* Increased max width */
    height: auto;
    padding: 40px;
    background-color: #2c2c2c;
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    color: white;
}

.register-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: .5s ease-in-out;
}

.top span {
    color: #fff;
    font-size: small;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.top span a {
    font-weight: 500;
    color: #fff;
    margin-left: 5px;
}

.two-forms {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Ensures wrapping on smaller screens */
}

.input-box {
    margin-bottom: 24px;
    position: relative;
    width: 100%;
}

.input-field {
    font-size: 15px;
    background: rgba(66, 49, 208, 0.20);
    color: #fff;
    height: 50px;
    width: 100%;
    padding: 0 10px 0 45px;
    border: none;
    border-radius: 30px;
    outline: none;
    transition: .2s ease;
    box-sizing: border-box;
}

.input-field:hover, .input-field:focus {
    background: rgba(66, 49, 208, 0.25);
}

::placeholder {
    color: #fff;
}

.input-box i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #fff;
}

.submit {
    font-size: 15px;
    font-weight: 500;
    color: white;
    height: 45px;
    width: 100%;
    border: none;
    border-radius: 30px;
    outline: none;
    background: rgba(66, 49, 208, 0.7);
    cursor: pointer;
    transition: .3s ease-in-out;
}

.submit:hover {
    background: rgba(66, 49, 208, 0.5);
    box-shadow: 1px 5px 7px 1px rgba(0, 0, 0, 0.2);
}

.two-col {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: small;
    margin-top: 20px;
}

.two-col .one {
    display: flex;
    gap: 5px;
}

.two label a {
    text-decoration: none;
    color: #fff;
}

.two label a:hover {
    text-decoration: underline;
}

/* RESPONSIVE LAYOUTS */
@media (min-width: 768px) {
    .two-forms {
        display: flex;
        flex-wrap: nowrap; /* Prevents wrapping when screen is large enough */
        align-items: center;
    }

    .input-box.half-width {
        width: 48%; /* First name & Last name take half width */
    }

    .input-box.full-width {
        width: 100%; /* Email & Password take full width */
    }
}

/* On smaller screens, all fields take full width */
@media (max-width: 768px) {
    .two-forms {
        flex-direction: column;
    }
    
    .input-box {
        width: 100%;
    }
}

/*------------ question pages -----------*/
.question-section {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
}
.question-section h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}
.question-section p {
    font-size: 1.2em;
    margin-bottom: 20px;
}
.question-section form {
    margin-bottom: 20px;
}
.question-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    cursor: pointer;
}
.question-section input[type="radio"] {
    margin-right: 10px;
}
.question-section button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #6a0dad;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.question-section button:hover {
    background-color: #413494;
}
#feedback {
    font-size: 1.2em;
    margin-top: 20px;
}
/* Back link styling */
.back-link {
    text-align: center;
    margin: 20px 0;
}
.back-link a {
    text-decoration: none;
    font-size: 1.1em;
    color: #6a0dad;
    border: 1px solid #6a0dad;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.back-link a:hover {
    background-color: #6a0dad;
    color: #fff;
}

/*------------ geometry -----------*/
.image-placeholder {
    background: #ddd;
    text-align: center;
    padding: 20px;
    margin: 10px 0;
    border-radius: 5px;
}
