.qm-quiz-wrap {
  max-width: 720px;
  margin: 30px auto;
  background: rgba(255, 255, 255, 0.8); /* semi-transparent for glass look */
  border-radius: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 30px 25px;
  font-family: "Poppins", sans-serif;
  border: 1px solid rgba(255,255,255,0.3);
}


.qm-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 15px;
  color: #555;
}

.qm-question-title {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
}


.qm-options label {
  display: block;
  padding: 14px 18px;
  margin-bottom: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f5f7fa;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  position: relative;
}

.qm-options input {
  margin-right: 10px;
  transform: scale(1.2);
}

.qm-options label:hover {
  background: #eaf4ff;
  border-color: #0073e6;
  box-shadow: 0 4px 10px rgba(0,115,230,0.15);
}

.qm-btn {
  display: inline-block;
  background: linear-gradient(135deg, #0073e6, #3daaf9);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-top: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 115, 230, 0.3);
}

.qm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 115, 230, 0.35);
  background: linear-gradient(135deg, #005fc1, #2196f3);
}

.qm-result {
  text-align: center;
  position: relative; /* Required for absolute child */
  overflow: hidden;    /* Hide overflow sparkles */
}

.qm-score { font-size: 22px; margin: 15px 0; }

.qm-correct { background: #e6ffed; border-left: 4px solid #3ec46d; }
.qm-wrong { background: #ffecec; border-left: 4px solid #f14b4b; }

.qm-review {
  margin-top: 20px;
  text-align: left;
}

.qm-fade {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from {opacity:0; transform: translateY(8px);}
  to {opacity:1; transform: translateY(0);}
}

@media (max-width: 768px) {
  .qm-quiz-wrap {
    padding: 20px 15px;
  }

  .qm-btn {
    width: 100%;
    text-align: center;
    font-size: 16px;
  }

  .qm-question-title {
    font-size: 18px;
    text-align: left;
  }

  .qm-options label {
    font-size: 14px;
    padding: 12px;
  }
}


.qm-progressbar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 16px;
}

.qm-progressbar-fill {
  height: 100%;
  background: linear-gradient(to right, #0073e6, #00c6ff);
  width: 0%;
  transition: width 0.4s ease;
}


/* subtle hover/glow effect */
.qm-progressbar-fill::after {
  content: '';
  display: block;
  height: 100%;
  background: rgba(255,255,255,0.2);
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.qm-score-message {
  margin: 18px 0 20px 0;
  padding: 14px 18px;
  font-size: 16px;
  border-radius: 10px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  border-left: 6px solid transparent;
  transition: all 0.3s ease;
}

/* 🎉 Excellent */
.qm-score-message.success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

/* 👍 Good */
.qm-score-message.good {
  background: #fefce8;
  border-color: #eab308;
  color: #92400e;
}

/* 🙂 Average */
.qm-score-message.average {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

/* 💪 Low */
.qm-score-message.low {
  background: #fef2f2;
  border-color: #ef4444;
  color: #7f1d1d;
}

.qm-result-actions {
  margin-top: 25px;
  text-align: center;
}

.qm-result-actions .qm-btn {
  margin: 6px 10px;
}

/* 🚀 Rocket */
.qm-firework-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  top: 0;
  left: 0;
}

.qm-firework-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: red;
  border-radius: 50%;
  animation: firework-move 800ms ease-out forwards;
}

@keyframes firework-move {
  to {
    transform: translate(var(--x), var(--y));
    opacity: 0;
  }
}





/* ------------ Base Table Style (Desktop) -------------- */
.qm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.qm-table th,
.qm-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    white-space: nowrap;
}

.qm-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Scroll support */
#qm-attempts-table {
    overflow-x: auto;
}

/* ------------- Mobile Responsive Cards ------------- */
@media (max-width: 768px) {

    .qm-table {
        border: 0;
    }

    .qm-table thead {
        display: none !important;
    }

    .qm-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 12px;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.07);
    }

    .qm-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 5px;
        border: none;
        border-bottom: 1px solid #eee;
        font-size: 14px;
        white-space: normal;
    }

    .qm-table td:last-child {
        border-bottom: none;
    }

    .qm-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #333;
        flex-basis: 45%;
        text-align: left;
    }
}

/* ----------- Extra small screens 480px ------------- */
@media (max-width: 480px) {
    .qm-table td {
        font-size: 13px;
        padding: 6px 3px;
    }

    .qm-table tr {
        padding: 8px;
    }
}



#qm-attempts-table thead th {
    cursor: pointer;
    position: relative;
    user-select: none;
}

#qm-attempts-table thead th.asc::after {
    content: " ▲";
    font-size: 12px;
}

#qm-attempts-table thead th.desc::after {
    content: " ▼";
    font-size: 12px;
}




/* ------------------------------------------------------
   MODERN CARD CONTAINER
------------------------------------------------------ */
.qm-filter-card {
    background: #fff;
    padding: 15px 18px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* LEFT SIDE (Category, Subcategory, Reset) */
.qm-filter-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* RIGHT SIDE (Search Input) */
.qm-filter-right {
    margin-left: auto;
}

/* Labels */
.qm-filter-card label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* Select dropdowns */
.qm-filter-card select {
    padding: 7px 10px !important;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 8px !important;
    height: 36px;
    background: #fff;
    min-width: 160px;
}

/* Reset button */
#qm-attempt-filter-reset {
    padding: 7px 14px;
    font-size: 13px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    cursor: pointer;
    transition: 0.2s ease;
    align-items: center;
}
#qm-attempt-filter-reset:hover {
    background: #e9e9e9;
}

/* Search box — right aligned */
#qm-attempt-search-input {
    padding: 7px 12px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 8px;
    height: 36px;
    width: 220px;
}

/* ------------------------------------------------------
   TABLETS
------------------------------------------------------ */
@media(max-width: 768px) {

    .qm-filter-card {
        flex-direction: column;
        align-items: stretch;
    }

    .qm-filter-left {
        justify-content: space-between;
        width: 100%;
    }

    .qm-filter-right {
        width: 100%;
    }

    #qm-attempt-search-input {
        width: 100%;
    }
}

/* ------------------------------------------------------
   MOBILE
------------------------------------------------------ */
@media(max-width: 480px) {

    .qm-filter-left {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #qm-attempt-filter-reset,
    .qm-filter-card select,
    #qm-attempt-search-input {
        width: 100%;
    }
}

/* Pagination container */
.qm-pagination {
    display: inline-flex;
    flex-wrap: wrap;       /* Mobile-friendly: line wrap */
    gap: 8px;              /* बटन के बीच spacing */
    justify-content: center;
    margin-top: 15px;
}

/* Page buttons */
.qm-pagination .qm-page-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: #f9f9f9;
    font-size: 14px;
    display: inline-block;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

/* Hover effect */
.qm-pagination .qm-page-btn:hover {
    background: #e9e9e9;
}

/* Active page */
.qm-pagination .qm-page-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Ellipsis style */
.qm-pagination .qm-page-ellipsis {
    padding: 6px 8px;
    font-size: 14px;
    color: #666;
    user-select: none;
    display: inline-block;
}


/* Sorting Arrow UI */
.qm-sort-arrow {
    margin-left: 5px;
    font-size: 10px;
    opacity: 0.6;
}
.qm-sort-active .qm-sort-arrow {
    opacity: 1;
}













/* Custom Registration Form UI */
.qm-auth-container {
    max-width: 450px;
    margin: 40px auto;
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    font-family: system-ui, -apple-system, sans-serif;
    border-top: 5px solid #3b82f6; /* Professional Blue */
}

.qm-auth-title {
    text-align: center;
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.qm-form-group {
    margin-bottom: 15px;
}

.qm-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-weight: 500;
    font-size: 14px;
}

.qm-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc; /* Pastel/Light background */
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.qm-form-group input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: #ffffff;
}

/* Inline Error Messages */
.qm-error-msg {
    display: block;
    color: #ef4444; /* Red for errors */
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px; /* Prevents layout jump */
}

/* Password Strength Meter */
.qm-password-strength {
    height: 5px;
    background: #e2e8f0;
    margin-top: 8px;
    border-radius: 3px;
    overflow: hidden;
}

.qm-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.qm-btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.qm-btn-primary:hover {
    background: #2563eb;
}

/* Global Alert Messages */
#qm-register-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}
.qm-alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.qm-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }