html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff; /* white text for dark backgrounds */
    background: linear-gradient(90deg, #6a11cb, #2575fc); /* purple-blue gradient */
    padding: 10px 0;
    border-radius: 8px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #2a003f; /* dark purple background */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: 1px;
}

.form-label {
    color: #ddd;
    font-weight: 500;
    display: block;
    text-align: left;
}

.form-control {
    background-color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.btn-login {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    border: none;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

    .btn-login:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

.signup-text {
    margin-top: 15px;
    color: #ccc;
}

    .signup-text a {
        color: #6a11cb;
        font-weight: bold;
        text-decoration: none;
    }

        .signup-text a:hover {
            text-decoration: underline;
        }

.register-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 30px;
    background-color: #2a003f; /* dark purple */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.register-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
}

.form-label {
    color: #ddd;
    font-weight: 500;
    display: block;
    text-align: left;
    margin-bottom: 5px;
}

.form-control, .form-select {
    background-color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 10px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.form-select {
    height: 40px;
}

.btn-register {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    border: none;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    font-size: 1rem;
}

    .btn-register:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

.validation-message, .text-danger {
    font-size: 0.85rem;
    color: #ff6b6b;
    text-align: left;
    display: block;
    margin-top: 3px;
}

.alert {
    border-radius: 8px;
    margin-bottom: 15px;
}
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    margin-top: 20px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #6a11cb; /* matches the button gradient */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== Question Page Styles ===== */
.question-page .page-title {
    color: #4b0082;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.question-page .no-exam {
    color: #6c757d;
    text-align: center;
    margin-top: 1rem;
}

.question-page .page-card {
    background: white;
    border-radius: 0.6rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Table styling */
.question-page .question-table thead {
    background-color: #4b0082;
    color: white;
    font-weight: 600;
}

.question-page .question-table td,
.question-page .question-table th {
    text-align: center;
    vertical-align: middle;
}

.question-page .question-table tr:nth-child(odd) {
    background-color: rgba(75, 0, 130, 0.04);
}

.question-page .question-table tbody tr:hover {
    background-color: rgba(75, 0, 130, 0.1);
    transition: background-color 0.2s ease-in-out;
}

/* Buttons */
.question-page .btn-edit {
    background-color: #6c63ff;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    margin-right: 0.3rem;
    transition: all 0.2s ease-in-out;
}

    .question-page .btn-edit:hover {
        background-color: #4b0082;
        box-shadow: 0 0 8px rgba(75, 0, 130, 0.4);
    }

.question-page .btn-delete {
    background-color: #ff4b5c;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    transition: all 0.2s ease-in-out;
}

    .question-page .btn-delete:hover {
        background-color: #d90429;
        box-shadow: 0 0 8px rgba(217, 4, 41, 0.4);
    }


/* --- Question edit --- */
h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4b0082; /* Indigo/Dark Purple */
    text-align: center;
    margin-bottom: 1.5rem;
}

/* --- Edit Form Container --- */
.edit-form {
    max-width: 600px;
    margin: 2rem auto;
    background: #1e1e2f;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

    /* --- Labels --- */
    .edit-form .form-label {
        font-weight: 600;
        color: #e0e0ff;
    }

    /* --- Input Fields --- */
    .edit-form .form-control,
    .edit-form .form-select {
        background-color: #2b2b40;
        border: 1px solid #444;
        color: #f5f5f5;
        border-radius: 8px;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .edit-form .form-control:focus,
        .edit-form .form-select:focus {
            border-color: #6c63ff;
            box-shadow: 0 0 6px rgba(108, 99, 255, 0.6);
            outline: none;
        }

    /* --- Validation Messages --- */
    .edit-form .validation-message {
        color: #ff6b6b;
        font-size: 0.85rem;
    }

    /* --- Submit Button --- */
    .edit-form button[type="submit"] {
        background: #6c63ff;
        border: none;
        border-radius: 8px;
        padding: 0.7rem 1.2rem;
        font-weight: bold;
        font-size: 1rem;
        color: #fff;
        cursor: pointer;
        width: 100%;
        transition: background 0.3s ease, transform 0.1s ease;
    }

        .edit-form button[type="submit"]:hover {
            background: #574fe1;
            transform: scale(1.02);
        }

/* --- Flash Message --- */
.flash-message {
    max-width: 600px;
    margin: 1rem auto;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

    /* Success/Failure colors (you can keep @FlashMessageCss logic) */
    .flash-message.alert-success {
        background-color: #2e7d32;
        color: #e8f5e9;
        border: 1px solid #388e3c;
    }

    .flash-message.alert-danger {
        background-color: #c62828;
        color: #ffebee;
        border: 1px solid #b71c1c;
    }

.nav {
    display: flex;
    justify-content: flex-start; /* Left align */
    background-color: #f8f9fa;
    border-radius: 0.4rem;
    padding: 0.4rem;
    margin-bottom: 1rem;
}

.nav-link {
    color: #4b0082; /* Purple text */
    font-weight: 600;
    margin-right: 0.5rem;
    border-radius: 0.4rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s ease-in-out;
    outline: none; /* Removes blue focus box */
    box-shadow: none;
}

    .nav-link:hover {
        background-color: rgba(75, 0, 130, 0.08); /* Slight purple glow */
        box-shadow: 0 0 8px rgba(75, 0, 130, 0.3);
        text-decoration: none;
    }

    .nav-link.active {
        background-color: transparent; /* No box */
        color: #4b0082; /* Keep the text purple */
        font-weight: 700;
        text-shadow: 0 0 6px rgba(75, 0, 130, 0.7); /* Glow text */
        box-shadow: none; /* No box shadow */
    }

    .nav-link:focus,
    .nav-link:active {
        outline: none !important;
        box-shadow: none !important; /* Removes Bootstrap blue shadow */
    }

.student-page h3 {
    color: #4b0082;
    margin-bottom: 1rem;
    font-weight: 700;
}

.student-page h4 {
    color: #6c757d;
    text-align: center;
    margin-top: 1rem;
}

.student-page .table {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

    .student-page .table thead {
        background-color: #4b0082;
        color: white;
        font-weight: 600;
    }

.student-page .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(75, 0, 130, 0.04);
}

.student-page .table-hover tbody tr:hover {
    background-color: rgba(75, 0, 130, 0.1);
    transition: background-color 0.2s ease-in-out;
}

.student-page .table td,
.student-page .table th {
    vertical-align: middle;
    text-align: center;
}

.student-page .btn-secondary {
    background-color: #6c63ff;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    transition: all 0.2s ease-in-out;
}

    .student-page .btn-secondary:hover {
        background-color: #4b0082;
        box-shadow: 0 0 8px rgba(75, 0, 130, 0.4);
    }
/* ===== Exam Page Styles ===== */
.exam-page .no-exam {
    color: #6c757d;
    text-align: center;
    margin-top: 1rem;
}

.exam-page .page-card {
    background: white;
    border-radius: 0.6rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Table Styling */
.exam-page .exam-table thead {
    background-color: #4b0082;
    color: white;
    font-weight: 600;
}

.exam-page .exam-table td,
.exam-page .exam-table th {
    text-align: center;
    vertical-align: middle;
}

.exam-page .exam-table tr:nth-child(odd) {
    background-color: rgba(75, 0, 130, 0.04);
}

.exam-page .exam-table tbody tr:hover {
    background-color: rgba(75, 0, 130, 0.1);
    transition: background-color 0.2s ease-in-out;
}

/* Buttons */
.exam-page .btn-view {
    background-color: #6c63ff;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    margin-right: 0.3rem;
    transition: all 0.2s ease-in-out;
}

    .exam-page .btn-view:hover {
        background-color: #4b0082;
        box-shadow: 0 0 8px rgba(75, 0, 130, 0.4);
    }

.exam-page .btn-take {
    background-color: #00b894;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    margin-right: 0.3rem;
    transition: all 0.2s ease-in-out;
}

    .exam-page .btn-take:hover {
        background-color: #009d81;
        box-shadow: 0 0 8px rgba(0, 184, 148, 0.4);
    }

.exam-page .btn-delete {
    background-color: #ff4b5c;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 0.4rem;
    transition: all 0.2s ease-in-out;
}

    .exam-page .btn-delete:hover {
        background-color: #d90429;
        box-shadow: 0 0 8px rgba(217, 4, 41, 0.4);
    }
/* ===== Generate Exam Page Styles ===== */
.generate-exam-page .form-card {
    background: white;
    border-radius: 0.6rem;
    padding: 1.5rem;
    max-width: 450px;
    margin: 1rem auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.generate-exam-page .page-title {
    text-align: center;
    color: #4b0082;
    font-weight: 600;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.generate-exam-page .custom-input {
    border-radius: 0.4rem;
    border: 1px solid #ccc;
    transition: all 0.2s ease-in-out;
}

    .generate-exam-page .custom-input:focus {
        border-color: #4b0082;
        box-shadow: 0 0 5px rgba(75, 0, 130, 0.3);
        outline: none;
    }

.generate-exam-page .form-error {
    color: #d90429;
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.generate-exam-page .btn-generate {
    background-color: #4b0082;
    color: white;
    font-weight: 600;
    width: 100%;
    padding: 0.6rem;
    border-radius: 0.4rem;
    border: none;
    transition: all 0.2s ease-in-out;
}

    .generate-exam-page .btn-generate:hover {
        background-color: #3a0066;
        box-shadow: 0 0 8px rgba(75, 0, 130, 0.4);
    }
.generate-exam-page .form-label {
    font-weight: 600;
    font-size: 1rem;
    color: #4b0082; /* Matches your theme */
    margin-bottom: 0.3rem;
    display: inline-block;
    letter-spacing: 0.3px;
}
/* ===== Page Title & Student Info ===== */
.show-exam-page h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4b0082; /* Theme purple */
    margin-bottom: 0.5rem;
}

.show-exam-page .student-info {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ===== Question Section ===== */
.show-exam-page fieldset {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.show-exam-page legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b0082;
    margin-bottom: 0.8rem;
}

/* ===== Radio Buttons ===== */
.show-exam-page .form-check {
    margin-bottom: 0.5rem;
}

.show-exam-page .form-check-input {
    accent-color: #4b0082; /* Make radio button purple */
    cursor: pointer;
}

.show-exam-page .form-check-label {
    margin-left: 0.4rem;
    cursor: pointer;
}

/* ===== Error Message ===== */
.show-exam-page .text-danger {
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* ===== Submit Button ===== */
.show-exam-page button[type="submit"] {
    display: block;
    width: 100%;
    background-color: #4b0082;
    border: none;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out;
}

    .show-exam-page button[type="submit"]:hover {
        background-color: #3b006b;
    }

/* ===== Page Titles ===== */
.show-exam-result h3, .show-exam-result h6 {
    color: #4b0082; /* Theme purple */
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.show-exam-result h6 {
    font-weight: 500;
    font-size: 1rem;
}

/* ===== Question Card ===== */
.show-exam-result fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ===== Question Text ===== */
.show-exam-result legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b0082;
    margin-bottom: 1rem;
}

/* ===== Choice Styling ===== */
.show-exam-result .alert {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
}

/* Correct choice */
.show-exam-result .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Incorrect choice selected */
.show-exam-result .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Neutral / not selected incorrect choice */
.show-exam-result .alert-light {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #ddd;
}

/* Radio button styling */
.show-exam-result .form-check-input {
    accent-color: #4b0082;
    cursor: default;
}

.show-exam-result .form-check-label {
    margin-bottom: 0;
    cursor: default;
}

/* Back button */
.show-exam-result .btn-secondary {
    background-color: #4b0082;
    border: none;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

    .show-exam-result .btn-secondary:hover {
        background-color: #3b006b;
    }
.home-welcome {
    background-color: #f3f0ff; /* light purple background */
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 2rem;
}

    .home-welcome h1 {
        font-size: 2rem;
        color: #4b0082; /* dark purple */
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .home-welcome p {
        font-size: 1.1rem;
        color: #4b0082;
        margin: 0;
    }
.dashboard-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.card-stat {
    flex: 1 1 12rem;
    background-color: #dcd0ff; /* lighter purple for personalization */
    color: #4b0082; /* dark purple text */
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(75,0,130,0.15);
    transition: transform 0.2s ease-in-out;
}

    .card-stat h5 {
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .card-stat p {
        font-size: 1.4rem;
        font-weight: 700;
    }

    .card-stat:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(75,0,130,0.3); /* subtle glow on hover */
    }
