/* HackerDNA - Course Chapter (Enhanced Dark Theme) */

:root {
  --primary: #7367f0;
  --primary-dark: #5e50ee;
  --secondary: #28c76f;
  --accent: #00cfe8;
  --warning: #ff9f43;
  --pro-gold: #ffc107;
  --dark-bg: #1e1e2d;
  --card-bg: #282a3c;
  --text-primary: #e7e7ff;
  --text-secondary: #a8aabc;
  --border-color: rgba(115, 103, 240, 0.12);
}

/* === Page Layout === */
body {
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(115, 103, 240, 0.08), transparent),
    #161622;
  min-height: 100vh;
}

.layout-wrapper {
  background: transparent;
}

.content-wrapper {
  background: transparent;
}

.container-xxl {
  background: transparent;
}

/* === Scrollbar Styling === */
.list-group,
.chapters-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.list-group::-webkit-scrollbar,
.chapters-list::-webkit-scrollbar {
  width: 4px;
}

.list-group::-webkit-scrollbar-track,
.chapters-list::-webkit-scrollbar-track {
  background: transparent;
}

.list-group::-webkit-scrollbar-thumb,
.chapters-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.list-group::-webkit-scrollbar-thumb:hover,
.chapters-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* === Mobile Responsiveness === */
@media (max-width: 991.98px) {
  .sticky-md-top {
    position: static !important;
  }

  .mobile-course-summary {
    order: -1;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-course-summary h5 {
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .sticky-md-top {
    position: sticky;
  }
}

/* === Page Header === */
.page-header {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 1;
}

.header-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  opacity: 0.6;
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 2;
  padding: 1.75rem 2rem;
}

/* === Breadcrumb === */
.breadcrumb-enhanced {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
  padding: 0;
  background: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-link {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.875rem;
}

.breadcrumb-link:hover {
  background: rgba(115, 103, 240, 0.12);
  color: var(--text-primary);
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0.25rem;
  font-size: 0.75rem;
}

.breadcrumb-item.active span {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
}

/* === Course Header Info === */
.course-header-info {
  margin-top: 0;
}

.course-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.course-subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.course-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.stat-pill:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-pill i {
  color: var(--primary);
  font-size: 0.875rem;
}

/* === Lab Practice Card === */
.lab-practice-card {
  background: var(--card-bg);
  border: 1px solid rgba(40, 199, 111, 0.25);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lab-practice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), #20bf6b);
  z-index: 1;
}

.lab-header-content {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.lab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(40, 199, 111, 0.12);
  color: var(--secondary);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(40, 199, 111, 0.25);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lab-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.lab-description {
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.lab-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.meta-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.lab-skills-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  flex-wrap: wrap;
}

.skills-label {
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.skills-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  flex: 1;
}

.skill-tag-inline {
  background: rgba(40, 199, 111, 0.12);
  color: var(--secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  border: 1px solid rgba(40, 199, 111, 0.25);
}

.lab-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.lab-access-info {
  display: flex;
  align-items: center;
}

.access-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.btn-start-lab,
.btn-upgrade-lab {
  background: var(--secondary);
  border: none;
  border-radius: 6px;
  padding: 0.625rem 1.25rem;
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(40, 199, 111, 0.25);
}

.btn-upgrade-lab {
  background: var(--pro-gold);
  color: #212529;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

.btn-start-lab:hover,
.btn-upgrade-lab:hover {
  box-shadow: 0 4px 12px rgba(40, 199, 111, 0.35);
  color: white;
  text-decoration: none;
}

.btn-upgrade-lab:hover {
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.35);
  color: #212529;
}

/* === Chapter Header Card === */
.chapter-header-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.chapter-header-bg {
  position: relative;
  background: linear-gradient(135deg, rgba(115, 103, 240, 0.15) 0%, rgba(114, 124, 245, 0.2) 100%);
  padding: 1.5rem;
}

.chapter-header-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 1;
}

.chapter-info-header {
  position: relative;
  z-index: 2;
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(115, 103, 240, 0.12);
  color: var(--primary);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(115, 103, 240, 0.25);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.chapter-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.chapter-header-content {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

/* Chapter Metadata */
.chapter-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.metadata-item:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.metadata-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #727cf5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.metadata-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.metadata-label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.metadata-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Chapter Objectives */
.chapter-objectives {
  padding: 1rem;
  background: rgba(115, 103, 240, 0.06);
  border: 1px solid rgba(115, 103, 240, 0.15);
  border-radius: 8px;
}

.objectives-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.objectives-header i {
  color: var(--primary);
  font-size: 1rem;
}

.objectives-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.objective-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: rgba(115, 103, 240, 0.12);
  color: var(--primary);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(115, 103, 240, 0.25);
  transition: all 0.2s ease;
}

.objective-tag:hover {
  background: rgba(115, 103, 240, 0.18);
  box-shadow: 0 2px 6px rgba(115, 103, 240, 0.2);
}

/* === Pro Upgrade Section === */
.pro-upgrade-section {
  margin: 0 0 1.5rem 0;
}

.pro-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.pro-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pro-gold), #ffeb3b);
  z-index: 1;
}

.pro-header {
  padding: 1.5rem;
  background: rgba(255, 193, 7, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.pro-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pro-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--pro-gold), #ffeb3b);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #212529;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
  position: relative;
  z-index: 1;
}

.pro-header-content {
  flex-grow: 1;
  margin-left: 1rem;
}

.pro-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pro-subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.pro-badge {
  background: linear-gradient(135deg, var(--pro-gold), #ffeb3b);
  color: #212529;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

.pro-content {
  padding: 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feature-category {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.category-title {
  color: var(--pro-gold);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-check {
  width: 20px;
  height: 20px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.feature-item span {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.pro-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* === Content Section === */
.content-section {
  margin: 0 0 1.5rem 0;
}

.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 1;
}

.content-header {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.content-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.content-icon {
  width: 40px;
  height: 40px;
  background: rgba(115, 103, 240, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

.content-info h3,
.content-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.content-subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.8125rem;
}

.content-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-btn:hover,
.action-btn:focus {
  background: rgba(115, 103, 240, 0.12);
  color: var(--primary);
  border-color: rgba(115, 103, 240, 0.3);
  outline: none;
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.content-body {
  padding: 1.5rem;
}

.chapter-content-wrapper {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* === Validation Section === */
.validation-section {
  margin: 1.5rem 0;
}

.validation-card {
  background: var(--card-bg);
  border: 1px solid rgba(115, 103, 240, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.validation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 1;
}

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

.validation-icon-container {
  position: relative;
  display: flex;
  align-items: center;
}

.validation-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), #727cf5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 12px rgba(115, 103, 240, 0.3);
  position: relative;
  z-index: 1;
}

.validation-pulse {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(115, 103, 240, 0.3);
  animation: pulse 2s infinite;
  z-index: 0;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.validation-text {
  flex-grow: 1;
  margin-left: 1rem;
}

.validation-title {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.validation-subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.8125rem;
}

.validation-points {
  display: flex;
  align-items: center;
}

.points-badge {
  background: linear-gradient(135deg, var(--secondary), #20bf6b);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(40, 199, 111, 0.3);
}

.question-container {
  margin-bottom: 1.5rem;
}

.question-label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
}

.question-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  position: relative;
}

.question-icon {
  position: absolute;
  top: -10px;
  left: 16px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 1;
}

.question-text {
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
  word-wrap: break-word;
}

.answer-section {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.answer-container {
  flex: 1;
  min-width: 250px;
}

.answer-label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.input-group-enhanced {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  z-index: 2;
}

.form-control-enhanced {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  width: 100%;
}

.form-control-enhanced:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(115, 103, 240, 0.25);
  outline: none;
}

.form-control-enhanced::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-control-enhanced.success-state {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.15rem rgba(40, 199, 111, 0.25);
  background: rgba(40, 199, 111, 0.08);
}

.form-control-enhanced.error-state {
  border-color: #ea5455;
  box-shadow: 0 0 0 0.15rem rgba(234, 84, 85, 0.25);
  background: rgba(234, 84, 85, 0.08);
}

.form-control-enhanced[readonly],
.form-control-enhanced.loading-state {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  opacity: 0.7;
}

.submit-container {
  display: flex;
  align-items: center;
}

.btn-validation {
  background: var(--secondary);
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(40, 199, 111, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-validation:hover {
  box-shadow: 0 4px 12px rgba(40, 199, 111, 0.35);
}

.btn-validation.btn-login {
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(115, 103, 240, 0.25);
}

.btn-validation.btn-login:hover {
  box-shadow: 0 4px 12px rgba(115, 103, 240, 0.35);
}

.btn-validation.loading {
  background: rgba(115, 103, 240, 0.6);
  cursor: not-allowed;
}

.btn-validation.success {
  background: var(--secondary);
  animation: successPulse 0.6s ease;
}

.btn-validation.error {
  background: #ea5455;
  animation: errorShake 0.5s ease;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-validation:hover .btn-shine {
  left: 100%;
}

.validation-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.progress-step.active .step-circle,
.progress-step.completed .step-circle {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
}

.progress-step.current .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.progress-step span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-line {
  width: 50px;
  height: 2px;
  background: var(--border-color);
}

.progress-line.completed {
  background: var(--secondary);
}

/* === Success Card === */
.success-card {
  background: var(--card-bg);
  border: 1px solid rgba(40, 199, 111, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.success-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), #20bf6b);
  z-index: 1;
}

.success-animation {
  margin-bottom: 1.5rem;
}

.success-checkmark {
  display: inline-block;
}

.checkmark-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--secondary);
  position: relative;
  background: rgba(40, 199, 111, 0.1);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark-stem,
.checkmark-kick {
  position: absolute;
  background: var(--secondary);
}

.checkmark-stem {
  width: 3px;
  height: 18px;
  left: 35px;
  top: 36px;
  transform: rotate(45deg);
}

.checkmark-kick {
  width: 3px;
  height: 10px;
  left: 26px;
  top: 44px;
  transform: rotate(-45deg);
}

.success-title {
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.success-message {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.success-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--secondary), #20bf6b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
}

.stat-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.stat-value {
  color: var(--secondary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-color);
}

/* === Sidebar === */
.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.progress-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.progress-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), #20bf6b);
  z-index: 1;
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.progress-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--secondary), #20bf6b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.progress-info h4,
.progress-title {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.progress-subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.75rem;
}

.progress-circle-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.progress-circle-svg {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
}

.progress-track {
  fill: none;
  stroke: rgba(40, 199, 111, 0.2);
  stroke-width: 6;
}

.progress-fill {
  fill: none;
  stroke: #28c76f;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #28c76f;
  line-height: 1;
}

.progress-total {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.progress-details {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.progress-stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

/* === Chapters Card === */
.chapters-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.chapters-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 1;
}

.chapters-header {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.chapters-title {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
}

.chapters-filter {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: 6px;
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(115, 103, 240, 0.12);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(115, 103, 240, 0.2);
}

.chapters-list {
  padding: 0.875rem;
  max-height: 60vh;
  overflow-y: auto;
}

.chapters-list > div {
  margin-bottom: 0.625rem;
}

.chapters-list > div:last-child {
  margin-bottom: 0;
}

.chapter-list-item {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.chapter-list-item:hover {
  border-color: rgba(115, 103, 240, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chapter-list-item.current-chapter {
  border-color: rgba(115, 103, 240, 0.5);
  background: rgba(115, 103, 240, 0.08);
}

.chapter-list-item.completed-chapter {
  border-color: rgba(40, 199, 111, 0.3);
}

.chapter-item-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
}

.chapter-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  min-width: 32px;
}

.status-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 2px solid;
  transition: all 0.2s ease;
}

.status-indicator.completed {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
}

.status-indicator.current {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.status-indicator.pending {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.chapter-number {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.chapter-details {
  flex-grow: 1;
  min-width: 0;
}

.chapter-item-title {
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chapter-type {
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.chapter-type.free {
  background: rgba(40, 199, 111, 0.12);
  color: var(--secondary);
  border: 1px solid rgba(40, 199, 111, 0.25);
}

.chapter-type.pro {
  background: rgba(255, 193, 7, 0.12);
  color: var(--pro-gold);
  border: 1px solid rgba(255, 193, 7, 0.25);
}

.chapter-points {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.chapter-points i {
  color: var(--warning);
  font-size: 0.6875rem;
}

.chapter-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
}

.chapter-duration {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.chapter-actions i {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.875rem;
}

/* === Notification System === */
.action-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.action-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.action-notification.notification-success {
  background: rgba(40, 199, 111, 0.9);
  border-color: rgba(40, 199, 111, 0.3);
}

.action-notification.notification-error {
  background: rgba(234, 84, 85, 0.9);
  border-color: rgba(234, 84, 85, 0.3);
}

.action-notification.notification-info {
  background: rgba(115, 103, 240, 0.9);
  border-color: rgba(115, 103, 240, 0.3);
}

.action-notification i {
  font-size: 1rem;
}

.action-notification span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* === No Results Message === */
.no-results-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
  display: none;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .header-content {
    padding: 1.25rem 1.5rem;
  }

  .course-title {
    font-size: 1.375rem;
  }

  .chapter-title {
    font-size: 1.125rem;
  }

  .pro-header {
    flex-direction: column;
    text-align: center;
  }

  .pro-header-content {
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .chapter-item-content {
    padding: 0.75rem;
  }

  .chapter-meta {
    flex-direction: column;
    gap: 0.375rem;
    align-items: flex-start;
  }

  .lab-header-content {
    padding: 1.25rem;
  }

  .lab-cta {
    flex-direction: column;
    text-align: center;
  }

  .btn-start-lab,
  .btn-upgrade-lab {
    width: 100%;
  }

  .action-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: calc(100vw - 20px);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .answer-section {
    flex-direction: column;
  }

  .stat-divider {
    width: 30px;
    height: 1px;
  }

  .success-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .validation-header {
    flex-direction: column;
    text-align: center;
  }

  .validation-text {
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  .page-title,
  .course-title {
    font-size: 1.25rem;
  }

  .course-stats {
    gap: 0.5rem;
  }

  .stat-pill {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }

  .breadcrumb-link {
    padding: 0.375rem 0.75rem;
  }
}
