.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1) !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}
.navbar-brand {
    padding: 5px 10px !important;
    margin-right: 15px !important;
}

.navbar-brand img {
    height: 50px !important;
}
.navbar .container {
    padding-top: 15;
    padding-bottom: 15;
}

:root {
    --background-color-light: #eef2f5;
    --text-color-light: #000000;
    --container-bg-light: #ffffff;
    --header-bg-light: #eaf6ff;
    --header-text-light: #000000;
    --footer-bg-light: #2c3e50;
    --footer-text-light: #000000;
    --footer-link-light: #ecf0f1;

    --background-color-dark: #1a1a1a;
    --text-color-dark: #ecf0f1;
    --container-bg-dark: #2c3e50;
    --header-bg-dark: #ebf1f5;
    --header-text-dark: #ecf0f1;
    --footer-bg-dark: #eaf6ff;
    --footer-text-dark: #000000;
    --footer-link-dark: #000000;

    --success-color: #78C841;
    --warning-color: #FF9B2F;
    --danger-color: #FB4141;
}

/* General Body and Typography */
html {
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif; /* Modern font */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Changed from 100vh to 100% */
    position: relative;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
}

/* Styles for action buttons in tables */
.action-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap if space is limited */
    gap: 10px; /* Increased gap between buttons for better spacing */
    align-items: center; /* Vertically align buttons */
    justify-content: flex-start; /* Align buttons to the start of the container */
}

.action-buttons .btn {
    margin: 0; /* Remove default button margins if any */
    padding: 5px 8px; /* Reduced padding for smaller buttons */
    font-size: 0.8em; /* Even smaller font for compactness */
    white-space: nowrap; /* Prevent text wrapping inside buttons */
    height: 28px; /* Slightly reduced fixed height for consistent alignment */
    display: flex; /* Use flex for internal centering of text */
    align-items: center; /* Vertically center text */
    justify-content: center; /* Horizontally center text */
    box-sizing: border-box; /* Ensure padding is included in total width/height */
}

.container {
    width: 90%;
    margin: 0 auto;
    background: var(--container-bg-light);
    padding: 0;
    border-radius: 0; /* More rounded corners */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* More pronounced, professional shadow */
    flex: 1 0 auto; /* Allow container to grow and shrink */
    transition: background-color 0.3s;
    box-sizing: border-box;
}

body.dark-mode .container {
    background: var(--container-bg-dark);
}

/* Specific styles for login/registration forms */
.container.form-container {
    max-width: 700px; /* Adjusted width for form pages to accommodate two columns */
    margin: 50px auto; /* Center vertically and horizontally, more space */
    padding: 40px; /* More padding */
    border-radius: 15px; /* Even more rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Stronger, more professional shadow */
    text-align: center; /* Center content like h2 and p */
}

.form-container h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #34495e; /* Darker heading */
}

.form-container form div {
    margin-bottom: 20px; /* More space between form fields */
    text-align: left; /* Align labels and inputs to the left */
}

.form-container label {
    font-size: 1.1em;
    margin-bottom: 8px; /* More space below label */
}

.form-container input[type="submit"],
.form-container .btn {
    width: 100%; /* Full width button */
    padding: 15px; /* Larger button */
    font-size: 1.2em;
    margin-top: 20px; /* Space above button */
}

.form-container p {
    margin-top: 25px; /* Space above "Already have an account?" text */
    font-size: 1.05em;
}

h1, h2, h3 {
    color: #2c3e50; /* Darker, more impactful headings */
    margin-bottom: 20px; /* Increased margin */
    font-weight: 700; /* Bolder headings */
}

p {
    margin-bottom: 15px;
}

.container a {
    color: #1A2A80; /* A vibrant blue for links */
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease; /* Smooth color and slight transform on hover */
}

.container a:hover {
    color: #2980b9;
    text-decoration: underline;
    transform: translateY(-1px); /* Slight lift on hover */
}

/* Header Styles */
header {
    background-color: var(--header-bg-light);
    color: #ffffff;
    padding: 0; /* Increased padding */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* More prominent shadow */
    transition: background-color 0.3s;
    height: 120px;
}

body.dark-mode header {
    background-color: var(--header-bg-dark);
}

header h1 {
    color: var(--header-text-light);
    margin: 0;
    float: left;
    font-size: 2em; /* Larger heading */
    letter-spacing: 1px; /* Slight letter spacing */
    transition: color 0.3s;
}

body.dark-mode header h1 {
    color: var(--header-text-dark);
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin-left: 25px; /* Increased spacing */
}

.navbar-nav .nav-link {
    color: #2c3e50 !important; /* Dark color for light navbar */
    font-weight: bold !important; /* Made text bold */
    white-space: normal !important; /* Allow text wrapping */
    word-break: break-word !important; /* Ensure long words don't overflow */
    line-height: 1.2 !important; /* Reset line height for better readability */
    text-align: center !important; /* Center text if it wraps */
    padding: 10px 25px !important; /* Reduced vertical padding */
    transition: color 0.3s ease !important;
}

.navbar-nav .nav-link:hover {
    color: #667eea !important; /* Blue hover color */
}

.navbar-toggler {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 5px !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

body.dark-mode header nav ul li a {
    color: var(--header-text-dark);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-label {
    font-size: 1em;
    font-weight: 600;
}

.theme-switcher .theme-label {
    color: var(--header-text-light);
    transition: color 0.3s;
}

body.dark-mode .theme-switcher .theme-label {
    color: var(--header-text-dark);
}

.theme-switcher input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switcher label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    cursor: pointer;
}

.theme-switcher label:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.theme-switcher input:checked + label {
    background-color: #000000;
}

.theme-switcher input:checked + label:before {
    transform: translateX(26px);
}

header nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Subtle hover background */
    text-decoration: none;
}

/* Clearfix for header */
header .container::after {
    content: "";
    display: table;
    clear: both;
}

/* Form Styles */
form div {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #34495e; /* Match body text color */
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], textarea, select {
    width: 100%;
    padding: 12px; /* Increased padding */
    border: 1px solid #dcdcdc; /* Lighter, softer border */
    border-radius: 6px; /* More rounded */
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="date"]:focus, textarea:focus, select:focus {
    border-color: #000000; /* Highlight on focus */
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    outline: none;
}

input[type="submit"], .btn {
    background-color: #28a745; /* Vibrant blue button */
    color: white;
    padding: 12px 25px; /* Increased padding */
    border: none;
    border-radius: 6px; /* More rounded corners */
    cursor: pointer;
    font-size: 17px; /* Slightly larger font */
    font-weight: 600; /* Bolder text */
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

input[type="submit"]:hover, .btn:hover {
    background-color: #000000; /* Darker blue on hover */
    transform: translateY(-2px); /* More pronounced lift */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: #95a5a6; /* Softer grey secondary button */
    margin-left: 15px; /* Increased space */
    box-shadow: 0 4px 10px rgba(149, 165, 166, 0.2);
}

.btn-secondary:hover {
    background-color: #7f8c8d; /* Darker grey on hover */
    box-shadow: 0 6px 12px rgba(149, 165, 166, 0.3);
}

/* New Form Layout Classes */
.form-row {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 20px; /* Space between columns */
    margin-bottom: 20px; /* Space below the row */
}

.form-group {
    flex: 1; /* Each group takes equal space */
    min-width: 280px; /* Minimum width before wrapping */
    margin-bottom: 0; /* Reset margin as gap handles spacing */
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px; /* Increased margin */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* More visible shadow */
    border-radius: 8px; /* Rounded corners for table */
    overflow: hidden; /* Ensures rounded corners apply to content */
    /* Removed table-layout: fixed; to allow columns to size based on content */
}

table, th, td {
    border: 1px solid #ecf0f1; /* Lighter border */
}

th, td {
    padding: 10px 15px; /* Adjusted padding to match the image more closely */
    text-align: left;
    vertical-align: top; /* Align content to the top for multi-line cells */
    font-size: 0.95em; /* Keep font size consistent */
}

/* Specific width for the Actions column in tables */
table th:last-child,
table td:last-child {
    min-width: 200px; /* Adjusted width for actions to keep buttons on one line */
    white-space: nowrap; /* Prevent wrapping of buttons */
}

/* General table cell styling for text wrapping */
table td {
    word-wrap: break-word; /* Ensures long words break and wrap */
    overflow-wrap: break-word; /* Modern alternative to word-wrap */
    white-space: normal; /* Allow text to wrap naturally */
    height: auto; /* Allow row height to adjust to content */
}

/* Class for remarks column */
.remarks-cell {
    text-align: left; /* Changed to left-align based on the provided image */
    min-width: 280px; /* Ensure a sufficient minimum width for remarks */
    max-width: 350px; /* Allow it to expand but not excessively */
}

/* Removed .text-truncate-tooltip as it's no longer needed for table cells */

/* New class for no-wrap and smaller font size (retained if still needed elsewhere) */
.no-wrap-cell {
    white-space: nowrap;
    font-size: 0.85em;
}

/* Responsive table adjustments */
@media (max-width: 1200px) {
    table th, table td {
        padding: 8px 12px; /* Further reduce padding on smaller screens */
        font-size: 0.9em;
    }
    .remarks-cell {
        min-width: 220px;
        max-width: 300px;
    }
    table th:last-child,
    table td:last-child {
        min-width: 180px;
    }
}

@media (max-width: 992px) {
    table th, table td {
        padding: 6px 10px; /* Even further reduced padding */
        font-size: 0.85em;
    }

    .remarks-cell {
        min-width: 180px;
        max-width: 250px;
    }

    table th:last-child,
    table td:last-child {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #ecf0f1;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    table {
        border-radius: 0;
        box-shadow: none;
    }

    /* Hide less critical columns on very small screens */
    table:not(.responsive-quiz-table) thead th:nth-child(3), /* PAN Photo */
    table:not(.responsive-quiz-table) tbody td:nth-child(3),
    table:not(.responsive-quiz-table) thead th:nth-child(4), /* Aadhaar Front Photo */
    table:not(.responsive-quiz-table) tbody td:nth-child(4),
    table:not(.responsive-quiz-table) thead th:nth-child(5), /* Aadhaar Back Photo */
    table:not(.responsive-quiz-table) tbody td:nth-child(5) {
        display: none;
    }

    /* Responsive styles for quiz list table */
    .quiz-list-table thead th:nth-child(4), /* Description */
    .quiz-list-table tbody td:nth-child(4),
    .quiz-list-table thead th:nth-child(8), /* Registration Status */
    .quiz-list-table tbody td:nth-child(8) {
        display: none;
    }

    /* Responsive styles for quiz history table */
    .quiz-history-table thead th:nth-child(5), /* End Time */
    .quiz-history-table tbody td:nth-child(5),
    .quiz-history-table thead th:nth-child(7), /* Passing Score */
    .quiz-history-table tbody td:nth-child(7),
    .quiz-history-table thead th:nth-child(9), /* Result */
    .quiz-history-table tbody td:nth-child(9) {
        display: none;
    }

    .remarks-cell {
        min-width: 120px;
        max-width: none; /* Allow it to take available space */
    }

    table th:last-child,
    table td:last-child {
        min-width: 120px;
    }
}

th {
    background-color: #3E606F; /* Lighter header background */
    font-weight: 700; /* Bolder header text */
    color: #ffffff;
}

tr:nth-child(even) {
    background-color: #fefefe; /* Very light stripe */
}

/* Message Styles */
.error-message {
    color: var(--danger-color); /* Brighter red for errors */
    background-color: #fdeded; /* Very light red background */
    border: 1px solid #f5c6cb;
    padding: 12px; /* Increased padding */
    margin-top: 5px; /* Space above error message */
    margin-bottom: 0; /* Reset margin as form-group handles spacing */
    border-radius: 6px;
    font-weight: 500;
    display: block; /* Ensure it takes full width */
}

.success-message {
    color: var(--success-color); /* Brighter green for success */
    background-color: #e8f8f5; /* Very light green background */
    border: 1px solid #c3e6cb;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 66px;
    font-weight: 500;
}

/* Specific Landing Page Section Styles */
.hero {
    text-align: center;
    padding: 60px 30px; /* More padding */
    background: linear-gradient(135deg, #2ddde8, #28a745); /* Gradient background */
    color: #fff;
    border-radius: 12px;
    margin-bottom: 30px; /* Increased margin */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); /* Stronger shadow */
}

.hero h2 {
    color: #fff; /* White heading */
    font-size: 2.8em; /* Larger hero heading */
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* Subtle text shadow */
}

.hero p {
    font-size: 1.2em; /* Larger hero text */
    max-width: 700px;
    margin: 0 auto 30px auto; /* Center and add margin */
    opacity: 0.9;
}

.hero .btn {
    background-color: #fff; /* White button on gradient background */
    color: #000000; /* Blue text on white button */
    font-weight: 700;
    padding: 15px 30px; /* Larger button */
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero .btn:hover {
    background-color: #f0f0f0;
    color: #2980b9;
    transform: translateY(-3px); /* More pronounced lift */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.features, .about-us, .how-it-works {
    margin-bottom: 30px; /* Increased margin */
    padding: 20px;
    background-color: #fdfdfd; /* Slightly off-white background */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.features ul {
    list-style: none; /* Remove default bullet points */
    padding: 0;
    display: grid; /* Use grid for features */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px; /* Space between grid items */
}

.features li {
    background-color: #ecf0f1; /* Light grey background for feature items */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
}

.features li::before {
    content: '✓'; /* Custom checkmark icon */
    color: #2ecc71; /* Green checkmark */
    font-size: 1.2em;
    margin-right: 10px;
    font-weight: bold;
}

.cta {
    text-align: center;
    padding: 40px 30px; /* More padding */
    background-color: #34495e; /* Dark blue/grey background */
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cta h2 {
    color: #fff;
    font-size: 2.2em;
    margin-bottom: 20px;
}

.cta .btn {
    background-color: #2ecc71; /* Green button on dark background */
    color: #fff;
    font-weight: 700;
    padding: 15px 30px;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

.cta .btn:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg-light);
    color: #eff4f5; /* Lighter text */
    text-align: center;
    padding: 25px 0; /* Increased padding */
    margin-top: auto;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1); /* Top shadow */
    transition: background-color 0.3s;
}

body.dark-mode footer {
    background-color: var(--footer-bg-dark);
}

footer p {
    margin: 0;
    color: var(--footer-text-light);
    font-size: 0.9em;
    transition: color 0.3s;
}

body.dark-mode footer p {
    color: var(--footer-text-dark);
}

footer nav ul li a {
    color: #000000;
    font-weight: 500;
    transition: color 0.3s ease;
}

body.dark-mode footer nav ul li a {
    color: #000000;
}

footer nav ul li {
    display: inline-block;
    margin: 0 15px;
}

footer nav ul li a:hover {
    color: #000000;
    text-decoration: underline;
}

/* Layout for main content and sidebar */
.container.main-layout {
    display: flex;
    gap: 30px; /* Increased space between main content and sidebar */
    align-items: flex-start;
}

.main-content {
    flex: 3;
    min-width: 0;
    padding: 30px;
}

.sidebar {
    flex: 1;
    background-color: #ffffff; /* White background for sidebar */
    padding: 30px;
    border-radius: 10px; /* More rounded */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* More prominent shadow */
    position: sticky;
    top: 30px; /* Adjusted sticky position */
    max-height: calc(100vh - 60px); /* Adjusted max height */
    overflow-y: auto; /* Enable vertical scrolling for the sidebar itself if content exceeds */
    min-width: 250px; /* Slightly wider minimum width */
}

.sidebar-header {
    margin-bottom: 15px;
}

.sidebar h3 {
    color: #000000; /* Blue heading for sidebar */
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;
    font-size: 1.3em; /* Slightly larger */
    padding-bottom: 10px;
    border-bottom: 2px solid #dcdcdc; /* Lighter separator */
}

.notification-area-wrapper {
    height: 375px; /* Fixed height to show exactly 3 items (approx 125px per item including margin) */
    overflow: hidden; /* This will clip the scrolling content */
    position: relative;
    margin-top: 15px; /* Space between heading and scrolling content */
}

.notification-scroll-container {
    position: absolute;
    width: 100%;
    /* No fixed height or overflow here, JS handles transform */
}

.notification-item {
    background-color: #ffffff;
    border-left: 5px solid #000000;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.notification-item.unread,
.user-header .notification-entry.unread {
    background-color: #ffeeba; /* Light yellow for unread */
    border-color: #ffeeba; /* Slightly darker yellow border */
    font-weight: bold; /* Make unread text bolder */
    color: #856404;
}

.notification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.notification-item.viewed {
    background-color: #d4edda; /* Light green for viewed */
    border-color: #c3e6cb; /* Slightly darker green border */
    font-weight: normal; /* Reset font weight after viewing */
    color: #155724;
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-item h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.notification-item p {
    margin: 0;
    font-size: 0.9em;
    color: #7f8c8d;
    line-height: 1.4;
}

.notification-content {
    color: #000000;
    line-height: 1.6;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.notification-scroll-container {
    animation: scroll-up 40s linear infinite;
}

/* Admin Dashboard Specific Styles */
.admin-dashboard-body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f6; /* Light background for the whole dashboard */
}

/* User Dashboard Specific Styles */
.user-dashboard-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    background-color: #eef2f5; /* Consistent light background */
    color: #34495e;
}

.user-header {
    background-color: #2c3e50; /* Dark blue/grey */
    color: #8dbbc7;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-header .header-container {
    /* Removed max-width and margin: auto for full width */
    width: 100%; /* Ensure it takes full available width */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Keep some horizontal padding for content inside */
    box-sizing: border-box; /* Include padding in width calculation */
}

.user-header .logo {
    font-size: 28px;
    font-weight: 700;
    color: #a9d4df;
}

.user-header .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-header .main-nav ul li {
    margin-left: 25px;
}


.user-header .main-nav ul li a:hover {
    background-color: #34495e;
}

.user-header .navbar-nav {
    flex-direction: row !important;
    align-items: center;
    flex-wrap: nowrap;
}

.user-main-content-wrapper {
    display: flex;
    flex: 1;
    width: 95%;
    margin: 20px auto;
    box-sizing: border-box;
}

.user-sidebar {
    /* Removed fixed width */
    flex-basis: 280px; /* Set a preferred width, but allow shrinking/growing */
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-right: 20px;
    flex-shrink: 0; /* Prevent sidebar from shrinking too much */
}

.user-sidebar h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.user-info-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}

.user-info-card p {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #555;
}

.user-info-card .balance-amount {
    font-size: 2em;
    font-weight: 700;
    color: #28a745; /* Green for balance */
    margin-bottom: 15px;
}

.user-info-card .btn {
    display: inline-block;
    margin: 5px;
    padding: 8px 15px;
    font-size: 0.9em;
}

.user-sidebar .sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-sidebar .sidebar-links li {
    margin-bottom: 10px;
}

.user-sidebar .sidebar-links li a {
    display: block;
    padding: 12px 15px;
    background-color: #f0f4f7; /* Light background for links */
    color: #34495e;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
}

.user-sidebar .sidebar-links li a:hover {
    background-color: #d9edf7; /* Lighter blue on hover */
    color: #000000;
}

.user-content {
    flex: 1;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.user-content h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2em;
}

.user-content p {
    color: #555;
    margin-bottom: 20px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-cards .card {
    background-color: #fdfdfd;
    border: 1px solid #e9ecef;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.dashboard-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dashboard-cards .card h3 {
    color: #000000;
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
}

.dashboard-cards .card p {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

.dashboard-cards .card .btn {
    padding: 10px 20px;
    font-size: 1em;
}

.dashboard-section {
    background-color: #fdfdfd;
    border: 1px solid #e9ecef;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.dashboard-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.user-footer {
    background-color: #2c3e50;
    color: #eff4f5;
    text-align: center;
    padding: 25px 0;
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.user-footer .footer-container {
    /* Removed max-width and margin: auto for full width */
    width: 100%; /* Ensure it takes full available width */
    padding: 0 20px; /* Keep some horizontal padding for content inside */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box; /* Include padding in width calculation */
}

.user-footer p {
    margin: 0;
    color: #a0a0a0;
    font-size: 0.9em;
}

.user-footer .footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-footer .footer-nav ul li {
    display: inline-block;
    margin: 0 15px;
}

.user-footer .footer-nav ul li a {
    color: #eff4f5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.user-footer .footer-nav ul li a:hover {
    color: #000000;
    text-decoration: underline;
}

/* Responsive adjustments for user dashboard */
@media (max-width: 768px) {
    .user-main-content-wrapper {
        flex-direction: column;
        padding: 10px;
    }
    .user-sidebar {
        width: 100%; /* Take full width on small screens */
        margin-right: 0;
        margin-bottom: 20px;
        flex-basis: auto; /* Reset flex-basis on small screens */
    }
    .user-sidebar .sidebar-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 15px;
    }
    .user-sidebar .sidebar-links li {
        margin: 5px 10px;
    }
    .user-content {
        padding: 20px;
        margin: 0;
    }
    /* Add padding to user-main-content-wrapper on small screens */
    .user-main-content-wrapper {
        padding: 10px; /* Add back some padding for small screens */
    }
    .user-header .header-container {
        flex-direction: row;
        text-align: center;
        justify-content: center; /* Center items horizontally */
        flex-wrap: wrap; /* Allow items to wrap */
    }
    .user-header .main-nav ul {
        margin-top: 0;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0; /* Remove default padding */
    }
    .user-header .navbar-nav {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center;
        align-items: center; /* Align items vertically */
    }
    .user-header .main-nav ul li {
        margin: 2px; /* Reduce margin */
    }
    .user-footer .footer-container {
        flex-direction: column;
    }
    .user-footer .footer-nav ul {
        margin-top: 15px;
    }
    .user-footer .footer-nav ul li {
        margin: 5px 10px;
    }
}

.admin-header {
    background-color: #2c3e50; /* Dark blue/grey */
    color: #ecf0f1; /* Light grey */
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.admin-header h1 {
    margin: 0;
    font-size: 24px;
    color: #ecf0f1; /* Ensure heading is visible */
}
.admin-header a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.admin-header a:hover {
    background-color: #34495e; /* Slightly lighter dark blue */
}

.admin-container {
    display: flex;
}

.admin-main-content-wrapper {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    width: 250px;
    background-color: #34495e; /* Darker blue/grey */
    color: #ecf0f1;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}
.admin-sidebar h3 {
    color: #ecf0f1;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3em;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(236, 240, 241, 0.2); /* Subtle separator */
}
.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.admin-sidebar ul li {
    margin-bottom: 10px;
}
.admin-sidebar ul li a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.admin-sidebar ul li a:hover, .admin-sidebar ul li a.active {
    background-color: #2c3e50; /* Even darker blue */
    color: #ffffff;
}

.admin-content {
    flex: 1;
    padding: 30px;
    background-color: #ffffff;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.admin-content h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}
.admin-content p {
    color: #555;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.filter-container .form-group {
    flex: 1 1 auto;
    min-width: 150px;
}

.filter-container .btn {
    padding: 8px 12px;
    font-size: 0.9em;
}

.report-table th.user-name-col, .report-table td.user-name-col {
    width: 15%;
}

.report-table th.quiz-name-col, .report-table td.quiz-name-col {
    width: 20%;
}

.report-table th.date-col, .report-table td.date-col {
    width: 12%;
}

.report-table th.time-taken-col, .report-table td.time-taken-col {
    width: 10%;
}

.report-table th.actions-col, .report-table td.actions-col {
    width: 8%;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .admin-main-content-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding-bottom: 0;
    }
    .admin-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 10px;
    }
    .admin-sidebar ul li {
        margin: 5px 10px;
    }
    .admin-content {
        margin: 10px;
        padding: 20px;
    }
}
/* Styles for hierarchical sidebar menu */
.admin-sidebar ul.main-menu {
    /* Existing styles for main ul */
}

.admin-sidebar ul.main-menu li.has-submenu {
    position: relative; /* Needed for submenu positioning */
}

.admin-sidebar ul.main-menu li.has-submenu > a {
    /* Style for main menu item link */
    position: relative; /* For potential arrow icon */
}

.admin-sidebar ul.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none; /* Hidden by default */
    background-color: #2c3e50; /* Darker background for submenu */
    position: absolute; /* Position relative to parent li */
    left: 100%; /* Position to the right of the parent */
    top: 0;
    min-width: 200px; /* Ensure submenu has enough width */
    z-index: 10; /* Ensure it appears above other content */
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.admin-sidebar ul.main-menu li.has-submenu:hover > ul.submenu {
    display: block; /* Show on hover */
}

.admin-sidebar ul.submenu li a {
    padding: 10px 15px; /* Padding for submenu items */
    color: #ecf0f1; /* Light text color */
    background-color: transparent; /* No background by default */
    transition: background-color 0.3s ease;
}

.admin-sidebar ul.submenu li a:hover {
    background-color: #34495e; /* Darker hover background */
}

/* Adjustments for active state in submenus */
.admin-sidebar ul.submenu li a.active {
    background-color: #2c3e50; /* Active background for submenu items */
    color: #ffffff;
}

/* Responsive adjustments for stacked sidebar */
@media (max-width: 768px) {
    .admin-sidebar ul.main-menu li.has-submenu {
        position: static; /* Reset positioning for stacked layout */
    }
    .admin-sidebar ul.submenu {
        position: static; /* Reset positioning for stacked layout */
        display: block; /* Always show submenu in stacked layout */
        background-color: #3e5060; /* Slightly different background for nested items */
        padding-left: 20px; /* Indent submenu items */
        box-shadow: none; /* Remove shadow */
        border-radius: 0;
    }
    .admin-sidebar ul.main-menu li.has-submenu:hover > ul.submenu {
        display: block; /* Still show on hover, but it's static now */
    }
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: capitalize;
    font-size: 0.9em;
}

.status-badge.pending {
    background-color: var(--warning-color); /* Yellow */
    color: #333;
}

.status-badge.approved {
    background-color: var(--success-color); /* Green */
    color: white;
}

.status-badge.rejected {
    background-color: var(--danger-color); /* Red */
    color: white;
}

/* Table responsiveness */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Notification Icon in Header */
.notification-icon-link {
    position: relative;
    display: inline-block;
    padding: 0; /* Remove padding from the link itself */
    background-color: transparent !important; /* Ensure no background on hover */
}

.notification-icon-link:hover {
    background-color: transparent !important; /* Ensure no background on hover */
    transform: none !important; /* Remove transform on hover */
    text-decoration: none !important; /* Remove underline on hover */
}

.notification-icon {
    vertical-align: middle;
    color: #fff;
    font-size: 1em; /* Adjust size as needed */
}

.notification-badge-header {
    position: absolute;
    top: -8px; /* Adjust position */
    right: -8px; /* Adjust position */
    background-color: var(--danger-color); /* Red color */
    color: white;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 0.7em;
    font-weight: bold;
    line-height: 1;
    min-width: 18px; /* Ensure it's circular even for single digits */
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Notification Dropdown */
.user-header .notification-item {
    position: relative;
}

.user-header .notification-icon-container {
    position: relative;
    display: inline-block;
}


.user-header .notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #f9f9f9;
    min-width: 300px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.user-header .notification-dropdown a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #ddd;
}

.user-header .notification-dropdown a:last-child {
    border-bottom: none;
}

.user-header .notification-dropdown a:hover {
    background-color: #f1f1f1;
}

.user-header .notification-icon-container:hover .notification-dropdown {
    display: block;
}


.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

#quizForm .question {
    margin-bottom: 25px; /* Increased margin between questions */
    padding: 20px;
    background-color: #fdfdfd;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#quizForm .question p {
    margin-top: 0;
    margin-bottom: 15px; /* Space between question text and options */
    font-size: 1.1em;
    font-weight: 600;
    color: #34495e;
}

#quizForm .options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Space between options */
}

#quizForm .option {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#quizForm .option:hover {
    background-color: #e9ecef;
    border-color: #dcdcdc;
}

#quizForm .option input[type="radio"] {
    margin-right: 15px;
    width: auto; /* Override default width */
    flex-shrink: 0;
}

#quizForm .option label {
    margin-bottom: 0;
    font-weight: normal;
    color: #555;
    flex-grow: 1;
}

#quizTimer {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--danger-color);
    text-align: center;
    margin-bottom: 20px;
}

.navbar-nav .notification-item,
.navbar-nav .notification-item:hover,
.navbar-nav .notification-item:focus,
.navbar-nav .notification-item:active {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.navbar-nav .notification-item .notification-icon-link.nav-link,
.navbar-nav .notification-item .notification-icon-link.nav-link:hover,
.navbar-nav .notification-item .notification-icon-link.nav-link:focus,
.navbar-nav .notification-item .notification-icon-link.nav-link:active {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px 15px !important;
    margin: 0 !important;
    outline: none !important;
}
/* Header Styles - Logo Right, Menu Center */
header {
    background-color: var(--header-bg-light);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

body.dark-mode header {
    background-color: var(--header-bg-dark);
}

/* Header Container - Custom Layout */
header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

/* Logo - Right Side */
header h1 {
    color: var(--header-text-light);
    margin: 0;
    font-size: 2em;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    float: none;
}

body.dark-mode header h1 {
    color: var(--header-text-dark);
}

/* Navigation - Center */
header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

header nav ul li {
    margin: 0;
}

header nav ul li a {
    color: var(--header-text-light);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s;
    white-space: nowrap;
}

body.dark-mode header nav ul li a {
    color: var(--header-text-dark);
}

header nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Theme Switcher - Center below menu if needed */
.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.theme-label {
    font-size: 1em;
    font-weight: 600;
}

.theme-switcher .theme-label {
    color: var(--header-text-light);
    transition: color 0.3s;
}

body.dark-mode .theme-switcher .theme-label {
    color: var(--header-text-dark);
}

.theme-switcher input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switcher label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    cursor: pointer;
}

.theme-switcher label:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.theme-switcher input:checked + label {
    background-color: #000000;
}

.theme-switcher input:checked + label:before {
    transform: translateX(26px);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        position: static;
        padding: 15px 20px;
        text-align: center;
    }
    
    header h1 {
        position: static;
        transform: none;
        margin-bottom: 15px;
        font-size: 1.6em;
        right: auto;
        top: auto;
    }
    
    header nav {
        width: 100%;
    }
    
    header nav ul {
        gap: 10px;
    }
    
    header nav ul li a {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .theme-switcher {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4em;
    }
    
    header nav ul {
        flex-direction: column;
        gap: 8px;
    }
    
    header nav ul li a {
        padding: 8px 16px;
        font-size: 0.9em;
        display: block;
        min-width: 120px;
    }
}

/* Responsive styles for the always-visible navbar */
@media (max-width: 992px) {
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .navbar-nav .nav-item {
        margin: 5px;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: #34495e;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
    border: 1px solid #ddd;
    margin: 0 4px;
}

.pagination a.active {
    background-color: #2c3e50;
    color: white;
    border: 1px solid #2c3e50;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

select.form-select {
    position: relative;
    z-index: 1000;
}

/* Quiz search form styles */
.quiz-search-form {
    margin-bottom: 20px;
}

.search-box-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box-container label {
    margin-bottom: 0; /* Override default margin */
}

#search_query {
    width: 25%; /* Set search box width to 1/4 of its container */
    min-width: 200px; /* Ensure it's not too small */
}


/* Enhanced Hero Section */
.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="a" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="1000" height="1000" fill="url(%23a)"/></svg>');
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.hero-section .btn:hover {
    background-color: #f0f0f0;
    color: #333;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}


.hero-stats {
    font-size: 0.9rem;
}

.hero-stats .stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(255, 253, 253, 0.1);
}

.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Step Cards */
.step-card {
    padding: 2rem 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

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

/* About Section */
.about-us {
    border-radius: 20px;
}

.about-highlights .row > div {
    padding: 0.5rem 0;
}

/* CTA Section */
.cta-section {
    border-radius: 20px;
    margin: 2rem 0;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        padding: 3rem 0;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-stats .stat-item {
        text-align: center;
    }

    .feature-card .card-body {
        padding: 1.5rem 1rem;
    }

    .step-card {
        margin-bottom: 2rem;
    }

    .about-us .row {
        text-align: center;
    }

    .about-highlights .row > div {
        margin-bottom: 1rem;
    }
}
