:root {
  --study-primary: #6d28d9;
  --study-primary-dark: #5b21b6;
  --study-primary-light: #8b5cf6;
  --study-accent: #f59e0b;
  --study-bg: #f8fafc;
}

body {
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--study-bg);
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

.study-navbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.study-brand {
  font-weight: 700;
  color: #102a43;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
}

.study-brand-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: 180px;
  object-fit: contain;
}

.study-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--study-primary), var(--study-primary-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.study-nav-link {
  color: #475569;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}

.study-nav-link:hover,
.study-nav-link.active {
  color: var(--study-primary);
  background: #ede9fe;
}

.hero {
  background: linear-gradient(135deg, #4c1d95 0%, var(--study-primary) 55%, var(--study-primary-light) 100%);
  color: #fff;
  padding: 4.5rem 0;
}

.hero h1 {
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
}

.btn-study {
  background: var(--study-primary);
  border-color: var(--study-primary);
  color: #fff;
  font-weight: 600;
}

.btn-study:hover {
  background: var(--study-primary-dark);
  border-color: var(--study-primary-dark);
  color: #fff;
}

.btn-study-outline {
  border: 1.5px solid var(--study-primary);
  color: var(--study-primary);
  font-weight: 600;
  background: #fff;
}

.btn-study-outline:hover {
  background: var(--study-primary);
  color: #fff;
}

.course-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.12);
}

.course-thumb {
  height: 170px;
  background: linear-gradient(135deg, #7c3aed, #c084fc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-price {
  font-weight: 700;
  color: var(--study-primary);
}

.course-card:hover .course-price {
  color: var(--study-primary-dark);
}

.study-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: auto;
  flex-shrink: 0;
}

.study-auth-card {
  max-width: 460px;
  margin: 3rem auto;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(30, 41, 59, 0.06);
}

.study-auth-hero {
  background: linear-gradient(135deg, var(--study-primary), var(--study-primary-light));
  color: #fff;
  padding: 1.2rem;
  text-align: center;
  border-radius: 15px 15px 0 0;
}

.study-auth-body {
  padding: 1.6rem;
}

.lesson-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  color: #334155;
  font-weight: 500;
}

.lesson-nav-item:hover {
  background: #f1f5f9;
}

.lesson-nav-item.active {
  background: #ede9fe;
  color: var(--study-primary);
}

.lesson-nav-item .badge-free {
  font-size: 0.65rem;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

.lesson-nav-group {
  padding: 0.15rem 0;
}

.lesson-nav-group.current > .lesson-nav-item {
  background: #ede9fe;
  color: var(--study-primary);
}

.lesson-docs {
  margin: 0.1rem 0 0.4rem 1.85rem;
  padding-left: 0.6rem;
  border-left: 2px solid #e9d5ff;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.lesson-doc-row {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.lesson-doc-row .lesson-doc {
  flex-grow: 1;
  min-width: 0;
}

.lesson-doc-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  color: var(--study-primary);
  font-size: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.lesson-doc-dl:hover {
  background: #ede9fe;
  color: var(--study-primary-dark);
}

.lesson-doc {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  color: #64748b;
  font-size: 0.82rem;
}

.lesson-doc:hover {
  background: #f1f5f9;
  color: #334155;
}

.lesson-doc.current {
  color: var(--study-primary);
  font-weight: 500;
}

.lesson-doc .bi {
  flex-shrink: 0;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
}

.player-shell iframe,
.player-shell video {
  width: 100%;
  height: 100%;
  border: 0;
}

.progress-ring-done {
  color: #22c55e;
}

.status-chip {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.status-pending { background: #fef3c7; color: #b45309; }
.status-active { background: #dcfce7; color: #15803d; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.stat-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 1.1rem 1.25rem;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--study-primary);
}
