/* ============================================================
   Marquinhos Mentor — Estilos (Dark Premium Theme)
   ============================================================ */

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

:root {
  --bg:          #0b0d10;
  --bg2:         #12151a;
  --bg3:         #181c23;
  --bg4:         #1f242d;
  --bg5:         #272d38;
  --text:        #f1f3f5;
  --text2:       #a8b2bf;
  --text3:       #6b7a8d;
  --accent:      #d4a028;
  --accent2:     #e8b73a;
  --accent-soft: rgba(212,160,40,.12);
  --blue:        #4a90d9;
  --green:       #2ecc71;
  --yellow:      #f1c40f;
  --red:         #e74c3c;
  --border:      #1e2430;
  --border2:     #2a3140;
  --radius:      8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:   0 8px 48px rgba(0,0,0,.6);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:  .2s ease;
  --gradient-hero: linear-gradient(135deg, #0b0d10 0%, #141824 50%, #1a1f2e 100%);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -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: #3a4050; border-radius: 3px; }

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

/* ---- Header ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 72px;
  background: rgba(11,13,16,.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.site-header.scrolled {
  background: rgba(11,13,16,.95);
  border-bottom-color: 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: 36px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-nav { display: flex; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text2); transition: all var(--transition); }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.04); }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: auto; object-fit: contain; }
.logo-badge { background: var(--accent); color: #000; font-weight: 800; font-size: 16px; padding: 4px 10px; border-radius: 6px; letter-spacing: -.5px; }
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: -.5px; color: var(--accent); }

/* User menu */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 14px; transition: all var(--transition);
}
.user-menu-btn:hover { background: rgba(255,255,255,.1); border-color: var(--border2); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e8b73a); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #000;
}
.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: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); min-width: 220px; 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: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 18px; font-size: 14px; color: var(--text2); transition: all .15s; }
.dropdown-item:hover { background: rgba(255,255,255,.04); 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(--accent); color: #000; 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 22px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  transition: all var(--transition); white-space: nowrap; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #000; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(212,160,40,.3); }
.btn-secondary { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: rgba(255,255,255,.14); border-color: var(--text3); }
.btn-outline { border: 2px solid var(--border2); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.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 30px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text2); transition: all var(--transition); }
.btn-icon:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* ---- Alerts ---- */
.alert { padding: 14px 24px; font-size: 14px; font-weight: 500; }
.alert-success { background: rgba(46,204,113,.1); border-bottom: 2px solid var(--green); color: #2ecc71; }
.alert-error { background: rgba(231,76,60,.1); border-bottom: 2px solid var(--red); color: #e74c3c; }

/* ---- Forms ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.form-input {
  padding: 11px 16px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition); outline: none; width: 100%;
  font-family: var(--font);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,160,40,.1); }
.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: var(--red); 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(231,76,60,.15); color: #e74c3c; }
.badge-blue { background: rgba(74,144,217,.15); color: #4a90d9; }
.badge-green { background: rgba(46,204,113,.15); color: #2ecc71; }
.badge-yellow { background: rgba(212,160,40,.15); color: var(--accent2); }
.badge-gray { background: rgba(107,122,141,.15); color: #8a97a8; }

/* ---- Progress bar ---- */
.progress-bar { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); 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,.15); border-top-color: var(--accent); 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; min-height: 92vh; 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(11,13,16,.97) 35%, rgba(11,13,16,.5) 70%, rgba(11,13,16,.3) 100%), linear-gradient(to top, rgba(11,13,16,.9) 0%, transparent 40%); }
.hero-bg-plain { background: var(--gradient-hero); }
.hero-bg-plain::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(212,160,40,.06) 0%, transparent 60%);
}
.hero-content { position: relative; padding: 100px 48px 80px; max-width: 680px; animation: fadeIn .6s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero h1 { font-size: clamp(30px, 4.5vw, 56px); font-weight: 800; line-height: 1.12; margin-bottom: 20px; letter-spacing: -1.5px; }
.hero h1 .highlight { color: var(--accent); }
.hero-desc { font-size: 17px; color: var(--text2); line-height: 1.75; margin-bottom: 28px; }
.hero-meta { display: flex; gap: 24px; margin-bottom: 32px; 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: 5px 16px; border-radius: 100px; font-size: 12px; font-weight: 600; }

/* ---- Carousel ---- */
.carousel-section { margin-bottom: 48px; }
.carousel-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; padding: 0 24px; }
.carousel-wrapper { position: relative; }
.carousel-track { display: flex; gap: 14px; 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(11,13,16,.85); border: 1px solid var(--border2); border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition); color: var(--text);
  backdrop-filter: blur(8px);
}
.carousel-btn:hover { background: rgba(11,13,16,.95); border-color: var(--accent); }
.carousel-btn-left { left: 4px; }
.carousel-btn-right { right: 4px; }

/* ---- Course card ---- */
.course-card {
  flex-shrink: 0; width: 260px; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg3); border: 1px solid var(--border); cursor: pointer;
  transition: all .3s ease; display: block;
}
.course-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,.4); border-color: var(--border2); 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, var(--bg3), var(--bg5)); display: flex; align-items: center; justify-content: center; color: var(--text3); }
.course-card-body { padding: 14px; }
.course-card-cat { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 100px; display: inline-block; margin-bottom: 8px; }
.course-card-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; 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: 15px; font-weight: 700; color: var(--accent); margin-top: 8px; }
.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: 72px 24px; background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; }
.stats-section::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 0%, rgba(212,160,40,.04) 0%, transparent 60%); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; text-align: center; position: relative; }
.stat-num { font-size: 44px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; 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(260px, 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: 7px 16px; 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: .08; }
.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 - 72px); 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: var(--accent-soft); border-left-color: var(--accent); }
.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: 8px; font-size: 14px; color: var(--text2); margin-bottom: 6px; transition: all var(--transition); }
.file-item:hover { background: var(--bg5); 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: 12px; 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; transition: all .2s; }
.enrolled-card:hover { border-color: var(--border2); }
.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, var(--bg3), var(--bg5)); 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: var(--gradient-hero); padding: 24px; position: relative; }
.auth-page::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 30%, rgba(212,160,40,.06) 0%, transparent 60%); }
.auth-card { width: 100%; max-width: 440px; position: relative; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { height: 56px; margin: 0 auto; }
.auth-tabs { display: flex; background: var(--bg4); border-radius: 10px; padding: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; padding: 10px; border-radius: 8px; 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(--accent); }

/* ---- 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: all .25s; }
.blog-card:hover { transform: translateY(-4px); border-color: var(--border2); }
.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, var(--bg3), var(--bg5)); 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(--accent); 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(--accent); padding: 12px 20px; background: var(--accent-soft); 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; transition: all .25s; }
.ebook-card:hover { transform: translateY(-4px); border-color: var(--border2); }
.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, var(--bg3), var(--bg5)); 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,.04); color: var(--text); }
.admin-nav-item.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); 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: all var(--transition); }
.admin-stat-card:hover { transform: translateY(-2px); }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--bg3); border: 1px solid var(--border2); 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: 56px 24px 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo img { height: 36px; }
.footer-desc { font-size: 14px; color: var(--text3); line-height: 1.8; max-width: 340px; margin-bottom: 16px; }
.affiliate-notice { font-size: 12px; color: var(--text3); line-height: 1.7; padding: 12px 16px; background: rgba(255,255,255,.02); border-radius: var(--radius); border: 1px solid var(--border); }
.site-footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 18px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); }
.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(--accent); }
.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; }

/* ---- CTA Section ---- */
.cta-section { padding: 80px 24px; text-align: center; position: relative; }
.cta-section::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 50% 50%, rgba(212,160,40,.06) 0%, transparent 70%); }
.cta-section h2 { font-size: clamp(24px,3vw,36px); font-weight: 800; margin-bottom: 16px; }
.cta-section p { color: var(--text2); font-size: 16px; margin-bottom: 28px; max-width: 500px; margin-inline: auto; }

/* ---- Utilities ---- */
.text-muted { color: var(--text3); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-accent { color: var(--accent); }
.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; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-nav { display: none; }
  .hero { min-height: 70vh; }
  .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; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .course-card { width: 180px; }
  .hero h1 { font-size: 26px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .stat-num { font-size: 32px; }
}
