/* ================================================
   O Level Page — Complete CSS (All Fixed)
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,600;0,700;1,400&family=Noto+Sans+Devanagari:wght@400;600;700&display=swap');
/* ---- Font ---- */
.olevel-page,
.olevel-page * {
  font-family: 'Hind', system-ui, sans-serif !important;
}

.olevel-page { font-family: 'Noto Sans','Noto Sans Devanagari',sans-serif !important; }
.olevel-page * { font-family: 'Noto Sans','Noto Sans Devanagari',sans-serif !important; box-sizing: border-box; }
.ol-main { padding-top: 16px !important; }
.ol-hero  { margin-top: 0 !important; }
/* ---- Page ---- */
.olevel-page {
  background: #f8f7ff;
  min-height: 100vh;
  padding-bottom: 80px;ḍ
  overflow-x: hidden;
}

/* ---- Hero ---- */
.ol-hero { background: #1e0a3c; padding: 20px 0; }
.ol-hero-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.ol-hero-badge {
  font-size: 10px; background: rgba(255,255,255,0.12); color: #c4b5fd;
  display: inline-block; padding: 2px 10px; border-radius: 20px; margin-bottom: 6px;
}
.ol-hero h1 { font-size: 20px !important; font-weight: 700 !important; color: #fff !important; margin-bottom: 4px !important; }
.ol-hero p  { font-size: 13px; color: rgba(255,255,255,0.65); margin: 0; }
.ol-hero-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ol-btn-white {
  background: #fff; color: #5d15ea; padding: 7px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 700; text-decoration: none; display: inline-block;
}
.ol-btn-white:hover { background: #f0ebff; color: #5d15ea; }
.ol-btn-outline {
  border: 1px solid rgba(255,255,255,0.35); color: #fff; padding: 7px 14px;
  border-radius: 20px; font-size: 13px; text-decoration: none; display: inline-block;
}
.ol-btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ---- Main Grid ---- */
.ol-main { padding: 16px 0; }
.ol-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  align-items: start;
  max-width: 100%;
  min-width: 0;
}

/* ---- Sidebar ---- */
.ol-sidebar {
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 60px;
}
.ol-sidebar-label {
  font-size: 10px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 0 4px; margin-bottom: 2px;
}
.ol-module-card {
  background: #fff; border: 0.5px solid #e2e8f0;
  border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all 0.2s;
}
.ol-module-card:hover  { border-color: #5d15ea; }
.ol-module-card.active { background: #5d15ea; border-color: #5d15ea; }
.ol-mc-title { font-size: 12px; font-weight: 700; color: #1e293b; }
.ol-module-card.active .ol-mc-title { color: #fff; }
.ol-mc-sub   { font-size: 10px; color: #64748b; margin-top: 2px; }
.ol-module-card.active .ol-mc-sub { color: rgba(255,255,255,0.8); }
.ol-mc-badges { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.ol-mc-badge  { background: #f1f5f9; color: #64748b; font-size: 9px; padding: 1px 6px; border-radius: 10px; }
.ol-module-card.active .ol-mc-badge { background: rgba(255,255,255,0.2); color: #fff; }
.ol-sidebar-divider { border-top: 0.5px solid #e2e8f0; margin: 4px 0; }
@media (max-width: 991px) {
  .ol-sidebar-divider { display: none !important; }
  .ol-quick-link {
    min-width: 72px !important;
    max-width: 80px !important;
    padding: 7px 6px !important;
    font-size: 10px !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 3px !important;
  }
  .ol-quick-link span { font-size: 16px !important; }
}
.ol-quick-link {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: all 0.2s; border: none; width: 100%; text-align: left;
}
.ol-ql-green  { background: #f0fdf4; color: #166534; }
.ol-ql-orange { background: #fff7ed; color: #9a3412; }
.ol-ql-blue   { background: #eff6ff; color: #1d4ed8; }
.ol-ql-purple { background: #f0ebff; color: #5d15ea; }
.ol-ql-green:hover  { background: #dcfce7; }
.ol-ql-orange:hover { background: #ffedd5; }
.ol-ql-blue:hover   { background: #dbeafe; }
.ol-ql-purple:hover { background: #e0d4ff; }

/* ---- Right Content ---- */
.ol-content { display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow: hidden; }

/* ---- Module Header ---- */
.ol-module-header {
  background: #f0ebff; border-radius: 12px;
  padding: 12px 14px; border-left: 3px solid #5d15ea;
}
.ol-module-header h2 {
  font-size: 15px !important; font-weight: 700 !important;
  color: #5d15ea !important; margin: 0 0 3px !important;
}
.ol-module-header p { font-size: 12px; color: #7c3aed; margin: 0; }

/* ---- Cards ---- */
.ol-card { background: #fff; border: 0.5px solid #e2e8f0; border-radius: 14px; padding: 14px; }
.ol-card-title {
  font-size: 14px; font-weight: 700; color: #1e293b;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.ol-card-badge { font-size: 10px; padding: 3px 10px; border-radius: 20px; margin-left: auto; font-weight: 600; }
.ol-badge-purple { background: #5d15ea; color: #fff; }
.ol-badge-blue   { background: #e0f7ff; color: #0369a1; }

/* ---- Practice Sets ---- */
.ol-sets-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.ol-set-btn {
  background: #f8f7ff; border: 0.5px solid #e2e8f0; border-radius: 10px;
  padding: 10px 6px; text-align: center; cursor: pointer; transition: all 0.2s;
  font-size: 16px; font-weight: 700; color: #1e293b; width: 100%;
}
.ol-set-btn:hover  { background: #f0ebff; color: #5d15ea; transform: translateY(-2px); }
.ol-set-btn.active { background: #5d15ea; color: #fff; border-color: #5d15ea; }
.ol-set-btn span   { display: block; font-size: 10px; color: #64748b; margin-top: 3px; font-weight: 400; }
.ol-set-btn.active span { color: rgba(255,255,255,0.8); }

/* ---- Theory Chapters ---- */
.ol-chapter-list { display: flex; flex-direction: column; gap: 4px; }
.ol-chapter-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #f8f7ff; border-radius: 8px; cursor: pointer; text-decoration: none;
  transition: all 0.2s; border: 0.5px solid transparent;
}
.ol-chapter-item:hover  { background: #f0ebff; border-color: #c4b5fd; }
.ol-chapter-num {
  width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #64748b; flex-shrink: 0;
}
.ol-chapter-name  { font-size: 13px; color: #1e293b; flex: 1; }
.ol-chapter-arrow { font-size: 12px; color: #94a3b8; }

/* ---- Course Info ---- */
.ol-info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.ol-info-item { text-align: center; padding: 10px 8px; background: #f8f7ff; border-radius: 8px; }
.ol-info-val  { font-size: 15px; font-weight: 700; color: #5d15ea; line-height: 1; margin-bottom: 3px; }
.ol-info-key  { font-size: 10px; color: #64748b; }

/* ---- Question Box ---- */
.ol-question-box {
  background: #fff; border: 0.5px solid #e2e8f0; border-radius: 14px; padding: 16px;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.ol-set-info {
  font-size: 13px; font-weight: 700; color: #5d15ea;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid #f0ebff;
}
.ol-set-info span { font-weight: 400; color: #64748b; margin-left: 4px; }

.ol-q-block { margin-bottom: 4px; }
.ol-q-divider { border: none; border-top: 1px solid #f0f0f0; margin: 16px 0; }

/* ✅ Question text — formatting रखें */
.question-number {
  font-size: 13px; font-weight: 700; color: #5d15ea;
  margin-bottom: 8px; margin-top: 4px;
}
.question-text {
  font-size: 15px !important;
  color: #1e293b !important;
  line-height: 1.8 !important;
  margin-bottom: 12px !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: pre-wrap !important; /* ✅ line breaks preserve */
  max-width: 100% !important;
}
.question-text * { max-width: 100% !important; }

/* Options */
.options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.option {
  padding: 11px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  cursor: pointer; font-size: 14px !important; color: #374151;
  transition: all 0.15s; background: #fafafa;
  word-break: break-word; overflow-wrap: break-word;
  white-space: normal; width: 100%; text-align: left;
  display: block;
}
.option:hover   { background: #f0ebff; border-color: #c4b5fd; }
.option.correct { background: #f0fdf4; border-color: #86efac; color: #166534; font-weight: 600; }
.option.wrong   { background: #fff1f2; border-color: #fca5a5; color: #9f1239; }

.show-btn {
  background: #f0ebff; color: #5d15ea; border: none; padding: 7px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
  margin-bottom: 4px;
}
.show-btn:hover { background: #5d15ea; color: #fff; }
.explanation {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
  padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-top: 8px;
  white-space: pre-wrap; word-break: break-word;
}
.show-result-btn {
  width: 100%; background: #5d15ea; color: #fff; border: none;
  padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 20px; transition: all 0.2s;
}
.show-result-btn:hover { background: #4a10c4; }

/* Code box */
.code-box-container { position: relative; margin: 12px 0; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; background: #5d15ea; color: #fff;
  border: none; padding: 4px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.code-box {
  background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 8px;
  font-size: 13px; overflow-x: auto; white-space: pre; max-width: 100%;
  font-family: 'Courier New', monospace !important;
}

/* ---- Result Popup ---- */
#resultBox {
  display: none; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%); background: #fff; border-radius: 18px;
  padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  z-index: 9999; min-width: 280px; text-align: center;
}
#resultBox div { font-size: 16px; color: #1e293b; margin-bottom: 8px; }
.close-btn {
  background: #5d15ea; color: #fff; border: none; padding: 11px 24px;
  border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
  margin-top: 12px; width: 100%;
}

/* ---- Comments ---- */
.ol-comment-wrap { margin-top: 20px; padding-top: 20px; border-top: 1px solid #f0ebff; }
.ol-comment-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 10px; }
.ol-comment-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; color: #1e293b; background: #fafafa; outline: none;
  margin-bottom: 8px; transition: border-color 0.2s;
  font-family: 'Noto Sans','Noto Sans Devanagari',sans-serif !important;
}
.ol-comment-input:focus { border-color: #5d15ea; background: #fff; }
textarea.ol-comment-input { min-height: 70px; resize: vertical; }
.ol-comment-btn {
  background: #5d15ea; color: #fff; border: none; padding: 9px 20px;
  border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; margin-bottom: 12px;
}
.ol-comment-item {
  background: #f8f7ff; border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 13px;
}
.ol-comment-item strong { color: #5d15ea; display: block; margin-bottom: 3px; }
.ol-comment-item small  { color: #94a3b8; font-size: 11px; display: block; margin-top: 4px; }
.ol-load-more-btn {
  width: 100%; margin-top: 10px; padding: 9px; border-radius: 8px;
  border: 1.5px solid #5d15ea; background: #fff; color: #5d15ea;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.ol-load-more-btn:hover { background: #f0ebff; }

/* ================================================
   MOBILE
   ================================================ */
@media (max-width: 991px) {
  .ol-grid { grid-template-columns: 1fr; }

  .ol-sidebar {
    position: static; flex-direction: row; overflow-x: auto; overflow-y: hidden;
    flex-wrap: nowrap; padding-bottom: 8px; gap: 8px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ol-sidebar::-webkit-scrollbar { display: none; }

  .ol-sidebar-label   { display: none; }
  .ol-sidebar-divider { display: none; }
  .ol-module-card { min-width: 130px; flex-shrink: 0; }
  .ol-quick-link  { min-width: 80px; flex-shrink: 0; font-size: 11px !important; padding: 7px 8px !important; }

  /* ✅ Bottom Nav force show */
  .bs-bottom-nav       { display: block !important; }
  .mobile_btn          { display: none  !important; }

  .ol-sets-grid { grid-template-columns: repeat(5,1fr); gap: 6px; }
  .ol-info-grid { grid-template-columns: repeat(3,1fr); }
  .question-text { font-size: 14px !important; }
  .option { font-size: 13px !important; }
}

@media (max-width: 576px) {
  .ol-hero h1 { font-size: 17px !important; }
  .ol-sets-grid { gap: 5px; }
  .ol-set-btn { font-size: 14px; padding: 8px 4px; }
  .ol-chapter-name { font-size: 12px; }
  .ol-card { padding: 12px; }
  .ol-question-box { padding: 12px; }
  .question-text { font-size: 13px !important; }
  .option { font-size: 12px !important; padding: 9px 10px; }
}