/* src/xp-animations.css */
@keyframes confetti-pop {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}
@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}
@keyframes level-up-glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--glow-color, rgba(245, 158, 11, 0.4));
  }
  50% {
    box-shadow: 0 0 40px var(--glow-color, rgba(245, 158, 11, 0.8)), 0 0 60px var(--glow-color, rgba(245, 158, 11, 0.4));
  }
}
@keyframes xp-glow {
  0%, 100% {
    box-shadow: 0 0 10px var(--xp-color, #F59E0B);
  }
  50% {
    box-shadow: 0 0 20px var(--xp-color, #F59E0B), 0 0 30px var(--xp-color, #F59E0B);
  }
}
@keyframes level-up {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes xp-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
.xp-progress-bar {
  transition: width 0.5s ease-out;
}
.xp-progress-glow {
  animation: xp-glow 2s ease-in-out infinite;
}
.level-badge {
  transition: all 0.3s ease;
}
.level-badge:hover {
  transform: scale(1.1);
}
@keyframes streak-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes streak-fire {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}
.streak-counter {
  transition: all 0.3s ease;
}
.streak-counter:hover {
  transform: scale(1.05);
}
@keyframes achievementUnlock {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes achievementGlow {
  0%, 100% {
    box-shadow: 0 0 20px var(--glow-color, rgba(245, 158, 11, 0.4));
  }
  50% {
    box-shadow: 0 0 40px var(--glow-color, rgba(245, 158, 11, 0.6));
  }
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
.achievement-badge {
  transition: all 0.3s ease;
}
.achievement-badge:hover {
  transform: translateY(-4px);
}
.achievement-badge.unlocked .achievement-icon {
  animation: achievementGlow 3s ease-in-out infinite;
}
.achievement-toast {
  animation: slideIn 0.5s ease;
}
.achievement-toast.dismissing {
  animation: slideOut 0.3s ease;
}
.lesson-card {
  transition: all 0.2s ease;
}
.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.lesson-card.active {
  border-color: var(--primary-9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.lesson-card.completed {
  opacity: 0.85;
}
.lesson-icon {
  transition: all 0.3s ease;
}
.lesson-card:hover .lesson-icon {
  transform: scale(1.05);
}
.completed-overlay {
  animation: slideIn 0.3s ease;
}
.progress-ring circle {
  transition: stroke-dashoffset 0.5s ease;
}
.daily-goals-widget {
  transition: all 0.3s ease;
}
.daily-goals-widget:hover {
  transform: scale(1.02);
}
@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--confetti-color, #F59E0B);
  animation: confetti-fall 3s linear forwards;
}
@keyframes xp-pop {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(1.5) translateY(-50px);
    opacity: 0;
  }
}
.xp-pop {
  position: fixed;
  font-size: 24px;
  font-weight: bold;
  color: var(--xp-color, #F59E0B);
  animation: xp-pop 1s ease forwards;
  pointer-events: none;
  z-index: 9999;
}
@keyframes levelUpModal {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.level-up-modal {
  animation: levelUpModal 0.5s ease;
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.pulse {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
.shine {
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.4) 50%,
      transparent 100%);
  background-size: 200% 100%;
  animation: shine 3s linear infinite;
}
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.float {
  animation: float 3s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
.bounce {
  animation: bounce 1s ease-in-out infinite;
}
.level-up-confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.level-up-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease forwards;
}
.level-up-modal {
  position: relative;
  background: var(--background);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: levelUpModal 0.5s ease forwards;
  border: 2px solid var(--glow-color, rgba(245, 158, 11, 0.5));
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation: confetti-fall 3s linear forwards;
}

/* src/learning-animations.css */
@keyframes learning-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.learning-fade-in {
  animation: learning-fade-in 0.4s ease forwards;
}
.learning-fade-in-delay-1 {
  animation-delay: 0.1s;
  opacity: 0;
}
.learning-fade-in-delay-2 {
  animation-delay: 0.2s;
  opacity: 0;
}
.learning-fade-in-delay-3 {
  animation-delay: 0.3s;
  opacity: 0;
}
.learning-fade-in-delay-4 {
  animation-delay: 0.4s;
  opacity: 0;
}
@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}
@keyframes slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}
.slide-in-right {
  animation: slide-in-right 0.3s ease forwards;
}
.slide-in-left {
  animation: slide-in-left 0.3s ease forwards;
}
.slide-out-left {
  animation: slide-out-left 0.2s ease forwards;
}
.slide-out-right {
  animation: slide-out-right 0.2s ease forwards;
}
.progress-animated {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.card-enter {
  animation: card-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
.card-enter:nth-child(1) {
  animation-delay: 0.05s;
}
.card-enter:nth-child(2) {
  animation-delay: 0.1s;
}
.card-enter:nth-child(3) {
  animation-delay: 0.15s;
}
.card-enter:nth-child(4) {
  animation-delay: 0.2s;
}
.card-enter:nth-child(5) {
  animation-delay: 0.25s;
}
.card-enter:nth-child(6) {
  animation-delay: 0.3s;
}
@keyframes button-press {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}
.button-press {
  animation: button-press 0.15s ease;
}
@keyframes xp-popup {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  30% {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
  }
  60% {
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.xp-popup {
  animation: xp-popup 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes streak-fire {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-2deg);
  }
  75% {
    transform: scale(1.1) rotate(2deg);
  }
}
.streak-fire {
  animation: streak-fire 0.6s ease infinite;
}
@keyframes correct-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}
.correct-pulse {
  animation: correct-pulse 0.6s ease;
}
@keyframes wrong-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}
.wrong-shake {
  animation: wrong-shake 0.4s ease;
}
@keyframes celebration-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(-15px);
  }
}
.celebration-bounce {
  animation: celebration-bounce 0.8s ease;
}
@keyframes page-enter {
  from {
    opacity: 0;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}
.page-enter {
  animation: page-enter 0.3s ease forwards;
}
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}
.ripple-container {
  position: relative;
  overflow: hidden;
}
.ripple-container::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
}
.ripple-container:active::after {
  animation: ripple 0.6s ease-out;
}
@keyframes count-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.score-count-up {
  animation: count-up 0.4s ease;
}
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  }
}
.glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}
@media (hover: none) and (pointer: coarse) {
  .quiz-option-btn:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
  }
}
.quiz-option-btn.rt-BaseButton[data-accent-color=gray] {
  background-color: var(--gray-3);
  color: var(--gray-12);
}
.quiz-option-btn.rt-BaseButton[data-accent-color=gray]:hover {
  background-color: var(--gray-4);
}
.quiz-option-btn.is-selected:not(.is-revealed) {
  box-shadow: 0 0 0 2px var(--accent-9);
}
.inline-mini-quiz {
  background-color: var(--color-panel);
}
.skeleton-pulse {
  background-color: var(--gray-4);
}
.flashcard-container .rt-Card {
  background-color: var(--color-panel);
  border: 1px solid var(--gray-6);
}
.spaced-rep-card {
  background-color: var(--color-panel);
}
.growth-stat-card {
  background-color: var(--gray-2);
  border: 1px solid var(--gray-5);
}
.challenge-progress-bar {
  background-color: var(--gray-4);
}
.leaderboard-row.is-me {
  background-color: var(--accent-3);
}
kbd {
  background-color: var(--gray-3);
  border-color: var(--gray-6);
  color: var(--gray-11);
}
.quiz-feedback-banner {
  color: var(--gray-12);
}
@media (prefers-color-scheme: dark) {
  .skeleton-pulse {
    background-color: var(--gray-5);
  }
}
@media (max-width: 640px) {
  .chat-drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  .chat-threads {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2 !important;
    border-right: none !important;
    background: var(--panel) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .chat-threads-head {
    flex: 0 0 auto !important;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px !important;
  }
  .chat-thread-list {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 8px !important;
  }
  .chat-main {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 3 !important;
    transform: translateX(100%) !important;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
    background: var(--panel) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .chat-threads:has(.chat-thread-item.is-active) {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .chat-drawer-panel:has(.chat-thread-item.is-active) .chat-main {
    transform: translateX(0) !important;
  }
  .chat-main-head {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .chat-main-title {
    font-size: 1rem !important;
  }
  .chat-messages {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 12px !important;
  }
  .chat-compose {
    flex: 0 0 auto !important;
    padding: 12px 14px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (max-width: 960px) and (min-width: 641px) {
  .chat-drawer-panel {
    width: 100% !important;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) !important;
  }
  .chat-drawer-panel {
    height: 100dvh;
  }
}
@media (max-width: 960px) {
  .worker-profile-subtabs,
  .learning-module-selector-tabs,
  .learning-trainer-selector-tabs,
  .learning-module-jump-tabs,
  .learning-module-nav-tabs {
    padding-inline-end: 16px;
  }
  .learning-module-selector-tabs > :last-child,
  .learning-trainer-selector-tabs > :last-child,
  .worker-profile-subtabs > :last-child {
    scroll-snap-align: end;
    margin-inline-end: 8px;
  }
}
@media (max-width: 640px) {
  .learning-module-selector-tabs,
  .learning-trainer-selector-tabs {
    padding-inline-start: 4px;
    padding-inline-end: 24px;
  }
}
.worker-mobile-shell-cta-dismiss {
  appearance: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--gray-3) 80%, transparent);
  color: var(--gray-11);
  cursor: pointer;
  padding: 0;
}
.worker-mobile-shell-cta-dismiss:hover {
  color: var(--gray-12);
  background: color-mix(in srgb, var(--gray-4) 90%, transparent);
}
.worker-mobile-shell-cta-dismiss:active {
  transform: scale(0.9);
}
@media (max-width: 960px) and (min-width: 641px) {
  .chat-drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) !important;
  }
}
@media (max-width: 960px) {
  .learning-module-selector-tabs,
  .learning-trainer-selector-tabs,
  .learning-module-nav-tabs,
  .learning-module-jump-tabs {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-inline-end: 24px !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .learning-module-selector-tabs > *,
  .learning-trainer-selector-tabs > *,
  .learning-module-nav-tabs > *,
  .learning-module-jump-tabs > * {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  .learning-module-selector-tabs::-webkit-scrollbar,
  .learning-trainer-selector-tabs::-webkit-scrollbar,
  .learning-module-nav-tabs::-webkit-scrollbar,
  .learning-module-jump-tabs::-webkit-scrollbar {
    display: none !important;
  }
}
.panel-pad-lg {
  overflow: visible !important;
}
body.radix-shell .skills-modules-carousel {
  scroll-snap-type: none !important;
  overflow-x: auto !important;
  overscroll-behavior-x: auto !important;
}
body.radix-shell .skills-modules-carousel > * {
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}
body.radix-shell .skills-modules-carousel .rt-Card {
  overflow: visible !important;
}
.learning-module-selector-tabs,
.learning-trainer-selector-tabs,
.learning-module-nav-tabs,
.learning-module-jump-tabs,
.worker-profile-subtabs {
  overscroll-behavior-x: contain !important;
  scroll-snap-type: none !important;
  touch-action: pan-x !important;
}
@media (min-width: 641px) and (max-width: 960px) {
  .chat-drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) !important;
    height: 100dvh !important;
  }
  .chat-threads {
    height: 100% !important;
  }
  .chat-main {
    height: 100% !important;
  }
}
@media (max-width: 960px) and (min-width: 641px) {
  .chat-drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) !important;
  }
}
.worker-new-design-root > [role=tabpanel],
.worker-new-design-root > [role=tabpanel][data-state=active] {
  min-height: 0 !important;
  height: auto !important;
}
.worker-home-dashboard-grid,
.worker-home-dashboard-main {
  min-height: 0 !important;
}
.worker-new-design-content {
  min-height: 0 !important;
  overflow: visible !important;
}
@media (max-width: 960px) {
  .worker-home-dashboard-grid {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .worker-home-dashboard-main {
    height: auto !important;
    min-height: 0 !important;
  }
  .worker-home-dashboard-stack {
    height: auto !important;
    min-height: 0 !important;
    align-items: start !important;
  }
  .worker-home-stack {
    height: auto !important;
  }
}
.chat-back-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.chat-back-btn:hover {
  background: var(--gray-a3);
}
.chat-back-btn:active {
  transform: scale(0.95);
}
.chat-threads-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--line);
}
.chat-threads-title {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.chat-main-title-wrap {
  flex: 1;
  min-width: 0;
}
.chat-main-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--line);
}
.growth-page {
  min-height: 200px;
  padding: 16px;
  background: var(--panel);
}
.growth-page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.growth-page-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.growth-section-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
