/* ==========================================================================
   EDUFORT - Exact Replica Styles (Mobile App UI)
   ========================================================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #27318b 0%, #303b9e 100%);
  --bg-main: #f4f6fb;
  --card-bg: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --accent-orange: #f97316;
  --accent-pink: #ec4899;
  --border-light: #f1f5f9;
  --app-max-width: 460px;
}

.badge-pill-navy {
  background: #111827;
  border-radius: 20px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0b0f19;
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

/* App Viewport Container (Centered mobile frame constrained strictly to screen size) */
.app-container,
.app-viewport {
  width: 100%;
  max-width: min(var(--app-max-width), 100vw);
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--bg-main);
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   HEADER (Gradient top bar with Logo, Search, Avatar)
   -------------------------------------------------------------------------- */
.home-header {
  background: var(--primary-gradient);
  padding: 16px 18px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-decoration: none;
}

.brand-logo svg {
  width: 28px;
  height: 28px;
}

.header-search {
  flex: 1;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 8px;
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13.5px;
  width: 100%;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #facc15;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   CONTENT WRAPPER & SECTIONS
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  padding: 14px 14px 90px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: #2b3954;
  padding-left: 6px;
}

.section-card {
  background: var(--card-bg);
  border-radius: 28px;
  padding: 24px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

/* 3-Column Grid for Subjects & Resources (Reduced gap & neat contained icons) */
.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 16px;
  column-gap: 8px;
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  padding: 4px;
}

.grid-item:active {
  transform: scale(0.94);
  opacity: 0.85;
}

.grid-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  padding: 0;
  box-sizing: border-box;
}

.grid-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.25;
  max-width: 100px;
  word-break: break-word;
}

/* Floating Action Button (FAB) */
.fab-button {
  position: fixed;
  bottom: 84px;
  right: calc(50% - (var(--app-max-width) / 2) + 20px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.45);
  z-index: 9999;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

@media (max-width: 480px) {
  .fab-button {
    right: 20px;
  }
}

.fab-button:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

.fab-button:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------------------------
   BOTTOM NAVIGATION BAR
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: 68px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 60;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.nav-tab.active {
  color: #e11d48;
}

.nav-tab svg {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   PAGE HEADER (For Chapters, Topics & Player subpages)
   -------------------------------------------------------------------------- */
.subpage-header {
  background: #ffffff;
  border-radius: 24px;
  margin: 14px 14px 10px 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  padding: 6px;
  margin-left: -6px;
}

.subpage-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  margin-left: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subpage-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  overflow: hidden;
}

.subpage-badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   CHAPTER LIST (Image #3)
   -------------------------------------------------------------------------- */
.chapter-card-list {
  background: #ffffff;
  border-radius: 28px;
  margin: 6px 14px 90px 14px;
  padding: 10px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.chapter-item {
  display: flex;
  align-items: flex-start;
  padding: 18px 20px;
  gap: 16px;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chapter-item:last-child {
  border-bottom: none;
}

.chapter-item:hover, .chapter-item:active {
  background: #f8fafc;
}

.chapter-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  flex-shrink: 0;
  margin-top: 2px;
}

.chapter-info {
  flex: 1;
}

.chapter-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 6px;
}

.chapter-progress-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 6px;
  overflow: hidden;
}

.chapter-progress-fill {
  height: 100%;
  background: var(--accent-orange);
  width: 0%;
}

.chapter-progress-text {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   TOPICS & LESSONS (Image #4)
   -------------------------------------------------------------------------- */
.chapter-header-progress {
  padding: 0 20px 10px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topic-group-card {
  background: #ffffff;
  border-radius: 28px;
  margin: 6px 14px 20px 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.topic-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 6px 0;
  gap: 12px;
}

.topic-accordion-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.topic-badge-wrapper {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.topic-num-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.topic-check-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.topic-group-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.topic-chevron {
  color: #64748b;
  transition: transform 0.25s ease;
}

.topic-chevron.open {
  transform: rotate(180deg);
}

/* Lessons Container with vertical dotted connector */
.lessons-container {
  margin-top: 16px;
  padding-left: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-pill {
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #f1f5f9;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
}

.lesson-pill:active {
  background: #e2e8f0;
  transform: scale(0.98);
}

.lesson-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.lesson-play-ring-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-ring-circle-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 2.5;
}

.progress-ring-circle-fill {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

.lesson-play-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.chapter-header-progress-wrap {
  padding: 0 16px 14px 16px;
}

.chapter-top-progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.chapter-top-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 4px;
  transition: width 0.35s ease;
}

.chapter-header-progress-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
}

.lesson-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.lesson-duration-badge {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   DARK THEME PLAYER PAGE (Image #5)
   -------------------------------------------------------------------------- */
.player-page {
  background: #0f172a;
  color: #ffffff;
  min-height: 100vh;
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: #ffffff;
}

.player-top-center-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.player-top-center-badge::after {
  content: "×";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0f172a;
}

.video-frame-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  position: relative;
  overflow: hidden;
}

.player-details-card {
  padding: 24px 20px 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.player-lecture-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.player-action-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.player-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.player-action-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s ease, background 0.15s ease;
}

.player-action-circle.star {
  color: #f59e0b;
}

.player-action-circle:active {
  transform: scale(0.92);
  background: #334155;
}

.btn-continue-orange {
  width: 100%;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 0;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-continue-orange:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

/* Loading Spinner */
.spinner-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  width: 100%;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(249, 115, 22, 0.2);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ==========================================================================
   CUSTOM VIDEO PLAYER STYLES (adapted from player/player.css)
   ========================================================================== */
/* ==========================================================================
   Universal Smooth Video Player Styles (YouTube / Xylem Inspired)
   ========================================================================== */

.cx-player-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cx-player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 2x Speed Indicator Overlay */
.cx-speed-indicator {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 40;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: cx-fade-in 0.15s ease-out;
}

/* Big Center Ripple Action (Play / Pause / Seek) */
.cx-center-action-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 35;
  animation: cx-ripple-pop 0.5s ease-out forwards;
}

@keyframes cx-ripple-pop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  40% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

@keyframes cx-fade-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Buffering Spinner */
.cx-buffering-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #f97316;
  animation: cx-spin 0.8s linear infinite;
  z-index: 30;
  pointer-events: none;
}

@keyframes cx-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Controls Gradient Overlay */
.cx-controls-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 25%, transparent 60%);
  opacity: 1;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.cx-controls-overlay.cx-controls-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Scrubber Bar Area */
.cx-scrubber-wrap {
  position: relative;
  width: calc(100% - 24px);
  margin: 0 auto;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.cx-scrubber-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  transition: height 0.15s ease;
}

.cx-scrubber-wrap:hover .cx-scrubber-track {
  height: 6px;
}

.cx-scrubber-buffered {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
}

.cx-scrubber-played {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #f97316;
  border-radius: 2px;
}

.cx-scrubber-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f97316;
  transition: transform 0.15s ease;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.cx-scrubber-wrap:hover .cx-scrubber-handle,
.cx-scrubber-wrap.cx-dragging .cx-scrubber-handle {
  transform: translate(-50%, -50%) scale(1);
}

.cx-scrubber-tooltip {
  position: absolute;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.95);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Bottom Controls Row */
.cx-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px 16px;
  gap: 12px;
}

.cx-bottom-left,
.cx-bottom-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.cx-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
}

.cx-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cx-btn:active {
  transform: scale(0.92);
}

/* Volume Control Slider on Hover */
.cx-volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cx-volume-slider-wrap {
  width: 0;
  overflow: hidden;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
}

.cx-volume-group:hover .cx-volume-slider-wrap,
.cx-volume-slider-wrap:focus-within {
  width: 68px;
}

.cx-volume-slider {
  width: 60px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.cx-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

/* Time Display */
.cx-time-display {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  letter-spacing: 0.02em;
  margin-left: 4px;
}

/* Live Badge */
.cx-live-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.cx-live-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cx-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
  transition: background 0.2s ease;
}

.cx-live-dot.cx-live-gray {
  background: #94a3b8;
}

/* HD Badge on Settings Icon */
.cx-hd-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
}

/* ==========================================================================
   Settings Menu Popup (Images #2, #3, #4, #5)
   ========================================================================== */
.cx-settings-panel {
  position: absolute;
  bottom: 56px;
  right: 16px;
  width: 270px;
  background: rgba(24, 24, 27, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 60;
  overflow: hidden;
  animation: cx-menu-slide-up 0.18s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes cx-menu-slide-up {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cx-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

.cx-menu-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cx-menu-list {
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.cx-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px;
  color: #f1f5f9;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}

.cx-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cx-menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cx-menu-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
}

.cx-menu-item-label {
  font-weight: 500;
}

.cx-menu-item-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

/* Switch Toggle (Image #2: Ambient mode, Annotations) */
.cx-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.cx-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #475569;
  transition: 0.2s;
  border-radius: 20px;
}

.cx-switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.cx-switch input:checked + .cx-switch-slider {
  background-color: #00acc1;
}

.cx-switch input:checked + .cx-switch-slider:before {
  transform: translateX(16px);
}

/* Speed Slider Panel (Image #4) */
.cx-speed-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cx-speed-display-value {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.cx-speed-stepper-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cx-stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.cx-stepper-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.cx-speed-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.cx-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.cx-speed-presets-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: 100%;
}

.cx-speed-preset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 6px;
  padding: 6px 2px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.cx-speed-preset-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.cx-speed-preset-btn.cx-active {
  background: #ffffff;
  color: #000000;
}

/* Quality & Subtitle Choice Rows (Images #3 & #5) */
.cx-choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  color: #f1f5f9;
  transition: background 0.12s ease;
}

.cx-choice-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cx-choice-check {
  width: 16px;
  color: #00acc1;
  font-weight: 900;
}

.cx-choice-text {
  flex: 1;
}

.cx-choice-hd-tag {
  font-size: 10px;
  font-weight: 800;
  color: #ef4444;
  margin-left: 6px;
}


/* ==========================================================================
   LIVE CLASSES STYLES (Images #1 & #2)
   ========================================================================== */
.live-header-pill {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #9333ea 100%);
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  margin: 12px 14px 16px 14px;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.live-header-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  flex: 1;
  margin-left: 12px;
}

.live-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  margin-bottom: 20px;
}

.live-tab-btn {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.live-tab-btn.active {
  background: linear-gradient(135deg, #f43f5e 0%, #f97316 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35);
}

.live-filter-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #fecdd3;
  color: #f43f5e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.live-section-title {
  font-size: 15px;
  font-weight: 800;
  font-style: italic;
  color: #0f172a;
  padding: 0 16px;
  margin-bottom: 14px;
}

.live-cards-list {
  display: flex;
  flex-direction: column;
  padding: 0 14px;
}

.live-card-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  cursor: pointer;
}

.live-card-item:last-child {
  border-bottom: none;
}

.live-thumb-box {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  overflow: hidden;
  background: #3b82f6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.live-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-info-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-category-tag {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
}

.live-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-tutor-name {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

.live-datetime {
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
}

/* ==========================================================================
   CHILD RESOURCES STYLES (Image #3)
   ========================================================================== */
.res-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.res-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  margin-left: 12px;
}

.res-filter-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 16px;
  white-space: nowrap;
  scrollbar-width: none;
}

.res-filter-scroll::-webkit-scrollbar {
  display: none;
}

.res-filter-pill {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.res-filter-pill.active {
  background: #f97316;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.res-items-container {
  padding: 6px 14px 40px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.res-card-item {
  background: #f8fafc;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #f1f5f9;
  transition: all 0.15s ease;
}

.res-card-item:hover, .res-card-item:active {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.res-pdf-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

.res-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  flex: 1;
}

/* ==========================================================================
   QUESTION BANK DARK THEME STYLES (Images #4, #5, #6, #7)
   ========================================================================== */
.qb-dark-page {
  background-color: #131b2e;
  color: #ffffff;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.qb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: #ffffff;
}

.qb-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  flex: 1;
  margin-left: 12px;
}

.qb-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 24px;
}

.qb-stat-card {
  background: #1e293b;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 85px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.qb-stat-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.qb-stat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qb-stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qb-stat-num {
  font-size: 18px;
  font-weight: 800;
}

.qb-section-heading {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  padding: 0 16px;
  margin-bottom: 14px;
}

.qb-subjects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px 40px 14px;
}

.qb-subject-card {
  background: #1e293b;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.qb-subject-card:hover, .qb-subject-card:active {
  background: #27354f;
  transform: translateY(-2px);
}

.qb-subject-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

.qb-subject-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qb-subject-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.qb-subject-qcount {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

/* Image #5: Chapters Progress list */
.qb-progress-card {
  background: #1e293b;
  border-radius: 20px;
  padding: 18px;
  margin: 0 14px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease;
}

.qb-progress-card:active {
  background: #27354f;
}

.qb-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.qb-progress-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  flex: 1;
}

.qb-progress-total {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qb-progress-stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.qb-progress-mastery-box {
  background: #182234;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 12.5px;
  color: #cbd5e1;
  font-weight: 500;
}

.qb-recommendations-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 400px;
  background: linear-gradient(135deg, #fef08a 0%, #a7f3d0 50%, #bfdbfe 100%);
  color: #0f172a;
  border-radius: 30px;
  padding: 14px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Image #6: Chapter Questions List */
.qb-filter-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 16px 14px;
  white-space: nowrap;
  scrollbar-width: none;
  max-width: 100%;
  box-sizing: border-box;
}

.qb-filter-tags-row::-webkit-scrollbar {
  display: none;
}

.qb-filter-tag {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.qb-filter-tag.active {
  border-color: #f97316;
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}

.qb-qcard-item {
  background: #1e293b;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 0 14px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  box-sizing: border-box;
}

.qb-qcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.qb-qcard-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
}

.qb-qcard-content-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.qb-practice-now-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  max-width: calc(100vw - 40px);
  box-sizing: border-box;
  z-index: 50;
}

/* Image #7: Question Practice Screen */
.qb-attempt-banner {
  background: #1e293b;
  border-radius: 14px;
  padding: 10px 16px;
  margin: 0 14px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.qb-practice-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px;
  margin: 0 14px 20px 14px;
  color: #0f172a;
}

.qb-practice-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 12px;
}

.qb-practice-badge-num {
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.qb-question-text {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 18px;
}

.qb-option-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}

.qb-option-item:hover {
  background: #f8fafc;
}

.qb-option-item.selected {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.05);
}

.qb-option-item.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.qb-option-item.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.qb-option-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

.qb-option-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
}

.qb-floating-pen-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fef08a;
  color: #854d0e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  z-index: 40;
}

.qb-solution-btn {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 440px;
  background: #334155;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}

.qb-solution-btn:active {
  background: #475569;
}

.qb-solution-box {
  background: #1e293b;
  border-radius: 16px;
  padding: 16px;
  margin: 0 14px 80px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
  line-height: 1.5;
  color: #e2e8f0;
}


/* ==========================================================================
   PRACTICE & ADAPT QUIZ STYLES (Images #1 - #7)
   ========================================================================== */
.practice-search-box {
  background: #1e293b;
  border-radius: 16px;
  padding: 12px 18px;
  margin: 0 14px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.practice-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
}

.practice-search-input::placeholder {
  color: #94a3b8;
}

.practice-chap-card {
  background: #1e293b;
  border-radius: 18px;
  margin: 0 14px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.practice-chap-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.practice-chap-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.practice-chap-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.practice-chap-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.practice-topics-box {
  padding: 0 16px 16px 16px;
}

.practice-topic-item {
  background: #131b2e;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.practice-topic-item.selected {
  border-color: #f97316;
}

.practice-topic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.practice-topic-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.practice-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all 0.15s ease;
}

.practice-topic-item.selected .practice-checkbox {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
}

.practice-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.practice-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 4px;
}

.practice-bottom-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: #1e293b;
  border-radius: 30px;
  padding: 6px 8px 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 50;
}

.btn-practice-continue {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-practice-continue:active {
  transform: scale(0.96);
}

/* Question Indicator row in Test (Image #5 & #6) */
.quiz-stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 14px;
}

.quiz-step-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid transparent;
  color: #ffffff;
  transition: all 0.2s ease;
}

.quiz-step-node.active {
  background: #334155;
  border-color: #60a5fa;
  color: #ffffff;
}

.quiz-step-node.completed {
  background: #22c55e;
  color: #ffffff;
}

.quiz-step-node.wrong {
  background: #ef4444;
  color: #ffffff;
}

.quiz-step-node.skipped {
  background: #f59e0b;
  color: #ffffff;
}

.quiz-step-line {
  width: 24px;
  height: 3px;
  background: #334155;
  border-radius: 2px;
}

.quiz-step-line.done {
  background: #22c55e;
}

/* --------------------------------------------------------------------------
   CHECKPOINT & LECTURE STEP NODES (Image #1 & Image #2)
   -------------------------------------------------------------------------- */
.step-nodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background-color: #0f172a;
  color: #ffffff;
  position: relative;
  z-index: 20;
}

.step-nodes-track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 65%;
  justify-content: center;
  padding: 4px 0;
}
.step-nodes-track::-webkit-scrollbar {
  display: none;
}

.step-node-item {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #27354f;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-size: 13px;
  text-decoration: none;
}

.step-node-item.video-node {
  background: #ea580c;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.4);
}

.step-node-item.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 0 2px #60a5fa, 0 2px 10px rgba(59, 130, 246, 0.5);
}

.step-node-item.wrong {
  background: #ef4444;
  color: #ffffff;
}

.step-node-item.correct {
  background: #22c55e;
  color: #ffffff;
}

.step-node-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #0f172a;
  line-height: 1;
}

.step-node-badge.check {
  background: #22c55e;
}

.step-track-divider {
  width: 14px;
  height: 2px;
  background: #334155;
  flex-shrink: 0;
}

.step-track-divider.done {
  background: #3b82f6;
}

/* Checkpoint Quiz Layout (Image #2) */
.cp-quiz-wrapper {
  background-color: #0f172a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 16px 24px 16px;
}

.cp-quiz-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 20px 48px 20px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  margin-top: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cp-choose-tag {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-badge-pill {
  background: #e0e7ff;
  color: #3b82f6;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.cp-bm-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cp-bm-btn.active {
  color: #3b82f6;
  border-color: #3b82f6;
  background: #eff6ff;
}

.cp-question-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.5;
  margin-bottom: 24px;
}

.cp-question-title p {
  margin: 0;
}

.cp-options-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.cp-option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
  user-select: none;
}

.cp-option-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.cp-option-item.selected {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.cp-option-item.correct {
  border-color: #22c55e;
  background: #f0fdf4;
}

.cp-option-item.wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

.cp-opt-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cp-option-item.selected .cp-opt-circle {
  background: #3b82f6;
  color: #ffffff;
}

.cp-option-item.correct .cp-opt-circle {
  background: #22c55e;
  color: #ffffff;
}

.cp-option-item.wrong .cp-opt-circle {
  background: #ef4444;
  color: #ffffff;
}

.cp-opt-text {
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  flex: 1;
}

.cp-opt-text p {
  margin: 0;
}

/* Floating Scratchpad Button inside Quiz Card */
.cp-scratchpad-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fef08a;
  color: #ca8a04;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
  z-index: 5;
}

.cp-scratchpad-btn:active {
  transform: scale(0.92);
}

/* Checkpoint Bottom Actions */
.cp-bottom-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.cp-btn-idk {
  flex: 1;
  height: 52px;
  border-radius: 14px;
  background: #1e293b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cp-btn-idk:active {
  background: #0f172a;
}

.cp-btn-submit {
  flex: 1.2;
  height: 52px;
  border-radius: 14px;
  background: #ea580c;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.2s ease;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.cp-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.cp-btn-submit:not(:disabled):hover {
  background: #c2410c;
}

/* Live class countdown badge */
.live-starts-in-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  margin-top: 4px;
  width: fit-content;
}

.live-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #ef4444;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  margin-top: 4px;
  width: fit-content;
  animation: pulse-live 1.8s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Scratchpad Canvas Overlay */
.scratchpad-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  flex-direction: column;
  padding: 16px;
}

.scratchpad-container {
  background: #ffffff;
  border-radius: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.scratchpad-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.scratchpad-canvas {
  flex: 1;
  width: 100%;
  touch-action: none;
  cursor: crosshair;
}

/* --------------------------------------------------------------------------
   ADAPT AI FORMATTING (Tables, Math, Code, Blockquotes)
   -------------------------------------------------------------------------- */
.msg-bubble-assistant {
  overflow-x: auto;
  line-height: 1.6;
}

.msg-bubble-assistant table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
}

.msg-bubble-assistant th,
.msg-bubble-assistant td {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  text-align: left;
}

.msg-bubble-assistant th {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-weight: 700;
}

.msg-bubble-assistant tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.msg-bubble-assistant pre {
  background: #020617;
  padding: 12px 14px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.msg-bubble-assistant code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #7dd3fc;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
}

.msg-bubble-assistant pre code {
  background: transparent;
  padding: 0;
}

.msg-bubble-assistant blockquote {
  border-left: 3px solid #38bdf8;
  margin: 10px 0;
  padding: 6px 14px;
  color: #cbd5e1;
  background: rgba(56, 189, 248, 0.07);
  border-radius: 0 8px 8px 0;
}

.msg-bubble-assistant .katex-display {
  margin: 12px 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
}

.msg-bubble-assistant div.katex-math-render {
  display: block;
  margin: 12px 0;
  text-align: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
}

.msg-bubble-assistant span.katex-math-render {
  display: inline-block;
  vertical-align: middle;
  padding: 0 2px;
}


