/* ============================================================
   AI Academy — E-Learning Platform Styles
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0e1a;
  --bg-card: #141a2a;
  --bg-card-hover: #1a2238;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #f0eef5;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --accent: #8b5cf6;        /* purple */
  --accent2: #06b6d4;       /* cyan */
  --accent3: #f59e0b;       /* amber */
  --success: #10b981;
  --danger: #ef4444;
  --beginner: #10b981;
  --intermediate: #f59e0b;
  --advanced: #ef4444;
}

html, body {
  font-family: 'Inter', 'Segoe UI', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

/* ============================================================
   TOP NAVIGATION BAR
   ============================================================ */
.topnav {
  position: sticky;
  top: 0;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 14px 32px;
}
.topnav .wrap {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topnav .logo {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.topnav .nav-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.topnav .nav-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
}
.topnav .nav-search input::placeholder { color: var(--text-faint); }
.topnav .nav-search input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.09);
}
.topnav .nav-search::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
}
.topnav .nav-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
}
.topnav .nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 4px;
  transition: color 0.15s;
}
.topnav .nav-links a:hover { color: var(--text); }
.topnav .nav-links a.active { color: var(--accent2); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #0a0e1a 0%, #1a103a 50%, #0f2a3a 100%);
  padding: 80px 32px 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.25), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.18), transparent 50%);
  pointer-events: none;
}
.hero .wrap {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.hero h1 {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .tagline {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 700px;
  margin-bottom: 32px;
}
.hero .stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero .stat {
  display: flex;
  flex-direction: column;
}
.hero .stat .num {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent2);
  line-height: 1;
}
.hero .stat .label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px;
}

/* Filters bar */
.filters {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.filter-group .label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-right: 4px;
}
.chip {
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  font-family: inherit;
}
.chip:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.chip.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ============================================================
   COURSE CARDS GRID
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title h2 {
  font-size: 24px;
  font-weight: 800;
}
.section-title a {
  color: var(--accent2);
  text-decoration: none;
  font-size: 14px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.course-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.course-card.coming-soon {
  opacity: 0.65;
  cursor: not-allowed;
}
.course-card.coming-soon:hover { transform: none; }

.course-thumb {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 88px;
}
.course-thumb.gradient-1 { background: linear-gradient(135deg, #ef4444, #f59e0b); }
.course-thumb.gradient-2 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.course-thumb.gradient-3 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.course-thumb.gradient-4 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.course-thumb.gradient-5 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.course-thumb.gradient-6 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.course-thumb.gradient-7 { background: linear-gradient(135deg, #f43f5e, #8b5cf6); }
.course-thumb.gradient-8 { background: linear-gradient(135deg, #14b8a6, #84cc16); }

.course-thumb .badge-coming {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}
.course-thumb .badge-live {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--success);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.course-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-body h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text);
}
.course-body .instructor {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.course-body .description {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.5;
  flex: 1;
}
.course-body .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.course-body .meta-item {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.level-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.level-badge.beginner { background: rgba(16, 185, 129, 0.15); color: var(--beginner); }
.level-badge.intermediate { background: rgba(245, 158, 11, 0.15); color: var(--intermediate); }
.level-badge.advanced { background: rgba(239, 68, 68, 0.15); color: var(--advanced); }

/* ============================================================
   COURSE PAGE — sidebar + content layout
   ============================================================ */
.course-page-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  gap: 0;
}

.course-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.course-sidebar .sidebar-header {
  padding: 0 24px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.course-sidebar .sidebar-header h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}
.course-sidebar .sidebar-header .meta {
  font-size: 12px;
  color: var(--text-dim);
}
.course-sidebar .progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}
.course-sidebar .progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.3s;
}
.course-sidebar .progress-text {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}
.lesson-nav {
  list-style: none;
}
.lesson-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.lesson-nav li a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.lesson-nav li a.active {
  background: rgba(139, 92, 246, 0.12);
  color: var(--text);
  border-left-color: var(--accent);
}
.lesson-nav li a.completed {
  color: var(--text);
}
.lesson-nav .lesson-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.lesson-nav .completed .lesson-num {
  background: var(--success);
  color: #fff;
}
.lesson-nav .active .lesson-num {
  background: var(--accent);
  color: #fff;
}

.course-content {
  padding: 40px 56px 80px;
  min-width: 0;
}
.lesson { scroll-margin-top: 80px; margin-bottom: 80px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.lesson:last-child { border-bottom: none; }

.lesson .lesson-header {
  margin-bottom: 28px;
}
.lesson .lesson-tag {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lesson h2 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.lesson .duration {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--text);
}
.lesson h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--accent2);
}
.lesson p { margin-bottom: 16px; color: var(--text); }
.lesson p:last-child { margin-bottom: 0; }

.lesson ul, .lesson ol {
  margin: 14px 0 18px 24px;
}
.lesson li { margin-bottom: 8px; }

.lesson a { color: var(--accent2); }

.lesson strong { color: #fff; font-weight: 700; }

.lesson code {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent2);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 0.92em;
}
.lesson pre {
  background: #0a0716;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 18px 0;
  overflow-x: auto;
  line-height: 1.6;
  font-size: 13.5px;
}
.lesson pre code {
  background: none;
  color: var(--text);
  padding: 0;
  font-size: inherit;
}

.objectives {
  background: rgba(6, 182, 212, 0.06);
  border-left: 4px solid var(--accent2);
  padding: 16px 22px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0 24px;
}
.objectives strong { color: var(--accent2); }
.objectives ul { margin: 8px 0 0 20px; }
.objectives li { margin-bottom: 4px; color: var(--text); }

.example {
  background: rgba(245, 158, 11, 0.05);
  border-left: 4px solid var(--accent3);
  padding: 16px 22px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
}
.example .ex-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent3);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.exercise {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 20px 24px;
  border-radius: 12px;
  margin: 24px 0;
}
.exercise .ex-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.exercise strong { color: var(--accent); }

.callout {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 16px 22px;
  border-radius: 10px;
  margin: 16px 0;
  font-size: 15px;
}
.callout strong { color: var(--accent2); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}
table.data-table th {
  background: rgba(139, 92, 246, 0.15);
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
}
table.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
table.data-table tr:hover td { background: rgba(255, 255, 255, 0.03); }

.mark-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 24px;
  font-family: inherit;
  transition: all 0.15s;
}
.mark-complete:hover { background: #7c3aed; transform: translateY(-2px); }
.mark-complete.done { background: var(--success); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 32px 32px;
  margin-top: 80px;
  color: var(--text-dim);
  font-size: 13px;
}
footer .wrap {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
footer h4 {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
footer a {
  color: var(--text-dim);
  text-decoration: none;
  display: block;
  padding: 4px 0;
}
footer a:hover { color: var(--accent2); }
footer .copyright {
  max-width: 1400px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: 32px; }
  .hero .tagline { font-size: 16px; }
  .container { padding: 28px 20px; }
  .topnav { padding: 12px 20px; }
  .topnav .nav-search { display: none; }

  .course-page-layout { grid-template-columns: 1fr; }
  .course-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .course-content { padding: 28px 20px 60px; }
  .lesson h2 { font-size: 26px; }

  footer .wrap { grid-template-columns: 1fr 1fr; }
}
