@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

.lms-course-lesson-container {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.lms-course-header {
  margin-bottom: 30px;
  border-bottom: 1px solid #e1e5e9;
  padding-bottom: 20px;
}

.lms-breadcrumb {
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: #6b7280;
}

.lms-breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
}

.lms-breadcrumb a:hover {
  text-decoration: underline;
}

.lms-breadcrumb .separator {
  margin: 0 8px;
  color: #9ca3af;
}

.lms-breadcrumb .current {
  color: #374151;
  font-weight: 500;
}

.lms-course-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.lms-lesson-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin: 5px 0 0 0;
}

.lms-course-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #718096;
  font-size: 0.95rem;
}

.lms-course-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lms-course-meta-item svg {
  width: 16px;
  height: 16px;
}

.lms-course-meta-item svg path {
  fill: currentColor;
}

.lms-course-content-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
}

.lms-course-sidebar {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 20px;
}

.lms-course-progress {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.lms-course-progress h3 {
  margin: 0 0 15px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
}

.progress-container {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.lms-lesson-navigation {
  padding: 20px;
}

.lms-lesson-navigation h3 {
  margin: 0 0 15px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
}

.lms-lessons-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lms-lesson-item {
  margin-bottom: 8px;
}

.lms-lesson-item .lesson-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lms-lesson-item .lesson-header:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.lms-lesson-item.current .lesson-header {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.lesson-icon {
  width: 16px;
  height: 16px;
  color: #64748b;
}

.lesson-title {
  flex: 1;
  font-weight: 500;
  color: #374151;
}

.lesson-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.lesson-toggle.open {
  transform: rotate(180deg);
}

.lms-topics-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.lms-topics-list.open {
  max-height: 500px;
}

.lms-topic-item {
  margin-bottom: 4px;
}

.lms-topic-item .topic-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: white;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
}

.lms-topic-item .topic-link:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
}

.lms-topic-item.current .topic-link {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
}

.topic-icon {
  width: 14px;
  height: 14px;
  color: #64748b;
}

.topic-title {
  flex: 1;
  font-weight: 500;
}

.topic-status {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lms-main-content {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lms-topic-content {
  padding: 0;
}

.topic-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.topic-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.topic-title-section h2 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #6b7280;
  font-size: 0.875rem;
}

.lesson-name {
  font-weight: 500;
}

.topic-duration {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topic-header-actions {
  margin-left: 20px;
}

.btn-unmark-complete-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-unmark-complete-header:hover {
  background: #059669;
}

.topic-body {
  padding: 24px;
  line-height: 1.7;
  color: #374151;
}

.topic-body h1,
.topic-body h2,
.topic-body h3,
.topic-body h4,
.topic-body h5,
.topic-body h6 {
  color: #111827;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.topic-body h1 {
  font-size: 2rem;
}
.topic-body h2 {
  font-size: 1.75rem;
}
.topic-body h3 {
  font-size: 1.5rem;
}
.topic-body h4 {
  font-size: 1.25rem;
}
.topic-body h5 {
  font-size: 1.125rem;
}
.topic-body h6 {
  font-size: 1rem;
}

.topic-body p {
  margin-bottom: 1em;
}

.topic-body ul,
.topic-body ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.topic-body li {
  margin-bottom: 0.25em;
}

.topic-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9em;
}

.topic-body pre {
  background: #f1f5f9;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1em 0;
}

.topic-body pre code {
  background: none;
  padding: 0;
}

.topic-body blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 16px;
  margin: 1em 0;
  color: #64748b;
  font-style: italic;
}

.topic-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

.topic-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.topic-body th,
.topic-body td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid #e5e7eb;
}

.topic-body th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.topic-complete-section {
  margin-top: 30px;
  padding: 24px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.btn-mark-complete-end {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-mark-complete-end:hover {
  background: #2563eb;
}

.btn-mark-complete-end:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .lms-course-lesson-container {
    padding: 15px;
  }

  .lms-course-title {
    font-size: 2rem;
  }

  .lms-course-content-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .lms-course-sidebar {
    position: static;
  }

  .topic-header-content {
    flex-direction: column;
    gap: 15px;
  }

  .topic-header-actions {
    margin-left: 0;
    align-self: flex-start;
  }

  .topic-meta {
    flex-wrap: wrap;
  }
}
