/* ============================================================
   EduFlix — Estilos principais (Netflix-style dark theme)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a0a;
  --bg2:         #141414;
  --bg3:         #1a1a1a;
  --bg4:         #222222;
  --bg5:         #2a2a2a;
  --text:        #ffffff;
  --text2:       #b3b3b3;
  --text3:       #737373;
  --red:         #e50914;
  --red2:        #f40612;
  --blue:        #3b82f6;
  --green:       #10b981;
  --yellow:      #f59e0b;
  --border:      #2a2a2a;
  --border2:     #333333;
  --radius:      8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --shadow:      0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.7);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:  .2s ease;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* ---- Layout ---- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.header-spacer { height: 64px; }

/* ---- Header ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 64px;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), transparent);
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}
.site-header.scrolled {
  background: rgba(10,10,10,.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 32px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-nav { display: flex; gap: 4px; }
.nav-link { padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--text2); transition: color var(--transition); }
.nav-link:hover { color: var(--text); }

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; }
.logo-badge { background: var(--red); color: #fff; font-weight: 800; font-size: 18px; padding: 3px 10px; border-radius: 4px; letter-spacing: -.5px; }
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: -.5px; }

/* User menu */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; transition: background var(--transition);
}
.user-menu-btn:hover { background: rgba(255,255,255,.15); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.user-name { font-size: 14px; font-weight: 500; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #1e1e1e; border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 200px; box-shadow: var(--shadow-lg);
  overflow: hidden; animation: fadeInDown .15s ease;
}
.user-dropdown.open { display: block; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; color: var(--text2); transition: all .15s; }
.dropdown-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.dropdown-divider { border-top: 1px solid var(--border); }
.dropdown-logout { color: var(--red) !important; }
.notify-btn { position: relative; }
.notify-badge { position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  transition: all var(--transition); white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red2); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(4px); }
.btn-secondary:hover { background: rgba(255,255,255,.25); }
.btn-outline { border: 2px solid var(--border2); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: #fff; }
.btn-ghost { color: var(--text2); }
.btn-ghost:hover { color: var(--text); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { opacity: .9; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text2); transition: all var(--transition); }
.btn-icon:hover { background: rgba(255,255,255,.08); color: var(--text); }

/* ---- Alerts ---- */
.alert { padding: 14px 24px; font-size: 14px; font-weight: 500; }
.alert-success { background: rgba(16,185,129,.15); border-bottom: 2px solid var(--green); color: #34d399; }
.alert-error { background: rgba(229,9,20,.15); border-bottom: 2px solid var(--red); color: #ff4d5a; }

/* ---- Forms ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.form-input {
  padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  transition: border-color var(--transition); outline: none; width: 100%;
  font-family: var(--font);
}
.form-input:focus { border-color: var(--blue); }
.form-input::placeholder { color: var(--text3); }
.form-input-lg { padding: 14px 18px; font-size: 16px; }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { cursor: pointer; appearance: none; }
.form-error { font-size: 13px; color: #ff4d5a; margin-top: 4px; }
.form-help { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ---- Cards ---- */
.card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 15px; }

/* ---- Badge ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.badge-red { background: rgba(229,9,20,.2); color: #ff4d5a; }
.badge-blue { background: rgba(59,130,246,.2); color: #60a5fa; }
.badge-green { background: rgba(16,185,129,.2); color: #34d399; }
.badge-yellow { background: rgba(245,158,11,.2); color: #fbbf24; }
.badge-gray { background: rgba(115,115,115,.2); color: #a3a3a3; }

/* ---- Progress bar ---- */
.progress-bar { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--red); border-radius: 2px; transition: width .3s ease; }
.progress-bar-fill.green { background: var(--green); }

/* ---- Spinner ---- */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loading { min-height: 50vh; display: flex; align-items: center; justify-content: center; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.02); }

/* ---- Hero ---- */
.hero { position: relative; height: 85vh; min-height: 500px; overflow: hidden; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-gradient { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.95) 40%, rgba(0,0,0,.3) 100%), linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 50%); }
.hero-bg-plain { background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%); }
.hero-content { position: relative; padding: 80px 48px 60px; max-width: 640px; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hero h1 { font-size: clamp(28px, 4vw, 52px); font-weight: 800; line-height: 1.15; margin-bottom: 16px; letter-spacing: -1px; }
.hero-desc { font-size: 16px; color: var(--text2); line-height: 1.7; margin-bottom: 24px; }
.hero-meta { display: flex; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.hero-meta-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cat-chip { display: inline-block; margin-bottom: 16px; padding: 4px 14px; border-radius: 100px; font-size: 12px; font-weight: 600; }

/* ---- Carousel ---- */
.carousel-section { margin-bottom: 48px; }
.carousel-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; padding: 0 24px; }
.carousel-wrapper { position: relative; }
.carousel-track { display: flex; gap: 12px; padding: 8px 24px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(0,0,0,.7); border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition); color: var(--text);
  backdrop-filter: blur(4px);
}
.carousel-btn:hover { background: rgba(0,0,0,.9); }
.carousel-btn-left { left: 0; }
.carousel-btn-right { right: 0; }

/* ---- Course card ---- */
.course-card {
  flex-shrink: 0; width: 240px; border-radius: var(--radius); overflow: hidden;
  background: var(--bg3); cursor: pointer; transition: transform .3s ease, box-shadow .3s ease;
  display: block;
}
.course-card:hover { transform: scale(1.05); box-shadow: var(--shadow-lg); z-index: 2; position: relative; }
.course-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg4); }
.course-card-thumb-ph { width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #1a1a2e, #16213e); display: flex; align-items: center; justify-content: center; color: var(--text3); }
.course-card-body { padding: 12px; }
.course-card-cat { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 100px; display: inline-block; margin-bottom: 6px; }
.course-card-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text3); }
.course-card-price { font-size: 14px; font-weight: 700; color: var(--red); margin-top: 6px; }
.course-card-price.free { color: var(--green); }

/* ---- Section header ---- */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 24px; font-weight: 700; }

/* ---- Stats ---- */
.stats-section { padding: 64px 24px; background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; text-align: center; }
.stat-num { font-size: 40px; font-weight: 800; color: var(--red); letter-spacing: -1px; }
.stat-label { font-size: 14px; color: var(--text3); margin-top: 8px; }

/* ---- Courses catalog ---- */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-bar .form-input { max-width: 240px; }
.cat-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-chip-btn { padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 500; border: none; cursor: pointer; transition: all var(--transition); }

/* ---- Course detail ---- */
.course-detail-hero { background: var(--bg2); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.course-detail-hero .bg-blur { position: absolute; inset: 0; z-index: 0; }
.course-detail-hero .bg-blur img { width: 100%; height: 100%; object-fit: cover; opacity: .1; }
.course-detail-hero .bg-overlay { position: absolute; inset: 0; background: linear-gradient(to right, var(--bg2) 40%, transparent); }
.course-detail-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 360px; gap: 48px; padding: 48px 24px; align-items: start; }
.course-purchase-card { padding: 24px; }
.curriculum-accordion { display: flex; flex-direction: column; gap: 8px; }
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; background: var(--bg3); transition: background var(--transition); }
.accordion-header:hover { background: var(--bg4); }
.accordion-body { border-top: 1px solid var(--border); }
.lesson-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.lesson-item:last-child { border-bottom: none; }
.lesson-item:hover { background: rgba(255,255,255,.02); }
.lesson-item a { flex: 1; font-size: 14px; color: var(--text2); transition: color var(--transition); }
.lesson-item a:hover { color: var(--text); }
.lesson-locked { flex: 1; font-size: 14px; color: var(--text3); }
.lesson-dur { font-size: 12px; color: var(--text3); white-space: nowrap; }
.lesson-preview-badge { font-size: 11px; color: var(--green); font-weight: 600; }

/* ---- Video Player / Lesson page ---- */
.lesson-layout { display: flex; height: calc(100vh - 64px); overflow: hidden; }
.lesson-sidebar { width: 300px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
.sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sidebar-module-title { padding: 10px 20px; font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; background: rgba(255,255,255,.02); border-bottom: 1px solid var(--border); }
.sidebar-lesson { display: flex; align-items: center; gap: 10px; padding: 10px 20px; cursor: pointer; border-left: 3px solid transparent; transition: all .15s; }
.sidebar-lesson:hover { background: rgba(255,255,255,.04); }
.sidebar-lesson.active { background: rgba(229,9,20,.1); border-left-color: var(--red); }
.sidebar-lesson-title { flex: 1; font-size: 13px; color: var(--text2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-lesson.active .sidebar-lesson-title { color: var(--text); }
.lesson-main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.video-wrap { background: #000; flex-shrink: 0; }
.video-wrap video { width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.video-wrap iframe { width: 100%; aspect-ratio: 16/9; max-height: 70vh; border: none; display: block; }
.video-placeholder { aspect-ratio: 16/9; max-height: 70vh; display: flex; align-items: center; justify-content: center; background: #111; color: var(--text3); font-size: 14px; }
.lesson-info { padding: 24px 32px; flex: 1; }
.lesson-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lesson-files { margin-top: 20px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg4); border-radius: 6px; font-size: 14px; color: var(--text2); margin-bottom: 6px; transition: all var(--transition); }
.file-item:hover { background: var(--bg3); color: var(--text); }

/* ---- Dashboard ---- */
.dashboard-header { margin-bottom: 40px; }
.dashboard-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 40px; }
.stat-card { padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-val { font-size: 24px; font-weight: 800; }
.stat-lbl { font-size: 12px; color: var(--text3); margin-top: 2px; }
.enrolled-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.enrolled-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.enrolled-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg4); }
.enrolled-card-ph { width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #1a1a2e, #16213e); display: flex; align-items: center; justify-content: center; color: var(--text3); }
.enrolled-card-body { padding: 20px; }

/* ---- Auth ---- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0a 70%); padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-tabs { display: flex; background: var(--bg4); border-radius: 8px; padding: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--text3); cursor: pointer; transition: all var(--transition); text-align: center; background: none; border: none; }
.auth-tab.active { background: var(--bg3); color: var(--text); }

/* ---- Blog ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.blog-card { display: block; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--transition); }
.blog-card:hover { transform: translateY(-4px); }
.blog-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg4); }
.blog-card-ph { width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #1a1a2e, #16213e); display: flex; align-items: center; justify-content: center; color: var(--text3); }
.blog-card-body { padding: 20px; }
.blog-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.blog-card-excerpt { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text3); }
.blog-post-content { font-size: 16px; line-height: 1.9; color: var(--text2); }
.blog-post-content h2 { font-size: 24px; font-weight: 700; color: var(--text); margin: 32px 0 12px; }
.blog-post-content h3 { font-size: 20px; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.blog-post-content p { margin-bottom: 16px; }
.blog-post-content a { color: var(--blue); text-decoration: underline; }
.blog-post-content ul, .blog-post-content ol { padding-left: 24px; margin-bottom: 16px; }
.blog-post-content li { margin-bottom: 8px; }
.blog-post-content blockquote { border-left: 4px solid var(--red); padding: 12px 20px; background: rgba(229,9,20,.05); margin: 20px 0; border-radius: 0 8px 8px 0; }

/* ---- Ebooks ---- */
.ebooks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.ebook-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.ebook-card-thumb { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--bg4); }
.ebook-card-ph { width: 100%; aspect-ratio: 3/4; background: linear-gradient(135deg, #1a1a2e, #16213e); display: flex; align-items: center; justify-content: center; color: var(--text3); }
.ebook-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

/* ---- Admin ---- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; z-index: 100; display: flex; flex-direction: column; }
.admin-sidebar-header { padding: 20px 16px; border-bottom: 1px solid var(--border); }
.admin-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; margin-bottom: 2px; font-size: 14px; font-weight: 400; color: var(--text2); border-left: 3px solid transparent; transition: all .15s; }
.admin-nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.admin-nav-item.active { background: rgba(229,9,20,.1); color: var(--text); border-left-color: var(--red); font-weight: 600; }
.admin-footer-nav { padding: 12px 8px; border-top: 1px solid var(--border); }
.admin-content { margin-left: 240px; flex: 1; padding: 32px; min-height: 100vh; }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-page-title { font-size: 26px; font-weight: 800; }
.admin-page-sub { color: var(--text3); font-size: 14px; margin-top: 4px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 36px; }
.admin-stat-card { padding: 20px; display: flex; align-items: center; gap: 16px; transition: transform var(--transition); }
.admin-stat-card:hover { transform: translateY(-2px); }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: #1e1e1e; border: 1px solid var(--border); border-radius: var(--radius-xl); width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; animation: fadeIn .2s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border); }

/* ---- Footer ---- */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 48px 24px 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-desc { font-size: 14px; color: var(--text3); line-height: 1.7; max-width: 280px; margin-bottom: 12px; }
.affiliate-notice { font-size: 12px; color: var(--text3); line-height: 1.7; }
.site-footer h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a { font-size: 14px; color: var(--text3); transition: color var(--transition); }
.site-footer ul a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 13px; color: var(--text3); }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text3); }
.empty-state svg { margin: 0 auto 16px; opacity: .4; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text2); margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; }

/* ---- Utilities ---- */
.text-muted { color: var(--text3); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .course-detail-grid { grid-template-columns: 1fr; }
  .course-purchase-card-wrap { order: -1; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-nav { display: none; }
  .hero-content { padding: 80px 24px 48px; }
  .lesson-layout { flex-direction: column; height: auto; }
  .lesson-sidebar { width: 100%; height: auto; max-height: 40vh; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
  .lesson-info { padding: 16px; }
}
@media (max-width: 480px) {
  .course-card { width: 160px; }
  .hero h1 { font-size: 24px; }
}
