.course-detail-page {
  min-height: 100vh;
  background: 
    radial-gradient(circle at 20% 10%, rgba(139, 92, 246, 0.08), transparent 40%),
    radial-gradient(circle at 80% 50%, rgba(6, 182, 212, 0.06), transparent 40%),
    radial-gradient(circle at 40% 90%, rgba(139, 92, 246, 0.05), transparent 35%),
    linear-gradient(180deg, #030712 0%, #0a0e1a 50%, #050810 100%);
  color: #f8fafc;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.course-detail-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(139, 92, 246, 0.03) 0px,
      transparent 1px,
      transparent 40px,
      rgba(139, 92, 246, 0.03) 41px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(6, 182, 212, 0.02) 0px,
      transparent 1px,
      transparent 40px,
      rgba(6, 182, 212, 0.02) 41px
    );
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

.course-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Faixa de contexto da jornada */
.course-breadcrumb {
  position: sticky;
  top: 0;
  z-index: 15;
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.12), 
    rgba(6, 182, 212, 0.08)
  );
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  padding: 12px 48px 12px 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: breadcrumbSlideDown 0.4s ease-out;
}

/* Botão Voltar integrado na breadcrumb */
.course-detail__back-button {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 16;
  background: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: all 0.25s ease;
}

.course-detail__back-button:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-50%) translateX(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.course-detail__back-button svg {
  width: 16px;
  height: 16px;
}

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

.course-breadcrumb__icon {
  font-size: 1.2rem;
  animation: breadcrumbIconPulse 2s ease-in-out infinite;
}

@keyframes breadcrumbIconPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.3));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
  }
}

.course-breadcrumb__text {
  flex: 1;
  font-weight: 500;
}

.course-breadcrumb__badge {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* Header com banner imersivo */
.course-detail-header {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding: 80px 48px 48px;
  overflow: hidden;
}

.course-detail-header__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.4);
  transform: scale(1.1);
  z-index: 0;
}

.course-detail-header__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 12, 0.3) 0%,
    rgba(5, 6, 12, 0.7) 40%,
    rgba(5, 6, 12, 0.95) 100%
  );
  z-index: 1;
}

.course-detail-header__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Badges com contraste e espaçamento */
.course-detail__badges {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.course-detail__badge {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.course-detail__badge--price {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #e0e7ff;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.course-detail__badge--level {
  background: rgba(23, 25, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

/* Título grande e imersivo */
.course-detail__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(135deg, #ffffff, #d6e0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.course-detail__title-icon {
  font-size: clamp(2rem, 4vw, 3rem);
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
  animation: titleIconFloat 3s ease-in-out infinite;
}

@keyframes titleIconFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

.course-detail__excerpt {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  max-width: 700px;
}

/* Conteúdo do curso - Zona de leitura elevada */
.course-detail-content {
  padding: 64px 48px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: relative;
  background: 
    radial-gradient(ellipse at center top, rgba(139, 92, 246, 0.04), transparent 60%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.6) 0%, rgba(5, 8, 16, 0.8) 100%);
  box-shadow: 
    0 -40px 80px rgba(0, 0, 0, 0.3),
    0 0 100px rgba(139, 92, 246, 0.08);
  border-radius: 32px 32px 0 0;
  margin-top: -40px;
  z-index: 2;
}

.course-detail-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3), transparent);
}

.course-detail__info {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 900px;
  position: relative;
}

.course-detail__description h2,
.course-detail__modules h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 24px 0;
  color: rgba(248, 250, 252, 0.95);
  position: relative;
  padding-bottom: 16px;
}

.course-detail__description h2::after,
.course-detail__modules h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.course-detail__description {
  padding: 32px;
  background: rgba(15, 20, 35, 0.4);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.course-detail__description::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08), transparent 70%);
  pointer-events: none;
}

.course-detail__description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(248, 250, 252, 0.8);
  margin: 0;
  position: relative;
  z-index: 1;
}

.course-detail__modules {
  border-radius: 16px;
  padding: 32px;
  background: rgba(23, 25, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.course-detail__loading {
  text-align: center;
  padding: 40px;
  color: rgba(248, 250, 252, 0.5);
}

.course-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.course-detail__actions .button--large {
  box-shadow: 
    0 0 20px rgba(139, 92, 246, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.course-detail__actions .button--large:hover {
  box-shadow: 
    0 0 30px rgba(139, 92, 246, 0.5),
    0 0 60px rgba(6, 182, 212, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.course-detail__actions .button--large::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.4), 
    rgba(6, 182, 212, 0.4)
  );
  border-radius: 14px;
  opacity: 0;
  z-index: -1;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.course-detail__actions .button--large:hover::after {
  opacity: 1;
}

.button--large {
  width: 100%;
  padding: 18px 32px;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button--large::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.button--large:hover::before {
  transform: translateX(100%);
}

.button--large[data-continue] {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.15));
  border-color: rgba(6, 182, 212, 0.4);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
  }
}

.button--large[data-continue]::after {
  content: '→';
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.button--large[data-continue]:hover::after {
  transform: translateX(4px);
}

/* Blocos de informação do curso */
.course-detail__info-blocks {
  display: grid;
  gap: 24px;
  margin-bottom: 56px;
  position: relative;
  animation: fadeInUp 0.6s ease-out;
}

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

.course-info-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 32px;
  background: 
    linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.08)),
    rgba(15, 20, 35, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.course-info-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.course-info-block:hover::before {
  opacity: 1;
}

.course-info-block__item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.course-info-block__icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 25, 40, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.course-info-block__item > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.course-info-block__label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.course-info-block__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

/* Lista de módulos */
.course-modules-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

.course-modules-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, 
    transparent 0%,
    rgba(139, 92, 246, 0.3) 10%,
    rgba(6, 182, 212, 0.3) 50%,
    rgba(139, 92, 246, 0.3) 90%,
    transparent 100%
  );
  opacity: 0.5;
}

/* Module and lesson styles - Trilha de aprendizado visual colapsável */
.module-section {
  background: 
    linear-gradient(135deg, rgba(23, 25, 40, 0.6), rgba(15, 20, 35, 0.5)),
    rgba(10, 14, 26, 0.4);
  border-radius: 16px;
  padding: 0;
  border: 1px solid rgba(139, 92, 246, 0.15);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out backwards;
}

.module-section--expanded {
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.08) 0%, 
    rgba(6, 182, 212, 0.06) 50%,
    rgba(139, 92, 246, 0.08) 100%
  );
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.3);
}

.module-section:nth-child(1) { animation-delay: 0.1s; }
.module-section:nth-child(2) { animation-delay: 0.2s; }
.module-section:nth-child(3) { animation-delay: 0.3s; }
.module-section:nth-child(4) { animation-delay: 0.4s; }
.module-section:nth-child(5) { animation-delay: 0.5s; }

.module-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  opacity: 0.7;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.5);
}

.module-section__header {
  padding: 24px 28px;
  background: transparent;
  border: none;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.module-section--expanded .module-section__header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, 
    rgba(10, 14, 26, 0.98) 0%, 
    rgba(5, 8, 16, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(139, 92, 246, 0.1);
}

.module-section__header:hover {
  background: rgba(139, 92, 246, 0.05);
}

.module-section__header[aria-expanded="true"] {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 20px;
}

.module-section__title-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 300px;
}

.module-section__icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.module-section__header:hover .module-section__icon {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.module-section__title {
  margin: 0 0 6px 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

.module-section__description {
  margin: 0;
  color: rgba(155, 163, 175, 0.85);
  line-height: 1.6;
  font-size: 0.9rem;
}

.module-section__summary {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.module-section__summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.module-section__summary-icon {
  font-size: 1rem;
}

.module-section__summary-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.module-section__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.module-section__progress-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.module-section__progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.module-section__status {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  white-space: nowrap;
}

.module-section__status--new {
  background: rgba(251, 191, 36, 0.12);
  color: rgba(251, 191, 36, 1);
  border-color: rgba(251, 191, 36, 0.3);
}

.module-section__status--in-progress {
  background: rgba(6, 182, 212, 0.12);
  color: rgba(6, 182, 212, 1);
  border-color: rgba(6, 182, 212, 0.3);
}

.module-section__status--completed {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(34, 197, 94, 1);
  border-color: rgba(34, 197, 94, 0.3);
}

.module-section__toggle-icon {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.module-section__header[aria-expanded="true"] .module-section__toggle-icon {
  transform: rotate(180deg);
  color: rgba(139, 92, 246, 0.8);
}

.module-section__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.module-section__content:not([hidden]) {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) rgba(255, 255, 255, 0.05);
}

.module-section__content::-webkit-scrollbar {
  width: 8px;
}

.module-section__content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.module-section__content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, 
    rgba(139, 92, 246, 0.4), 
    rgba(6, 182, 212, 0.3)
  );
  border-radius: 4px;
  transition: background 0.3s ease;
}

.module-section__content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, 
    rgba(139, 92, 246, 0.6), 
    rgba(6, 182, 212, 0.5)
  );
}

.module-section__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
  position: relative;
  overflow: hidden;
}

.module-section__progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.module-section__progress-fill--complete {
  animation: progressComplete 0.6s ease-out;
}

@keyframes progressComplete {
  0% { transform: scaleX(0.98); }
  50% { 
    transform: scaleX(1.02);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
  }
  100% { 
    transform: scaleX(1);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
  }
}

/* Mensagem de conquista de módulo */
.module-completion-toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(34, 197, 94, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  animation: toastSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.module-completion-toast:hover {
  transform: translateY(-4px);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.module-completion-toast__icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  animation: celebrationBounce 0.6s ease-out;
}

@keyframes celebrationBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(10deg); }
}

.module-completion-toast__content h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.module-completion-toast__content p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.module-completion-toast__close {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.module-completion-toast__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lesson-list {
  display: flex;
  flex-direction: column;
  padding: 16px 8px 8px;
}

.lesson-item {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 20px 20px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  opacity: 0;
}

.module-section--expanded .lesson-item {
  animation: lessonSlideIn 0.5s ease-out forwards;
}

@keyframes lessonSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.lesson-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 60%;
  background: linear-gradient(180deg, #8b5cf6, #06b6d4);
  border-radius: 0 4px 4px 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.lesson-item:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.05));
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateX(8px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2);
}

.lesson-item:hover::before {
  width: 4px;
}

.lesson-item--completed {
  opacity: 0.85;
  position: relative;
}

.lesson-item--completed::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid rgba(34, 197, 94, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgb(34, 197, 94);
  animation: checkmarkPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.lesson-item--completed:hover {
  opacity: 1;
}

.lesson-item--in-progress {
  background: rgba(6, 182, 212, 0.03);
  border-color: rgba(6, 182, 212, 0.15);
}

.lesson-item--in-progress::before {
  background: linear-gradient(180deg, #06b6d4, #0ea5e9);
}

.lesson-item--new {
  position: relative;
}

.lesson-item__number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: rgba(139, 92, 246, 0.8);
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.lesson-item:hover .lesson-item__number {
  background: rgba(139, 92, 246, 0.2);
  color: rgba(139, 92, 246, 1);
  border-color: rgba(139, 92, 246, 0.4);
  transform: scale(1.05);
}

.lesson-item--completed .lesson-item__number {
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.3);
}

.lesson-item--in-progress .lesson-item__number {
  background: rgba(6, 182, 212, 0.15);
  color: rgba(6, 182, 212, 0.9);
  border-color: rgba(6, 182, 212, 0.3);
}

.lesson-item__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lesson-item__title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lesson-item__type-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  filter: grayscale(0.3);
  transition: all 0.25s ease;
}

.lesson-item:hover .lesson-item__type-icon {
  filter: grayscale(0);
  transform: scale(1.1);
}

.lesson-item__content h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.lesson-item:hover .lesson-item__content h4 {
  color: #ffffff;
}

.lesson-item__content p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(155, 163, 175, 0.75);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-item__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.lesson-item__duration {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(155, 163, 175, 0.9);
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
}

.lesson-item__duration svg {
  opacity: 0.7;
}

.lesson-item__status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border: 1px solid;
}

.lesson-item__status--completed {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(34, 197, 94, 1);
  border-color: rgba(34, 197, 94, 0.3);
}

.lesson-item__status--in-progress {
  background: rgba(6, 182, 212, 0.12);
  color: rgba(6, 182, 212, 1);
  border-color: rgba(6, 182, 212, 0.3);
  animation: pulse-progress 2s ease-in-out infinite;
}

.lesson-item__status--new {
  background: rgba(251, 191, 36, 0.12);
  color: rgba(251, 191, 36, 1);
  border-color: rgba(251, 191, 36, 0.3);
  animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-progress {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0);
  }
}

@keyframes pulse-new {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0);
  }
}

.lesson-item__button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  color: rgba(139, 92, 246, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.lesson-item:hover .lesson-item__button {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #8b5cf6;
  transform: translateX(4px) scale(1.05);
  box-shadow: 
    0 0 20px rgba(139, 92, 246, 0.4),
    0 0 40px rgba(139, 92, 246, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.lesson-item__button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.lesson-item:hover .lesson-item__button svg {
  transform: translateX(2px);
}

/* Responsive */
@media (max-width: 992px) {
  .course-detail-header {
    min-height: 400px;
    padding: 60px 32px 40px;
  }
  
  .course-detail__title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  
  .course-detail-content {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .course-detail__back-button {
    top: 16px;
    left: 16px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .course-detail-header {
    min-height: 350px;
    padding: 50px 24px 32px;
  }
  
  .course-detail__badges {
    gap: 12px;
  }
  
  .course-detail__badge {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
  
  .course-detail__badge--price {
    font-size: 0.9rem;
  }
  
  .course-detail__excerpt {
    font-size: 1rem;
  }
  
  .course-detail-content {
    padding: 24px 16px;
    gap: 32px;
  }
  
  .course-detail__description h2,
  .course-detail__modules h2 {
    font-size: 1.5rem;
  }
  
  .button--large {
    padding: 16px 24px;
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .course-detail-header {
    min-height: 320px;
  }
  
  .lesson-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .lesson-item__meta {
    width: 100%;
    justify-content: space-between;
  }
}
