.qh-quiz-container {
  width: 100%;
  max-width: 60rem;
  margin: 1.25rem auto;

  background: var(--qh-surface);
  color: var(--qh-text);

  padding: 2rem;
  border-radius: var(--qh-radius-lg);
  box-shadow: 0 1.25rem 3.125rem rgba(0,0,0,0.1);

  border: 1px solid var(--qh-border);

  box-sizing: border-box;
}
.qh-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.qh-quiz-header h5 {
  margin: 0;
  font-size: 1.3125rem; /* 21px */
  font-weight: 700;
}

.qh-quiz-header small {
  color: var(--qh-muted);
}
.qh-progress {
    flex: 1;
  min-width: 10rem;
  max-width: 20rem;
  height: 0.625rem;
 

  background: var(--qh-border);
  border-radius: 999px;
  overflow: hidden;
}
 
.qh-progress div {
  height: 100%;
  background: linear-gradient(90deg, var(--qh-primary), #3b82f6);
  transition: width 0.4s ease;
}
.qh-timer {
  font-weight: 600;
  font-size: 1rem;
  color: var(--qh-primary);
  display: flex;
  gap: 0.375rem;
  align-items: center;
}
.qh-quiz-body {
  background: var(--qh-surface1);
  border: 2px solid var(--qh-border);
  border-radius: 1.25rem;
  padding: 2.5rem; /* 40px */
  margin-bottom: 2rem;
}

.qh-quiz-ques {
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 2rem;
}
.qh-options {
  display: grid;
  gap: 1rem;
}

.qh-option {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;

  background: var(--qh-surface);
  border: 2px solid var(--qh-border);

  display: flex;
  align-items: center;
  gap: 1.125rem;
flex-wrap: wrap;
  word-break: break-word;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 1rem;
}
 
.qh-option:hover {
  border-color: var(--qh-primary);
  transform: translateY(-0.1875rem);
  background: rgba(37,99,235,0.05);
}

/* ACTIVE */
.qh-option.active {
  background: var(--qh-primary);
  color: #fff;
  border-color: var(--qh-primary);
}

/* CORRECT / WRONG */
 
.qh-option.correct {
    border: 2px solid #28a745;
    background: #eafaf1;
    color: #166534;
}

.qh-option.wrong {
    border: 2px solid #dc3545;
    background: #fdecea;
    color: #991b1b;
}

.qh-option.correct-selected {
    border: 2px solid #28a745;
    background: #d4edda;
    font-weight: bold;
}
.qh-quiz-opt {
  width: 1rem;
  height: 1rem;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: var(--qh-border);
  font-weight: 500;
}
.qh-quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--qh-border);
  gap: 0.75rem;
}

.qh-quiz-footer button {
  padding: 0.875rem 2rem;
  border-radius: 0.875rem;
  font-weight: 600;
  transition: all 0.25s ease;
}
.qh-config-card {
  max-width: 32.5rem;
  margin: auto;
}

.qh-field {
  margin-bottom: 1.125rem;
}

.qh-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--qh-muted);
  margin-bottom: 0.375rem;
  display: block;
}
.qh-chapter-box {
  padding: 0.75rem;
  border: 1px dashed var(--qh-border);
  border-radius: var(--qh-radius);
  margin-bottom: 1.125rem;

  opacity: 0;
  transform: translateY(-0.3125rem);
  transition: all 0.25s ease;
}

.qh-chapter-box.active {
  opacity: 1;
  transform: translateY(0);
}
 
/*=========================
MOBILE (≤ 992px)

=========================*/
@media (max-width: 992px)  {

  .qh-quiz-container {
    padding: 1.5rem;
  }

  .qh-quiz-body {
    padding: 2rem;
  }

  .qh-quiz-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .qh-progress {
    max-width: 100%;
  }
}
/*=========================
MOBILE (≤ 576px)

=========================*/
@media (max-width: 576px) {

  .qh-quiz-container {
    padding: 1rem;
    margin: 0.75rem;
  }

  .qh-quiz-body {
    padding: 1.25rem;
  }

  .qh-quiz-ques {
    font-size: 1.05rem;
  }

  .qh-option {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .qh-quiz-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .qh-quiz-footer button {
    width: 100%;
  }
}
.qh-sidebar-title {
  font-weight: 700;
  margin-bottom: 12px;
}


.qh-quiz-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  border-color: var(--qh-primary);
}

/* CONTENT FLEX */
.qh-quiz-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LEFT INFO */
.qh-quiz-name {
  display: block;
  font-weight: 600;
  color: var(--qh-text);
}

.qh-quiz-count {
  color: var(--qh-muted);
  font-size: 12px;
}



.qh-parent-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--qh-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* CARD */
.qh-quiz-card {
  display: block;
  text-decoration: none;

  border-radius: 12px;
  padding: 12px;

  border: 1px solid var(--qh-border);
  background: var(--qh-surface);

  margin-bottom: 10px;

  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* HOVER EFFECT */
.qh-quiz-card:hover {
  transform: translateY(-3px);
  border-color: var(--qh-primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* LEFT */
.qh-quiz-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--qh-text);
}

/* META */
.qh-quiz-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--qh-muted);
  margin-top: 4px;
}

/* CTA */
.qh-quiz-action {
  font-size: 12px;
  font-weight: 700;
  color: var(--qh-primary);
  background: rgba(37,99,235,0.1);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* FLEX */
.qh-quiz-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qh-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qh-seo-links a {
  font-size: 13px;
  color: var(--qh-primary);
}
/* DEFAULT */
.qh-option {
    border: 1px solid var(--qh-border);
    background:var(--qh-surface);
    color: var(--qh-text);
}

/* CORRECT (only for revealing correct answer when wrong/unanswered) */
.qh-option.correct {
    border: 2px solid #28a745;
    background:var(--qh-surface);
    color: #166534;
}

/* USER SELECTED CORRECT */
.qh-option.correct-selected {
    border: 2px solid #28a745;
    background: #28a745;
    color: #fff;
    font-weight: 600;
}

/* USER SELECTED WRONG */
.qh-option.wrong {
    border: 2px solid var( --qh-danger);
    background: var( --qh-danger);
    color: #fff;
}
 
.qh-feed{
    max-width:850px;
    margin:auto;
    padding:40px 20px;
}

 


.qh-live-badge{
    background:var( --qh-danger);
    color:#fff;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

 

 

 
 

.qh-letter{
    width:36px;
    height:36px;
    border-radius:50%;
    background:var(--qh-surface);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
}

 

 
.qh-feed{
    display:flex;
    flex-direction:column;
    gap:28px;
}

.qh-feed-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:24px;
}

.qh-feed-category{
    font-size:13px;
    font-weight:600;
    color:var(--qh-primary);
    margin-bottom:6px;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.qh-feed-title{
    margin:0;
    font-size:28px;
}

.qh-feed-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:24px;
    padding-top:20px;
    border-top:1px solid var(--qh-border);
    flex-wrap:wrap;
    gap:12px;
}

.qh-feed-meta{
    display:flex;
    gap:16px;
    color:var(--qh-muted);
    font-size:14px;
}

.qh-live-badge{
    background:linear-gradient(
        135deg,
        #dc2626,
        #ef4444
    );

    color:#fff;

    padding:8px 16px;

    border-radius:999px;

    font-size:12px;
    font-weight:700;

    letter-spacing:.5px;
}
 
/* =========================
   QH-D-HERO (MODERN HERO)
========================= */

.qh-d-hero {
    position: relative;
    padding: 80px 20px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--qh-surface);
}

/* Background gradient layer */
.qh-d-hero__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(37,99,235,0.25), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(14,165,233,0.25), transparent 45%),
                linear-gradient(135deg, var(--qh-bg), var(--qh-surface));
    z-index: 0;
}

/* dark overlay glow */
.qh-d-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.08));
    z-index: 1;
}

/* container */
.qh-d-hero__container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

/* badge */
.qh-d-hero__badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: var(--qh-font-sm);
    background: rgba(37,99,235,0.1);
    color: var(--qh-primary);
    border: 1px solid var(--qh-border);
    margin-bottom: 14px;
}

/* title */
.qh-d-hero__title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    color: var(--qh-headings);
    margin-bottom: 12px;
    line-height: 1.1;
}

/* description */
.qh-d-hero__desc {
    font-size: var(--qh-font-lg);
    color: var(--qh-muted);
    max-width: 720px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* grid */
.qh-d-hero__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 30px;
}

/* card */
.qh-d-hero__card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--qh-surface);
    border: 1px solid var(--qh-border);
    text-decoration: none;
    transition: 0.25s ease;
    box-shadow: var(--qh-shadow);
}

.qh-d-hero__card i {
    font-size: 18px;
    color: var(--qh-primary);
}

/* text inside card */
.qh-d-hero__card strong {
    display: block;
    font-size: var(--qh-font-lg);
    color: var(--qh-text);
}

.qh-d-hero__card span {
    font-size: var(--qh-font-sm);
    color: var(--qh-muted);
}

/* hover */
.qh-d-hero__card:hover {
    transform: translateY(-5px);
    border-color: var(--qh-primary);
}

/* primary highlight card */
.qh-d-hero__card.primary {
    background: linear-gradient(135deg, var(--qh-primary), #1d4ed8);
    color: #fff;
}

.qh-d-hero__card.primary i,
.qh-d-hero__card.primary strong,
.qh-d-hero__card.primary span {
    color: #fff;
}

/* muted card */
.qh-d-hero__card.muted {
    opacity: 0.9;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .qh-d-hero__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .qh-d-hero {
        padding: 50px 16px;
    }

    .qh-d-hero__grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================
   QUIZERHUB QUIZ CONFIG PANEL
========================================== */

.setup-wrapper{
    margin:30px 0;
}

/* ==========================================
   HERO SECTION
========================================== */

.setup-hero{

    background:
    linear-gradient(
        135deg,
        #0f172a,
        #1e40af
    );

    border-radius:20px;

    padding:20px;

    color:#fff;

    margin-bottom:15px;

    box-shadow:var(--qh-shadow);

    overflow:hidden;

    position:relative;
}

.hero-logo{

    width:60px;
    height:60px;

    object-fit:contain;

    background:#fff;

    padding:8px;

    border-radius:22px;

    flex-shrink:0;
}

.hero-title{

    font-size:var(--qh-font-4xl);

    font-weight:800;

    line-height:var(--qh-leading-tight);

    margin-bottom:10px;

    color:#fff;
}

.hero-subtitle{

    margin:0;

    font-size:var(--qh-font-md);

    line-height:var(--qh-leading-relaxed);

    opacity:.9;

    max-width:550px;
}

/* ==========================================
   STATS
========================================== */

.quick-stats{

    display:flex;

    justify-content:flex-end;

    align-items:center;

    gap:15px;

    flex-wrap:wrap;
}

.quick-stat{

    min-width:120px;

    padding:18px;

    border-radius:18px;

    text-align:center;

    backdrop-filter:blur(12px);

    background:rgba(255,255,255,.12);

    border:1px solid rgba(255,255,255,.15);
}

.quick-stat strong{

    display:block;

    font-size:var(--qh-font-2xl);

    font-weight:800;

    color:#fff;

    line-height:1.2;
}

.quick-stat span{

    display:block;

    margin-top:5px;

    font-size:var(--qh-font-sm);

    opacity:.9;
}

/* ==========================================
   MAIN CONFIG CARD
========================================== */

.generator-card{

    background:var(--qh-surface);

    border:1px solid var(--qh-border);

    border-radius:30px;

    padding:35px;

    box-shadow:var(--qh-shadow);
}

.generator-card h4{

    color:var(--qh-headings);

    font-size:var(--qh-font-2xl);

    font-weight:700;
}

/* ==========================================
   LABELS
========================================== */

.form-label{

    color:var(--qh-headings);

    font-size:var(--qh-font-sm);

    font-weight:600;

    margin-bottom:10px;
}

/* ==========================================
   INPUTS
========================================== */

.modern-select,
.modern-input{

    height:58px;

    border-radius:16px;

    border:1px solid var(--qh-border);

    background:var(--qh-surface1);

    color:var(--qh-text);

    font-size:var(--qh-font-md);

    transition:.25s ease;
}

.modern-select:focus,
.modern-input:focus{

    border-color:var(--qh-primary);

    background:var(--qh-surface);

    box-shadow:
    0 0 0 .25rem
    rgba(37,99,235,.15);
}

.modern-select option{

    background:var(--qh-surface);

    color:var(--qh-text);
}

/* ==========================================
   CHAPTER RANGE BOX
========================================== */

#chapterFields{

    background:var(--qh-bg);

    border:1px solid var(--qh-border);

    border-radius:20px;

    padding:22px;

    transition:.3s ease;
}

/* ==========================================
   ACTION AREA
========================================== */

.action-area{

    margin-top:35px;

    display:flex;

    flex-wrap:wrap;

    gap:15px;
}

/* ==========================================
   START BUTTON
========================================== */

.btn-start{

    min-width:240px;

    height:58px;

    border:none;

    border-radius:16px;

    font-size:var(--qh-font-md);

    font-weight:700;

    background:
    linear-gradient(
        135deg,
        var(--qh-primary),
        #1d4ed8
    );

    transition:.25s ease;
}

.btn-start:hover{

    transform:translateY(-2px);

    box-shadow:
    0 10px 25px rgba(37,99,235,.30);
}

/* ==========================================
   HISTORY BUTTON
========================================== */

.btn-history{

    min-width:220px;

    height:58px;

    border-radius:16px;

    font-size:var(--qh-font-md);

    font-weight:600;

    border:1px solid var(--qh-primary);

    color:var(--qh-primary);

    background:transparent;

    transition:.25s ease;
}

.btn-history:hover{

    background:var(--qh-primary);

    color:#fff;
}

/* ==========================================
   HELP TEXT
========================================== */

.qh-muted{

    color:var(--qh-muted);

    font-size:var(--qh-font-sm);
}

/* ==========================================
   DARK MODE IMPROVEMENTS
========================================== */

.dark-mode .quick-stat{

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);
}

.dark-mode .generator-card{

    background:var(--qh-surface);

    border-color:var(--qh-border);
}

.dark-mode #chapterFields{

    background:rgba(255,255,255,.03);
}

/* ==========================================
   TABLET
========================================== */

@media (max-width:992px){

    .setup-hero{
        text-align:center;
    }

    .quick-stats{
        justify-content:center;
        margin-top:25px;
    }

    .hero-title{
        font-size:var(--qh-font-3xl);
    }

    .generator-card{
        padding:25px;
    }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width:576px){

    .setup-hero{
        padding:25px;
    }

    .hero-logo{
        width:70px;
        height:70px;
    }

    .hero-title{
        font-size:var(--qh-font-2xl);
    }

    .hero-subtitle{
        font-size:var(--qh-font-sm);
    }

    .action-area{
        flex-direction:column;
    }

    .btn-start,
    .btn-history{
        width:100%;
        min-width:100%;
    }

    .quick-stat{
        min-width:95px;
        padding:12px;
    }
}
/* ==========================================
   COMPACT QUIZ HERO (SIDEBAR LAYOUT)
========================================== */

.setup-hero{

    background:linear-gradient(
        135deg,
        var(--qh-primary),
        #1d4ed8
    );

    border-radius:20px;

    padding:18px 22px;

    color:#fff;

    margin-bottom:20px;

    box-shadow:var(--qh-shadow);

    overflow:hidden;
}

.hero-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.hero-left{
    display:flex;
    align-items:center;
    gap:15px;
    min-width:0;
}

.hero-logo{

    width:60px;
    height:60px;

    border-radius:16px;

    background:var(--qh-surface);

    padding:6px;

    object-fit:contain;

    flex-shrink:0;
}

.hero-content{
    min-width:0;
}

.hero-title{

    margin:0;

    color:#fff;

    font-size:var(--qh-font-2xl);

    font-weight:800;

    line-height:1.2;
}

.hero-subtitle{

    margin:4px 0 0;

    font-size:var(--qh-font-sm);

    opacity:.9;
}

/* STATS */

.quick-stats{

    display:flex;

    gap:12px;

    flex-shrink:0;
}

.quick-stat{

    min-width:95px;

    padding:12px;

    text-align:center;

    border-radius:14px;

    background:rgba(255,255,255,.15);

    backdrop-filter:blur(10px);
}

.quick-stat strong{

    display:block;

    font-size:var(--qh-font-lg);

    font-weight:800;

    line-height:1;
}

.quick-stat span{

    display:block;

    margin-top:4px;

    font-size:11px;

    opacity:.85;

    text-transform:uppercase;
}

/* MOBILE */

@media(max-width:768px){

    .hero-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .quick-stats{
        width:100%;
        justify-content:space-between;
    }

    .hero-title{
        font-size:var(--qh-font-xl);
    }

    .hero-logo{
        width:50px;
        height:50px;
    }
}
.qh-exam-wrap{
    max-width: 900px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
      border: 10px solid var(--qh-exam);
        border-radius:16px;
        padding: 0px 16px 16px 16px;
}

/* HEADER COMPACT */
.qh-exam-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;

    padding:14px 16px;
   margin-left:-16px;
    margin-right:-16px;

    background: var(--qh-exam);
    color:#fff;
}

/* REDUCE BRAND SIZE */
.qh-exam-brand h4{
    font-size:16px;
    margin:0;
}

.qh-exam-brand small{
    font-size:12px;
    opacity:.9;
}

/* STATS SMALLER */
.qh-exam-stats{
    display:flex;
    gap:8px;
}

.qh-stat{
    padding:8px 10px;
    border-radius:10px;
    min-width:70px;
    background: rgba(255,255,255,.15);
    text-align:center;
}

.qh-stat span{ font-size:11px; }
.qh-stat strong{ font-size:14px; }

/* QUESTION CARD COMPACT */
.qh-question-card{
    padding:18px;
    border-radius:16px;
}

/* QUESTION TEXT SMALLER */
.qh-question-title{
    font-size:1.2rem;
    margin-bottom:16px;
     padding:5px;
}

/* OPTIONS MORE COMPACT */
.qh-option{
    padding:5px;
    font-size:12px;
    
}

/* NAV GRID RESPONSIVE (NO SCROLL OVERFLOW PROBLEM) */
.qh-question-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(38px,1fr));
    gap:6px;
}

/* FOOTER FIX */
.qh-exam-footer{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:12px;
    border-radius:14px;
}

/* MOBILE OPTIMIZATION */
@media(max-width:768px){

    .qh-exam-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .qh-exam-stats{
        width:100%;
        justify-content:space-between;
    }

    .qh-question-title{
        font-size:1.05rem;
    }

    .qh-option{
        font-size:13px;
    }
}
.qh-qno {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.qh-qno.answered {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.qh-qno.current {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    transform: scale(1.1);
}

.qh-qno.answered.current {
    background: #0b5ed7;
}
.already-selected{
    background:#2563eb !important;
    color:#fff !important;
    border-color:#2563eb !important;
}

.correct-selected{
    background:#16a34a !important;
    color:#fff;
}

.correct{
    background:#16a34a !important;
    color:#fff;
}

.wrong{
    background:#dc2626 !important;
    color:#fff;
}

.qh-option:disabled{
    cursor:not-allowed;
    opacity:.9;
}