/* Whole Site - General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #1a1a1a; /* Dark background */
    color: #ffffff; /* White text */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Index Header Container */
.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Index Beautifications */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #09419b 0%, #1a1a1a 70%); /* Gradient using your primary color */
    /* overflow: hidden; */
}

/* Stars and Glitters Animation */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: glitter 5s infinite;
}

@keyframes glitter {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); }
}

/* Generate multiple stars with different sizes and positions */
.star:nth-child(1) { width: 2px; height: 2px; top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { width: 3px; height: 3px; top: 30%; left: 50%; animation-delay: 1s; }
.star:nth-child(3) { width: 1px; height: 1px; top: 50%; left: 70%; animation-delay: 2s; }
.star:nth-child(4) { width: 4px; height: 4px; top: 70%; left: 30%; animation-delay: 3s; }
.star:nth-child(5) { width: 2px; height: 2px; top: 20%; left: 80%; animation-delay: 4s; }
.star:nth-child(6) { width: 3px; height: 3px; top: 40%; left: 10%; animation-delay: 0.5s; }
.star:nth-child(7) { width: 1px; height: 1px; top: 60%; left: 90%; animation-delay: 1.5s; }
.star:nth-child(8) { width: 2px; height: 2px; top: 80%; left: 40%; animation-delay: 2.5s; }

/* Main Heading and Subheading */
.hero-section h1 {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    animation: fadeInDown 1.5s ease-out;
}

.hero-section p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 2rem;
    animation: fadeInUp 1.5s ease-out;
}

/* Animations for Text */
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1.5s ease-out 0.5s;
    animation-fill-mode: both;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: #09419b; /* Primary color */
    color: #fff;
}

.btn-primary:hover {
    background-color: #62144e; /* Hover background */
    color: #fff; /* Hover text color */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: #5f0e46; /* Secondary color */
    color: #fff;
}

.btn-secondary:hover {
    background-color: #62144e; /* Hover background */
    color: #fff; /* Hover text color */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Section Titles */
h2 {
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

h3 {
    font-size: 1.5rem;
    color: #fff;
    text-align: left;
    margin-bottom: 1rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #ccc;
    text-align: center;
    margin-bottom: 3rem;
}

/* Features Section */
.features-section {
    background-color: #1a1a1a;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(145deg, #09419b, #5f0e46);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1rem;
    text-align: center;
    color: #fff;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #ddd;
}

/* How It Works Section */
.how-it-works-section {
    background: #222;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    background-color: #09419b;
    color: #fff;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.step h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-align: center;
}

.step p {
    color: #ccc;
}

/* Testimonials Section */
.testimonials-section {
    background-color: #1a1a1a;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card p {
    font-style: italic;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    font-size: 1.1rem;
    color: #fff;
}

.testimonial-author p {
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
}

/* Call-to-Action Section */
.cta-section {
    background: linear-gradient(145deg, #09419b, #5f0e46);
    text-align: center;
    padding: 4rem 2rem;
}

.cta-section .buttons {
    justify-content: center;
}

img.hero-image {
    border-radius: 1rem;
}
/* Upper Nav: Social Media Icons */
.upper-nav {
    background: #1a1a1a;
    padding: 10px 0;
    text-align: center;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-icons li {
    display: inline-block;
    margin: 0 10px;
}

.social-icons li a {
    color: #fff;
    font-size: 18px;
    transition: color 0.3s ease;
}

.social-icons li a:hover {
    color: #62144e;
}

/* Bottom Nav: Main Navbar */
.bottom-nav {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 0;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    height: 65px;
    margin-right: 15px;
    width: auto;
    display: flex;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: left;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #62144e;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    left: 0; /* Align dropdown to the right */
    border-radius: 5%;
}

.dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background: #444;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Login Button */
.login-btn {
    background: #5f0e46;
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: #ffffff;
    color: black;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #000;
        position: absolute;
        top: 100px;
        left: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .dropdown-content {
        position: static;
    }
}

/* Hero Section Styles (Home) */
.hero {
    background: #1a1a1a; /* Dark background */
    padding: 150px 0; /* Increased padding */
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffffff; /* White text */
    font-weight: bold;
}

.hero p {
    font-size: 18px;
    color: #cccccc; /* Light gray text */
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    display: inline-block;
    padding: 15px 30px;
    background: #09419b; /* Accent color (orange) */
    color: #ffffff; /* White text */
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background 0.3s ease;
}

.hero .btn:hover {
    background: #5f0e46; /* Darker shade of orange */
}

/* Footer Styles */
footer {
    background: #1a1a1a; /* Dark background */
    color: #ffffff; /* White text */
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #333; /* Subtle border */
    margin-top: 50px; /* Added margin */
    position: relative; /* Ensure footer stays at the bottom */
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 14px;
    color: #cccccc; /* Light gray text */
}

/* Quiz PHP Styling */
/* Quiz Page Styles */
.quiz {
    background: #1a1a1a; /* Dark background */
    padding: 100px 0; /* Increased padding */
    text-align: center;
}

.quiz h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ffffff; /* White text */
    font-weight: bold;
}

.quiz p {
    font-size: 18px;
    color: #cccccc; /* Light gray text */
    margin-bottom: 40px;
}

.quiz .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.quiz label {
    display: block;
    font-size: 16px;
    color: #ffffff; /* White text */
    margin-bottom: 5px;
}

.quiz input[type="text"],
.quiz input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #333; /* Subtle border */
    border-radius: 5px;
    background: #262626; /* Darker background */
    color: #ffffff; /* White text */
}

.quiz input[type="checkbox"] {
    margin-left: 10px;
}

.quiz .btn {
    display: inline-block;
    padding: 15px 30px;
    background: #ff6f61; /* Accent color (orange) */
    color: #ffffff; /* White text */
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.quiz .btn:hover {
    background: #e65a50; /* Darker shade of orange */
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 36px; /* Smaller font size for mobile */
    }

    .hero p {
        font-size: 16px; /* Smaller font size for mobile */
    }

    .quiz h2 {
        font-size: 28px; /* Smaller font size for mobile */
    }

    .quiz p {
        font-size: 16px; /* Smaller font size for mobile */
    }

    .quiz input[type="text"],
    .quiz input[type="number"] {
        font-size: 14px; /* Smaller font size for mobile */
    }

    .quiz .btn {
        padding: 12px 24px; /* Smaller button for mobile */
    }
}

/* Profile Page Styles */
.profile-container h2 {
    padding-left: 20px;
    color: white;
}

.profile-container p {
    padding-left: 20px;
    color: white;
}

/* Admin Panel Styles */
.admin-panel {
    padding: 50px 0;
}

.admin-panel h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff; /* White text */
}

.admin-panel h1 {
    font-size: 25px;
    margin-top: -25px;
    text-align: center;
    color: #ffffff; /* White text */
}

.admin-panel h5 {
    font-size: 15px;
    margin-top: -15px;
    text-align: center;
    color: #ffffff; /* White text */
}

.admin-panel h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffffff; /* White text */
}

.admin-panel form {
    margin-bottom: 30px;
}

.admin-panel label {
    display: block;
    font-size: 16px;
    color: #ffffff; /* White text */
    margin-bottom: 5px;
}

.admin-panel input[type="text"],
.admin-panel select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #333; /* Subtle border */
    border-radius: 5px;
    background: #262626; /* Dark background */
    color: #ffffff; /* White text */
    margin-bottom: 10px;
}

/* Hierarchical List Bottom of page */

.hierarchy-list-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.see-questions-btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-left: 2rem;
}

.hierarchical-list {
    list-style-type: none;
    padding-left: 0;
}

.hierarchical-list .topic-item {
    margin: 5px 0;
}

.hierarchical-list .subtopics {
    padding-left: 30px; /* Increased indentation for subtopics */
}

.hierarchical-list .subtopic-item {
    margin: 5px 0;
}

.hierarchical-list .branches {
    padding-left: 30px; /* Increased indentation for branches */
}

.hierarchical-list .branch-item {
    margin: 5px 0;
}

.toggle {
    cursor: pointer;
    color: #007bff; /* Light Blue */
    margin-right: 5px;
}

.btn-danger {
    margin-left: 10px;
    text-decoration: none;
    color: white;
    background-color: red;
    padding: 2px 5px;
    border-radius: 3px;
}

/* New styles for the scrollable container */
.list-scroll-container {
    max-height: 400px; /* Adjust this height as needed */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #292828; /* Optional: Add a border for visual clarity */
    padding: 10px; /* Optional: Add padding inside the container */
    background-color: #1a1a1a; /* Optional: Light background for contrast */
}

/* Delete Button Styles */
.btn-danger {
    background: #dc3545; /* Red */
    color: #ffffff; /* White text */
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 11px;
}

.btn-danger:hover {
    background: #c82333; /* Darker red */
}

/* Textarea Styles */
textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #333; /* Subtle border */
    border-radius: 5px;
    background: #262626; /* Dark background */
    color: #ffffff; /* White text */
    margin-bottom: 10px;
    resize: vertical; /* Allow vertical resizing */
}

/* Login Page */
div.login-container form {
    display: inline-flexbox;
    padding: 25px 25px 25px 25px;
    margin: 25px 25px 25px 25px;
    border-radius: 4px;
}

div.login-container h2 {
    font-size: 35px;
    padding-left: 55px;
    margin-bottom: -25px;
}

button.btn {
    background: #ff6f61;
    margin-top: 25px;
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    transition: background 0.3s ease;
    cursor: pointer;
}

button.btn:hover {
    background: #e65a50;
    transition: background 0.3s ease;
    cursor: pointer;
}

span.makeanaccount a {
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
}

/* Quiz Admin - Questions Table */
.main-content-questions-table {
    margin-left: 250px; /* Adjust based on sidebar width */
    padding: 20px;
    width: 100%;
}

form {
    max-width: 800px;
    margin-bottom: 40px;
}

label {
    display: block;
    margin: 10px 0 5px;
}

select, textarea, input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
}

.option {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.option input[type="text"] {
    flex: 1;
    margin-right: 10px;
}

.questions-table {
    width: 100%;
    border-collapse: collapse;
}

.q-info .topic-qt { font-size: 16px; }
.q-info .subtopic-qt { font-size: 14px; color: #666; }
.q-info .branch-qt { font-size: 12px; color: #888; }

.questions-table th, .questions-table td {
    border: 1px solid #516880;
    padding: 10px;
    text-align: left;
}

.questions-table tr {
    color: white;
    background-color: #000;
}
.questions-table th {
    background-color: #34495e;
}

button {
    padding: 8px 16px;
    background-color: #34495e;
    display: inline-block;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #34495e;
}

.remove_option {
    background-color: #dc3545;
    margin-left: 10px;
}

.hierarchy-list ul { margin: 0; }

/* Override TinyMCE toolbar and UI for a black theme */
.tox-tinymce {
    border: 1px solid #333 !important;
    background-color: #1a1a1a !important;
}

.tox-toolbar, .tox-toolbar__primary {
    background-color: #222 !important;
}

.tox-toolbar button, .tox-toolbar__primary button {
    color: #ffffff !important;
}

.tox-toolbar button:hover, .tox-toolbar__primary button:hover {
    background-color: #444 !important;
}

.tox-edit-area__iframe {
    background-color: #1a1a1a !important;
}

.tox-statusbar {
    background-color: #222 !important;
    color: #ffffff !important;
}

.tox-menubar, .tox-menubar button {
    background-color: #222 !important;
    color: #ffffff !important;
}

#editQuestionModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

#editQuestionModal .modal-content {
    background: #1a1a1a;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 5px;
    color: #fff;
    max-height: 80vh;
    overflow-y: auto;
}

#editQuestionModal .modal-content button {
    margin-top: 20px;
}

#closeModal {
    margin-left: 10px;
}

/* Styles for users.php */
.users-main-content {
    margin-left: 150px; /* Adjust based on sidebar width */
    padding: 20px;
    width: 100%;
}

.main-content.collapsed {
    margin-left: 70px; /* Matches collapsed sidebar width (60px + 10px padding) */
}

/* User table styling */
.user-table {
    width: 60%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #1a1a1a;
    color: #fff;
}

.user-table th, .user-table td {
    padding: 12px 15px;
    border: 1px solid #444;
    text-align: left;
}

.user-table th {
    background: #333;
    font-weight: bold;
}

.user-table td {
    background: #222;
}

.user-table a {
    color: #4CAF50;
    text-decoration: none;
}

.user-table a:hover {
    text-decoration: underline;
}

/* Filter section */
.filter-section {
    width: 60%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

h5.filter-text {
    display: flex;
    font-size: 15px;
    justify-content: flex-start;
    padding-right: 5px;
    margin-bottom: 15px;
}

.filter-section form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-section label {
    color: #fff;
    font-size: 14px;
    margin-bottom: 5px;
}

.filter-section input[type="text"] {
    padding: 5px;
    border: 1px solid #444;
    border-radius: 3px;
    background: #333;
    color: #fff;
    width: 100px;
    margin-bottom: 5px;
}

.filter-section button {
    padding: 5px 15px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.filter-section button:hover {
    background: #45a049;
}

/* Add user button */
.add-user-btn {
    position: relative;
    right: 770px;
    padding: 10px 20px;
    background: #ff6f61;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 15px;
}

.add-user-btn:hover {
    background: #ff6f61;
}

/* Dropdown for actions (gear icon) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #333;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #555;
    text-decoration: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.gear-icon {
    cursor: pointer;
    font-size: 16px;
}

/* Success and error messages */
.success-message {
    color: green;
    margin-bottom: 15px;
}

.error-message {
    color: red;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .user-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Media Gallery Styling */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px;
}

.media-size {
    color: #ccc;
    font-size: 12px;
    text-align: center;
    margin: 5px 0;
}

.media-item {
    position: relative;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.media-item:hover {
    transform: scale(1.05);
}

.media-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.media-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-actions {
    opacity: 1;
}

.copy-link-btn, .delete-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    color: #fff;
}

.copy-link-btn {
    background: #4CAF50;
}

.copy-link-btn:hover {
    background: #45a049;
}

.delete-btn {
    background: #f44336;
}

.delete-btn:hover {
    background: #da190b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .media-thumbnail {
        height: 120px;
    }
}

/* View Questions Modal */

.question-view {
    max-width: 600px;
    margin: 0 auto;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.question-text {
    margin-bottom: 15px;
    font-size: 18px;
}
.question-image {
    margin-bottom: 15px;
    text-align: center;
}
.question-image img {
    max-width: 100%;
    height: auto;
}
.question-options label,
.question-answer textarea {
    display: block;
    margin: 10px 0;
}
.question-options input,
.question-answer textarea {
    margin-right: 5px;
}
.question-answer textarea {
    width: 100%;
    height: 100px;
    resize: none;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 5px;
}
.question-meta {
    margin-top: 15px;
    font-size: 14px;
}
.question-meta p {
    margin: 5px 0;
}

/* Popup Styling in View - Quiz Admin */
.popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}
.popup.success {
    background-color: #28a745;
}
.popup.error {
    background-color: #dc3545;
}

/* Import Button */

div.header-info-quizadmin {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.importbtn {
    background: #28a745;
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    transition: background 0.3s ease;
    text-decoration: none;
    margin-left: 7rem;
}

.importbtn:hover {
    background: #4d4d4d;
}

/* Style for Questions table */

.truncated {
    max-width: 200px;
    white-space: normal;
    overflow: hidden;
}
.pagination-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pagination-links a {
    margin: 0 10px;
    text-decoration: none;
    color: #007bff;
}
.pagination-links a:hover {
    text-decoration: underline;
}
.filter-controls {
    margin-bottom: 20px;
}

/* Take Quiz */ 
.main-content-tq {  
    background: #1a1a1a; /* Dark background */
    padding: 100px 0; /* Increased padding */
    text-align: center;
    border-radius: 10px;
    margin: 25px 25px 25px 25px;
    border: 1px solid #ccc; /* Optional: Add a border */
}
/* Quiz Maker */

.main-contentqm {
    background: #1a1a1a; /* Dark background */
    padding: 100px 0; /* Increased padding */
    text-align: center;
}

.q-type { font-weight: bold; color: #007bff; }
.tag { 
    font-size: 12px; 
    background: #555; 
    color: white; 
    padding: 2px 6px; 
    border-radius: 10px; 
    margin: 0 5px; 
}
/* .subtopic { background: #28a745; } Come back here

.branch { background: #dc3545; } */

.difficulty { font-style: italic; color: #ffc107; }

.quiz-form, .quiz-table, .question-picker { margin: 20px 0; }
.quiz-form label, .quiz-form select, .quiz-form input { display: block; margin: 10px 0; }
.question-picker { display: none; }
#selected-count { position: fixed; top: 10px; right: 10px; background: #333; color: white; padding: 5px 10px; border-radius: 5px; }
.topic-section { border: 1px solid #ccc; padding: 10px; margin: 5px 0; width: auto; }
.topic-section h3 { cursor: pointer; margin: 0; }
.topic-content { display: none; max-height: 300px; overflow-y: auto; margin: 5px 0; }

/* Take Quiz */

.start-simulation {
    font-size: 24px;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: -60px 20px 20px 20px;
    display: block;
    text-align: center;
}
.simulation-form {
    display: none;
    background-color: #2e2b2b;
    color: white;
    padding: 20px;
    text-align: left;
    border-radius: 5px;
    margin-bottom: 20px;
}

.simulation-form label, .simulation-form select, .simulation-form button {
    display: block;
    margin: 10px 0;
}
.past-quizzes-header {
    margin-top: 40px;
    margin-left: 50px;
}

.past-quizzes-header p {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.past-quiz-item {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 5px;
    margin: auto;
    width: 70%;
    gap: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

/* Start Quiz */

.quiz-container {
    max-width: 800px;
    margin: 20px auto;
}
.question {
    display: none;
}
.question.active {
    display: block;
}
.question img {
    max-width: 100%;
    height: auto;
}
.feedback {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
}
.feedback.correct {
    background-color: #d4edda;
    color: #155724;
}
.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
}
.timer {
    position: fixed;
    top: 10px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
}

/* Questions table */



/* Cache Manager Page */
