/* Import Google Font for a modern feel */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

/* Reset some default browser styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  /* Overall page settings */
  body {
    font-family: 'Montserrat', sans-serif;
    background-color: #FFF8F4;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    padding-top: 100px;
  }
  
  /* Header styles */
  header {
    position: relative;
    margin-top: 10px;
    text-align: center;
    margin-bottom: 20px;
  }
  
  header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #FF6F00;
  }
  
  header p {
    font-size: 1.1rem;
    color: #666;
  }
  
  /* Form container styling */
  form#quiz-form {
    max-width: 900px;
    margin: 0 auto;
  }
  
  /* Section styling for each quiz category */
  form#quiz-form section {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    border-left: 5px solid #FF6F00;
  }
  
  /* Section headings */
  form#quiz-form section h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: #000E8A;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
  }
  
  /* Question styling */
  .question {
    margin-bottom: 25px;
  }
  
  .question p {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #000E8A;
  }
  
  /* Answer option styling with custom radio buttons */
  .question label {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.3s, border 0.3s;
  }
  
  /* Label hover effect */
  .question label:hover {
    background: #f1f3f5;
    border-color: #5FD3FF;
  }
  
  /* Custom radio button styling */
  .question input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s, border 0.3s;
    aspect-ratio: 1;
    flex-shrink: 0;
  }
  
  /* Custom checked state for radio buttons */
  .question input[type="radio"]:checked {
    background-color: #FF6F00;
    border-color: #FF6F00;
  }
  
  .question input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
  }
  
  /* Submit button styling */
  button[type="submit"] {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    background-color: #FF6F00;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 0 auto;
    max-width: 900px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 111, 0, 0.3);
  }
  
  button[type="submit"]:hover {
    background-color: #E56200;
  }
  
  /* Results section styling */
  #results {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
  }
  
  @media (max-width: 600px) {
    header h1 {
      font-size: 2rem;
    }
  
    button[type="submit"] {
      font-size: 1rem;
    }
  }

  /* Loading spinner container */
  #loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 248, 244, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  /* Spinner animation */
  .spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #FF6F00;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* Spinner text */
  #loading-spinner p {
    font-size: 1.2rem;
    color: #333;
  }

  /* Fixed progress wrapper at the top of the viewport */
  #progress-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
  }

  /* Progress bar container */
  #progress-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 25px;
    overflow: hidden;
    margin: 5px 0;
  }

  /* Progress bar fill */
  #progress-bar {
    height: 15px;
    width: 0%;
    background: linear-gradient(to right, #FF6F00, #5FD3FF);
    border-radius: 25px;
    transition: width 0.4s ease-in-out;
  }

  /* Motivational message styling */
  #motivational-message {
    text-align: center;
    font-size: 1rem;
    color: #000E8A;
    margin-top: 5px;
    font-weight: 500;
  }

  /* Modern styling for the email input in the "Join the Movement" section */
  #join input[type="email"] {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    margin-top: 10px;
  }

  #join input[type="email"]::placeholder {
    color: #888;
  }

  #join input[type="email"]:focus {
    border-color: #5FD3FF;
    box-shadow: 0 4px 8px rgba(95, 211, 255, 0.2);
  }

  /* Spinner message adjustments for mobile view */
  @media (max-width: 600px) {
    #loading-spinner p {
        max-width: 80%;
        text-align: center;
        margin: 0 auto;
        padding: 0 20px;
    }
  }

  /* Thank You Page Specific Styles */
  body.thankyou {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #FF6F00, #5FD3FF); /* Brand color gradient background */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
  }

  .thankyou-card {
    background: rgba(255, 255, 255, 0.97);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
    max-width: 500px;
    margin: 20px;
    animation: fadeInUp 0.8s ease-out;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .thankyou-card h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #FF6F00; /* Brand color */
  }

  .thankyou-card p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
    white-space: pre-wrap;
  }

  .thankyou-card .results {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    font-size: 1rem;
    color: #444;
    text-align: left;
    border-left: 5px solid #5FD3FF; /* Brand color accent */
  }

  .results-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    color: #000E8A; /* Brand color */
  }

  .results-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .results-list li {
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    color: #444;
    transition: transform 0.3s ease, background 0.3s ease;
  }

  .results-list li:hover {
    transform: translateX(5px);
    background: #e9ecef;
  }

  .results-list li.primary {
    background: linear-gradient(135deg, #FF6F00, #FF9A4D); /* Brand color gradient */
    font-weight: 700;
    color: #fff;
    text-align: center;
  }

  .thankyou-card a.button {
    display: inline-block;
    background: #FF6F00; /* Brand color */
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.3s;
    margin-top: 20px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 111, 0, 0.3); /* Brand color shadow */
  }

  .thankyou-card a.button:hover {
    background: #E56200; /* Darker shade of brand color */
    transform: translateY(-3px);
  }

  /* ========================================================================== */
  /* Landing Page Specific Styles                                               */
  /* ========================================================================== */

  body.landing-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: url('../assets/images/backgrounds/addonbg.svg'), url('../assets/images/backgrounds/mainbg.svg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow-x: hidden;
    background-attachment: fixed; /* Prevents background from cutting off */
  }
  
  .logo {
    position: absolute;
    top: 175px;
    left: 125px;
    width: 244.55px;
    height: 20.94px;
  }

  .tagline {
    position: absolute;
    top: 232px;
    left: 116px;
    width: 1048px;
    height: 344px;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 134px;
    line-height: 99.16px;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    text-transform: uppercase;
    font-stretch: 110%;
  }

  .description {
    position: absolute;
    top: 612px;
    left: 125px;
    width: 628px;
    height: 113px;
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0%;
    color: #EEEEEE;
  }

  .quiz-button {
    position: absolute;
    top: 643px;
    left: 917px;
    width: 218px;
    height: 61.19px;
    background: #FFFFFF;
    border-radius: 45.89px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-family: 'Urbanist', sans-serif;
    font-weight: 900;
    font-size: 18.36px;
    line-height: 27.54px;
    letter-spacing: 0%;
    color: #FF6F00;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .quiz-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  /* Responsive styles for landing page */
  /* Large desktop screens */
  @media (min-width: 1441px) {
    .logo {
      width: 300px;
      height: auto;
      top: 200px;
      left: 150px;
    }
    
    .tagline {
      font-size: 150px;
      top: 260px;
      left: 150px;
      width: 1200px;
    }
    
    .description {
      font-size: 28px;
      line-height: 42px;
      top: 650px;
      left: 150px;
      width: 700px;
    }
    
    .quiz-button {
      top: 680px;
      left: 950px;
      width: 240px;
      height: 68px;
      font-size: 20px;
    }
  }

  /* Standard desktop screens */
  @media (max-width: 1440px) and (min-width: 1025px) {
    .logo {
      width: 244.55px;
      height: 20.94px;
      top: 175px;
      left: 125px;
    }
    
    .tagline {
      font-size: 134px;
      top: 232px;
      left: 116px;
      width: 1048px;
    }
    
    .description {
      font-size: 24px;
      line-height: 36px;
      top: 612px;
      left: 125px;
      width: 628px;
    }
    
    .quiz-button {
      top: 643px;
      left: 917px;
      width: 218px;
      height: 61.19px;
      font-size: 18.36px;
    }
  }

  /* Tablets in landscape mode and small desktops */
  @media (max-width: 1024px) and (min-width: 769px) {
    .logo {
      width: 220px;
      height: auto;
      top: 150px;
      left: 100px;
    }
    
    .tagline {
      font-size: 100px;
      line-height: 80px;
      top: 200px;
      left: 100px;
      width: 800px;
    }
    
    .description {
      font-size: 22px;
      line-height: 33px;
      top: 550px;
      left: 100px;
      width: 550px;
    }
    
    .quiz-button {
      top: 580px;
      left: 700px;
      width: 200px;
      height: 56px;
      font-size: 17px;
    }
  }

  /* Tablets in portrait mode */
  @media (max-width: 768px) and (min-width: 481px) {
    .logo {
      width: 200px;
      height: auto;
      top: 120px;
      left: 80px;
    }
    
    .tagline {
      font-size: 80px;
      line-height: 65px;
      top: 180px;
      left: 80px;
      width: 600px;
    }
    
    .description {
      font-size: 20px;
      line-height: 30px;
      top: 450px;
      left: 80px;
      width: 500px;
    }
    
    .quiz-button {
      top: 520px;
      left: 80px;
      width: 180px;
      height: 50px;
      font-size: 16px;
    }
  }

  /* Mobile phones in landscape mode */
  @media (max-width: 480px) and (min-width: 321px) and (orientation: landscape) {
    .logo {
      width: 180px;
      height: auto;
      top: 80px;
      left: 50px;
    }
    
    .tagline {
      font-size: 60px;
      line-height: 50px;
      top: 130px;
      left: 50px;
      width: 380px;
    }
    
    .description {
      font-size: 16px;
      line-height: 24px;
      top: 350px;
      left: 50px;
      width: 380px;
    }
    
    .quiz-button {
      top: 420px;
      left: 50px;
      width: 160px;
      height: 45px;
      font-size: 14px;
    }
  }

  /* Mobile phones in portrait mode */
  @media (max-width: 480px) and (orientation: portrait) {
    .logo {
      width: 160px;
      height: auto;
      top: 60px; /* Moved up to create more space */
      left: 50%;
      transform: translateX(-50%);
    }
    
    .tagline {
      font-size: 42px; /* Reduced font size */
      line-height: 40px;
      top: 120px; /* Moved up */
      left: 20px;
      width: calc(100% - 40px);
      text-align: center;
      height: auto; /* Allow height to adjust to content */
      padding: 0 10px; /* Add some padding */
    }
    
    .description {
      font-size: 16px;
      line-height: 24px;
      top: 280px; /* Adjusted position */
      left: 20px;
      width: calc(100% - 40px);
      text-align: center;
      padding-bottom: 20px; /* Add space below text */
    }
    
    .quiz-button {
      top: 420px; /* Increased distance from description */
      left: 50%;
      transform: translateX(-50%);
      width: 160px;
      height: 45px;
      font-size: 14px;
      margin-bottom: 40px; /* Ensure space at bottom */
    }
    
    .quiz-button:hover {
      transform: translateX(-50%) translateY(-3px);
    }
  }

  /* iPhone SE specific adjustments */
  @media (max-width: 375px) and (max-height: 667px) {
    .logo {
      top: 50px;
      width: 140px;
    }
    
    .tagline {
      font-size: 38px;
      line-height: 36px;
      top: 110px;
    }
    
    .description {
      font-size: 14px;
      line-height: 21px;
      top: 250px;
    }
    
    .quiz-button {
      top: 380px;
      width: 150px;
      height: 42px;
      font-size: 13px;
    }
    
    /* Ensure content doesn't overflow */
    body.landing-page {
      min-height: 100vh;
      padding-bottom: 50px;
    }
  }

  /* Ensure the page has enough height on very small screens */
  @media (max-height: 600px) {
    body.landing-page {
      height: auto;
      min-height: 100vh;
      padding-bottom: 80px;
    }
  }

  /* Join section styling */
  #join {
    background: linear-gradient(135deg, rgba(255, 111, 0, 0.05), rgba(95, 211, 255, 0.05)) !important;
    border-left: 5px solid #5FD3FF !important;
  }

  #join h2 {
    color: #FF6F00 !important;
  }

  /* Page navigation styling */
  #page-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }

  #page-indicators {
    display: flex;
    gap: 10px;
  }

  .page-indicator {
    width: 12px;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .page-indicator.active {
    background-color: #FF6F00;
  }

  .quiz-page {
    margin-bottom: 30px;
  }

  .quiz-page:not(.active) {
    display: none;
  }

  .page-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px; /* Add gap between buttons */
  }

  /* Make buttons more balanced on final page */
  #page-5 .page-buttons {
    justify-content: flex-end; /* Align buttons to right */
  }

  #page-5 .prev-page-btn {
    margin-right: auto; /* Push back button to left */
  }

  #page-5 button[type="submit"] {
    min-width: 120px; /* Set minimum width */
    padding: 12px 30px; /* Slightly larger padding */
    margin: 0; /* Remove default margin */
    max-width: unset; /* Override max-width for submit button on last page */
  }

  /* Optional: Match height of back/submit buttons */
  #page-5 .prev-page-btn {
    padding: 12px 24px;
    font-size: 1rem; /* Match font size with submit button */
  }

  .next-page-btn, .prev-page-btn {
    padding: 12px 24px;
    background-color: #5FD3FF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
  }

  .next-page-btn:hover, .prev-page-btn:hover {
    background-color: #4CB8E5;
  }

  .prev-page-btn {
    background-color: #f1f1f1;
    color: #333;
  }

  .prev-page-btn:hover {
    background-color: #e0e0e0;
  }

  .next-page-btn {
    margin-left: auto;
    display: block;
  }

  /* Gamification Styles */
  #gamification-container {
    position: fixed;
    right: 20px;
    top: 100px;
    width: 220px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 100;
    transition: all 0.3s ease;
  }

  #progress-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }

  .progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(#FF6F00 var(--progress, 0%), #f1f1f1 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-right: 15px;
  }

  .progress-circle::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
  }

  #progress-percentage {
    position: relative;
    font-weight: bold;
    font-size: 16px;
    color: #333;
  }

  .progress-label {
    font-size: 14px;
    color: #666;
  }

  #achievements-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
  }

  #achievements-section h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
  }

  .achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .achievement {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f5f5f5;
    opacity: 0.5;
    transition: all 0.3s ease;
  }

  .achievement.unlocked {
    background: linear-gradient(135deg, rgba(255, 111, 0, 0.1), rgba(95, 211, 255, 0.1));
    opacity: 1;
    transform: translateX(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .achievement-icon {
    font-size: 20px;
    margin-right: 10px;
    opacity: 0.7;
  }

  .achievement.unlocked .achievement-icon {
    opacity: 1;
  }

  .achievement-info {
    flex: 1;
  }

  .achievement-name {
    font-size: 14px;
    font-weight: 600;
    color: #555;
  }

  .achievement.unlocked .achievement-name {
    color: #000E8A;
  }

  /* Achievement notification */
  #achievement-notification {
    position: fixed;
    bottom: -100px; /* Start off-screen */
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    width: 300px;
    z-index: 1000;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease; /* Added opacity to transition */
    cursor: pointer;
    opacity: 0; /* Start fully transparent */
    pointer-events: none; /* Prevent interaction when hidden */
  }

  #achievement-notification.show {
    bottom: 20px;
    opacity: 1; /* Fade in */
    pointer-events: auto; /* Allow interaction when shown */
  }

  .notification-content {
    display: flex;
    align-items: center;
  }

  .notification-icon {
    font-size: 30px;
    margin-right: 15px;
    color: #FF6F00;
  }

  .notification-text h3 {
    margin: 0 0 5px 0;
    color: #FF6F00;
    font-size: 16px;
  }

  .notification-text h4 {
    margin: 0 0 5px 0;
    color: #000E8A;
    font-size: 18px;
  }

  .notification-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
  }

  /* Responsive adjustments for gamification elements */
  @media (max-width: 768px) {
    #gamification-container {
      position: static;
      width: 100%;
      margin: 20px auto;
      max-width: 500px;
    }
    
    #achievements-section {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    
    .achievements-list {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }
    
    .achievement {
      width: calc(50% - 10px);
    }
    
    #achievement-notification {
      width: calc(100% - 40px);
      left: 20px;
      right: 20px;
    }
  }

  @media (max-width: 480px) {
    .achievement {
      width: 100%;
    }
  }

  /* Mobile floating progress indicator */
  #mobile-progress-indicator {
    display: none; /* Hidden by default, shown only on mobile */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
  }

  /* Style for the latest achievement icon shown when NOT expanded */
  #mobile-progress-indicator:not(.expanded)::after {
    content: attr(data-latest-achievement-icon);
    position: absolute;
    bottom: -5px; /* Position below the circle */
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    background: white;
    padding: 2px 4px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  /* Show the icon only if the data attribute is not empty */
  #mobile-progress-indicator:not(.expanded)[data-latest-achievement-icon]:not([data-latest-achievement-icon=''])::after {
    opacity: 1;
  }

  .mobile-progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(#FF6F00 var(--progress, 0%), #f1f1f1 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 5px;
  }

  .mobile-progress-circle::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
  }

  #mobile-progress-percentage {
    position: relative;
    font-weight: bold;
    font-size: 14px;
    color: #333;
  }

  /* Expanded state for mobile indicator */
  #mobile-progress-indicator.expanded {
    width: 200px;
    height: auto;
    border-radius: 15px;
    bottom: 20px;
    right: 20px;
    padding: 15px;
  }

  /* Hide the latest achievement icon pseudo-element when expanded */
  #mobile-progress-indicator.expanded::after {
    opacity: 0;
    pointer-events: none;
  }

  /* Hide the mobile achievements list when NOT expanded */
  #mobile-progress-indicator:not(.expanded) .mobile-achievements {
    display: none;
  }

  /* Show the mobile achievements list when expanded */
  #mobile-progress-indicator.expanded .mobile-achievements {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
  }

  .mobile-achievement {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.5;
    transition: all 0.3s ease;
  }

  .mobile-achievement.unlocked {
    background: linear-gradient(135deg, #FF6F00, #5FD3FF);
    opacity: 1;
    color: white;
  }

  /* Pulse animation for completed quiz */
  @keyframes pulse {
    0% {
      transform: scale(1);
      box-shadow: 0 4px 15px rgba(255, 111, 0, 0.2);
    }
    50% {
      transform: scale(1.05);
      box-shadow: 0 4px 20px rgba(255, 111, 0, 0.4);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 4px 15px rgba(255, 111, 0, 0.2);
    }
  }

  #mobile-progress-indicator.pulse {
    animation: pulse 2s infinite;
  }

  /* Show expanded content */
  #mobile-progress-indicator.expanded::before {
    content: 'Your Achievements:';
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #000E8A;
  }

  #mobile-progress-indicator.expanded .mobile-progress-circle {
    width: 70px;
    height: 70px;
  }

  #mobile-progress-indicator.expanded .mobile-progress-circle::before {
    width: 55px;
    height: 55px;
  }

  #mobile-progress-indicator.expanded #mobile-progress-percentage {
    font-size: 18px;
  }

  /* Media query to show mobile indicator only on mobile devices */
  @media (max-width: 768px) {
    #mobile-progress-indicator {
      display: block;
    }
    
    /* When expanded, show mini achievement badges */
    #mobile-progress-indicator.expanded::after {
      content: '';
      display: flex;
      justify-content: center;
      gap: 5px;
      margin-top: 10px;
    }
    
    #mobile-progress-indicator.expanded .mobile-achievements {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 10px;
    }
    
    .mobile-achievement {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: #f5f5f5;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      opacity: 0.5;
      transition: all 0.3s ease;
    }
    
    .mobile-achievement.unlocked {
      background: linear-gradient(135deg, #FF6F00, #5FD3FF);
      opacity: 1;
      color: white;
    }
  }