/* ======================
   GLOBAL RESET & BASE STYLES
====================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f4f6fb;
  color: #111827;
  line-height: 1.5;
}

/* ======================
   APP LAYOUT STRUCTURE
====================== */

.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ======================
   SIDEBAR COMPONENT
====================== */

.sidebar {
  width: 240px;
  min-width: 240px;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #ffffff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.brand {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-circle {
  width: 56px;
  height: 56px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand small {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  color: #cbd5f5;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar nav a.active {
  background: #1f2937;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ======================
   MAIN CONTENT AREA
====================== */

.content {
  flex: 1;
  padding: 24px 32px;
  background: #f4f6fb;
  overflow-y: auto;
}

/* ======================
   CARD COMPONENT
====================== */

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* ======================
   BUTTON COMPONENTS
====================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 8px;
  min-height: 44px;
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.btn.secondary {
  background: #111827;
}

.btn.secondary:hover {
  background: #000000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ======================
   PROGRESS BAR
====================== */

.progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 10px;
  position: relative;
}

.progress span {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%);
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* ======================
   COURSE PAGE LAYOUT
====================== */

.course-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.course-hero {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  padding: 40px;
  border-radius: 20px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.course-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.course-hero h1 {
  font-size: 32px;
  margin: 0 0 12px;
  font-weight: 800;
  line-height: 1.2;
}

.course-hero p {
  font-size: 15px;
  opacity: 0.95;
  max-width: 720px;
  margin-bottom: 0;
}

.course-cta {
  margin-top: 28px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ======================
   COURSE BODY GRID
====================== */

.course-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ======================
   LESSON CARD COMPONENT
====================== */

.lesson-card {
  background: #ffffff;
  padding: 20px 24px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.lesson-title {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
}

.lesson-meta {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 12px;
}

.locked {
  color: #dc2626;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ======================
   COURSE INFO CARD
====================== */

.course-info {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 24px;
}

.course-info h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.course-info p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ======================
   GRID SYSTEM
====================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

/* ======================
   RESPONSIVE DESIGN
====================== */

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  
  .content {
    padding: 20px;
    width: 100%;
  }
  
  .course-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .course-hero {
    padding: 28px 24px;
  }
  
  .course-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .course-hero h1 {
    font-size: 26px;
  }
  
  .card {
    padding: 20px;
  }
  
  .lesson-card {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .lesson-meta {
    width: 100%;
    justify-content: space-between;
  }
}