/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:         #080808;
  --card:       #111111;
  --secondary:  #1A1A1F;
  --muted:      #161616;
  --fg:         #EEEEEE;
  --muted-fg:   #888899;
  --border:     #222228;
  --primary:    #2B5BEE;
  --accent:     #7B49DF;
  --success:    #2EB860;
  --error:      #D92626;
  --r-sm:       8px;
  --r:          12px;
  --r-lg:       16px;
  --r-xl:       24px;
  --grad:       linear-gradient(135deg, #2B5BEE, #7B49DF);
  --grad-acc:   linear-gradient(135deg, #7B49DF, #D94FA0);
  --grad-warm:  linear-gradient(135deg, #D94FA0, #EE831A);
  --font:       'Montserrat', sans-serif;
  --sidebar-w:  260px;
  --nav-h:      108px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea { font-family: var(--font); }
img { display: block; max-width: 100%; }

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

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-bg { background: var(--grad); }
.hidden { display: none !important; }
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,255,255,.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border);
  color: var(--fg); font-size: 13px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--r-xl);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity .25s;
}
.toast.show { opacity: 1; }
.toast.error { border-color: var(--error); color: var(--error); }
.toast.success { border-color: var(--success); color: var(--success); }

/* ── Lucide icons ──────────────────────────────────────────────────────────── */
svg.lucide {
  width: 1em; height: 1em;
  vertical-align: -0.125em;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Top Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; padding: 0 28px;
  background: rgba(8,8,8,.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  gap: 24px;
}
.navbar-logo {
  display: flex; align-items: center; gap: 12px;
}
.navbar-logo img { height: 100px; width: auto; }
.navbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.navbar-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--muted-fg); font-size: 18px;
  position: relative; transition: color .2s, background .2s;
}
.navbar-icon-btn:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.nav-notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #EF4444; border: 1.5px solid var(--bg);
}
.navbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  cursor: pointer; transition: transform .2s;
  border: 2px solid transparent;
}
.navbar-avatar:hover { transform: scale(1.08); }
.logout-btn {
  font-size: 12px; font-weight: 600; color: var(--muted-fg);
  padding: 6px 14px; border-radius: var(--r);
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s;
}
.logout-btn:hover { color: var(--fg); border-color: var(--muted-fg); }

/* ── Page wrapper ──────────────────────────────────────────────────────────── */
.page { padding-top: var(--nav-h); min-height: 100vh; }

/* ══════════════════════════════════════════════════════════════════════════════
   AUTH SCREENS
══════════════════════════════════════════════════════════════════════════════ */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(43,91,238,.18), transparent),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(123,73,223,.12), transparent),
              var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  animation: fadeIn .35s ease both;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { height: 44px; margin: 0 auto 12px; }
.auth-logo h1 {
  font-size: 22px; font-weight: 900; letter-spacing: -.5px;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-logo p { font-size: 13px; color: var(--muted-fg); margin-top: 4px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--muted-fg); letter-spacing: .5px; text-transform: uppercase; }
.form-group input {
  background: var(--secondary); border: 1px solid var(--border);
  color: var(--fg); border-radius: var(--r);
  padding: 12px 14px; font-size: 14px; font-weight: 500;
  transition: border-color .2s;
  outline: none;
}
.form-group input::placeholder { color: var(--muted-fg); }
.form-group input:focus { border-color: var(--primary); }
.form-group input.error { border-color: var(--error); }
.field-error { font-size: 11px; color: var(--error); font-weight: 600; margin-top: 2px; }
.auth-submit {
  margin-top: 8px;
  padding: 14px; border-radius: var(--r);
  background: var(--grad); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .2s, transform .1s;
  min-height: 48px;
}
.auth-submit:hover { opacity: .9; }
.auth-submit:active { transform: scale(.98); }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted-fg); }
.auth-footer a, .auth-link { color: var(--primary); font-weight: 600; cursor: pointer; }
.auth-footer a:hover, .auth-link:hover { text-decoration: underline; }
.auth-divider { text-align: center; margin: 4px 0; font-size: 12px; color: var(--muted-fg); }
.auth-or { display:flex;align-items:center;gap:10px;margin:12px 0 8px;color:var(--muted-fg);font-size:12px }
.auth-or::before,.auth-or::after { content:'';flex:1;height:1px;background:var(--border) }
.google-btn-wrap { display:flex;justify-content:center;min-height:44px;width:100% }
.verify-banner {
  background: rgba(43,91,238,.12); border: 1px solid rgba(43,91,238,.35);
  border-radius: var(--r); padding: 14px 16px;
  font-size: 13px; color: var(--fg); line-height: 1.5;
  margin-bottom: 16px;
}
.verify-banner strong { color: var(--primary); }

/* ══════════════════════════════════════════════════════════════════════════════
   COURSES SCREEN
══════════════════════════════════════════════════════════════════════════════ */
.courses-page { padding-top: 0; margin: 0; }

/* Hero wrap — centralizado, position:relative p/ o badge absoluto */
.hero-wrap {
  position: relative;
  width: calc(100% - 60px);
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero video container */
.hero {
  position: relative;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
  aspect-ratio: 16/9;
  border-radius: 0 0 20px 20px;
}
.hero video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .95;
}
.hero-overlay-left {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,8,15,.55) 0%, transparent 18%, transparent 82%, rgba(16,7,42,.55) 100%);
  pointer-events: none;
}
.hero-overlay-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 18%; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(6,8,15,.7) 100%);
}
.hero-overlay-top { display: none; }
.hero-content { display: none; }

.hero-brand { display: none; }

/* Carousel */
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.12); color: #fff;
  width: 46px; height: 46px; border-radius: 50%;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  padding: 0;
}
.carousel-btn:hover { background: rgba(0,0,0,.72); transform: translateY(-50%) scale(1.08); }
.carousel-btn-prev { left: 14px; }
.carousel-btn-next { right: 14px; }
.carousel-dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; z-index: 10; pointer-events: all;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.38); border: none; cursor: pointer; padding: 0;
  transition: background .25s, width .25s;
}
.carousel-dot.active { background: #fff; width: 24px; }
.carousel-dot:hover:not(.active) { background: rgba(255,255,255,.65); }

/* Section header */
.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.section-bar {
  width: 3px; height: 20px; border-radius: 2px;
  background: var(--grad);
  flex-shrink: 0;
}
.section-bar.accent { background: var(--grad-acc); }
.section-bar.warm { background: var(--grad-warm); }
.section-title {
  font-size: 17px; font-weight: 800; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--fg);
}

/* Courses catalog — mesmo alinhamento do hero-wrap */
.catalog-section {
  width: calc(100% - 60px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0 60px;
}
.courses-row { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 12px; }
.courses-row::-webkit-scrollbar { height: 0; }

/* Course portrait card */
.course-card {
  width: 270px; flex-shrink: 0;
  border-radius: var(--r-lg); overflow: hidden;
  position: relative; cursor: pointer;
  aspect-ratio: .65/1;
  background: linear-gradient(135deg, #1A1A3E, #0D1547);
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover { transform: scale(1.04) translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.course-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.course-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.95) 100%);
}
.course-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 12px 12px;
}
.course-card-info h3 { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.3; }
.course-placeholder-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COURSE DETAIL (modules)
══════════════════════════════════════════════════════════════════════════════ */
.course-detail-page { padding-top: var(--nav-h); }

.course-cover {
  position: relative; width: 100%;
  min-height: 440px; overflow: hidden;
  background: linear-gradient(135deg, #06080F, #10072A);
}
.course-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.course-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(6,8,15,.92) 0%,
    rgba(6,8,15,.75) 40%,
    rgba(6,8,15,.1) 100%);
}
.back-btn {
  position: absolute; top: 24px; left: 52px; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.75); font-size: 14px; font-weight: 600;
  padding: 0; transition: color .2s;
}
.back-btn:hover { color: #fff; }

/* Course info — overlaid on the cover image */
.course-cover-content {
  position: absolute; bottom: 0; left: 0;
  width: 55%; padding: 0 52px 44px;
  z-index: 3;
}
.cover-title {
  font-size: 34px; font-weight: 900; color: #fff;
  line-height: 1.1; margin-bottom: 12px;
  letter-spacing: -.5px;
}
.cover-desc {
  font-size: 13px; color: rgba(255,255,255,.65);
  line-height: 1.6; margin-bottom: 16px;
}
.cover-progress-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 7px;
}
.cover-progress-label { font-size: 12px; color: rgba(255,255,255,.6); font-weight: 600; }
.cover-progress-pct { font-size: 12px; color: var(--primary); font-weight: 800; }
.cover-bar {
  height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.18); overflow: hidden; margin-bottom: 20px;
}
.cover-bar-fill {
  height: 100%; border-radius: 3px; background: var(--primary);
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.cover-stats {
  display: flex; gap: 20px; margin-bottom: 20px;
}
.cover-stat {
  font-size: 12px; color: rgba(255,255,255,.55); font-weight: 500;
}
.cover-stat strong { color: #fff; font-weight: 800; margin-right: 3px; }

/* unused but kept for reference */
.course-info-card { display: none; }
.badge-complete { display: none; }
.course-desc { display: none; }
.progress-row { display: none; }
.progress-bar-track { display: none; }
.progress-bar-fill { }
.course-stats { display: none; }
.stat-item { }
.stat-icon { }
.stat-value { }
.stat-label { }

.modules-list {
  padding: 24px 52px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

/* Module card — portrait grid style */
.module-card {
  border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
  background: transparent;
}
.module-card:hover { transform: scale(1.04) translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.6); }

.module-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #1A1A3E, #0D1547);
}
.module-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.module-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.92) 100%);
}
.module-thumb-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 10px 10px;
  font-size: 11px; font-weight: 700; color: #fff; line-height: 1.25;
}
.module-num-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.65); color: rgba(255,255,255,.8);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
}
.module-count-badge {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.65); color: rgba(255,255,255,.7);
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 5px;
}

/* Module card info row (below thumb) */
.module-card-meta {
  padding: 8px 4px 4px;
}
.module-card-progress-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 5px;
}
.module-card-completed {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--success);
}
.module-card-pct {
  font-size: 11px; font-weight: 700; color: var(--primary);
}
.module-card-bar {
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.1); overflow: hidden; margin-bottom: 6px;
}
.module-card-bar-fill {
  height: 100%; border-radius: 2px; background: var(--primary);
  transition: width .6s ease;
}
.module-card-title {
  font-size: 12px; font-weight: 600; color: var(--fg); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* keep play-circle for player */
.play-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(43,91,238,.6);
  font-size: 22px; color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CLASSES SCREEN
══════════════════════════════════════════════════════════════════════════════ */
.module-header {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, #1A1A3E, #0D1547);
  max-height: 420px;
}
.module-header img { width: 100%; height: 100%; object-fit: cover; }
.module-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 35%, rgba(0,0,0,.85) 100%);
}
.module-header-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0 52px 28px;
}
.module-header-info h2 { font-size: 26px; font-weight: 900; text-shadow: 0 2px 12px rgba(0,0,0,.6); margin-bottom: 10px; }
.module-pills { display: flex; gap: 8px; }
.pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; padding: 4px 10px;
  font-size: 11px; color: rgba(255,255,255,.75); font-weight: 500;
}
.classes-label {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 14px 52px;
}
.classes-label-right { margin-left: auto; font-size: 12px; color: var(--muted-fg); font-weight: 500; }
.classes-list { padding: 16px 52px 80px; display: flex; flex-direction: column; gap: 14px; }

/* Lesson card */
.lesson-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; transition: border-color .2s, transform .15s, box-shadow .2s;
}
.lesson-card:hover:not(.locked) {
  border-color: rgba(43,91,238,.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.lesson-card.locked { opacity: .55; cursor: default; }
.lesson-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, #1A1A3E, #0D1547);
}
.lesson-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lesson-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.65) 100%);
}
.lesson-thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.play-circle-sm {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(43,91,238,.55);
  font-size: 20px; color: #fff;
}
.lesson-duration {
  position: absolute; bottom: 8px; right: 10px;
  background: rgba(0,0,0,.75); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px;
}
.lesson-info { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 16px; }
.lesson-num {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; margin-top: 1px;
  background: rgba(43,91,238,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--primary);
}
.lesson-num.locked { background: rgba(255,255,255,.07); color: var(--muted-fg); }
.lesson-meta h3 { font-size: 14px; font-weight: 600; line-height: 1.35; }

/* ══════════════════════════════════════════════════════════════════════════════
   PLAYER SCREEN
══════════════════════════════════════════════════════════════════════════════ */
.player-page { background: #0a0a0a; }
.player-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}
.player-main {
  display: flex; flex-direction: column;
  background: #0a0a0a; min-width: 0;
  overflow-y: auto; overflow-x: hidden;
}

/* ── Topbar (two-row, like Hotmart) ── */
.player-topbar {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 28px 12px;
  background: #0f0f0f; border-bottom: 1px solid #1c1c1c;
  flex-shrink: 0;
}
.player-topbar-row1 {
  display: flex; align-items: center; justify-content: space-between;
}
.player-back-btn {
  display: flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600;
  background: none; border: none; cursor: pointer; padding: 2px 0;
  transition: color .15s; flex-shrink: 0;
}
.player-back-btn:hover { color: #fff; }
.player-back-btn i { width: 16px; height: 16px; }
.player-topbar-row2 { min-width: 0; }
.player-topbar-mod { font-size: 11px; color: #555; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.player-topbar-cls { font-size: 18px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.player-topbar-nav { display: flex; gap: 8px; flex-shrink: 0; }
.ctrl-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7); cursor: pointer; transition: all .15s;
}
.ctrl-nav-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.ctrl-nav-btn i { width: 16px; height: 16px; }

/* ── Video area (padded, rounded) ── */
.player-video-area {
  padding: 18px 28px 0;
  background: #0a0a0a;
  flex-shrink: 0;
}

/* ── Below video ── */
.player-below { flex-shrink: 0; background: #0a0a0a; }
.player-below-head { padding: 20px 28px 16px; }
.video-wrapper {
  position: relative; aspect-ratio: 16/9; width: 100%; background: #000;
  overflow: hidden; border-radius: 12px; cursor: pointer;
}
.video-wrapper.fullscreen-active {
  position: fixed; inset: 0; z-index: 9000;
  aspect-ratio: unset; width: 100%; height: 100%;
  border-radius: 0;
}
.video-wrapper video {
  width: 100%; height: 100%; display: block; background: #000;
}
/* Controls overlay */
.video-controls {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, transparent 22%, transparent 68%, rgba(0,0,0,.85) 100%);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .22s;
  pointer-events: none;
}
.video-controls.visible { opacity: 1; pointer-events: all; }
.ctrl-top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 0;
}
.ctrl-back-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
  transition: background .2s;
}
.ctrl-back-btn:hover { background: rgba(255,255,255,.22); }
.ctrl-title { flex: 1; min-width: 0; }
.ctrl-title h4 {
  font-size: 14px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctrl-title p {
  font-size: 11px; color: rgba(255,255,255,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctrl-center {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px;
}
.ctrl-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; cursor: pointer;
  border: none; transition: background .2s, transform .1s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.2); }
.ctrl-btn:active { transform: scale(.9); }
.ctrl-play {
  width: 64px; height: 64px;
  background: var(--grad);
  box-shadow: 0 0 28px rgba(43,91,238,.6);
  font-size: 28px;
}
.ctrl-play:hover { opacity: .9; }
.ctrl-bottom { padding: 0 16px 14px; }
.seek-bar-wrap { position: relative; height: 18px; display: flex; align-items: center; margin-bottom: 6px; cursor: pointer; }
.seek-bar-track {
  width: 100%; height: 3px; background: rgba(255,255,255,.25);
  border-radius: 2px; position: relative; overflow: visible;
}
.seek-bar-fill {
  height: 100%; background: var(--primary); border-radius: 2px;
  position: absolute; left: 0; top: 0; transition: width .1s;
}
.seek-bar-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(43,91,238,.5);
  transition: left .1s;
}
.ctrl-row {
  display: flex; align-items: center; justify-content: space-between;
}
.ctrl-time { font-size: 11px; color: #fff; font-weight: 600; }
.ctrl-time span { color: rgba(255,255,255,.45); font-weight: 400; }
.ctrl-fs-btn {
  background: none; border: none; color: #fff; font-size: 22px;
  cursor: pointer; padding: 2px; transition: color .2s;
}
.ctrl-fs-btn:hover { color: var(--primary); }

/* Double-tap flash */
.seek-flash {
  position: absolute; top: 0; bottom: 0; width: 120px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; border-radius: 0;
  font-size: 32px; color: #fff;
}
.seek-flash.left { left: 0; background: linear-gradient(90deg, rgba(43,91,238,.25), transparent); border-radius: 0 50% 50% 0; }
.seek-flash.right { right: 0; background: linear-gradient(270deg, rgba(43,91,238,.25), transparent); border-radius: 50% 0 0 50%; }

/* Buffering spinner in video */
.video-buffering {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* ── Sidebar ── */
.player-sidebar {
  border-left: 1px solid #1a1a1a;
  background: #111;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.sidebar-search-wrap {
  position: relative; padding: 14px 16px;
  border-bottom: 1px solid #1a1a1a;
  background: #111; flex-shrink: 0;
}
.sidebar-search-icon {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  color: var(--muted-fg); width: 16px; height: 16px; pointer-events: none;
}
.sidebar-search-input {
  width: 100%; background: #1a1a1a; border: 1px solid #252525;
  border-radius: var(--r); padding: 10px 14px 10px 38px;
  color: var(--fg); font-size: 14px; outline: none; font-family: var(--font);
}
.sidebar-search-input:focus { border-color: var(--primary); }
#sidebar-modules { flex: 1; }

/* ── Module accordion ── */
.sidebar-module { border-bottom: 1px solid #1a1a1a; }
.sidebar-module-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; cursor: pointer; background: #161616;
  transition: background .15s; user-select: none;
}
.sidebar-module-header:hover { background: #1c1c1c; }
.sidebar-module-title { font-size: 14px; font-weight: 800; color: var(--fg); line-height: 1.3; }
.sidebar-module-sub { font-size: 11px; color: #555; margin-top: 3px; font-weight: 600; letter-spacing: .3px; }
.sidebar-module-chevron { color: #444; flex-shrink: 0; margin-left: auto; }
.sidebar-module-chevron i { width: 18px; height: 18px; }
.sidebar-module.open .sidebar-module-chevron { color: var(--primary); }
.sidebar-module-body { display: none; background: #0f0f0f; }
.sidebar-module.open .sidebar-module-body { display: block; }

/* ── Class item ── */
.sidebar-class-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s;
}
.sidebar-class-item:hover:not(.locked) { background: rgba(255,255,255,.04); }
.sidebar-class-item.active { background: rgba(43,91,238,.15); border-left: 3px solid var(--primary); padding-left: 15px; }
.sidebar-class-item.locked { opacity: .35; cursor: default; }
.sidebar-class-thumb {
  position: relative; width: 100px; flex-shrink: 0;
  aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #1A1A3E;
}
.sidebar-class-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-class-playing {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: #fff;
}
.sidebar-class-playing span { font-size: 9px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; }
.sidebar-class-playing i { width: 16px; height: 16px; }
.sidebar-class-info { flex: 1; min-width: 0; }
.sidebar-class-title {
  font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar-class-dur { font-size: 11px; color: #555; margin-top: 4px; font-weight: 500; }
.sidebar-class-check { flex-shrink: 0; }
.sidebar-class-check.done i { width: 20px; height: 20px; color: #2EB860; }
.sidebar-class-check.locked-icon i { width: 16px; height: 16px; color: var(--muted-fg); }

/* ── Info below video ── */
.info-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.crumb {
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.crumb-primary { background: rgba(43,91,238,.18); color: var(--primary); }
.crumb-muted { background: rgba(255,255,255,.08); color: var(--muted-fg); }
.crumb-arrow { color: var(--muted-fg); font-size: 14px; }
.info-title { font-size: 22px; font-weight: 900; line-height: 1.3; color: var(--fg); margin-top: 4px; }

/* Description — always visible, no toggle */
.desc-section {
  padding: 18px 28px 20px;
  border-top: 1px solid var(--border);
}
.desc-body {
  font-size: 14px; color: var(--muted-fg); line-height: 1.8;
}
.desc-body li { margin-bottom: 6px; padding-left: 4px; }
.desc-body p { margin-bottom: 10px; }

/* Generic section */
.info-section { border-bottom: 1px solid var(--border); }
.info-section-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 28px 12px;
}
.info-section-title { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--fg); }
.info-section-count { margin-left: auto; font-size: 13px; color: var(--muted-fg); font-weight: 700; }

/* Materials */
.materials-row {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 4px 20px 16px;
}
.materials-row::-webkit-scrollbar { height: 0; }
.material-card {
  flex-shrink: 0; width: 96px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: border-color .2s, background .2s;
  text-decoration: none;
}
.material-card:hover { border-color: var(--primary); background: rgba(43,91,238,.08); }
.material-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.comment-menu-btn {
  margin-left: auto; background: none; border: none;
  color: var(--muted-fg); cursor: pointer; font-size: 16px;
  padding: 2px 4px; border-radius: 6px; display: flex;
  transition: color .15s, background .15s;
}
.comment-menu-btn:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.material-name {
  font-size: 11px; font-weight: 600; color: var(--fg);
  text-align: center; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.material-ext { font-size: 10px; color: var(--muted-fg); }
.empty-row {
  margin: 4px 20px 16px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 16px;
  font-size: 13px; color: var(--muted-fg);
}
.empty-row-icon { font-size: 18px; }

/* Related lessons */
.related-row {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 20px; cursor: pointer; transition: background .15s;
  opacity: 1;
}
.related-row.unavailable { opacity: .5; cursor: default; }
.related-row:not(.unavailable):hover { background: rgba(255,255,255,.03); }
.related-thumb {
  width: 120px; height: 68px; border-radius: var(--r-sm);
  flex-shrink: 0; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #1A1A3E, #0D1547);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.play-xs {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}
.related-meta { flex: 1; min-width: 0; }
.related-meta h4 {
  font-size: 12px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-meta p { font-size: 11px; color: var(--muted-fg); margin-top: 3px; }

/* Comments */
.comment-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 28px 14px;
}
.comment-input-wrap { flex: 1; position: relative; }
.comment-input {
  width: 100%; background: rgba(255,255,255,.05); border: none; outline: none;
  border-radius: 20px; padding: 10px 46px 10px 16px;
  font-size: 13px; color: var(--fg); resize: none;
  font-family: var(--font); line-height: 1.5;
}
.comment-input::placeholder { color: var(--muted-fg); }
.comment-send-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--primary); font-size: 16px;
  cursor: pointer; padding: 4px; transition: color .2s;
}
.comment-send-btn:hover { color: var(--accent); }
.comment-row {
  display: flex; gap: 12px; padding: 12px 28px;
}
.uid-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.comment-name { font-size: 12px; font-weight: 700; }
.comment-time { font-size: 11px; color: var(--muted-fg); }
.comment-edited { font-size: 10px; color: var(--muted-fg); font-style: italic; }
.comment-text { font-size: 13px; line-height: 1.55; }
.comment-like {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer; padding: 2px 6px;
  color: var(--muted-fg); transition: color .2s;
}
.comment-like:hover { color: #EF4444; }
.comment-like.liked { color: #EF4444; }
.comment-like-count { font-size: 10px; font-weight: 700; }

/* Comment context menu */
.ctx-menu {
  position: fixed; z-index: 9000;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
  min-width: 160px;
}
.ctx-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.ctx-item:hover { background: rgba(255,255,255,.06); }
.ctx-item.danger { color: #EF4444; }
.ctx-item.primary { color: var(--primary); }

/* Edit comment dialog */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 28px 28px 20px;
  width: 100%; max-width: 460px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
  animation: fadeIn .2s ease both;
}
.modal-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-textarea {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--fg); border-radius: var(--r); padding: 12px 14px;
  font-size: 14px; font-family: var(--font); resize: vertical; min-height: 90px;
  outline: none; transition: border-color .2s;
}
.modal-textarea:focus { border-color: var(--primary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-cancel {
  padding: 9px 18px; border-radius: var(--r); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted-fg); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.modal-cancel:hover { color: var(--fg); }
.modal-save {
  padding: 9px 18px; border-radius: var(--r);
  background: var(--grad); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COACH CHAT
══════════════════════════════════════════════════════════════════════════════ */
.coach-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 5000;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad); border: none; cursor: pointer;
  box-shadow: 0 8px 32px rgba(43,91,238,.55);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
  font-size: 24px; color: #fff;
}
.coach-fab:hover { transform: scale(1.08); box-shadow: 0 12px 40px rgba(43,91,238,.7); }
.coach-fab.open { background: rgba(255,255,255,.1); border: 1px solid var(--border); box-shadow: none; }

.coach-panel {
  position: fixed; bottom: 96px; right: 28px; z-index: 4999;
  width: 440px; height: 620px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: popIn .22s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
.coach-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.2);
}
.coach-header-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.coach-header h3 { font-size: 15px; font-weight: 800; }
.coach-header p { font-size: 11px; color: var(--muted-fg); }
.coach-threads-btn {
  margin-left: auto; padding: 6px 12px; border-radius: var(--r);
  background: rgba(255,255,255,.07); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--muted-fg); cursor: pointer;
  transition: color .2s, background .2s;
}
.coach-threads-btn:hover { color: var(--fg); background: rgba(255,255,255,.1); }
.coach-new-btn {
  padding: 6px 12px; border-radius: var(--r);
  background: var(--grad); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
  border: none;
}

/* Thread list */
.coach-threads {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}
.thread-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.thread-item:hover { background: rgba(255,255,255,.04); }
.thread-item.active { background: rgba(43,91,238,.1); }
.thread-icon { font-size: 18px; color: var(--muted-fg); flex-shrink: 0; }
.thread-info { flex: 1; min-width: 0; }
.thread-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-date { font-size: 11px; color: var(--muted-fg); }
.thread-del {
  background: none; border: none; color: var(--muted-fg);
  font-size: 14px; cursor: pointer; padding: 4px; border-radius: 6px;
  opacity: 0; transition: opacity .15s, color .15s;
}
.thread-item:hover .thread-del { opacity: 1; }
.thread-del:hover { color: #EF4444; }
.threads-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--muted-fg); font-size: 14px;
}
.threads-empty-icon { font-size: 40px; }
.threads-new-btn {
  padding: 10px 20px; border-radius: var(--r);
  background: var(--grad); color: #fff;
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
}

/* Chat messages */
.coach-messages {
  flex: 1; overflow-y: auto;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 14px;
}
.msg-row { display: flex; gap: 10px; }
.msg-row.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  background: var(--grad);
}
.msg-avatar.coach { background: var(--grad); }
.msg-avatar.user-av { background: rgba(43,91,238,.25); color: var(--primary); font-size: 12px; }
.msg-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: var(--r-lg);
  font-size: 13px; line-height: 1.6;
}
.msg-row.user .msg-bubble {
  background: var(--grad); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-row.assistant .msg-bubble {
  background: var(--secondary); color: var(--fg);
  border-bottom-left-radius: 4px; border: 1px solid var(--border);
}
/* Markdown in coach messages */
.msg-bubble strong { font-weight: 700; }
.msg-bubble em { font-style: italic; }
.msg-bubble code {
  background: rgba(255,255,255,.1); border-radius: 4px;
  padding: 1px 5px; font-size: 12px; font-family: monospace;
}
.msg-bubble pre {
  background: rgba(0,0,0,.4); border-radius: var(--r-sm);
  padding: 10px 12px; margin: 8px 0; overflow-x: auto;
}
.msg-bubble pre code { background: none; padding: 0; }
.msg-bubble ul, .msg-bubble ol { padding-left: 18px; margin: 6px 0; }
.msg-bubble li { margin-bottom: 3px; }
.msg-bubble p { margin-bottom: 6px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.typing-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted-fg); margin: 0 2px;
  animation: blink 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.2} 40%{opacity:1} }

/* Coach input */
.coach-input-area {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: flex-end; gap: 10px;
}
.coach-textarea {
  flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--fg); border-radius: var(--r-lg);
  padding: 10px 14px; font-size: 13px; font-family: var(--font);
  resize: none; max-height: 120px; outline: none;
  transition: border-color .2s; line-height: 1.5;
}
.coach-textarea:focus { border-color: var(--primary); }
.coach-textarea::placeholder { color: var(--muted-fg); }
.coach-send {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  transition: opacity .2s;
}
.coach-send:disabled { opacity: .5; cursor: not-allowed; }

/* ── Loading screen ─────────────────────────────────────────────────────────── */
.loading-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
}
.loading-screen p { color: var(--muted-fg); font-size: 14px; }

/* ══════════════════════════════════════════════════════════════════════════════
   USER MENU DROPDOWN
══════════════════════════════════════════════════════════════════════════════ */
.user-menu-wrap { position: relative; }

.nav-user-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s;
  font-size: 14px; font-weight: 800;
  background: none;
  flex-shrink: 0;
}
.nav-user-btn:hover { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(43,91,238,.25); }
.nav-user-btn img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  z-index: 2;
}
.nav-user-initial { position: relative; z-index: 1; }
.nav-user-btn > i { width: 18px; height: 18px; }
.nav-online-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--success); border: 2.5px solid var(--bg);
  z-index: 3;
}

.user-dropdown {
  position: absolute; top: calc(100% + 14px); right: 0;
  min-width: 248px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 28px 70px rgba(0,0,0,.8);
  overflow: hidden;
  z-index: 500;
  opacity: 0; transform: translateY(-10px) scale(.95);
  pointer-events: none;
  transition: opacity .2s cubic-bezier(.4,0,.2,1), transform .2s cubic-bezier(.4,0,.2,1);
}
.user-menu-wrap:hover .user-dropdown {
  opacity: 1; transform: none;
  pointer-events: all;
}

.udrop-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.udrop-av {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  border: 2px solid; position: relative; overflow: hidden;
}
.udrop-av img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; z-index: 2;
}
.udrop-av-initial { position: relative; z-index: 1; }
.udrop-info { flex: 1; min-width: 0; }
.udrop-name {
  font-size: 14px; font-weight: 700; color: var(--fg); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.udrop-email {
  font-size: 11px; color: var(--muted-fg); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.udrop-connected {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--success); margin-top: 5px;
}
.udrop-connected-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
  animation: pulseOnline 2s ease-in-out infinite;
}

.udrop-guest-header {
  padding: 20px 16px 16px; border-bottom: 1px solid var(--border);
  text-align: center;
}
.udrop-guest-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; color: var(--muted-fg);
}
.udrop-guest-icon i { width: 22px; height: 22px; }
.udrop-guest-header h4 { font-size: 14px; font-weight: 700; color: var(--fg); }
.udrop-guest-header p { font-size: 12px; color: var(--muted-fg); margin-top: 4px; }

.udrop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--fg);
  transition: background .15s; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--font);
}
.udrop-item:hover { background: rgba(255,255,255,.05); }
.udrop-item i { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted-fg); }
.udrop-item.danger { color: var(--error); }
.udrop-item.danger i { color: var(--error); }
.udrop-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════════════════════════════════════════════ */
.profile-page { padding-top: var(--nav-h); min-height: 100vh; }

.profile-page-header {
  position: sticky; top: var(--nav-h); z-index: 50;
  padding: 14px 28px;
  background: rgba(8,8,8,.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
.profile-back-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg); cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.profile-back-btn:hover { background: rgba(255,255,255,.12); }
.profile-back-btn i { width: 18px; height: 18px; }
.profile-page-title {
  font-size: 18px; font-weight: 900; letter-spacing: .5px;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.profile-inner {
  max-width: 560px; margin: 0 auto; padding: 40px 28px 100px;
}

.profile-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; margin-bottom: 36px;
}
.profile-av-wrap { position: relative; width: 92px; height: 92px; margin-bottom: 16px; }
.profile-av {
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 800; overflow: hidden;
  border: 3px solid; position: relative;
}
.profile-av img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; z-index: 2;
}
.profile-av-initial { position: relative; z-index: 1; }
.profile-av-online {
  position: absolute; bottom: 2px; right: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); border: 3px solid var(--bg);
}
.profile-name {
  font-size: 22px; font-weight: 900; letter-spacing: -.5px; color: var(--fg);
}
.profile-email { font-size: 13px; color: var(--muted-fg); margin-top: 4px; }
.profile-status {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--success);
}
.profile-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
  animation: pulseOnline 2s ease-in-out infinite;
}
@keyframes pulseOnline {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 28px;
}
.profile-stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: border-color .2s;
}
.profile-stat-card:hover { border-color: rgba(43,91,238,.35); }
.profile-stat-card i { width: 22px; height: 22px; }
.profile-stat-val {
  font-size: 22px; font-weight: 900; line-height: 1;
}
.profile-stat-lbl { font-size: 11px; color: var(--muted-fg); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

.profile-menu { display: flex; flex-direction: column; gap: 10px; }
.profile-menu-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 15px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: border-color .2s, transform .1s, box-shadow .2s;
  font-size: 14px; font-weight: 600; color: var(--fg);
}
.profile-menu-item:hover {
  border-color: rgba(43,91,238,.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.profile-menu-item i { width: 20px; height: 20px; flex-shrink: 0; }
.profile-menu-chevron { margin-left: auto; color: var(--muted-fg); display: flex; }
.profile-menu-chevron i { width: 16px; height: 16px; }
.profile-menu-item.danger { color: var(--error); border-color: rgba(217,38,38,.25); }
.profile-menu-item.danger:hover { border-color: rgba(217,38,38,.55); transform: none; box-shadow: none; }
.profile-section-label {
  font-size: 11px; font-weight: 700; color: var(--muted-fg);
  letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 4px; padding: 0 4px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { display: none; }
}
@media (max-width: 900px) {
  .catalog-section, .modules-list, .classes-list { padding-left: 24px; padding-right: 24px; }
  .module-header-info, .classes-label { padding-left: 24px; padding-right: 24px; }
  .course-info-card { padding-left: 24px; padding-right: 24px; }
  .hero-content { left: 24px; }
  .hero-content h2 { font-size: 28px; }
  .coach-panel { width: calc(100vw - 40px); right: 20px; bottom: 88px; }
  .modules-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
@media (max-width: 600px) {
  .hero-content h2 { font-size: 22px; }
  .navbar { padding: 0 16px; }
  .catalog-section, .modules-list, .classes-list { padding-left: 16px; padding-right: 16px; }
  .module-header-info, .classes-label { padding-left: 16px; padding-right: 16px; }
  .course-info-card { padding: 16px; }
  .coach-panel { right: 12px; bottom: 82px; height: 75vh; }
  .coach-fab { right: 16px; bottom: 16px; }
  .modules-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .course-card { width: 170px; }

  /* Profile + dropdown responsive */
  .profile-page-header { padding: 14px 16px; }
  .profile-inner { padding: 24px 16px 80px; }
  .profile-stats { gap: 8px; }
  .profile-stat-card { padding: 14px 8px; }
  .profile-stat-val { font-size: 18px; }
  .user-dropdown { min-width: 220px; }
}
