/*Universal Design*/
body {
    margin: 0;
    padding: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    background-color: #EAD7C1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 1500'%3E%3Cdefs%3E%3Crect stroke='%23EAD7C1' stroke-width='0' width='1' height='1' id='s'/%3E%3Cpattern id='a' width='3' height='3' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cuse fill='%23e8d5bf' href='%23s' y='2'/%3E%3Cuse fill='%23e8d5bf' href='%23s' x='1' y='2'/%3E%3Cuse fill='%23e5d3bd' href='%23s' x='2' y='2'/%3E%3Cuse fill='%23e5d3bd' href='%23s'/%3E%3Cuse fill='%23e3d0bb' href='%23s' x='2'/%3E%3Cuse fill='%23e3d0bb' href='%23s' x='1' y='1'/%3E%3C/pattern%3E%3Cpattern id='b' width='7' height='11' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23e0ceb9'%3E%3Cuse href='%23s'/%3E%3Cuse href='%23s' y='5' /%3E%3Cuse href='%23s' x='1' y='10'/%3E%3Cuse href='%23s' x='2' y='1'/%3E%3Cuse href='%23s' x='2' y='4'/%3E%3Cuse href='%23s' x='3' y='8'/%3E%3Cuse href='%23s' x='4' y='3'/%3E%3Cuse href='%23s' x='4' y='7'/%3E%3Cuse href='%23s' x='5' y='2'/%3E%3Cuse href='%23s' x='5' y='6'/%3E%3Cuse href='%23s' x='6' y='9'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='h' width='5' height='13' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23e0ceb9'%3E%3Cuse href='%23s' y='5'/%3E%3Cuse href='%23s' y='8'/%3E%3Cuse href='%23s' x='1' y='1'/%3E%3Cuse href='%23s' x='1' y='9'/%3E%3Cuse href='%23s' x='1' y='12'/%3E%3Cuse href='%23s' x='2'/%3E%3Cuse href='%23s' x='2' y='4'/%3E%3Cuse href='%23s' x='3' y='2'/%3E%3Cuse href='%23s' x='3' y='6'/%3E%3Cuse href='%23s' x='3' y='11'/%3E%3Cuse href='%23s' x='4' y='3'/%3E%3Cuse href='%23s' x='4' y='7'/%3E%3Cuse href='%23s' x='4' y='10'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='c' width='17' height='13' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23deccb7'%3E%3Cuse href='%23s' y='11'/%3E%3Cuse href='%23s' x='2' y='9'/%3E%3Cuse href='%23s' x='5' y='12'/%3E%3Cuse href='%23s' x='9' y='4'/%3E%3Cuse href='%23s' x='12' y='1'/%3E%3Cuse href='%23s' x='16' y='6'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='d' width='19' height='17' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23EAD7C1'%3E%3Cuse href='%23s' y='9'/%3E%3Cuse href='%23s' x='16' y='5'/%3E%3Cuse href='%23s' x='14' y='2'/%3E%3Cuse href='%23s' x='11' y='11'/%3E%3Cuse href='%23s' x='6' y='14'/%3E%3C/g%3E%3Cg fill='%23dccab5'%3E%3Cuse href='%23s' x='3' y='13'/%3E%3Cuse href='%23s' x='9' y='7'/%3E%3Cuse href='%23s' x='13' y='10'/%3E%3Cuse href='%23s' x='15' y='4'/%3E%3Cuse href='%23s' x='18' y='1'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='e' width='47' height='53' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23CCBBA8'%3E%3Cuse href='%23s' x='2' y='5'/%3E%3Cuse href='%23s' x='16' y='38'/%3E%3Cuse href='%23s' x='46' y='42'/%3E%3Cuse href='%23s' x='29' y='20'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='f' width='59' height='71' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23CCBBA8'%3E%3Cuse href='%23s' x='33' y='13'/%3E%3Cuse href='%23s' x='27' y='54'/%3E%3Cuse href='%23s' x='55' y='55'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='g' width='139' height='97' patternUnits='userSpaceOnUse' patternTransform='scale(13.1) translate(-923.66 -692.75)'%3E%3Cg fill='%23CCBBA8'%3E%3Cuse href='%23s' x='11' y='8'/%3E%3Cuse href='%23s' x='51' y='13'/%3E%3Cuse href='%23s' x='17' y='73'/%3E%3Cuse href='%23s' x='99' y='57'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23b)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23h)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23c)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23d)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23e)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23f)' width='100%25' height='100%25'/%3E%3Crect fill='url(%23g)' width='100%25' height='100%25'/%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: cover;

}

.dt-button {
    background-color: #d4af37 !important;
    color: #fdf6f0 !important;
    border: none !important;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.dt-button:hover {
    background-color: #d4af37 !important;
    transform: translateY(-2px);
}

* {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

/* Optional: Fallback for body text */
span {
    color: #800000;
    font-weight: 900;
}

h1 {
    font-weight: 600;
}

p {
    font-weight: medium;
}

.card-header {
    background-color: maroon;
    color: white !important;
    font-weight: 600 !important;
}

.form-label {
    font-size: larger;
}

.form-control {
    padding: 15px;
}

/*Quiz.php design*/

.bg-primary {
    background-color: #ead7c1 !important;
    color: black !important;
}

/*Buttons*/
.btn {
    border-radius: 5px !important;
}

.btn-warning {
    width: 50%;
    padding: 10px;
    font-size: medium !important;
}

.btn-outline-light {
    background-color: white;
    color: black;
}

.btn-danger {
    width: 50%;
    padding: 10px;
    font-size: medium !important;
    transition: all 200ms ease-in-out;
}

.btn-primary {
    background-color: #d4af37;
    /* Maroon base */
    width: 50%;
    padding: 10px;
    border: none;
    font-size: medium !important;
    font-weight: 500;
    color: #fdf6f0;
    /* Soft ivory text for contrast */
    transition: all 200ms ease-in-out;
}

.btn-primary:hover {
    background-color: #d4af37;
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    background-color: rgb(201, 201, 201);
    color: black;
}

.btn-info {
    width: 50%;
    padding: 10px;
    font-size: medium !important;
    font-size: large;
}

.btn-success {
    width: 50%;
    padding: 10px;
    font-size: large;
    transition: 200ms;
    font-size: medium !important;
}

.btn-success:hover {
    transform: translateY(-5px);
}

.btn-secondary {
    width: 50%;
    padding: 10px;
    font-size: medium !important;
    transition: 200ms;
}

.btn-secondary:hover {
    transform: translateY(-5px);
}

.btn-danger:hover {
    transform: translateY(-5px);
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, #6a1b1b, #800000);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
}

.navbar-brand img {
    border-radius: 50%;
}

.navbar .btn {
    background-color: white;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 0;
}


.offcanvas {
    background-color: #800000;
    color: #faf9f6;
}


.offcanvas-body {
    z-index: 2;
    background-color: #ead7c1;
}

.offcanvas-header {
    background-color: #800000;
}


.offcanvas-title {
    color: #faf9f6;
    font-weight: 700;
    letter-spacing: 0.5px;
}


.offcanvas .btn-close {
    border-radius: 4px;
    opacity: 1;
    transition: background-color 0.2s ease-in-out;
}


.offcanvas-body img {
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
}


.offcanvas-body .nav-link {
    color: black;
    margin-top: 5px;
    border-radius: 6px;
    padding: 10px;
    transition: all 0.2s ease-in-out;
}

.offcanvas-body .nav-link.active {
    background-color: #800000;
    color: white !important;
}


.modal-header {
    background: linear-gradient(90deg, #6a1b1b, #800000);
    color: white;
}

.modal-title {
    color: white !important;
}

.modal-body {
    background-color: #ead7c1;
    color: black !important;
}

.btn-close {
    background-color: #dc3545;

    border-radius: 5px;
    opacity: 100%;
}


#login-form-section {
    margin-top: 100px;
    background: linear-gradient(360deg, #3e0000, #6a0d0d, #800000);
    color: white;
}

#otp-form-section {
    margin-top: 50px;
    background: linear-gradient(360deg, #3e0000, #6a0d0d, #800000);
    color: white;
}

#forgot-form {
    margin-top: 150px;
    background: linear-gradient(360deg, #3e0000, #6a0d0d, #800000);

    color: white;
}

/*Result.php*/
#result-card {
    background-color: #800000 !important;
    /* Maroon to match theme */
    color: black;
    /* Soft ivory text for contrast */
    border-radius: 10px;
}

#profile-card {
    background-color: #ead7c1 !important;
    /* Warm muted beige-gray */
    color: black;
    /* Dark brown text for softer look */
}

.card {
    border-radius: 10px !important;
}

#congratulations-card {
    margin-top: 100px;
}





.icon {
    font-size: 5rem;
    color: rgb(145, 138, 51);
}

/*Leaderboard*/
#leaderboard-card {
    background: linear-gradient(180deg, #800000, #a83232);

    max-height: 100vh;
    overflow-y: auto;
}

.quiz-card {
    position: relative;
    background: linear-gradient(360deg, #3e0000, #6a0d0d, #800000);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
}

.quiz-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card.leaderboard-entry {
    border: none;
    padding: 5px 5px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.leaderboard-entry:hover {
    transform: translateY(0px);
}

.card.leaderboard-entry.top-1 {
    background-color: #FFD700;
}

.card.leaderboard-entry.top-2 {
    background-color: #C0C0C0;
}

.card.leaderboard-entry.top-3 {
    background-color: #CD7F32;
}

.profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.rank-number {
    font-weight: bold;
    font-size: 1.1rem;
    color: #495057;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.score-badge {
    font-size: 1.1rem;
    font-weight: 600;
    color: #198754;
}

#leaderboard-card {
    background-position: center;
    background-size: cover;
    background-color: #d4c9be;
    border-radius: 5px;
}

/*Achievements*/
.medal-card {
    border: none;
    background: transparent;
    padding: 20px;

    transition: transform 0.2s ease-in-out;
}

.medal-card:hover {
    transform: translateY(-5px);
}

.medal-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

#achievements-card {
    background: linear-gradient(180deg, #800000, #a83232);

    border-radius: 5px;
}

/*Fade in*/
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/*Difficulty*/
.difficulty-card {
    background-image: url(game_img/difficulty_bg.png);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 16px;
    text-align: center;
}

/* Optional hover effect */
.difficulty-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.difficulty-icon {
    font-size: 2.5rem;
}

.easy .difficulty-icon {
    color: #28a745;
}

.medium .difficulty-icon {
    color: #94720b;
}

.hard .difficulty-icon {
    color: #dc3545;
}

/*Review Module*/

/*choose Module*/
#module {
    background: linear-gradient(360deg, #3e0000, #6a0d0d, #800000);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 16px;
    text-align: center;
}

/* Optional hover effect */
#module:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/*Subejct*/
.subject-card {
    position: relative;
    background: linear-gradient(360deg, #3e0000, #6a0d0d, #800000);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    height: 100%;
}

.subject-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

a {
    text-decoration: none;
}

.subject-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 2rem;

    height: 100%;
}

#icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/*Loading*/
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0000009a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #800000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 426px) {
    .leaderboard-entry .profile-img {
        width: 50px !important;
        height: 50px !important;
    }

    label {
        font-size: 13px;
    }

    .icon {
        font-size: 3rem;
        color: rgb(145, 138, 51);
    }

    .title {
        font-size: 25px !important;
    }

    #form-bg {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    #quiz_instruction {
        font-size: 15px;
    }
}

@media (max-width: 426px) {
    .leaderboard-entry .profile-img {
        width: 50px !important;
        height: 50px !important;
    }

    .icon {
        font-size: 3rem;
        color: rgb(145, 138, 51);
    }

    .title {
        font-size: 25px !important;
    }

    #form-bg {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    #quiz_instruction {
        font-size: 15px;
    }
}