/* General Body and Layout */
body {
    background-color: #f0f2f5;
    color: #333;
    font-family: 'Open Sans', sans-serif; /* Combined font rule */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main.container {
    padding-top: 90px; /* Pushes the content down below the new sticky header */
}

/* Typography */
h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Montserrat', sans-serif; /* Heading font */
}

/* Header Styles */
.site-header {
    background-color: #232f3e;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1020;
}

.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
}

.logo {
    font-size: 24px;
    text-decoration: none;
    font-weight: bold;
}

/* Header Text & Score Styles */
.site-header .logo,
.site-header .score-display {
    color: #ffffff; /* Sets text color to white for readability */
    font-size: 1.2rem;
    font-weight: 600;
}

.site-header #score-value {
    color: #ff9900; /* Keeps the score number orange for contrast */
    font-weight: bold;
}

/* Progress Bar Custom Styles */
.progress-bar {
    transition: width 0.6s ease;
}

/* Question & Quiz Container Styles */
.question {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.options {
    margin: 20px 0;
}

.option {
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
}

.option input[type="checkbox"] {
    margin-top: 0.3rem;
    margin-right: 1rem;
}

.option label {
    line-height: 1.5;
    flex: 1;
}

/* Feedback & Explanation Styles */
.feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feedback.show {
    display: block;
    opacity: 1;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.explanation-box {
    margin-top: 15px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.explanation-box.show {
    display: block;
    opacity: 1;
}

/* Pagination Styles */
.pagination-nav .page-link {
    color: #007bff;
}

.pagination-nav .page-link:hover {
    color: #0056b3;
}

.pagination-nav .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Footer Styles */
.site-footer {
    background: #232f3e;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-links a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff9900;
}

/* Back to Top Button Styles */
#back-to-top-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #ff9900;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-size: 1.2rem;
    border-radius: 50%; /* Make it circular */
    height: 50px;
    width: 50px;
    /* Center the icon inside the button */
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top-btn:hover {
    opacity: 1;
}