/* CS Education Platform — LMS Layout */

.course-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
}

/* Sidebar */
.course-sidebar {
  background: #1a1a2e;
  color: #eee;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #2a2a4e;
}

.back-link {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: #fff; }

.module-group { margin-bottom: 1.5rem; }

.module-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}

.lesson-link {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #d1d5db;
  text-decoration: none;
  margin-bottom: 2px;
}
.lesson-link:hover { background: #2a2a4e; color: #fff; }
.lesson-link.active { background: #e94560; color: #fff; font-weight: 600; }

/* Main content */
.lesson-content {
  padding: 2.5rem 3rem;
  max-width: 860px;
}

.lesson-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Bloom badges */
.bloom-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bloom-remember   { background: #dbeafe; color: #1e40af; }
.bloom-understand { background: #d1fae5; color: #065f46; }
.bloom-apply      { background: #fef3c7; color: #92400e; }
.bloom-analyze    { background: #fce7f3; color: #9d174d; }
.bloom-evaluate   { background: #ede9fe; color: #5b21b6; }
.bloom-create     { background: #e0e7ff; color: #3730a3; }

.duration {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Video embed */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.5rem 0 2rem;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Lesson body */
.lesson-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #f3f4f6;
}
.lesson-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}
.lesson-body code {
  background: #f1f5f9;
  color: #dc2626;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
}
.lesson-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Prev/Next nav */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
  transition: all 0.15s;
}
.nav-btn:hover { border-color: #e94560; color: #e94560; }
.nav-next { margin-left: auto; }

/* Responsive */
@media (max-width: 768px) {
  .course-layout { grid-template-columns: 1fr; }
  .course-sidebar { position: static; height: auto; }
  .lesson-content { padding: 1.25rem; }
}

/* Course index */
.course-index { max-width: 860px; margin: 0 auto; padding: 2rem 3rem; }
.module-list { margin-top: 2rem; }
.module-card { margin-bottom: 2rem; padding: 1.5rem; border: 1px solid #e5e7eb; border-radius: 10px; }
.module-card h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.module-card ul { list-style: none; padding: 0; }
.module-card li { margin-bottom: 0.5rem; }
.module-card a { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #374151; padding: 0.4rem 0; }
.module-card a:hover { color: #e94560; }
.prerequisites { margin-top: 2rem; padding: 1rem; background: #fefce8; border-radius: 8px; }
