.right-col-container {
    position: relative;
    overflow-y: auto;
    height: 90vh;
  }

.left-col-container{
  position: sticky; 
  overflow-y: auto;
}

footer {
    height: 50px;
    font-size: 13px;
    opacity: 0.6;
    width: 100%;
}


/* Style for light mode */
.light-mode {
    color: #000;
    background-color: #f5f5f5;
  }
  
  /* Style for dark mode */
  .dark-mode {
    color: #fff;
    background-color: #333;
  }

  /* using the class invert to target the sections which are not getting automatically inverted */
  /* {% comment %} .dark-mode .invert {
    filter: invert(90%) brightness(80%);
  } {% endcomment %} */
  .dark-mode .invert {
    filter: invert(100%) brightness(100%);
  }
  
  /* setting the color of the light mode and dark mode label */
  .mode-label {
    color: #2a37ee;
  }

  /* dimming the brightness of text in the right column */
  .set-brightness{
    filter: brightness(0.85) contrast(100%);
}


/* Scrollbar css from here */

::-webkit-scrollbar {
  width: 10px;
}

/* ::-webkit-scrollbar-track {
  background-color: #bbb5b5;
} */

::-webkit-scrollbar-track {
  background-color: transparent; /* hide the scroll bar track completely */
}

::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

body {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

/* creating a separate scroll bar for left column- it works like a charm */

.left-col-container {
  /* overflow-y: scroll;  */
  overflow-y: hidden; /* hide the vertical scroll bar by default */
   max-height: calc(100vh - 100px);
}

.left-col-container:hover {
  overflow-y: scroll; /* show the vertical scroll bar on hover */
}

.left-col-container::-webkit-scrollbar {
  width: 10px;
}

/* .left-col-container::-webkit-scrollbar-track {
  background-color: #bbb5b5;
} */

.left-col-container::-webkit-scrollbar-track {
  background-color: transparent; /* hide the scroll bar track completely */
}

.left-col-container::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 5px;
}

.left-col-container::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

 /* adding styling to checkboxes color on the index page */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  outline: none;
  cursor: default;
}

input[type="checkbox"]:checked::before {
  content: "\2713";
  display: block;
  width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  font-size: 13px;
  color: white;
  background-color: green;
  border-radius: 4px;
  border: 2px solid green;
}

input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


{% comment %} Adding KP's edited CSS from here   {% endcomment %}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Roboto:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family:  Roboto, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    {% comment %} padding: 20px; {% endcomment %}
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

/* Improve typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}


/* Contact Us links on the landing page */

.contact-links a {
    color: #007bff; /* Change this to your preferred color */
    text-decoration: none;
}

.contact-links a:hover {
    text-decoration: underline;
}



/* New badge feature on Quiz Mode toggle switch */

.new-feature-badge {
    position: absolute;
    top: -10px;
    right: -15px;
    background-color: #ff4757;
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
    100% {
      transform: scale(1);
    }
  }



/* Navigation bar styles */
nav {
    background-color: rgba(51, 51, 51, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    {% comment %} border-radius: 10px; {% endcomment %}
    {% comment %} margin-bottom: 20px; {% endcomment %}
    width: 100%;
    box-sizing: border-box;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

nav ul li {
    display: flex;
    align-items: center;
    margin-right: 20px;
    {% comment %} margin-right: 0; {% endcomment %}
}

nav ul li:last-child {
    margin-right: 0;
    
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.1);
}

nav ul li a:hover {
    color: #007bff;
    background-color: rgba(255, 255, 255, 0.2);
}


#toggle-label {
    color: white;
    margin-right: 5px;
    font-weight: 400;
    font-size: 16px;

}

.switch {
    position: relative;
    display: inline-block;
    width: 35px;  /* Reduced from 60px */
    height: 18px; /* Reduced from 34px */
    margin-left: 0;
    margin-bottom: 0;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 0;
    bottom: 1px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Quiz container styles */
#quiz-container {
    width = '100%';
    height = '100%';
    zIndex = '1000';
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.25);
    {% comment %} box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); {% endcomment %}
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 20px;
    
    /* Use hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.full-height {
         height: 100% !important;
}



#quiz-container-title {
    width = '100%';
    height = '100%';
    zIndex = '1000';
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 20px;
}



/* Question block styles */
.question-block {
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
    border-radius: 12px;
    {% comment %} box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); {% endcomment %}
    margin-bottom: 24px;
    padding: 30px;

    /* Use hardware acceleration */
    transform: translateZ(0);
    will-change: transform, opacity;
   
    /* Simplified transition */
    transition: opacity 0.3s ease;
    perspective: 1000px;
}

/* Only apply hover effects for non-touch devices */
@media (hover: hover) {
    .question-block:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }
}



@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-block:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

.question-block.flipped .card-inner {
    transform: rotateY(180deg);
}

.question-number {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
}

.question {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #333;
}

/* Options styles */
.options {
    margin-bottom: 10px;
}

.option {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px 12px 40px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    {% comment %} transition: background-color 0.3s ease, transform 0.2s ease; {% endcomment %}
    
    /* Simplified transition */
    transition: background-color 0.2s ease;
    /* Use hardware acceleration */
    transform: translateZ(0);
    will-change: background-color;
}

.option.user-correct {
    background-color: #c3e6cb;
    border-color: #28a745;
    color: #155724;
    font-weight: bold;
    position: relative;
    padding-right: 30px;
  }

  .option.user-correct::after {
    content: '\2714';
    color: #28a745;
    font-weight: bold;
    font-size: 1.5em; /* Increase the size */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

.option:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-2px);

}

.option:active {
    transform: scale(0.98);
}

.option::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #007bff;
    border-radius: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
}

.option.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.option.selected::before {
    background-color: #fff;
    box-shadow: inset 0 0 0 4px #007bff;
}

.option.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.option.wrong {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.option.non-clickable {
    pointer-events: none;
    opacity: 0.7;
}

.toggle-explanation {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #007bff;
    color: white;
    margin-top: 10px;
    margin-bottom: 15px;
}

.toggle-explanation:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.toggle-explanation:active, .show-explanation:active {
    transform: translateY(2px);
}

.toggle-explanation.active {
   background-color: #28a745;
    
}

.toggle-explanation.active:hover {
    background-color: #218838;
}

.toggle-explanation:disabled, .show-explanation:disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
}

.explanation {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
    padding: 16px;
    margin-top: 16px;
    font-style: normal;
    color: #495057;
    line-height: 1.4;
}


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


#submit-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 30px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}

#submit-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

.score-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.score-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    width: 400px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: white;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
    z-index: 1001;
}

.close-btn:hover {
    background-color: #c0392b;
}

.score-content h2 {
    color: #3498db;
    margin-bottom: 30px;
    font-size: 28px;
    font-family: 'Poppins', sans-serif;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #3498db;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.score-number {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.score-label {
    font-size: 16px;
    color: #fff;
}

.score-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.score-item {
    text-align: center;
}

.score-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.score-item .score-label {
    font-size: 14px;
    color: #777;
}

.grade-info {
    margin-bottom: 30px;
}

.grade {
    font-size: 28px;
    font-weight: 700;
    color: #2ecc71;
    margin-bottom: 10px;
    display: block; /* Ensures the grade is on its own line */
}

.percentage {
    font-size: 18px;
    color: #777;
    display: block; /* Ensures the percentage is on its own line */
}

@media (max-width: 480px) {
    .score-content {
        padding: 20px;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-number {
        font-size: 32px;
    }

    .score-details {
        grid-template-columns: 1fr;
    }
}

.emoji-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1000;
}

.emoji-container span {
    position: absolute;
    font-size: 24px;
    animation: emojiAnimation 2s ease-out forwards;
}

@keyframes emojiAnimation {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(360deg);
    }
}
@keyframes optionSelected {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}



@keyframes submitPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

#submit-btn:hover {
    animation: submitPulse 1.5s infinite;
}

/* Progress bar */
.progress-bar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
    z-index: 1000;
}

.progress {
    width: 0;
    height: 100%;
    background-color: #007bff;
    transition: width 0.5s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .question-block {
        padding: 16px;
    }

    .question {
        font-size: 18px;
    }

    .option {
        padding: 10px 14px 10px 36px;
    }

    .score-content {
        padding: 20px;
    }
}

/* Improve button styles */
button {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
}


{% comment %} CSS for Styling FILTER Options {% endcomment %}

.form-switch {
    padding-left: 3em; /* Increased padding for a better visual appearance */
    position: relative; /* Ensure elements inside are positioned relative to this container */
}

.form-switch .form-check-input {
    width: 3em; /* Wider switch for better visibility */
    height: 1.5em; /* Height of the switch */
    margin-left: -3em; /* Adjust position of switch */
    border-radius: 1.5em; /* Circular ends */
    background-color: #ccc; /* Default background color */
    transition: background-color 0.25s, background-position 0.25s ease-in-out; /* Smooth transitions */
    cursor: pointer; /* Indicate the switch is clickable */
    position: relative; /* Allows for child elements to be positioned relative to this switch */
    outline: none; /* Remove default focus outline */
    appearance: none; /* Remove default checkbox appearance */
}

.form-switch .form-check-input:checked {
    background-color: #4caf50; /* Change background when checked */
    background-position: right center; /* Move background when checked */
}

.form-switch .form-check-input:before {
    content: ''; /* Create a pseudo-element for the slider */
    position: absolute; /* Positioned relative to the switch */
    top: 0.1em; /* Align slider vertically */
    left: 0.1em; /* Align slider horizontally */
    width: 1.3em; /* Width of slider */
    height: 1.3em; /* Height of slider */
    border-radius: 50%; /* Circular slider */
    background-color: #fff; /* Slider color */
    transition: transform 0.25s ease-in-out; /* Smooth transition when toggled */
}

.form-switch .form-check-input:checked:before {
    transform: translateX(1.5em); /* Move slider when checked */
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Focus outline for accessibility */
}


{% comment %} CSS for Subscription page {% endcomment %}
.referral-section {
    margin: 15px 0;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f8f9fa;
}
.referral-input {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}
.referral-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
}
.status-success {
    color: #28a745;
}
.status-error {
    color: #dc3545;
}
.referral-input input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}
.validate-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.validate-btn:hover {
    background-color: #0056b3;
}
.validate-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.icon-success {
    color: #28a745;
    font-size: 1.2em;
}
.icon-error {
    color: #dc3545;
    font-size: 1.2em;
}

