/* ============================================================
   Made2Stick Learning - Course Catalog & Video Player Styles
   Unified with Main Website Light Theme (#fafbfc)
   ============================================================ */

/* --- Catalog Page Styles --- */
.catalog-header-banner {
  padding: 60px 0 40px;
  background: radial-gradient(circle at top center, rgba(225, 29, 72, 0.08) 0%, rgba(15, 23, 42, 0.02) 60%, transparent 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.search-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 24px;
}

.course-search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 440px;
}

.course-search-box input {
  width: 100%;
  padding: 13px 18px 13px 44px;
  font-size: 15px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-xs);
}

.course-search-box input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.search-icon-svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.catalog-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(225, 29, 72, 0.25);
}

.catalog-card-img-wrap {
  position: relative;
  height: 195px;
  background: #0f172a;
  overflow: hidden;
}

.catalog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.catalog-card:hover .catalog-card-img-wrap img {
  transform: scale(1.04);
}

.catalog-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.catalog-card:hover .catalog-play-overlay {
  opacity: 1;
}

.play-circle-btn {
  width: 52px;
  height: 52px;
  background: var(--brand-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.catalog-card:hover .play-circle-btn {
  transform: scale(1);
}

.catalog-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.catalog-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.catalog-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient-soft);
  color: var(--brand-red);
}

.catalog-rating {
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
}

.catalog-card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 10px;
}

.catalog-card-desc {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-specs-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.catalog-spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* ============================================================
   Course Video Player & Classroom Layout (Light Theme Unified)
   ============================================================ */
.player-page-body {
  background-color: #fafbfc;
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.player-topbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.player-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.player-back-btn:hover {
  background: #e2e8f0;
  color: #000;
}

.player-course-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.player-topbar-center {
  flex: 1;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.player-progress-bar {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.player-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Classroom Main Layout */
.classroom-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  flex: 1;
  min-height: calc(100vh - 61px);
  background-color: #fafbfc;
}

@media (max-width: 1024px) {
  .classroom-container {
    grid-template-columns: 1fr;
  }
}

/* Video & Content Area (Left Column) */
.video-content-pane {
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow-y: auto;
}

.video-frame-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
}

.video-frame-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   Content Protection & Anti-Bootlegging Rules
   Disables native download buttons and right-click interactions
   ============================================================ */
.video-frame-container,
.video-frame-container video {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Hide native download buttons across Chromium, Safari, and Firefox */
video::-internal-media-controls-download-button {
  display: none !important;
}
video::-webkit-media-controls-download-button {
  display: none !important;
}
video::-webkit-media-controls-enclosure {
  overflow: hidden;
}

.video-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.lesson-active-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
}

.lesson-action-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-complete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-body);
  border: 1.5px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-complete-toggle:hover {
  background: #f8fafc;
  color: var(--text-dark);
  border-color: #cbd5e1;
}

.btn-complete-toggle.completed {
  background: var(--accent-green-bg);
  border-color: var(--accent-green);
  color: #065f46;
  font-weight: 700;
}

.btn-nav-lesson {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-red);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-nav-lesson:hover {
  background: var(--brand-red-dark);
  box-shadow: var(--shadow-glow);
}

.btn-nav-lesson:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #94a3b8;
  box-shadow: none;
}

/* Tabs: Notes & Resources */
.lesson-tabs-nav {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.lesson-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 4px 14px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: color 0.2s;
}

.lesson-tab-btn:hover {
  color: var(--text-dark);
}

.lesson-tab-btn.active {
  color: var(--brand-red);
  font-weight: 700;
}

.lesson-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--brand-red);
  border-radius: 2px;
}

.tab-pane {
  display: none;
  padding: 24px 0;
  line-height: 1.7;
  color: var(--text-body);
}

.tab-pane.active {
  display: block;
}

.tab-pane h3 {
  color: var(--text-dark);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 18px;
}

.tab-pane h3:first-child {
  margin-top: 0;
}

.tab-pane ul {
  padding-left: 22px;
  margin-bottom: 16px;
}

.tab-pane li {
  margin-bottom: 8px;
}

.tab-pane code {
  background: #fee2e2;
  color: #991b1b;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

/* Resource List */
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s;
}

.resource-item:hover {
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: var(--shadow-sm);
}

.resource-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

/* Sidebar Curriculum (Right Column) */
.curriculum-sidebar {
  background: #ffffff;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - 61px);
  box-shadow: -2px 0 10px rgba(0,0,0,0.02);
}

.sidebar-header {
  padding: 18px 20px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.curriculum-scroll-area {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

/* Module Accordion */
.module-group {
  border-bottom: 1px solid var(--border-subtle);
}

.module-header-btn {
  width: 100%;
  padding: 15px 20px;
  background: #f8fafc;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  color: var(--text-dark);
  font-family: inherit;
  transition: background 0.2s;
  border-bottom: 1px solid transparent;
}

.module-header-btn:hover {
  background: #f1f5f9;
}

.module-group.open .module-header-btn {
  border-bottom: 1px solid var(--border-subtle);
  background: #f1f5f9;
}

.module-title-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  padding-right: 12px;
}

.module-meta-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.module-chevron {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

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

.module-lessons-list {
  display: none;
  list-style: none;
  background: #ffffff;
}

.module-group.open .module-lessons-list {
  display: block;
}

/* Individual Lesson Item */
.lesson-item-btn {
  width: 100%;
  padding: 13px 20px 13px 24px;
  border: none;
  background: #ffffff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-body);
  font-family: inherit;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s;
}

.lesson-item-btn:hover {
  background: #f8fafc;
  color: var(--text-dark);
}

.lesson-item-btn.active {
  background: var(--brand-gradient-soft);
  color: var(--brand-red-dark);
  border-left-color: var(--brand-red);
}

.lesson-status-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-top: 2px;
  flex-shrink: 0;
  color: transparent;
  background: #ffffff;
  transition: all 0.2s;
}

.lesson-item-btn.completed .lesson-status-icon {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.lesson-item-btn.active:not(.completed) .lesson-status-icon {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.lesson-btn-content {
  flex: 1;
}

.lesson-btn-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: inherit;
}

.lesson-item-btn.active .lesson-btn-title {
  font-weight: 700;
  color: var(--brand-red-dark);
}

.lesson-btn-duration {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   Student Auth Modal & Classroom Gating Styles
   ============================================================ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.auth-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 440px;
  width: 100%;
  padding: 36px 32px;
  position: relative;
  border: 1px solid var(--border-subtle);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
}

.auth-modal-close:hover {
  color: var(--text-dark);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.btn-google-auth {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-dark);
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}

.btn-google-auth:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.auth-error-msg {
  background: #fee2e2;
  border: 1px solid #f87171;
  color: #991b1b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-modal-footer {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.auth-modal-footer a {
  color: var(--brand-red);
  font-weight: 700;
  margin-left: 4px;
}

/* Video Player Lock / Gate Overlay */
.video-auth-gate-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.gate-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.15);
  border: 1.5px solid var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--brand-red-light);
  margin-bottom: 16px;
}

/* --- Certificate Modal Styles --- */
.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
}

.cert-modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 840px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: modalFadeIn 0.25s ease-out;
}

.cert-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s;
}

.cert-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-cert-claim-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  margin-top: 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  animation: pulseCert 2s infinite ease-in-out;
}

@keyframes pulseCert {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4); }
}

/* ============================================================
   In-Classroom Q&A Discussion Board Styles
   ============================================================ */
.qa-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.qa-main-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.qa-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.qa-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.qa-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: qaDotPulse 1.8s infinite;
}

@keyframes qaDotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.qa-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.qa-filter-buttons {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.qa-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.qa-filter-btn.active {
  background: #ffffff;
  color: var(--brand-red);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}

.qa-filter-instructor {
  background: rgba(225, 29, 72, 0.08);
  color: var(--brand-red-dark);
  font-weight: 700;
}

.qa-filter-instructor:hover {
  background: rgba(225, 29, 72, 0.15);
}

.qa-filter-instructor.active {
  background: var(--brand-red);
  color: #ffffff;
}

.qa-needs-reply-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.qa-refresh-btn {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* Ask Card */
.qa-ask-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s;
}

.qa-ask-card:focus-within {
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: var(--shadow-sm);
}

.qa-logged-out-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

.qa-prompt-icon {
  font-size: 28px;
  color: var(--brand-red);
}

.qa-prompt-text strong {
  display: block;
  font-size: 14.5px;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.qa-prompt-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.qa-ask-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qa-form-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qa-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
  overflow: hidden;
}

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

.qa-author-meta {
  display: flex;
  flex-direction: column;
}

.qa-author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.qa-lesson-tag {
  font-size: 11.5px;
  color: var(--brand-red);
  font-weight: 600;
}

.qa-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-input-title {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s;
}

.qa-input-title:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.qa-textarea-content {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
  min-height: 90px;
  transition: all 0.2s;
}

.qa-textarea-content:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.qa-form-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.qa-hint-text code {
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.qa-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Stream / Threads */
.qa-stream-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qa-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.qa-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid #e2e8f0;
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.qa-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.qa-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.qa-empty-state h4 {
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 6px;
}

.qa-empty-state p {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
}

/* Thread Card */
.qa-threads-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qa-thread-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s;
}

.qa-thread-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: #cbd5e1;
}

.qa-thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.qa-thread-author-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qa-badge-instructor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  color: var(--brand-red-dark);
  border: 1px solid rgba(225, 29, 72, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.qa-badge-student {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
}

.qa-time-ago {
  font-size: 11.5px;
  color: var(--text-light);
  margin-left: 4px;
}

.qa-thread-lesson-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  background: #f8fafc;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.qa-thread-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.qa-thread-body {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.qa-code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.qa-inline-code {
  background: #f1f5f9;
  color: #be123c;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
}

.qa-thread-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.qa-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.qa-action-btn:hover {
  background: #f1f5f9;
  color: var(--text-dark);
}

.qa-action-btn.liked {
  color: var(--brand-red);
  background: #fff1f2;
  border-color: #fecdd3;
}

.qa-btn-delete {
  color: #94a3b8;
  font-size: 12px;
  padding: 4px 8px;
}

.qa-btn-delete:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.qa-reply-toggle-btn {
  margin-left: auto;
  color: var(--brand-red);
}

.qa-reply-delete-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.2s;
}

.qa-reply-delete-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Replies Section */
.qa-replies-container {
  margin-top: 14px;
  padding-left: 20px;
  border-left: 2.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-reply-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all 0.2s;
}

.qa-reply-card.qa-reply-instructor {
  background: #fffafa;
  border-color: #fecdd3;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.04);
}

.qa-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.qa-reply-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qa-reply-body {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Inline Reply Form */
.qa-reply-form-wrap {
  margin-top: 12px;
  padding-top: 10px;
}

.qa-reply-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa-reply-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s;
}

.qa-reply-input:focus {
  border-color: var(--brand-red);
}

.qa-reply-submit-row {
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   24/7 AI Course Tutor Assistant Styles
   ============================================================ */
.qa-tutor-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-red) !important;
}

.qa-ai-live-pill {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.ai-tutor-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 640px;
  max-height: 75vh;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ai-tutor-header {
  padding: 16px 20px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ai-tutor-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444 0%, #be123c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.ai-tutor-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.ai-tutor-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: qaDotPulse 1.8s infinite;
}

/* Prompt Chips */
.ai-prompt-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
  white-space: nowrap;
}

.ai-prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ai-prompt-chip:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--brand-red);
  transform: translateY(-1px);
}

/* Messages Stream */
.ai-messages-stream {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fafbfc;
}

.ai-msg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 88%;
}

.ai-msg-row.ai-user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  flex-shrink: 0;
}

.ai-msg-row.ai-tutor .ai-msg-avatar {
  background: linear-gradient(135deg, #ef4444, #be123c);
  color: #ffffff;
}

.ai-msg-bubble {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

.ai-msg-row.ai-tutor .ai-msg-bubble {
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ai-msg-row.ai-user .ai-msg-bubble {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

.ai-msg-bubble pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12.5px;
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.ai-msg-bubble code {
  background: #f1f5f9;
  color: #be123c;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12.5px;
}

.ai-msg-row.ai-user .ai-msg-bubble code {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
}

.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: aiTyping 1.4s infinite ease-in-out both;
}

.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes aiTyping {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Chat Input Form */
.ai-input-form {
  padding: 14px 18px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
}

.ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: all 0.2s;
}

.ai-input-wrap:focus-within {
  border-color: var(--brand-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.ai-textarea {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-dark);
  resize: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.45;
}

.ai-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  background: var(--brand-red-dark);
  transform: scale(1.05);
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ai-input-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================================
   INTERACTIVE PRACTICE COACH STYLES
   ============================================================ */
.ai-mastery-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  transition: all 0.3s;
}

.ai-mastery-pill.high {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.ai-interactive-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #e11d48;
  color: #e11d48;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-ai-action:hover {
  background: #e11d48;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.btn-timestamp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 3px;
  transition: all 0.15s ease;
  vertical-align: middle;
  font-family: inherit;
}

.btn-timestamp-pill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.ai-challenge-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 8px 0;
  border: 1.5px solid #3730a3;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.ai-challenge-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.ai-challenge-question {
  font-size: 14px;
  line-height: 1.55;
  color: #f8fafc;
  font-weight: 600;
  margin-bottom: 0;
}

.ai-eval-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 10px 0;
}

.ai-eval-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.ai-eval-score-num {
  font-size: 20px;
  font-weight: 800;
  color: #e11d48;
}

/* ============================================================
   MOBILE & TABLET RESPONSIVE OPTIMIZATIONS (< 768px & < 480px)
   ============================================================ */
@media (max-width: 768px) {
  /* Catalog Hub */
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }
  .search-filter-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .course-search-box {
    max-width: 100%;
  }

  /* Player Topbar */
  .player-topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .player-topbar-left {
    flex: 1;
    min-width: 0;
    gap: 10px;
  }
  .player-course-heading {
    font-size: 13.5px;
    max-width: 180px;
  }
  .player-topbar-center {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 2px;
  }
  .player-topbar-right {
    flex-wrap: wrap;
    gap: 6px;
  }
  .btn-complete-toggle,
  .btn-nav-lesson {
    padding: 7px 12px;
    font-size: 12px;
    min-height: 38px;
  }

  /* Video & Main Pane */
  .video-content-pane {
    padding: 14px 12px 24px;
  }
  .video-meta-bar {
    margin-top: 14px;
    padding-bottom: 12px;
  }
  .lesson-active-title {
    font-size: 18px;
    line-height: 1.35;
  }

  /* Smooth Swipable Tabs */
  .lesson-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 16px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .lesson-tabs-nav::-webkit-scrollbar {
    display: none;
  }
  .lesson-tab-btn {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 2px 10px;
    flex-shrink: 0;
  }

  /* Curriculum Mobile Drawer */
  .curriculum-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: none;
  }
  .lesson-item {
    padding: 12px 14px;
    min-height: 48px;
  }

  /* Classroom Q&A & AI Tutor */
  .qa-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .qa-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .qa-filter-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .qa-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .ai-textarea {
    font-size: 16px; /* Prevents iOS mobile zoom */
  }
  .ai-tutor-container {
    height: 65vh;
    min-height: 420px;
  }
}

@media (max-width: 480px) {
  .player-topbar-left .brand-logo {
    display: none;
  }
  .player-course-heading {
    max-width: 140px;
    font-size: 12.5px;
  }
  .catalog-card-actions {
    grid-template-columns: 1fr;
  }
  .btn-complete-toggle span:last-child {
    display: none;
  }
  .btn-complete-toggle::after {
    content: 'Done';
  }
}



/* ============================================================
   Made2Stick Learning - Interactive End-of-Chapter Quiz Engine
   ============================================================ */

.player-quiz-container {
  background: #ffffff;
  border-radius: var(--radius-md, 14px);
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 480px;
}

.quiz-header-bar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.quiz-header-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quiz-module-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #93c5fd;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quiz-title-text {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.quiz-header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-q-counter-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.quiz-score-live-pill {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
}

/* Progress line */
.quiz-progress-track {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #6366f1);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Area */
.quiz-body {
  padding: 28px 24px;
}

.quiz-q-prompt {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Media (Screenshots & Visuals from Videos) */
.quiz-media-wrap {
  margin: 16px 0 24px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.quiz-media-tag {
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.quiz-media-wrap img {
  display: block;
  max-width: 100%;
  max-height: 400px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s;
}

.quiz-media-wrap img:hover {
  transform: scale(1.01);
}

/* Code Snippet Container */
.quiz-code-wrap {
  margin: 16px 0 24px;
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #334155;
}

.quiz-code-header {
  background: #1e293b;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-code-wrap pre {
  margin: 0;
  padding: 14px 18px;
  color: #f8fafc;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

/* Options Grid */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-opt-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  text-align: left;
}

.quiz-opt-card:hover:not(.disabled) {
  border-color: #6366f1;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.quiz-opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.quiz-opt-text {
  font-size: 14.5px;
  color: #1e293b;
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
}

/* Correct / Incorrect Option States */
.quiz-opt-card.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}

.quiz-opt-card.correct .quiz-opt-letter {
  background: #10b981 !important;
  color: #ffffff !important;
}

.quiz-opt-card.correct .quiz-opt-text {
  color: #065f46 !important;
  font-weight: 700;
}

.quiz-opt-card.incorrect {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.quiz-opt-card.incorrect .quiz-opt-letter {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.quiz-opt-card.incorrect .quiz-opt-text {
  color: #991b1b !important;
  font-weight: 600;
}

.quiz-opt-card.disabled {
  cursor: default;
}

/* Explanation Box */
.quiz-explanation-panel {
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  animation: quizSlideIn 0.3s ease-out;
}

.quiz-explanation-panel.correct-panel {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}

.quiz-explanation-panel.incorrect-panel {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
}

.quiz-explanation-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 8px;
}

.quiz-explanation-panel.correct-panel .quiz-explanation-title {
  color: #15803d;
}

.quiz-explanation-panel.incorrect-panel .quiz-explanation-title {
  color: #b91c1c;
}

.quiz-explanation-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
  margin: 0;
}

/* Footer Control Actions */
.quiz-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.btn-quiz-nav {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-quiz-prev {
  background: #f1f5f9;
  color: #475569;
}

.btn-quiz-prev:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-quiz-next {
  background: #0f172a;
  color: #ffffff;
}

.btn-quiz-next:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-quiz-finish {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-quiz-finish:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Quiz Completion Screen */
.quiz-completion-card {
  padding: 48px 32px;
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}

.quiz-score-badge-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.quiz-score-badge-circle.passed {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 3px solid #10b981;
  color: #065f46;
}

.quiz-score-badge-circle.retry {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 3px solid #f43f5e;
  color: #9f1239;
}

.quiz-score-number {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.quiz-score-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  opacity: 0.85;
}

.quiz-result-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
}

.quiz-result-desc {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 auto 28px;
}

.quiz-completion-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sidebar Quiz Indicator */
.lesson-item-btn.quiz-item {
  border-left: 3px solid #6366f1;
}

.quiz-sidebar-pill {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.5px;
  display: inline-block;
  vertical-align: middle;
}

.quiz-sidebar-pill.mid-checkpoint {
  background: rgba(2, 132, 199, 0.14);
  color: #0284c7;
}

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

/* ============================================================
   Course Reviews & In-Classroom Spaced Feedback System
   ============================================================ */

.m2s-feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 18px;
  overflow-y: auto;
}

.m2s-feedback-modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
  animation: modalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-sizing: border-box;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.feedback-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.feedback-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.feedback-modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.feedback-badge-midpoint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.feedback-badge-completion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.feedback-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 6px 0 8px;
  line-height: 1.3;
}

.feedback-modal-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

.feedback-modal-subtitle strong {
  color: #1e293b;
}

/* Stars Rating */
.feedback-stars-section {
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 12px;
  margin-bottom: 18px;
}

.feedback-stars-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.feedback-star-btn {
  background: transparent;
  border: none;
  font-size: 34px;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  padding: 2px 4px;
  transition: all 0.15s ease;
  user-select: none;
}

.feedback-star-btn.active,
.feedback-star-btn:hover {
  color: #f59e0b;
  transform: scale(1.15);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.feedback-rating-desc {
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  min-height: 18px;
}

/* Chips / Sentiment Tags */
.feedback-chips-section {
  margin-bottom: 16px;
}

.feedback-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.feedback-chip-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.feedback-chip-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.feedback-chip-btn.selected {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
  font-weight: 700;
}

/* Form Fields */
.feedback-field-group {
  margin-bottom: 14px;
}

.feedback-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.feedback-input,
.feedback-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 13.5px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.feedback-input:focus,
.feedback-textarea:focus {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.feedback-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.feedback-char-count {
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.feedback-identity-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .feedback-identity-row {
    flex-direction: column;
    gap: 0;
  }
}

.feedback-options-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.feedback-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
  cursor: pointer;
  line-height: 1.45;
}

.feedback-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  accent-color: #e11d48;
}

/* Actions Row */
.feedback-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-feedback-submit {
  flex: 2;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
  text-align: center;
}

.btn-feedback-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35);
}

.btn-feedback-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-feedback-secondary {
  flex: 1;
  background: #ffffff;
  color: #64748b;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-feedback-secondary:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

/* Success State */
.feedback-success-state {
  text-align: center;
  padding: 24px 12px;
  animation: modalScaleIn 0.25s ease-out;
}

/* Sidebar Trigger Button & Banner */
.btn-sidebar-feedback {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #b45309;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-sidebar-feedback:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
  transform: translateY(-1px);
}

.sidebar-feedback-checkpoint-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 14px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
  animation: modalScaleIn 0.25s ease-out;
}

.btn-checkpoint-cta {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-checkpoint-cta:hover {
  background: #1d4ed8;
}

.btn-checkpoint-snooze {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-checkpoint-snooze:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #1e293b;
}
