/* ── Lesson v2 — تصميم عصري عالي الوضوح لصفحة الدروس ── */

:root {
  --lesson-accent: #2563eb;
  --lesson-accent-dark: #1d4ed8;
  --lesson-accent-light: #eff6ff;
  --lesson-gold: #d97706;
  --lesson-gold-light: #fef3c7;
  --lesson-violet: #1e40af;
  --lesson-sky: #2563eb;
  --lesson-emerald: #059669;
  --lesson-rose: #2563eb;
  --lesson-text: #0f172a;
  --lesson-text-muted: #334155;
  --lesson-border: #cbd5e1;
  --lesson-card-bg: #ffffff;
}

html.lesson-embed .lesson-v2-sidebar,
html.lesson-embed .lesson-v2-sidebar.open,
html.lesson-embed .lesson-v2-sidebar-backdrop,
html.lesson-embed .lesson-v2-sidebar-backdrop.visible,
html.lesson-embed .lesson-v2-sidebar-btn,
html.lesson-embed .lesson-v2-topnav,
html.lesson-embed .topbar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.lesson-embed .lesson-v2-page {
  padding-top: 0;
}

html.lesson-embed .lesson-v2-layout {
  padding-inline-start: 0 !important;
}

.lesson-v2-page {
  --lesson-v2-sidebar-width: 275px;
  padding-top: var(--layout-top, var(--topbar-height));
  scroll-behavior: smooth;
  background: #f8fafc;
  color: var(--lesson-text);
}

.lesson-v2-page .topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
}

.lesson-v2-layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--layout-top, var(--topbar-height)));
  min-height: calc(100dvh - var(--layout-top, var(--topbar-height)));
}

.lesson-v2-main {
  flex: 1;
  min-width: 0;
}

@media (min-width: 901px) {
  .lesson-v2-layout {
    padding-inline-start: var(--lesson-v2-sidebar-width);
  }
}

.lesson-v2 {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  animation: fadeUp 0.4s ease both;
}

/* ── Header ── */

.lesson-v2-header {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 2px solid #bfdbfe;
  border-top: 4px solid #2563eb;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.04);
}

.lesson-v2-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lesson-v2-topnav .lesson-v2-sidebar-btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.lesson-v2-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: var(--lesson-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.lesson-v2-home-link-icon {
  font-size: 1rem;
}

.lesson-v2-home-link:hover {
  color: #2563eb;
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-2px);
}

.lesson-v2-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.lesson-v2-header-text {
  min-width: 0;
  flex: 1;
}

.lesson-v2-header .hero-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 900;
  margin: 0;
  color: var(--lesson-text);
  line-height: 1.3;
}

.lesson-v2-sidebar-btn {
  appearance: none;
  border: 1.5px solid var(--lesson-border);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: #2563eb;
  background: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.lesson-v2-sidebar-btn:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  transform: translateY(-2px);
}

/* ── Sidebar القائمة الجانبية ── */

.lesson-v2-sidebar {
  position: fixed;
  top: var(--layout-top, var(--topbar-height));
  bottom: 0;
  inset-inline-start: 0;
  width: var(--lesson-v2-sidebar-width);
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-inline-end: 2px solid #e2e8f0;
  box-shadow: 4px 0 20px rgba(15, 23, 42, 0.05);
}

.lesson-v2-sidebar-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.25rem 1.15rem 1rem;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.lesson-v2-sidebar-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--lesson-text);
}

.lesson-v2-sidebar-close {
  display: none;
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.1rem;
  cursor: pointer;
  background: #ffffff;
  color: var(--lesson-text);
}

.lesson-v2-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lesson-v2-sidebar-link {
  display: block;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  color: var(--lesson-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: all 0.18s ease;
}

.lesson-v2-sidebar-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.lesson-v2-sidebar-link.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.lesson-v2-sidebar-group-title {
  margin: 1.25rem 0 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 900;
  color: #1e40af;
  background: #eff6ff;
  border-radius: 0.65rem;
  border-inline-start: 4px solid #2563eb;
}

.lesson-v2-sidebar-group-title:first-child {
  margin-top: 0;
}

.lesson-v2-sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .lesson-v2-sidebar {
    transform: translateX(100%);
    transition: transform 0.28s ease;
  }

  .lesson-v2-sidebar.open {
    transform: translateX(0);
  }

  .lesson-v2-sidebar-close {
    display: grid;
    place-items: center;
  }

  .lesson-v2-sidebar-backdrop {
    display: block;
    position: fixed;
    top: var(--layout-top, var(--topbar-height));
    inset-inline: 0;
    bottom: 0;
    z-index: 44;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .lesson-v2-sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 901px) {
  .lesson-v2-sidebar-btn,
  .lesson-v2-sidebar-close,
  .lesson-v2-sidebar-backdrop {
    display: none !important;
  }
}

/* ── Tabs شريط التبويبات العريض والأنيق ── */

.lesson-v2-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.45rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: calc(var(--layout-top, var(--topbar-height)) + 0.5rem);
  z-index: 10;
}

.lesson-v2-tabs::-webkit-scrollbar {
  display: none;
}

.lesson-v2-tab {
  flex-shrink: 0;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--lesson-text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lesson-v2-tab:hover {
  color: var(--lesson-text);
  background: #f1f5f9;
}

.lesson-v2-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.lesson-v2-tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-inline-start: 0.4rem;
  border-radius: 999px;
  background: #d97706;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  vertical-align: middle;
}

.lesson-v2-tab-badge.hidden {
  display: none;
}

.lesson-v2-tab.active .lesson-v2-tab-badge {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* ── Panels الأقسام والمحتوى ── */

.lesson-v2-panels {
  min-height: 320px;
}

.lesson-v2-panel {
  display: none;
  animation: fadeUp 0.3s ease both;
}

.lesson-v2-panel.active {
  display: block;
}

.lesson-v2-learn-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lesson-v2-learn-block {
  position: relative;
  border-radius: 1.25rem;
  border: 2px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  background: #ffffff;
}

.lesson-v2-learn-block::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  z-index: 1;
}

.lesson-v2-learn-block--book::before {
  background: #d97706;
}

.lesson-v2-learn-block--explanation::before {
  background: #2563eb;
}

.lesson-v2-learn-block--video::before {
  background: #2563eb;
}

.lesson-v2-learn-block-head {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.lesson-v2-learn-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--lesson-text);
}

.lesson-v2-learn-heading-icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  font-size: 1.25rem;
  background: #eff6ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
}

.lesson-v2-learn-block-body {
  padding: 1.25rem;
  background: #ffffff;
}

/* ── بطاقات الشرح والخطوات ── */

.explanation-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.explanation-step {
  border: 2px solid #e2e8f0;
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.explanation-step:hover {
  border-color: #bfdbfe;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.06);
}

.explanation-step-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
  padding: 0.85rem 1.15rem !important;
  background: #f8fafc !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  border-inline-start: 4px solid #2563eb !important;
  font-size: 1.08rem !important;
  font-weight: 900 !important;
  color: var(--lesson-text) !important;
}

.explanation-step-title > span {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.explanation-step-body {
  padding: 1.15rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1e293b;
}

/* ── أسئلة تحقق من فهمك والتمارين ── */

.comprehension-check,
.exercise-item {
  margin-top: 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.comprehension-check-header,
.exercise-item-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
  padding: 0.85rem 1.15rem !important;
  background: #f8fafc !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: var(--lesson-text) !important;
}

.comprehension-check-heading {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.lesson-v2-learn-heading {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.comprehension-check-body,
.exercise-item-body {
  padding: 1.15rem;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ── أزرار المشاركة والإبلاغ (تمت إزالتها بناء على الطلب) ── */
.card-action-bar,
.card-action-bar--header,
.card-action-btn,
#lesson-header-action-bar {
  display: none !important;
}

/* ── وميض البطاقة ── */

@keyframes cardTargetPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    border-color: #10b981 !important;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.25);
    border-color: #059669 !important;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.card-target-highlight {
  animation: cardTargetPulse 1.3s ease-in-out 2 !important;
  border-color: #10b981 !important;
}

/* ── تحسينات وتوافق فائق للشاشات الصغيرة والهواتف (Mobile & Small Screens) ── */

@media (max-width: 768px) {
  .lesson-v2 {
    padding: 0.5rem 0.35rem 2.5rem;
    max-width: 100%;
  }

  .lesson-v2-header {
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    margin-bottom: 0.85rem;
  }

  .lesson-v2-header .hero-title {
    font-size: 1.35rem;
    line-height: 1.35;
  }

  .lesson-v2-topnav {
    gap: 0.5rem;
    margin-bottom: 0.65rem;
  }

  .lesson-v2-home-link,
  .lesson-v2-sidebar-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
  }

  /* شريط التبويبات الملتصق */
  .lesson-v2-tabs {
    position: sticky;
    top: calc(var(--layout-top, var(--topbar-height)) + 0.25rem);
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.35rem;
    border-radius: 0.9rem;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .lesson-v2-tab {
    font-size: 0.84rem;
    padding: 0.48rem 0.8rem;
    border-radius: 0.75rem;
  }

  .lesson-v2-tab-badge {
    min-width: 1.1rem;
    height: 1.1rem;
    font-size: 0.68rem;
    padding: 0 0.25rem;
  }

  /* البطاقات والمحتوى */
  .lesson-v2-learn-inner {
    gap: 1rem;
  }

  .lesson-v2-learn-block {
    border-radius: 1rem;
  }

  .lesson-v2-learn-block-head {
    padding: 0.65rem 0.85rem;
  }

  .lesson-v2-learn-heading {
    font-size: 1.05rem;
  }

  .lesson-v2-learn-heading-icon {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1.05rem;
  }

  .lesson-v2-learn-block-body {
    padding: 0.85rem 0.75rem;
  }

  /* بطاقات الشرح والأسئلة */
  .explanation-steps {
    gap: 0.9rem;
  }

  .explanation-step,
  .comprehension-check,
  .exercise-item {
    border-radius: 0.95rem;
    border-width: 1.5px;
  }

  .explanation-step-title,
  .comprehension-check-header,
  .exercise-item-head {
    padding: 0.65rem 0.75rem;
    font-size: 0.96rem;
    gap: 0.4rem;
  }

  .explanation-step-title::before {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.95rem;
  }

  .explanation-step-body,
  .comprehension-check-body,
  .exercise-item-body {
    padding: 0.85rem 0.75rem;
    font-size: 0.98rem;
    line-height: 1.65;
  }

  /* أزرار المشاركة والإبلاغ على الهواتف */
  .card-action-bar {
    gap: 0.35rem !important;
  }

  .card-action-btn {
    padding: 0.3rem 0.65rem !important;
    font-size: 0.78rem !important;
    gap: 0.28rem !important;
  }

  .card-action-svg {
    width: 13px !important;
    height: 13px !important;
  }

  /* دعم التمرير السلس للمعادلات والصور */
  mjx-container,
  .MathJax,
  .table-scroll-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .md-figure img,
  .lesson-v2-learn-block-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0.65rem;
  }
}

@media (max-width: 420px) {
  .lesson-v2 {
    padding: 0.35rem 0.2rem 2rem;
  }

  .lesson-v2-header {
    padding: 0.75rem;
  }

  .lesson-v2-header .hero-title {
    font-size: 1.2rem;
  }

  .lesson-v2-tab {
    font-size: 0.8rem;
    padding: 0.42rem 0.65rem;
  }

  .explanation-step-body,
  .comprehension-check-body,
  .exercise-item-body {
    padding: 0.75rem 0.6rem;
    font-size: 0.94rem;
  }

  .card-action-btn {
    padding: 0.18rem 0.4rem;
    font-size: 0.68rem;
  }
}

/* ── حماية المحتوى من النسخ والتنزيل والطباعة (مع استثناء لوحة الإدارة والمعاينة) ── */
body, html, .lesson-v2-main, .lesson-v2-panels, #explanation, #exercises, #book-container, #slideshow-container {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* استثناء لوحة الإدارة والتحكم */
html.lesson-embed,
html.lesson-embed *,
html.is-admin,
html.is-admin *,
body[data-page="admin"],
body[data-page="admin"] *,
body.is-admin,
body.is-admin *,
input, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

img, svg, canvas, video, audio, iframe, embed, object {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
}

@media print {
  html, body {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }
}

/* Multiple Videos Switcher */
.lesson-video-switcher-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.9));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius, 0.75rem);
}

.lesson-video-switcher-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
}

.lesson-video-switcher-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lesson-video-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  background: #ffffff;
  color: var(--text, #1e293b);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lesson-video-pill:hover {
  background: rgba(241, 245, 249, 1);
  border-color: rgba(148, 163, 184, 0.8);
  transform: translateY(-1px);
}

.lesson-video-pill.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  border-color: #4338ca;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.28);
}

.lesson-video-pill-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.lesson-video-caption-text {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  text-align: center;
}
.lesson-video-caption-text.hidden {
  display: none;
}

/* ── Interactive Task Lists & Checkboxes ── */
.task-list {
  list-style: none !important;
  padding-inline-start: 0 !important;
  margin: 0.75rem 0 1.25rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-list-item {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.task-list-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.task-list-item.task-checked {
  background: #f0fdf4;
  border-color: #86efac;
}

.task-list-item.task-checked .task-text {
  color: #166534;
  text-decoration: line-through;
  text-decoration-color: #22c55e;
  text-decoration-thickness: 2px;
}

.task-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  user-select: none;
}

.task-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  margin-top: 0.15rem;
  border: 2px solid #94a3b8;
  border-radius: 0.35rem;
  background: #ffffff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.18s ease;
}

.task-checkbox:checked {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
}

.task-checkbox:checked::before {
  content: "";
  width: 0.45rem;
  height: 0.75rem;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.task-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.task-text {
  flex: 1;
  color: #1e293b;
  transition: color 0.18s ease;
}

/* ── Ultra-Modern Interactive Study Planner & Roadmap Component ── */
.study-planner-container {
  margin: 1.25rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: inherit;
}

/* 1. Hero Overview Dashboard Card */
.study-overview-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #1e3a8a 100%);
  color: #ffffff;
  border-radius: 1.5rem;
  padding: 1.75rem 2rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  position: relative;
  overflow: hidden;
}

.study-overview-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0) 70%);
  pointer-events: none;
}

.study-overview-card::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
}

.study-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
  position: relative;
  z-index: 1;
}

.study-overview-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.study-overview-title {
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.study-title-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.study-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.study-header-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.study-level-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.study-action-btn--reset {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.study-action-btn--reset:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.7);
  transform: translateY(-1px);
}

/* Stats Grid */
.study-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.35rem;
  position: relative;
  z-index: 1;
}

.study-stat-item {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.1rem;
  padding: 0.95rem 0.85rem;
  text-align: center;
  transition: all 0.2s ease;
}

.study-stat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.study-stat-val {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  display: block;
}

.study-stat-lbl {
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.35rem;
  display: block;
}

/* Progress Section */
.study-progress-section {
  position: relative;
  z-index: 1;
}

.study-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: #ffffff;
}

.study-progress-track {
  width: 100%;
  height: 1rem;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  position: relative;
  padding: 2px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.study-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #38bdf8 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.75);
}

/* 2. Student Phone / Sync Bar */
.study-student-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1rem 1.35rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
}

.study-student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.study-student-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 340px;
  flex-wrap: wrap;
}

.study-student-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.study-student-input-wrap {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex: 1 1 220px;
}

.study-student-input {
  flex: 1;
  padding: 0.5rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.65rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.study-student-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.study-student-btn {
  appearance: none;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 0.65rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.study-student-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.study-actions-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.study-student-status-box {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.study-status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.study-status-indicator.status-idle { background: #94a3b8; }
.study-status-indicator.status-connected { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
.study-status-indicator.status-saving { background: #f59e0b; }
.study-status-indicator.status-warning { background: #ef4444; }

.study-action-btn--reset {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #b91c1c;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.study-action-btn--reset:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* 3. Study Hours Selector Card */
.study-selector-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 1.35rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
}

.study-selector-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.study-hours-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.95rem;
}

.study-hour-btn {
  flex: 1 1 calc(20% - 0.6rem);
  min-width: 110px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.study-hour-btn:hover {
  background: #f0f7ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-2px);
}

.study-hour-btn.is-selected {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.study-calculation-result {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 0.85rem;
  padding: 0.8rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #166534;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(22, 101, 52, 0.04);
}

.calc-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* 4. Filter Tabs Bar */
.study-filter-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.study-filter-btn {
  appearance: none;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.8rem;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.study-filter-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.study-filter-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

/* 5. Units & Lesson Blocks */
.study-unit-block {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 1.35rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
}

.study-unit-head {
  padding: 1.15rem 1.45rem;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.study-unit-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.study-unit-badge {
  color: #ffffff;
  background: #2563eb;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
}

.study-unit-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.study-unit-pages {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.15rem;
}

.study-unit-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.study-unit-time-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.study-unit-progress-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 0.45rem;
  transition: all 0.2s ease;
}

.study-unit-body {
  padding: 1.25rem 1.45rem;
}

/* Lesson Card */
.study-lesson-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

.study-lesson-card:last-child {
  margin-bottom: 0;
}

.study-lesson-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.study-lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.study-lesson-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.study-lesson-time {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
}

/* 6. Tasks Tables */
.study-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.study-tasks-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 0.86rem;
  min-width: 540px;
}

.study-tasks-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}

.study-tasks-table thead th.col-check {
  width: 48px;
  text-align: center;
}

.study-tasks-table thead th.col-num {
  width: 44px;
  text-align: center;
}

.study-tasks-table thead th.col-topic {
  text-align: start;
}

.study-tasks-table thead th.col-type {
  width: 130px;
  text-align: center;
}

.study-tasks-table thead th.col-time {
  width: 110px;
  text-align: center;
}

.study-tasks-table tbody tr.task-table-row {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s ease;
}

.study-tasks-table tbody tr.task-table-row:last-child {
  border-bottom: none;
}

.study-tasks-table tbody tr.task-table-row:hover {
  background-color: #f8fafc;
}

.study-tasks-table tbody tr.task-table-row.task-checked {
  background-color: #f0fdf4 !important;
}

.study-tasks-table tbody tr.task-table-row.task-checked .task-table-label {
  color: #15803d;
  text-decoration: line-through;
  opacity: 0.85;
}

.study-tasks-table tbody td {
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
}

.study-tasks-table tbody td.col-check {
  text-align: center;
}

.study-tasks-table tbody td.col-num {
  text-align: center;
  font-weight: 700;
  color: #94a3b8;
  font-size: 0.8rem;
}

.study-tasks-table tbody td.col-topic {
  color: #1e293b;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.45;
}

.task-table-label {
  cursor: pointer;
  display: block;
  user-select: none;
  line-height: 1.45;
  margin: 0;
}

.study-tasks-table tbody td.col-type {
  text-align: center;
  white-space: nowrap;
}

.study-tasks-table tbody td.col-time {
  text-align: center;
  white-space: nowrap;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.73rem;
  font-weight: 700;
  color: #047857;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 0.15rem 0.5rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.48rem;
  border-radius: 0.35rem;
  white-space: nowrap;
}

.type-theory {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.type-practice {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.type-exam {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.study-tasks-table .task-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: #10b981;
  border-radius: 0.3rem;
  vertical-align: middle;
  transition: transform 0.15s ease;
  margin: 0;
}

.study-tasks-table .task-checkbox:hover {
  transform: scale(1.15);
}

/* 7. Strategy Card */
.study-strategy-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 1.35rem;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  margin-top: 0.5rem;
}

.study-strategy-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.study-strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.study-strategy-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.95rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.study-strategy-item strong {
  display: block;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.study-strategy-item p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.strategy-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  display: block;
}

@media (max-width: 640px) {
  .study-overview-card {
    padding: 1.25rem 1.35rem;
  }
  .study-overview-title {
    font-size: 1.2rem;
  }
  .study-tasks-table {
    min-width: 500px;
    font-size: 0.8rem;
  }
  .study-tasks-table thead th,
  .study-tasks-table tbody td {
    padding: 0.45rem 0.55rem;
  }
}

/* =========================================================
   Goal Achievement & Celebration Animations
   ========================================================= */

/* Floating Confetti Canvas */
.celebration-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999999;
}

/* Achievement Toast */
.goal-celebration-toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(-25px) scale(0.92);
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(16, 185, 129, 0.3);
  z-index: 999999;
  opacity: 0;
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  direction: rtl;
  max-width: 90vw;
  min-width: 320px;
}

.goal-celebration-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.goal-celebration-toast.is-grand {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  box-shadow: 0 20px 45px -10px rgba(79, 70, 229, 0.5), 0 0 0 2.5px #fbbf24;
}

.goal-toast-icon-wrap {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  animation: goalIconBounce 1s ease infinite alternate;
}

.goal-celebration-toast.is-grand .goal-toast-icon-wrap {
  background: linear-gradient(135deg, #fef3c7, #fde047);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.6);
}

@keyframes goalIconBounce {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.18) rotate(12deg); }
}

.goal-toast-body {
  flex: 1;
}

.goal-toast-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.goal-celebration-toast.is-grand .goal-toast-title {
  color: #fbbf24;
}

.goal-toast-message {
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.4;
}

.goal-celebration-toast.is-grand .goal-toast-message {
  color: #e0e7ff;
}

.goal-toast-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 0.5rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.goal-toast-close:hover {
  color: #334155;
}

.goal-celebration-toast.is-grand .goal-toast-close {
  color: #a5b4fc;
}

/* Checkbox Pop Animation */
@keyframes checkPop {
  0% { transform: scale(0.7); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.study-tasks-table .task-checkbox:checked {
  animation: checkPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Unit Complete Shiny Card Pulse */
@keyframes unitCelebrationPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.study-unit-block.is-completed {
  border-color: #10b981 !important;
  animation: unitCelebrationPulse 1.6s ease-out;
}

/* Level Badge Celebration Glow */
@keyframes badgeGlowPulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.25) drop-shadow(0 0 12px rgba(245, 158, 11, 0.65)); }
  100% { transform: scale(1); filter: brightness(1); }
}

.level-badge-glow {
  animation: badgeGlowPulse 0.8s ease-in-out 2;
}





