/* ===================================
   Encrypted Course Platform
   Design System & Global Styles
   =================================== */

/* --- Font Face --- */
@font-face {
  font-family: 'YekanBakh';
  src: url('../assets/fonts/YekanBakhFaNum-VF.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  /* Colors - Dark Theme (Stone & Gold Redesign) */
  --bg-primary: #0C0A09;
  /* --color-bg-dark */
  --bg-secondary: #292524;
  /* --color-primary */
  --bg-tertiary: #1C1917;
  /* --color-secondary */
  --bg-card: #1C1917;
  /* --color-secondary */
  --bg-card-hover: #292524;
  /* --color-primary */
  --bg-glass: rgba(68, 64, 59, 0.2);
  /* --color-border-light transparency */
  --bg-glass-hover: rgba(68, 64, 59, 0.4);

  /* Accent Colors */
  --accent-purple: #FFBE00;
  /* map accent color to gold */
  --accent-purple-light: #FFBE00;
  --accent-purple-dark: #cc9800;
  --accent-cyan: #FFBE00;
  /* map cyan to gold for a consistent gold/amber scheme */
  --accent-cyan-light: #FFD254;
  --accent-cyan-dark: #b38500;
  --accent-gradient: linear-gradient(135deg, #FFBE00, #FFD254);
  --accent-gradient-text: linear-gradient(135deg, #FFBE00, #FFD254);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #6b6b6b;
  --text-accent: #FFBE00;

  /* Borders */
  --border-subtle: #44403B;
  /* --color-border-light */
  --border-accent: rgba(255, 190, 0, 0.4);
  --border-glow: rgba(255, 190, 0, 0.25);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(255, 190, 0, 0.15);
  --shadow-glow-cyan: 0 0 30px rgba(255, 190, 0, 0.1);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;

  /* ─── NEW DESIGN SYSTEM TOKENS ─── */
  --color-bg-dark: #0C0A09;
  --color-primary: #292524;
  --color-secondary: #1C1917;
  --color-accent: #FFBE00;
  --color-border-light: #44403B;

  /* Text */
  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-text-muted: #6b6b6b;
  --color-text-on-accent: #0C0A09;

  /* Semantic */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Typography */
  --font-primary: "YekanBakh", sans-serif;
  --font-latin-display: "Anton", "Impact", sans-serif;
  --font-mono: "Fira Code", monospace;

  --text-hero: 2.5rem;
  /* 40px */
  --text-h1: 2rem;
  /* 32px */
  --text-h2: 1.5rem;
  /* 24px */
  --text-h3: 1.25rem;
  /* 20px */
  --text-body-lg: 1rem;
  /* 16px */
  --text-body: 0.875rem;
  /* 14px */
  --text-small: 0.75rem;
  /* 12px */
  --text-label: 0.75rem;
  /* 12px */

  /* Border Radius */
  --radius-card: 32px;
  --radius-button: 20px;

  /* Borders */
  --border-card-top: 2px solid var(--color-border-light);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 8px 40px rgba(255, 190, 0, 0.15);
  --shadow-button-hover: 0 0 40px rgba(255, 255, 255, 0.5);
  --glow-accent: 0 0 20px rgba(255, 190, 0, 0.25);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --container-max-width: 1200px;
  --container-padding-x: 24px;
  --section-padding-y: 80px;
  --grid-gap: 24px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'YekanBakh', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-purple-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Background Effects --- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--purple {
  background: var(--accent-purple);
  top: -100px;
  right: -100px;
}

.bg-glow--cyan {
  background: var(--accent-cyan);
  bottom: -100px;
  left: -100px;
}

/* ===================================
   NAVBAR
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(7, 7, 13, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-base);
}

.navbar.scrolled {
  padding: var(--space-sm) 0;
  background: rgba(7, 7, 13, 0.95);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.3rem;
  font-weight: 700;
}

.navbar__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: var(--transition-base);
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--outline {
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  background: var(--bg-glass);
}

.btn--outline:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-purple-light);
}

.btn--ghost {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn--ghost:hover {
  color: var(--text-primary);
}

.btn--lg {
  padding: 0.85rem 2.2rem;
  font-size: 1rem;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 120px;

}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-accent);
  background: var(--bg-glass);
  font-size: 0.85rem;
  color: var(--accent-purple-light);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease-out;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero__title-gradient {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  margin-top: var(--space-4xl);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ===================================
   SECTIONS - General
   =================================== */
.section {
  padding: var(--space-4xl) 0;
  position: relative;
  z-index: 2;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ===================================
   LOGIN PAGE
   =================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1001;
}

.login-card__back {
  position: absolute;
  top: 24px;
  left: 24px;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.25s ease;
  z-index: 10;
}

.login-card__back:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-accent);
  transform: translateX(-3px);
}

.login-card__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.login-card__logo {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto var(--space-lg);
}

.login-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.login-card__subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Form --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition-base);
  direction: ltr;
  text-align: right;
}

.form-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8rem;
  color: #f87171;
  margin-top: var(--space-xs);
  display: none;
}

.form-error.show {
  display: block;
}

.login-card .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

/* ===================================
   DASHBOARD / COURSE PAGE
   =================================== */
.dashboard {
  padding-top: 100px;
  min-height: 100vh;
}

.dashboard .container {
  padding-block: 80px;
}

.dashboard__header {
  margin-bottom: var(--space-3xl);
}

.dashboard__welcome {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.dashboard__title {
  font-size: 1.8rem;
  font-weight: 800;
}

/* --- Course Tree / Accordion --- */
.course-tree {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.course-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
}

.course-section:hover {
  border-color: var(--border-accent);
}

.course-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  transition: var(--transition-base);
  user-select: none;

  @media (width < 768px) {
    padding: 20px;
  }
}

.course-section__header:hover {
  background: var(--bg-glass-hover);
}

.course-section__info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.course-section__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.course-section__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.course-section__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.course-section__toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  transition: var(--transition-base);
  flex-shrink: 0;
}

.course-section__toggle svg {
  width: 18px;
  height: 18px;
  transition: var(--transition-base);
  color: var(--text-muted);
}

.course-section.open .course-section__toggle svg {
  transform: rotate(180deg);
  color: var(--accent-purple-light);
}

.course-section__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-section.open .course-section__body {
  max-height: 2000px;
}

.course-section__content {
  padding: var(--space-md) var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;

  @media (width < 768px) {
    padding: 20px;
  }
}

/* --- Sub-sections --- */
.sub-section {
  border: 1px solid var(--color-border-light) !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-primary) !important;
}

.sub-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: var(--transition-base);

  @media (width < 768px) {
    padding: 12px;
  }
}

.sub-section__header:hover {
  background: var(--bg-glass-hover);
}

.sub-section__info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sub-section__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 190, 0, 0.15) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--color-accent) !important;
}

.sub-section__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.sub-section__toggle {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.sub-section__toggle svg {
  width: 16px;
  height: 16px;
  transition: var(--transition-base);
  color: var(--text-muted);
}

.sub-section.open .sub-section__toggle svg {
  transform: rotate(180deg);
  color: var(--accent-purple-light);
}

.sub-section__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-section.open .sub-section__body {
  max-height: 1000px;
}

.sub-section__content {
  padding: 12px var(--space-lg) var(--space-md);

  @media (width < 768px) {
    padding: 12px 4px;
  }
}

/* --- Lessons --- */
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  border: 1px solid transparent;
}

.lesson-item:hover {
  background: var(--bg-glass-hover);
}

.lesson-item.active {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-accent);
}

.lesson-item__number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition-base);
}

.lesson-item:hover .lesson-item__number {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple-light);
  border-color: var(--border-accent);
}

.lesson-item__info {
  flex: 1;
}

.lesson-item__title {
  font-size: 0.9rem;
  font-weight: 500;
}

.lesson-item__duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lesson-item__play {
  width: 36px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}


.lesson-item__play svg {
  width: 14px;
  height: 14px;
  fill: var(--bg-secondary);
  margin-right: -2px;
}

/* --- Lesson Actions (Download & Play) --- */
.lesson-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 10;
}

.lesson-download-btn {
  width: 36px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--accent-cyan-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  cursor: pointer;
}

.lesson-download-btn:hover {
  background: var(--accent-cyan);
  color: var(--bg-secondary);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.lesson-download-icon {
  width: 14px;
  height: 14px;
}

/* ===================================
   VIDEO PLAYER PAGE
   =================================== */
.player-page {
  padding-top: 80px;
  min-height: 100vh;
}

.player-page .container {
  padding-block: 40px;
}

.player-page .player-navigation {
  align-items: center;
}

.player-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  z-index: 2;
  position: relative;
}

.player-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  grid-column: 2;

}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-info {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.player-info__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.player-info__meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.player-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: fit-content;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  position: sticky;
  grid-column: 1;
  order: -1;
  padding: 0;
}

.player-sidebar__header {
  padding: 16px 16px 12px 16px;
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.player-sidebar__list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

/* Custom Scrollbar for Player Sidebar List */
.player-sidebar__list::-webkit-scrollbar {
  width: 5px;
}

.player-sidebar__list::-webkit-scrollbar-track {
  background: transparent;
}

.player-sidebar__list::-webkit-scrollbar-thumb {
  background: rgba(255, 190, 0, 0.25);
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}

.player-sidebar__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 190, 0, 0.6);
}

/* ===================================
   ADMIN PANEL
   =================================== */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table th {
  background: var(--bg-tertiary);
  padding: var(--space-md) var(--space-lg);
  text-align: right;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-glass-hover);
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge--inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transform: translateY(20px) scale(0.95);
  transition: var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.modal__title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  transition: var(--transition-base);
}

.modal__close:hover {
  background: var(--bg-glass-hover);
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
.toast-container {
  position: fixed;
  top: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  animation: toastIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.toast--success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.toast--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ===================================
   USER MENU (Navbar)
   =================================== */
.user-menu {
  position: relative;
}

.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-base);
  cursor: pointer;
}

.user-menu__trigger:hover {
  border-color: var(--border-accent);
}

.user-menu__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-menu__name {
  font-size: 0.85rem;
  font-weight: 500;
  flex-shrink: 0;
}

.user-menu__trigger svg {
  width: 24px;
  aspect-ratio: 1;
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-base);
}

.user-menu__dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  transition: var(--transition-base);
  cursor: pointer;
}

.user-menu__dropdown-item:hover {
  background: var(--bg-glass-hover);
}

.user-menu__dropdown-item--danger {
  color: #f87171;
}

/* ===================================
   LOADING & SPINNER
   =================================== */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  transition: opacity 0.4s ease;
}

.loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ===================================
   RESPONSIVE
   =================================== */
/* Sidebar mobile backdrop overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2499;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1024px) {
  .player-layout {
    grid-template-columns: 1fr;
  }

  .player-main,
  .player-sidebar {
    grid-column: auto;
  }

  .player-sidebar {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 2500 !important;
    transform: translateX(100%);
    transition: transform var(--transition-base) !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-lg) !important;
    margin: 0 !important;
  }

  .player-sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-toggle-btn {
    display: inline-flex !important;
  }

  .sidebar-close-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  /* Hide skip buttons in player controls on mobile */
  #skipBackBtn,
  #skipForwardBtn {
    display: none !important;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__stats {
    gap: var(--space-xl);
  }

  .hero__stat-value {
    font-size: 1.5rem;
  }

  .navbar__logo {
    font-size: 1.1rem;
  }

  .section__title {
    font-size: 1.5rem;
  }

  .login-card {
    margin: var(--space-md);
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .admin-table {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   DESIGN SYSTEM REDESIGN & COMPONENTS
   ========================================================================== */

/* Load Anton font for display */
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
  direction: rtl;
}

/* Button overrides and new design system components */
.btn-primary,
.btn--primary {
  background-color: var(--color-accent) !important;
  background: var(--color-accent) !important;
  color: var(--color-text-on-accent) !important;
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  font-size: var(--text-body-lg) !important;
  padding: 16px 28px !important;
  border-radius: var(--radius-button) !important;
  border: none !important;
  cursor: pointer !important;
  transition: box-shadow 0.25s ease, color 0.25s ease, transform 0.25s ease !important;
  box-shadow: var(--shadow-sm) !important;
}

.navbar .btn--primary {
  padding: 12px 28px !important;
}

.btn-primary:hover,
.btn--primary:hover {
  background: var(--color-text-primary) !important;
  color: var(--color-text-on-accent) !important;
  box-shadow: var(--shadow-button-hover) !important;
  transform: translateY(-2px) !important;
}

.btn-secondary,
.btn--outline {
  background-color: transparent !important;
  color: var(--color-accent) !important;
  border: 2px solid var(--color-accent) !important;
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
  padding: 16px 28px !important;
  border-radius: var(--radius-button) !important;
  cursor: pointer !important;
  transition: box-shadow 0.25s ease, color 0.25s ease, transform 0.25s ease !important;
}

.btn-secondary:hover,
.btn--outline:hover {
  color: #F2F2F2 !important;
  /* box-shadow: var(--shadow-button-hover) !important; */
  background-color: rgba(255, 190, 0, 0.1) !important;
  transform: translateY(-2px) !important;
}

/* Base Card from Design System */
.card {
  background-color: var(--color-secondary) !important;
  border-top: var(--border-card-top) !important;
  border-radius: var(--radius-card) !important;
  padding: var(--space-6) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--space-4) !important;
  transition: box-shadow 0.25s ease !important;
  border: none !important;
}

.card:hover {
  box-shadow: var(--shadow-card-hover) !important;
}

/* Course Card Component */
.course-card {
  background-color: var(--color-secondary) !important;
  border-top: var(--border-card-top) !important;
  border-radius: var(--radius-card) !important;
  padding: var(--space-6) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--space-4) !important;
  transition: box-shadow 0.25s ease !important;
}

.course-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
}

.course-card__badge {
  background: var(--color-accent) !important;
  color: var(--color-text-on-accent) !important;
  font-size: var(--text-label) !important;
  font-weight: 700 !important;
  padding: 4px 12px !important;
  border-radius: var(--radius-full) !important;
  width: fit-content !important;
}

.course-card__title {
  font-size: var(--text-h3) !important;
  color: var(--color-text-primary) !important;
  font-weight: 700 !important;
}

.course-card__meta {
  color: var(--color-text-secondary) !important;
  font-size: var(--text-body) !important;
}

.course-card__price {
  color: var(--color-accent) !important;
  font-size: var(--text-h3) !important;
  font-weight: 700 !important;
}

/* VIP Step List Component */
.vip-step {
  display: flex !important;
  align-items: center !important;
  background-color: var(--color-secondary) !important;
  border-top: var(--border-card-top) !important;
  border-radius: var(--radius-card) !important;
  padding: var(--space-4) var(--space-6) !important;
  gap: var(--space-5) !important;
  transition: box-shadow 0.25s ease !important;
}

.vip-step:hover {
  box-shadow: var(--shadow-card-hover) !important;
}

.vip-step__number {
  background: var(--color-accent) !important;
  color: var(--color-text-on-accent) !important;
  font-weight: 900 !important;
  font-size: var(--text-h2) !important;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.vip-step__content {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--space-1) !important;
}

.vip-step__title {
  color: var(--color-text-primary) !important;
  font-weight: 700 !important;
  font-size: var(--text-body-lg) !important;
}

.vip-step__description {
  color: var(--color-text-secondary) !important;
  font-size: var(--text-body) !important;
}

/* Section Header (Latin + Persian) */
.section-header {
  text-align: center !important;
  margin-bottom: var(--space-12) !important;
}

.section-header__latin {
  font-family: var(--font-latin-display) !important;
  font-size: 3.5rem !important;
  color: var(--color-accent) !important;
  display: block !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  opacity: 0.8 !important;
  line-height: 1 !important;
}

.section-header__persian {
  font-family: var(--font-primary) !important;
  font-size: var(--text-h2) !important;
  color: var(--color-text-primary) !important;
  margin-top: -5px !important;
}

/* Theme adaptation for existing layouts */
.login-card {
  background: var(--color-secondary) !important;
  border-top: var(--border-card-top) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  transition: box-shadow 0.25s ease !important;
}

.login-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
}

.course-section {
  background: var(--color-secondary) !important;
  border-top: var(--border-card-top) !important;
  border-radius: var(--radius-card) !important;
  border: none;
  border-top: 2px solid var(--border-subtle);
  z-index: 3;
  position: relative;
}

.player-info,
.player-sidebar,
.admin-table {
  background: var(--color-secondary) !important;
  border: none !important;
  border-top: 2px solid var(--border-subtle) !important;
  border-radius: var(--radius-card) !important;
  z-index: 3 !important;
  position: relative;
}

/* Form input elements */
.form-input {
  background: var(--color-primary) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: var(--radius-md) !important;
  color: var(--color-text-primary) !important;
  padding: 12px 16px !important;
}

.form-input:focus {
  border-color: var(--color-accent) !important;
  box-shadow: var(--glow-accent) !important;
}

/* ===================================
   📈 USER WATCH PROGRESS & GAMIFICATION
   =================================== */

.progress-card {
  background: var(--color-secondary) !important;
  border-top: var(--border-card-top) !important;
  border-radius: var(--radius-card) !important;
  padding: var(--space-6) !important;
  box-shadow: var(--shadow-card) !important;
  transition: box-shadow var(--transition-base) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--space-4) !important;
  position: relative;
  z-index: 2;
}

.progress-card__info {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: var(--space-2) !important;
}

.progress-card__stats {
  display: flex !important;
  align-items: center !important;
  gap: var(--space-3) !important;
}

.progress-card__percentage {
  font-size: 2.2rem !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, var(--color-accent), #FFD254) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  line-height: 1 !important;
}

.progress-card__text {
  font-size: var(--text-body-lg) !important;
  font-weight: 700 !important;
  color: var(--color-text-primary) !important;
}

.progress-card__fraction {
  font-size: var(--text-body) !important;
  color: var(--color-text-secondary) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  padding: var(--space-1) var(--space-3) !important;
  border-radius: var(--radius-full) !important;
  border: 1px solid var(--color-border-light) !important;
}

.progress-card__bar-wrapper {
  width: 100% !important;
  height: 12px !important;
  background: var(--color-primary) !important;
  border-radius: var(--radius-full) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.progress-card__bar {
  height: 100% !important;
  background: linear-gradient(90deg, #FFD254, var(--color-accent)) !important;
  border-radius: var(--radius-full) !important;
  box-shadow: var(--glow-accent) !important;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.progress-card__motivation {
  font-size: var(--text-body) !important;
  color: var(--color-text-secondary) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding-top: var(--space-3) !important;
  display: flex !important;
  align-items: center !important;
  gap: var(--space-2) !important;
}

/* Conic gradient progress circle in sections */
.section-progress-circle {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: var(--color-text-primary) !important;
  position: relative !important;
  transition: transform var(--transition-base) !important;
  box-shadow: var(--shadow-sm) !important;
}

.section-progress-circle:hover {
  transform: scale(1.05) !important;
}

.section-progress-circle__text {
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  color: var(--color-success) !important;
}

/* Lesson check icon */
.lesson-check-icon {
  width: 16px !important;
  height: 16px !important;
  color: var(--color-success) !important;
  stroke-width: 3.5 !important;
  animation: checkPopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both !important;
}

@keyframes checkPopIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Completed lesson styling */
.lesson-item.completed {
  border-color: rgba(34, 197, 94, 0.2) !important;
  background: rgba(34, 197, 94, 0.02) !important;
}

.lesson-item.completed:hover {
  border-color: rgba(34, 197, 94, 0.4) !important;
  background: rgba(34, 197, 94, 0.05) !important;
}

.lesson-item__number.checked {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: var(--color-success) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Breadcrumb Styles */
.breadcrumb-item {
  transition: color var(--transition-fast) !important;
}

.breadcrumb-item[onclick]:hover {
  color: var(--color-accent) !important;
  text-decoration: underline !important;
}

/* ===================================
   VIDEO WATERMARK
   Selector uses data attribute since IDs are randomized for security
   =================================== */
[data-wm="1"] {
  position: absolute;
  z-index: 2147483647;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  font-family: monospace;
  transition: none;
}

/* Watermark stays on top in fullscreen */
#playerWrapper:fullscreen [data-wm="1"],
#playerWrapper:-webkit-full-screen [data-wm="1"] {
  z-index: 2147483647;
}

/* ===================================
   FULLSCREEN — wrapper mode
   When playerWrapper (not video) is the fullscreen element,
   ensure the video fills the screen and watermark remains visible
   =================================== */
#playerWrapper:fullscreen,
#playerWrapper:-webkit-full-screen {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  position: relative;
}

#playerWrapper:fullscreen video,
#playerWrapper:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   CUSTOM YOUTUBE-LIKE VIDEO PLAYER CONTROLS
   ========================================================================== */

.player-wrapper {
  cursor: default;
}

/* Hide cursor when controls are inactive */
.player-wrapper.controls-hidden {
  cursor: none;
}

/* Video Overlay for play/pause/loading feedback */
.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.video-overlay__center-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-overlay__center-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Animate overlay on state change */
.video-overlay.animate-pulse .video-overlay__center-btn {
  animation: pulseCenterBtn 0.5s ease-out forwards;
}

@keyframes pulseCenterBtn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

/* Main Controls Container */
.video-controls-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  direction: ltr;
  /* Always LTR for video player layout */
  padding: 0 12px 10px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  pointer-events: auto;
}

.player-wrapper.controls-hidden .video-controls-container {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

/* Timeline/Progress Bar */
.timeline-container {
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 6px;
  position: relative;
  z-index: 16;
}

.timeline {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  border-radius: 2px;
  transition: height 0.1s ease;
}

.timeline-container:hover .timeline {
  height: 6px;
}

.timeline-container:hover .timeline .play-head {
  transform: scale(1);
}

.buffered-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.35);
  width: 0;
  border-radius: 2px;
  pointer-events: none;
}

.played-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #f00;
  /* YouTube Red */
  width: 0;
  border-radius: 2px;
  pointer-events: none;
}

.play-head {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  background: #f00;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  transition: transform 0.1s ease;
  pointer-events: none;
}

/* Hover time preview */
.hover-time {
  position: absolute;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.75rem;
  font-family: monospace;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 18;
}

.timeline-container:hover .hover-time {
  opacity: 1;
}

/* Controls Buttons Layout */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}

.controls-left,
.controls-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 0;
  margin: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.control-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Volume controls */
.volume-container {
  display: flex;
  align-items: center;
  position: relative;
}

.volume-slider {
  width: 0;
  opacity: 0;
  height: 3px;
  margin-left: 0;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.2s ease;
  accent-color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.volume-container:hover .volume-slider,
.volume-slider:focus {
  width: 60px;
  opacity: 1;
  margin-left: 6px;
}

/* Time display styling */
.time-display {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-family: monospace;
  margin-left: 8px;
  pointer-events: none;
}

/* Session Title display */
.session-title-display {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.825rem;
  margin-left: 18px;
  /* Spacing between time and title */
  font-weight: 500;
  direction: rtl;
  /* Perso-Arabic text should be RTL */
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.15s ease;
}

.session-title-display:hover {
  color: #fff;
}

/* Settings speed gear container and menu */
.settings-menu-container {
  position: relative;
}

.settings-menu {
  position: absolute;
  bottom: 45px;
  right: 0;
  width: 150px;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 20;
}

.settings-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.settings-menu-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: right;
  direction: rtl;
}

.settings-menu-options {
  max-height: 220px;
  overflow-y: auto;
}

.speed-option {
  padding: 6px 16px;
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.speed-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.speed-option.active {
  color: var(--color-accent, #ffbe00);
  font-weight: bold;
  background-color: rgba(255, 190, 0, 0.05);
}

#playerWrapper:fullscreen .video-controls-container,
#playerWrapper:-webkit-full-screen .video-controls-container {
  z-index: 2147483647;
}

#playerWrapper:fullscreen .settings-menu,
#playerWrapper:-webkit-full-screen .settings-menu {
  z-index: 2147483647;
}

/* Password Visibility Toggle */
.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .form-input {
  width: 100%;
  padding-left: 48px !important;
  /* Extra padding on the left since it's RTL and toggle is on the left */
}

.password-toggle-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.password-toggle-btn:hover {
  color: var(--color-accent);
}

.password-toggle-btn svg {
  display: block;
}