/**
 * FireFly Progress Tracker Components CSS
 * Styles for dashboard, progress indicators, and completion UI
 * Version: 1.0.0
 */

/* ========================================
   DASHBOARD PAGE STYLES
   ======================================== */

/* Dashboard Hero Section */
.dashboard-hero {
  background: transparent;
  color: #333;
  text-align: left;
}

.dashboard-hero .intro-title,
.dashboard-hero .intro-deck,
.dashboard-hero .howto__kicker {
  color: white !important;
}

/* Dashboard Overview Cards */
.dashboard-overview .card {
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-overview .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

/* ========================================
   PROGRESS CIRCLE (SVG-BASED)
   ======================================== */

.progress-circle {
  display: inline-block;
  position: relative;
}

.progress-circle-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 8;
}

.progress-circle-fill {
  fill: none;
  stroke: #0071e3;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.5s ease;
}

.progress-circle-text {
  font-size: 24px;
  font-weight: 700;
  fill: #1d1d1f;
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: 'Montserrat', sans-serif;
}

/* ========================================
   CURRICULUM ACCORDION
   ======================================== */

.curriculum-accordion-item {
  margin-bottom: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.curriculum-accordion-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.curriculum-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-right: 1rem;
}

.curriculum-info {
  flex: 1;
}

/* Modules List */
.modules-list {
  padding: 0;
}

.module-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #e0e0e0;
}

.module-header .module-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1d1d1f;
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.lesson-row:hover {
  border-color: #0071e3;
  transform: translateX(4px);
}

.lesson-status {
  font-size: 1.25rem;
  color: #999;
  width: 24px;
  flex-shrink: 0;
}

.lesson-row.completed .lesson-status {
  color: #34c759;
}

.lesson-row.current .lesson-status {
  color: #0071e3;
}

.lesson-details {
  flex: 1;
}

.lesson-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1d1d1f;
}

.lesson-duration {
  font-size: 0.85rem;
}

.lesson-btn {
  flex-shrink: 0;
}

/* Dark mode styles for curriculum accordions */
body.dark-mode .curriculum-accordion-item {
  background: #1c1c1e;
  border-color: #3a3a3c;
}

body.dark-mode .curriculum-accordion-item:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

body.dark-mode .accordion-button {
  background: #1c1c1e;
  color: #f5f5f7;
}

body.dark-mode .accordion-button:not(.collapsed) {
  background: #2c2c2e;
  color: #f5f5f7;
}

body.dark-mode .accordion-button:hover {
  background: #2c2c2e;
}

body.dark-mode .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(10, 132, 255, 0.25);
}

body.dark-mode .accordion-body {
  background: #1c1c1e;
  color: #f5f5f7;
}

body.dark-mode .curriculum-info h4 {
  color: #f5f5f7;
}

body.dark-mode .howto__kicker {
  background: rgba(255, 214, 10, 0.1);
}

body.dark-mode .curriculum-progress-mini .progress-percent {
  color: #f5f5f7;
}

body.dark-mode .progress-bar-mini {
  background: #3a3a3c;
}

body.dark-mode .progress-bar-fill {
  background: linear-gradient(90deg, #0a84ff 0%, #5ac8fa 100%);
}

/* Dark mode styles for module/lesson lists */
body.dark-mode .module-item {
  background: #2c2c2e;
  border-color: #3a3a3c;
}

body.dark-mode .module-header .module-title {
  color: #f5f5f7;
}

body.dark-mode .lesson-row {
  background: #1c1c1e;
  border-color: #2c2c2e;
}

body.dark-mode .lesson-row:hover {
  border-color: #0a84ff;
}

body.dark-mode .lesson-row.completed {
  background: linear-gradient(135deg, #1e3a28 0%, #2a4a34 100%);
  border-left-color: #34c759;
}

body.dark-mode .lesson-status {
  color: #34c759;
}

body.dark-mode .lesson-title {
  color: #f5f5f7;
}

body.dark-mode .lesson-duration {
  color: #a1a1a6;
}

body.dark-mode .alert-success {
  background: rgba(52, 199, 89, 0.15);
  border-color: rgba(52, 199, 89, 0.3);
  color: #34c759;
}

body.dark-mode .btn-outline-secondary {
  border-color: #3a3a3c;
  color: #f5f5f7;
}

body.dark-mode .btn-outline-secondary:hover {
  background: #3a3a3c;
  border-color: #48484a;
  color: #f5f5f7;
}

.curriculum-info h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.curriculum-progress-mini {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 150px;
}

.progress-percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0071e3;
  min-width: 50px;
  text-align: right;
}

.progress-bar-mini {
  width: 80px;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-mini .progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0071e3 0%, #34c759 100%);
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ========================================
   LESSON CHECKLIST
   ======================================== */

.lesson-checklist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 6px;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

.lesson-item:hover:not(.locked) {
  background: #f0f0f0;
  transform: translateX(4px);
}

.lesson-item.completed {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
  border-top-color: #c5cad6!important;
  border-right-color: #c5cad6!important;
  border-bottom-color: #c5cad6!important;
  border-left-color: #4abf5b!important;
  border-left-width: 6px!important;
  border-top-width: 1px!important;
  border-right-width: 1px!important !important;
  border-bottom-width: 1px!important !important;
  border-left-width: 1px!important !important;

}

.lesson-item.current {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
  border-left-color: #ffe803;
  border-left-width: 6px!important;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
}

.lesson-item.locked {
  opacity: 0.8!important;
  cursor: not-allowed;
  border-color: #9da1aa!important;
}

.lesson-check {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #34c759;
  flex-shrink: 0;
}

.lesson-item.current .lesson-check {
  color: #0071e3;
}

/* Unlocked lesson icon - yellow triangle (matches current state) */
.lesson-item.unlocked .play-icon {
  color: #FFC107; /* Yellow */
}

/* Current lesson icon - yellow triangle */
.lesson-item.current .play-icon {
  color: #FFC107; /* Yellow */
}

.lesson-item.locked .lesson-check {
  color: #999;
}

.lesson-info {
  flex: 1;
}

.lesson-info h6 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
}

.lesson-meta {
  font-size: 0.875rem;
  color: #666;
  display: block;
  margin-top: 0.25rem;
}

/* ========================================
   STATS ROW
   ======================================== */

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.stat-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

.stat-value {
  color: #1d1d1f;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ========================================
   UNLOCK REQUIREMENT
   ======================================== */

.unlock-requirement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #fff3cd 0%, #fffaeb 100%);
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #856404;
}

.unlock-requirement svg {
  flex-shrink: 0;
}

/* ========================================
   LESSON COMPLETION SECTION
   ======================================== */

.lesson-completion-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  border: 1px solid #e0e0e0;
}

.completion-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ========================================
   PROGRESS RING (VIDEO WATCH INDICATOR)
   ======================================== */

.progress-ring {
  position: relative;
  flex-shrink: 0;
}

.progress-ring-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 4;
}

.progress-ring-circle {
  fill: none;
  stroke: #0071e3;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 163.36; /* 2 * PI * 26 */
  stroke-dashoffset: 163.36;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-circle.complete {
  stroke: #34c759;
}

.progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  font-weight: 700;
  color: #0071e3;
  font-family: 'Montserrat', sans-serif;
}

.progress-percent.complete {
  color: #34c759;
}

/* ========================================
   PROGRESS MESSAGES
   ======================================== */

.progress-message {
  text-align: left;
  flex: 1;
}

.progress-message h5 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d1d1f;
}

.progress-message h5.celebration {
  color: #34c759;
}

.progress-message p {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

/* ========================================
   MARK COMPLETE BUTTON
   ======================================== */

.mark-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
  font-family: 'Montserrat', sans-serif;
}

.mark-complete-btn:not(:disabled) {
  background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.mark-complete-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.4);
}

.mark-complete-btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

/* Pulse animation when enabled */
.mark-complete-btn.btn-pulse {
  animation: completePulse 1.5s ease-in-out infinite;
}

@keyframes completePulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3); 
  }
  50% { 
    transform: scale(1.02); 
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.5); 
  }
}

/* ========================================
   COMPLETION STATUS
   ======================================== */

.completion-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid #34c759;
  border-radius: 8px;
  color: #155724;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: 'Montserrat', sans-serif;
}

/* ========================================
   CONFETTI ANIMATION
   ======================================== */

@keyframes confetti {
  0% { 
    transform: translateY(0) rotate(0deg); 
    opacity: 1; 
  }
  100% { 
    transform: translateY(-100vh) rotate(720deg); 
    opacity: 0; 
  }
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #34c759;
  animation: confetti 3s ease-out forwards;
  z-index: 10000;
  pointer-events: none;
}

/* ========================================
   LOCKED GROUP
   ======================================== */

.lesson-item.locked-group {
  background: transparent;
  border: 1px dashed #ccc;
  padding: 0.75rem;
  text-align: center;
  font-style: italic;
}

.lesson-item.locked-group:hover {
  transform: none;
  background: transparent;
}

/* ========================================
   CONTINUE LEARNING CARD
   ======================================== */

.border-primary {
  border-color: #0071e3 !important;
  border-width: 2px !important;
}

#continueLearningCard .btn-primary {
  margin-top: 0.5rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .curriculum-accordion-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .curriculum-progress-mini {
    width: 100%;
    justify-content: space-between;
  }
  
  .lesson-item {
    flex-wrap: wrap;
  }
  
  .lesson-item .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .completion-progress {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .progress-message {
    text-align: center;
  }
  
  .mark-complete-btn {
    width: 100%;
    max-width: none;
  }
  
  .dashboard-hero {
    padding: 2rem 0;
  }
}

@media (max-width: 576px) {
  .progress-circle svg {
    width: 90px;
    height: 90px;
  }
  
  .progress-circle-text {
    font-size: 18px;
  }
  
  .lesson-completion-section {
    padding: 1.5rem 1rem;
  }
  
  .progress-ring svg {
    width: 50px;
    height: 50px;
  }
  
  .progress-message h5 {
    font-size: 1.1rem;
  }
}

/* ========================================
   PROFILE PAGE STYLES
   ======================================== */

.profile-section .nav-tabs {
  border-bottom: 2px solid #e0e0e0;
}

.profile-section .nav-tabs .nav-link {
  border: none;
  color: #666;
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.profile-section .nav-tabs .nav-link:hover {
  color: #0071e3;
  border-bottom: 3px solid #0071e3;
}

.profile-section .nav-tabs .nav-link.active {
  color: #0071e3;
  background: none;
  border-bottom: 3px solid #0071e3;
}

.profile-section .tab-content {
  padding: 2rem 0;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

.dark-mode .lesson-completion-section {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  border-color: #444;
}

.dark-mode .completion-progress {
  background: #1d1d1d;
}

.dark-mode .progress-message h5,
.dark-mode .progress-message p {
  color: #e0e0e0;
}

.dark-mode .lesson-item {
  background: #2d2d2d;
}

.dark-mode .lesson-item.completed {
  background: linear-gradient(135deg, #1a3a1a 0%, #2d4a2d 100%);
}

.dark-mode .lesson-item.current {
  background: linear-gradient(135deg, #1a2a3a 0%, #2d3d4d 100%);
}

.dark-mode .curriculum-accordion-item {
  background: #2d2d2d;
  border-color: #444;
}

.dark-mode .progress-circle-text {
  fill: #e0e0e0;
}

.dark-mode .stat-label {
  color: #aaa;
}

.dark-mode .stat-value {
  color: #e0e0e0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.lesson-item {
  animation: slideIn 0.3s ease forwards;
}

.lesson-item:nth-child(1) { animation-delay: 0s; }
.lesson-item:nth-child(2) { animation-delay: 0.05s; }
.lesson-item:nth-child(3) { animation-delay: 0.1s; }
.lesson-item:nth-child(4) { animation-delay: 0.15s; }
.lesson-item:nth-child(5) { animation-delay: 0.2s; }
.lesson-item:nth-child(6) { animation-delay: 0.25s; }
.lesson-item:nth-child(7) { animation-delay: 0.3s; }
.lesson-item:nth-child(8) { animation-delay: 0.35s; }

/* ========================================
   UTILITIES
   ======================================== */

.animate-slide-up {
  animation: slideUp 0.5s ease;
}

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

/* Progress Text States */
.progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
}

.progress-bar-wrapper {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill-curriculum {
  height: 100%;
  background: linear-gradient(90deg, #0071e3 0%, #34c759 100%);
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* ========================================
   LOCKED CURRICULA SECTION
   ======================================== */

.locked-curricula {
  background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
}

.locked-curricula .curriculum-card-locked {
  position: relative;
  overflow: hidden;
}

.locked-curricula .curriculum-lock-overlay {
  opacity: 0.7;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.lesson-item:focus-within {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

.mark-complete-btn:focus {
  outline: 3px solid #0071e3;
  outline-offset: 3px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   UNLOCK NOTIFICATIONS & CELEBRATIONS
   ======================================== */

/**
 * Unlock Notification
 * Shown when a curriculum automatically unlocks
 */
.unlock-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.unlock-notification.show {
  opacity: 1;
  pointer-events: all;
}

.unlock-notification-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.unlock-notification-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 3rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.unlock-notification.show .unlock-notification-content {
  transform: translateY(0);
}

.unlock-icon {
  margin-bottom: 1.5rem;
  animation: unlockBounce 0.6s ease;
}

@keyframes unlockBounce {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.unlock-title {
  font-size: 2rem;
  font-weight: 900;
  color: #333;
  margin-bottom: 1rem;
}

.unlock-message {
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 2rem;
}

.unlock-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.btn-unlock-view {
  display: inline-block;
  background: #4CAF50;
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.btn-unlock-view:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  color: white;
  text-decoration: none;
}

.btn-unlock-close {
  background: transparent;
  border: none;
  color: #999;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-unlock-close:hover {
  background: #f5f5f5;
  color: #333;
}

/**
 * Completion Celebration
 * Shown when user completes 100% of curriculum
 */
.completion-celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.completion-celebration.show {
  opacity: 1;
  pointer-events: all;
}

.celebration-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.celebration-content {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  padding: 4rem 3rem;
  max-width: 600px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.completion-celebration.show .celebration-content {
  transform: scale(1);
}

.celebration-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  border-radius: 16px;
}

.celebration-confetti::before,
.celebration-confetti::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffd700;
  animation: confettiFall 3s ease-out infinite;
}

.celebration-confetti::before {
  left: 20%;
  animation-delay: 0s;
}

.celebration-confetti::after {
  left: 80%;
  background: #4CAF50;
  animation-delay: 0.5s;
}

@keyframes confettiFall {
  0% {
    top: -10%;
    opacity: 1;
    transform: rotate(0deg);
  }
  100% {
    top: 110%;
    opacity: 0;
    transform: rotate(720deg);
  }
}

.celebration-icon {
  margin-bottom: 2rem;
  animation: celebrationPulse 1s ease infinite alternate;
}

@keyframes celebrationPulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.celebration-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.celebration-message {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.celebration-next {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  font-weight: 600;
}

.celebration-actions {
  margin-top: 2rem;
}

.btn-celebration-continue {
  background: white;
  color: #667eea;
  border: none;
  padding: 1rem 3rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-celebration-continue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: #f8f9fa;
}

/* Dark mode support */
body.dark-mode .unlock-notification-content {
  background: #1e1e1e;
  color: white;
}

body.dark-mode .unlock-title {
  color: white;
}

body.dark-mode .unlock-message {
  color: #ccc;
}

body.dark-mode .btn-unlock-close:hover {
  background: #333;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 767.98px) {
  .unlock-notification-content,
  .celebration-content {
    padding: 2rem 1.5rem;
    max-width: 95%;
  }
  
  .unlock-title {
    font-size: 1.5rem;
  }
  
  .unlock-message {
    font-size: 1rem;
  }
  
  .celebration-title {
    font-size: 1.875rem;
  }
  
  .celebration-message {
    font-size: 1.125rem;
  }
  
  .celebration-next {
    font-size: 1rem;
  }
  
  .btn-unlock-view,
  .btn-celebration-continue {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* Tablet responsiveness */
@media (min-width: 768px) and (max-width: 991.98px) {
  .unlock-notification-content {
    max-width: 450px;
  }
  
  .celebration-content {
    max-width: 550px;
  }
}

/* Ensure notifications appear above everything */
.unlock-notification,
.completion-celebration {
  z-index: 99999;
}

/* ========================================
   LOADING INDICATOR
   ======================================== */

.ff-loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  backdrop-filter: blur(2px);
}

.ff-loading-content {
  background: white;
  padding: 2rem 3rem;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.ff-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: ff-spin 0.8s linear infinite;
}

@keyframes ff-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ff-loading-text {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

/* Dark mode support */
body.dark-mode .ff-loading-content {
  background: #2a2a2a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

body.dark-mode .ff-loading-text {
  color: #e0e0e0;
}

body.dark-mode .ff-spinner {
  border-color: #444;
  border-top-color: #4da6ff;
}

/* Mobile responsiveness */
@media (max-width: 767.98px) {
  .ff-loading-content {
    padding: 1.5rem 2rem;
  }
  
  .ff-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }
  
  .ff-loading-text {
    font-size: 0.9rem;
  }
}

