/* ============================================================
   BioFast · LIGHT MODE ELITE · 2026-11-22 · rev 1
   Applied ONLY to html[data-theme="light"] — dark mode native.
   Palette per approved mockup:
   · cream-white page, white cards, soft navy shadows
   · deep navy (#0e2a4d) = primary CTAs, selected day, XP card
   · violet (#7c5cff) = kickers, PRO MAX, explore CTA
   · pastel tints for stat cards (blue / turquoise / lavender)
   ============================================================ */

html[data-theme="light"] {
  --elt-navy: #0e2a4d;
  --elt-navy-2: #123a6b;
  --elt-violet: #7c5cff;
  --elt-blue: #3f7ae0;
  --elt-ink: #14243f;
  --elt-edge: rgba(23, 43, 88, 0.09);
  --elt-shadow: 0 10px 30px rgba(31, 45, 90, 0.09);
  --elt-shadow-sm: 0 4px 14px rgba(31, 45, 90, 0.07);
}

/* ---------- 1. Warm cream backdrop ---------- */
html[data-theme="light"] #root::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(44% 30% at 90% -4%, rgba(124, 92, 255, 0.07), transparent 65%),
    radial-gradient(50% 36% at 4% 100%, rgba(63, 122, 224, 0.06), transparent 70%),
    linear-gradient(180deg, #fbf9f5 0%, #f7f5f0 55%, #f5f4f1 100%);
}
html[data-theme="light"] #root { position: relative; }
html[data-theme="light"] #root .bf-app-shell {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* ---------- 2. Top bar · navy with rounded base ---------- */
html[data-theme="light"] #root .bf-top-bar {
  border-radius: 0 0 22px 22px;
  box-shadow:
    0 12px 30px rgba(10, 26, 55, 0.22),
    inset 0 -1px 0 rgba(124, 92, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="light"] #root .bf-top-bar .bf-top-action {
  background: rgba(255, 255, 255, 0.11) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px !important;
  transition: background 0.25s ease, transform 0.2s ease;
}
html[data-theme="light"] #root .bf-top-bar .bf-top-action:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="light"] #root .bf-top-bar .bf-top-avatar {
  box-shadow:
    0 0 0 2px rgba(124, 92, 255, 0.55),
    0 0 16px rgba(124, 92, 255, 0.30) !important;
}

/* ---------- 3. Bottom nav · white glass ---------- */
html[data-theme="light"] #root .bf-bottom-nav {
  background: rgba(255, 255, 255, 0.92) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(23, 43, 88, 0.07);
  box-shadow: 0 -8px 26px rgba(31, 45, 90, 0.08) !important;
}
html[data-theme="light"] #root .bf-bottom-nav .bf-nav-btn {
  border-radius: 16px;
  transition: transform 0.22s ease;
}
html[data-theme="light"] #root .bf-bottom-nav .bf-nav-btn:active { transform: scale(0.93); }
html[data-theme="light"] #root .bf-bottom-nav .bf-nav-btn--home {
  background: linear-gradient(135deg, #e9f1fe, #efeafc) !important;
  border-radius: 18px;
}
html[data-theme="light"] #root .bf-bottom-nav .bf-nav-btn--home > div:first-child {
  filter: drop-shadow(0 3px 9px rgba(84, 104, 255, 0.35));
}

/* ---------- 4. Entrance stagger ---------- */
@keyframes eltRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
html[data-theme="light"] #root .bf-home-page > * {
  animation: eltRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html[data-theme="light"] #root .bf-home-page > *:nth-child(1) { animation-delay: 0.02s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(2) { animation-delay: 0.07s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(3) { animation-delay: 0.12s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(4) { animation-delay: 0.17s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(5) { animation-delay: 0.22s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(6) { animation-delay: 0.27s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(7) { animation-delay: 0.32s; }
html[data-theme="light"] #root .bf-home-page > *:nth-child(8) { animation-delay: 0.37s; }

/* ---------- 5. Hero · white card, crisp heart, navy CTA ---------- */
html[data-theme="light"] #root .bf-home-intro {
  background: linear-gradient(135deg, #ffffff 30%, #f4f7fd 100%) !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 26px !important;
  box-shadow: var(--elt-shadow), inset 0 1px 0 #ffffff !important;
}

/* breathing halo BEHIND the heart (heart stays crisp & live) */
html[data-theme="light"] #root .bf-home-heart-art {
  position: relative;
  isolation: isolate;
}
html[data-theme="light"] #root .bf-home-heart-art::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.22), transparent 72%);
  filter: blur(14px);
  animation: eltBreathe 6s ease-in-out infinite;
}
@keyframes eltBreathe {
  0%, 100% { opacity: 0.65; transform: scale(0.96); }
  50%      { opacity: 1; transform: scale(1.04); }
}
html[data-theme="light"] #root .bf-home-heart-art img {
  border-radius: 18px !important;
  box-shadow: 0 14px 32px rgba(31, 45, 90, 0.20) !important;
}

html[data-theme="light"] #root .bf-home-intro .bf-home-kicker {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid var(--elt-edge);
  border-radius: 999px;
  color: var(--elt-ink) !important;
}
html[data-theme="light"] #root .bf-home-intro .bf-home-kicker-dot {
  background: var(--elt-blue) !important;
  animation: eltPulse 2.4s ease-out infinite !important;
}
@keyframes eltPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 122, 224, 0.40); }
  60%      { box-shadow: 0 0 0 6px rgba(63, 122, 224, 0); }
}

html[data-theme="light"] #root .bf-home-greeting { color: var(--elt-navy) !important; }
html[data-theme="light"] #root .bf-home-hero-subtitle { color: rgba(20, 36, 63, 0.72) !important; }

html[data-theme="light"] #root .bf-home-intro-meta {
  background: rgba(14, 42, 77, 0.07) !important;
  border: 1px solid rgba(14, 42, 77, 0.10);
  border-radius: 999px !important;
  color: var(--elt-navy) !important;
}

/* navy solid CTA with gentle sheen */
html[data-theme="light"] #root .bf-home-hero-cta {
  background: linear-gradient(120deg, #123a6b 0%, #0e2a4d 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 10px !important;
  padding: 7px 15px !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 22px rgba(14, 42, 77, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease;
}
html[data-theme="light"] #root .bf-home-hero-cta::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-140%) skewX(-18deg);
  animation: eltSheen 4.4s ease-in-out infinite;
  pointer-events: none;
}
html[data-theme="light"] #root .bf-home-hero-cta:hover { transform: translateY(-1px); }
html[data-theme="light"] #root .bf-home-hero-cta:active { transform: scale(0.96); }
@keyframes eltSheen {
  0%       { transform: translateX(-140%) skewX(-18deg); }
  55%,100% { transform: translateX(260%) skewX(-18deg); }
}

/* ---------- 6. BioXP · richer navy nebula ---------- */
html[data-theme="light"] #root .bf-home-profile-card {
  background:
    radial-gradient(110% 90% at 88% -10%, rgba(124, 92, 255, 0.22), transparent 55%),
    radial-gradient(100% 95% at -6% 110%, rgba(63, 122, 224, 0.18), transparent 55%),
    linear-gradient(115deg, #0d2c55 0%, #143a6e 55%, #0b2344 100%) !important;
  border: 1px solid rgba(140, 160, 255, 0.18) !important;
  border-radius: 28px !important;
  box-shadow: 0 16px 38px rgba(10, 26, 55, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}
html[data-theme="light"] #root .bf-home-xp-ring {
  filter: drop-shadow(0 0 14px rgba(124, 92, 255, 0.42));
}
html[data-theme="light"] #root .bf-home-profile-info span,
html[data-theme="light"] #root .bf-home-profile-main span {
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 999px;
}
html[data-theme="light"] #root .bf-home-profile-info button {
  background: linear-gradient(120deg, #8b5cf6, #6d4df0) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.35) !important;
}

/* ---------- 7. Explore ---------- */
html[data-theme="light"] #root .bf-home-explore-preview {
  background: linear-gradient(135deg, #ffffff 35%, #f7f5fd 100%) !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 26px !important;
  box-shadow: var(--elt-shadow), inset 0 1px 0 #ffffff !important;
}
html[data-theme="light"] #root .bf-home-explore-kicker {
  color: var(--elt-violet) !important;
  letter-spacing: 1.5px;
}
html[data-theme="light"] #root .bf-home-explore-count {
  background: rgba(124, 92, 255, 0.10) !important;
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 999px !important;
  color: var(--elt-violet) !important;
}
html[data-theme="light"] #root .bf-home-explore-post {
  border-radius: 16px !important;
  border: 1px solid var(--elt-edge);
  box-shadow: var(--elt-shadow-sm) !important;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="light"] #root .bf-home-explore-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 45, 90, 0.13) !important;
}
/* lavender pill CTA with navy text (per mockup) */
html[data-theme="light"] #root .bf-home-explore-cta {
  background: linear-gradient(100deg, #edeafc 0%, #e4effe 100%) !important;
  color: var(--elt-navy) !important;
  border: 1px solid rgba(124, 92, 255, 0.22) !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 16px rgba(31, 45, 90, 0.08) !important;
  transition: transform 0.25s ease;
}
html[data-theme="light"] #root .bf-home-explore-cta:hover { transform: translateY(-1px); }
html[data-theme="light"] #root .bf-home-explore-cta:active { transform: scale(0.97); }

/* ---------- 8. Section headings ---------- */
html[data-theme="light"] #root .bf-home-section-heading h2 {
  color: var(--elt-navy) !important;
}
html[data-theme="light"] #root .bf-home-section-kicker {
  color: rgba(20, 36, 63, 0.62) !important;
  letter-spacing: 0.8px;
}
html[data-theme="light"] #root .bf-home-section-mark {
  background: #ffffff !important;
  border: 1px solid var(--elt-edge);
  border-radius: 14px !important;
  box-shadow: var(--elt-shadow-sm) !important;
}

/* ---------- 9. Week stats · pastel tints (mockup) ---------- */
html[data-theme="light"] #root .bf-home-week-feature,
html[data-theme="light"] #root .bf-home-week-stat {
  border-radius: 20px !important;
  border: 1px solid var(--elt-edge) !important;
  box-shadow: var(--elt-shadow-sm), inset 0 1px 0 #ffffff !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="light"] #root .bf-home-week-feature:hover,
html[data-theme="light"] #root .bf-home-week-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(31, 45, 90, 0.12), inset 0 1px 0 #ffffff !important;
}
/* feature · soft blue */
html[data-theme="light"] #root .bf-home-week-feature {
  background: linear-gradient(135deg, #ecf2fe 0%, #f0f6fe 100%) !important;
}
/* days · navy (user: green cards → navy) */
html[data-theme="light"] #root .bf-home-week-stat--days {
  background: linear-gradient(135deg, #eaf0fb 0%, #eff3fd 100%) !important;
  border-color: rgba(30, 64, 120, 0.14) !important;
}
/* accuracy · lavender */
html[data-theme="light"] #root .bf-home-week-stat--accuracy {
  background: linear-gradient(135deg, #f1edfe 0%, #f6f2ff 100%) !important;
  border-color: rgba(124, 92, 255, 0.16) !important;
}
/* tests · turquoise (user: cream → فیروزه‌ای) */
html[data-theme="light"] #root .bf-home-week-stat--tests {
  background: linear-gradient(135deg, #e7f6f4 0%, #edfaf8 100%) !important;
  border-color: rgba(22, 139, 162, 0.18) !important;
}
html[data-theme="light"] #root .bf-home-week-stat--tests .bf-home-stat-icon {
  color: #168ba2 !important;
}
html[data-theme="light"] #root .bf-home-week .bf-home-stat-icon {
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: inset 0 0 0 1px rgba(31, 45, 90, 0.06), 0 3px 10px rgba(31, 45, 90, 0.06) !important;
}
html[data-theme="light"] #root .bf-home-week-feature strong,
html[data-theme="light"] #root .bf-home-week-stat strong {
  color: var(--elt-navy) !important;
}
html[data-theme="light"] #root .bf-home-period {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid var(--elt-edge);
  border-radius: 999px !important;
  color: var(--elt-ink) !important;
}

/* ---------- 10. Calendar · navy selected day ---------- */
html[data-theme="light"] #root .bf-home-calendar {
  background: linear-gradient(140deg, #ffffff 40%, #f8f7fd 100%) !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 26px !important;
  box-shadow: var(--elt-shadow), inset 0 1px 0 #ffffff !important;
}
html[data-theme="light"] #root .bf-home-calendar__icon {
  background: #e8f1fd !important;
  border-radius: 14px !important;
  box-shadow: inset 0 0 0 1px rgba(63, 122, 224, 0.14) !important;
}
html[data-theme="light"] #root .bf-home-calendar__all {
  background: #ffffff !important;
  border: 1.5px solid rgba(124, 92, 255, 0.35) !important;
  border-radius: 999px !important;
  color: var(--elt-violet) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
html[data-theme="light"] #root .bf-home-calendar__all:hover {
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.18) !important;
}
html[data-theme="light"] #root .bf-home-calendar__day {
  border-radius: 15px !important;
  transition: transform 0.22s ease, background 0.22s ease;
}
html[data-theme="light"] #root .bf-home-calendar__day:hover { transform: translateY(-2px); }
html[data-theme="light"] #root .bf-home-calendar__day.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(63, 122, 224, 0.50) !important;
}
html[data-theme="light"] #root .bf-home-calendar__day.is-today .bf-home-calendar__dot {
  background: var(--elt-blue) !important;
}
html[data-theme="light"] #root .bf-home-calendar__day.is-selected {
  background: linear-gradient(135deg, #123a6b 0%, #0e2a4d 100%) !important;
  box-shadow: 0 10px 22px rgba(14, 42, 77, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  transform: scale(1.06);
}
html[data-theme="light"] #root .bf-home-calendar__day.is-selected .bf-home-calendar__weekday,
html[data-theme="light"] #root .bf-home-calendar__day.is-selected .bf-home-calendar__date {
  color: #ffffff !important;
}
html[data-theme="light"] #root .bf-home-calendar__day.is-selected .bf-home-calendar__dot {
  background: rgba(255, 255, 255, 0.95) !important;
}
html[data-theme="light"] #root .bf-home-calendar__tasks {
  border-radius: 18px !important;
  background: linear-gradient(135deg, #f3f0fe 0%, #eef3fe 100%) !important;
  border: 1px solid rgba(124, 92, 255, 0.10);
}

/* ---------- 11. Today CTA · deep navy ---------- */
html[data-theme="light"] #root .bf-home-entry-button {
  background: linear-gradient(115deg, #0d2c55 0%, #143a6e 55%, #0e2a4d 100%) !important;
  border: 1px solid rgba(140, 160, 255, 0.16) !important;
  border-radius: 24px !important;
  box-shadow: 0 14px 32px rgba(10, 26, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transition: transform 0.25s ease;
}
html[data-theme="light"] #root .bf-home-entry-button:hover { transform: translateY(-2px); }
html[data-theme="light"] #root .bf-home-entry-button:active { transform: scale(0.98); }

/* ---------- 12. Tools · BioHub, webinars, livestats ---------- */
html[data-theme="light"] #root .bf-home-biohub-card {
  background: linear-gradient(120deg, #f6f2fe 0%, #fdf9ee 100%) !important;
  border: 1px solid rgba(124, 92, 255, 0.16) !important;
  border-radius: 22px !important;
  box-shadow: var(--elt-shadow-sm) !important;
  transition: transform 0.3s ease;
}
html[data-theme="light"] #root .bf-home-biohub-card:hover { transform: translateY(-2px); }

html[data-theme="light"] #root .bf-home-webinar {
  background: #ffffff !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 24px !important;
  overflow: hidden;
  box-shadow: var(--elt-shadow), inset 0 1px 0 #ffffff !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="light"] #root .bf-home-webinar:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(31, 45, 90, 0.13), inset 0 1px 0 #ffffff !important;
}
html[data-theme="light"] #root .bf-home-webinar-kicker {
  color: var(--elt-violet) !important;
}

html[data-theme="light"] #root .bf-home-tools > div:last-child {
  background: #ffffff !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 22px !important;
  box-shadow: var(--elt-shadow-sm) !important;
}

/* ---------- 13. Video section ---------- */
html[data-theme="light"] #root .bf-home-video-card {
  background: #ffffff !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: var(--elt-shadow-sm) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="light"] #root .bf-home-video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(31, 45, 90, 0.12) !important;
}
html[data-theme="light"] #root .bf-home-video-more {
  background: #ffffff !important;
  border: 1px solid var(--elt-edge) !important;
  border-radius: 999px !important;
}

/* ---------- 14. Mystery tutor slider · teal/green → navy ---------- */
html[data-theme="light"] #root .bf-tutor-mystery-card {
  background: linear-gradient(160deg, #f3f6fd 0%, #e9effa 100%) !important;
  border: 1px solid rgba(30, 64, 120, 0.10) !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-visual {
  background: linear-gradient(160deg, #e9eef9 0%, #e3ebf8 100%) !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-halo {
  background: radial-gradient(closest-side, rgba(30, 64, 120, 0.10), transparent 72%) !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-ring--outer,
html[data-theme="light"] #root .bf-tutor-mystery-ring--middle,
html[data-theme="light"] #root .bf-tutor-mystery-ring--inner {
  border-color: rgba(30, 64, 120, 0.14) !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-mark {
  color: #1d3f73 !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-punctuation {
  color: #2c4d80 !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-label {
  background: rgba(30, 64, 120, 0.08) !important;
  color: #3a5c92 !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-lock {
  background: rgba(30, 64, 120, 0.07) !important;
}
html[data-theme="light"] #root .bf-tutor-mystery-lock,
html[data-theme="light"] #root .bf-tutor-mystery-lock svg,
html[data-theme="light"] #root .bf-tutor-mystery-lock-text {
  color: #3a5c92 !important;
}

/* ---------- 15. Heart · always fully visible (no dip, no wash) ---------- */
html[data-theme="light"] #root .bf-home-intro-art .bf-home-heart-art > img {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  opacity: 1 !important;
  animation: none !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  border-radius: 18px !important;
  filter: saturate(1.06) drop-shadow(0 10px 22px rgba(31, 56, 98, 0.22)) !important;
}

/* ---------- 16. Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] #root .bf-home-page > *,
  html[data-theme="light"] #root .bf-home-hero-cta::after,
  html[data-theme="light"] #root .bf-home-intro .bf-home-kicker-dot,
  html[data-theme="light"] #root .bf-home-heart-art::before {
    animation: none !important;
  }
  html[data-theme="light"] #root .bf-home-page > * { opacity: 1 !important; transform: none !important; }
}
