/* ==========================================================================
   STUDY FOX - ULTRA MODERN EDU-TECH DESIGN SYSTEM
   Dark Luxury Aesthetics with Neon Green Accents & Glowing Yellow Folders
   ========================================================================== */

:root {
  --bg-primary: #07080c;
  --bg-secondary: #0d0e14;
  --bg-card: #13141d;
  --bg-card-hover: #191b26;
  --bg-glass: rgba(10, 11, 16, 0.88);
  --bg-glass-card: rgba(19, 20, 29, 0.8);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 230, 118, 0.45);
  --border-folder: rgba(245, 158, 11, 0.45);

  --accent-green: #00e676;
  --accent-green-bright: #1aff87;
  --accent-green-dark: #00b050;
  --accent-green-glow: rgba(0, 230, 118, 0.35);
  --accent-green-soft: rgba(0, 230, 118, 0.12);

  --folder-yellow: #f59e0b;
  --folder-yellow-bright: #fbbf24;
  --folder-yellow-glow: rgba(245, 158, 11, 0.35);
  --folder-yellow-soft: rgba(245, 158, 11, 0.12);

  --telegram-blue: #24a1de;
  --telegram-blue-glow: rgba(36, 161, 222, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #030406;

  --badge-free-bg: rgba(0, 230, 118, 0.16);
  --badge-free-text: #00e676;
  --badge-free-border: rgba(0, 230, 118, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.65);
  --shadow-glow-green: 0 0 26px rgba(0, 230, 118, 0.3);
  --shadow-glow-yellow: 0 0 30px rgba(245, 158, 11, 0.3);
}

/* Base Reset & Anti-inspect selection protection */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-drag: none;
}

html {
  font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 54px 54px;
  background-position: -1px -1px;
  background-attachment: fixed;
  user-select: none;
  position: relative;
}

/* ==========================================================================
   AMBIENT GLOWING ORBS BACKGROUND
   ========================================================================== */

.bg-ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
}

.glow-orb-1 {
  top: -100px;
  left: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.14) 0%, transparent 70%);
  animation: orbFloat1 20s infinite ease-in-out alternate;
}

.glow-orb-2 {
  top: 35%;
  right: -80px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  animation: orbFloat2 24s infinite ease-in-out alternate;
}

.glow-orb-3 {
  bottom: -150px;
  left: 30%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  animation: orbFloat3 28s infinite ease-in-out alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 80px) scale(1.12); }
  100% { transform: translate(-40px, 40px) scale(0.95); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-90px, -60px) scale(1.15); }
  100% { transform: translate(50px, -40px) scale(0.9); }
}

@keyframes orbFloat3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -70px) scale(1.1); }
  100% { transform: translate(-60px, 50px) scale(0.92); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #202331;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34384d;
}

/* ==========================================================================
   NAVIGATION BAR (MATCHING SCREENSHOT 1)
   ========================================================================== */

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Polished Brand Logo */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.brand-logo-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(135deg, #00e676, rgba(255, 255, 255, 0.6), #00e676);
  box-shadow: 0 0 22px rgba(0, 230, 118, 0.4), inset 0 0 10px rgba(0, 230, 118, 0.3);
  transition: var(--transition-bounce);
  overflow: hidden;
  animation: logoGlowPulse 4s infinite ease-in-out;
}

@keyframes logoGlowPulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(0, 230, 118, 0.35);
    border-color: rgba(0, 230, 118, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.7);
    border-color: #00e676;
  }
}

.brand-link:hover .brand-logo-wrap {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 32px rgba(0, 230, 118, 0.75);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  filter: contrast(1.08) brightness(1.04);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.brand-name .fox-highlight {
  color: var(--accent-green);
  text-shadow: 0 0 14px rgba(0, 230, 118, 0.6);
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Nav Actions (Batches & My Enrollments) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-subtle);
}

.counter-badge {
  background: var(--accent-green-soft);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 2px 8px;
  font-size: 0.74rem;
  border-radius: var(--radius-full);
  font-weight: 800;
}

/* ==========================================================================
   MAIN CONTENT AREA & SUB-HEADER (MATCHING SCREENSHOT 1)
   ========================================================================== */

.main-content {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.75rem 5rem 1.75rem;
}

/* Sub-header Filter & Search Bar (Screenshot 1 Layout) */
.batches-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-pills-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.pill-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.pill-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pill-btn .pill-counter {
  background: #f59e0b;
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 6px;
}

.pill-btn.enrolled-pill.active .pill-counter {
  background: var(--accent-green);
}

/* Search Bar on Right (Matching Screenshot 1) */
.batches-search-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.batches-search-input {
  width: 100%;
  padding: 0.68rem 1rem 0.68rem 2.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.batches-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-green);
  box-shadow: 0 0 18px var(--accent-green-glow);
}

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

.batches-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.batches-search-clear {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 0.85rem;
  padding: 4px;
}

.batches-search-clear:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   BATCHES GRID (MATCHING SCREENSHOT 1)
   ========================================================================== */

.batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.5rem;
}

.batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.batch-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 230, 118, 0.45);
  box-shadow: var(--shadow-md), 0 0 24px rgba(0, 230, 118, 0.18);
}

.batch-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d0e14;
  overflow: hidden;
}

.batch-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.batch-card:hover .batch-thumb-img {
  transform: scale(1.05);
}

.batch-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.batch-badge.badge-free {
  background: rgba(0, 230, 118, 0.92);
  color: #031406;
  box-shadow: 0 2px 10px rgba(0, 230, 118, 0.5);
}

.batch-badge.badge-paid {
  background: rgba(245, 158, 11, 0.9);
  color: #171003;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.batch-details {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 1rem;
}

.batch-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.85rem;
}

.batch-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.batch-actions-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.65rem;
}

/* Batch Card Actions (ENROLL WHITE & STUDY GREEN) */
.btn-enroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  color: #050505;
  border: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.btn-enroll:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.4);
}

.btn-enroll.enrolled {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.btn-study {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--accent-green, #00e676);
  color: #021a0a;
  border: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 12px rgba(0, 230, 118, 0.4);
}

.btn-study:hover {
  background: var(--accent-green-bright, #25ff8d);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 230, 118, 0.6);
}

/* ==========================================================================
   LOAD MORE BATCHES (EXACT MATCH TO USER SCREENSHOT)
   ========================================================================== */

.load-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.75rem 0 1.5rem 0;
  width: 100%;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.72rem 2.2rem;
  background: #111218;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.btn-load-more:hover {
  background: #181a24;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(0, 230, 118, 0.15);
}

.btn-load-more:active {
  transform: translateY(0) scale(0.98);
}

.btn-load-more i {
  font-size: 0.82rem;
  transition: transform 0.2s ease;
  color: #e2e8f0;
}

.btn-load-more:hover i {
  transform: translateY(2px);
  color: #ffffff;
}

.btn-load-more.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn-load-more.loading i {
  animation: spinLoadMore 0.8s linear infinite;
}

@keyframes spinLoadMore {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   COURSE VIEW / DRILL-DOWN HEADER & TABS (MATCHING SCREENSHOT 2)
   ========================================================================== */

.course-view-container {
  display: none;
}

.course-view-container.active {
  display: block;
}

.course-hero-header {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.course-hero-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.course-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

/* Course Tabs (Exact Match to Screenshot 2) */
.course-nav-tabs {
  display: inline-flex;
  align-items: center;
  background: #111215;
  border: 1px solid #23252a;
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  max-width: 100%;
}

.course-tab-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8e8e93;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.course-tab-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.course-tab-item.active {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green, #00e676);
  border-color: rgba(0, 230, 118, 0.35);
  font-weight: 700;
}

/* Breadcrumb Sub-bar (Matching Screenshot 2) */
.course-breadcrumb-bar {
  background: rgba(18, 19, 27, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumb-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-decoration: none;
}

.breadcrumb-segment:hover {
  color: var(--accent-green);
}

.breadcrumb-segment.current {
  color: #fff;
  font-weight: 600;
  cursor: default;
}

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

/* ==========================================================================
   FOLDER / SUBJECT / TOPIC CARDS (MATCHING USER SCREENSHOTS 2 & 3)
   ========================================================================== */

.folders-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.folder-card {
  background: #141517;
  border: 1px solid #23252a;
  border-radius: 18px;
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.folder-card:hover {
  background: #18191e;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

/* Left thumbnail container */
.folder-thumb-box {
  width: 68px;
  height: 52px;
  min-width: 68px;
  background: #0c0d10;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.folder-thumb-square {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
}

.folder-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
}

.folder-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #0c0d10;
}

/* Info container (middle) */
.folder-info-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.folder-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: #8e8e93;
  letter-spacing: 0.01em;
}

/* Right side action: Green Open Button */
.btn-folder-open {
  background: var(--accent-green, #00e676);
  color: #021a0a;
  border: none;
  border-radius: 12px;
  padding: 0.52rem 1.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 230, 118, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-folder-open:hover {
  background: var(--accent-green-bright, #25ff8d);
  transform: scale(1.05);
  box-shadow: 0 4px 18px rgba(0, 230, 118, 0.55);
}

.btn-folder-open:active {
  transform: scale(0.97);
}

/* Right side action: Chevron icon for Topics */
.folder-chevron {
  color: #71717a;
  font-size: 0.95rem;
  margin-right: 0.35rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.folder-card-topic:hover .folder-chevron {
  transform: translateX(3px);
  color: var(--accent-green, #00e676);
}

/* Section Subheading (Screenshot 3) */
.topic-header-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8e8e93;
  margin: 0.75rem 0 0.85rem 0.25rem;
}

/* Skeleton shimmer row for folders */
.skeleton-folder-row {
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(90deg, #141518 25%, #1f2128 50%, #141518 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  width: 100%;
}

/* ==========================================================================
   CLASSES / LECTURES LIST VIEW
   ========================================================================== */

.classes-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lecture-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  transition: var(--transition-smooth);
}

.lecture-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(0, 230, 118, 0.3);
  box-shadow: var(--shadow-sm);
}

.lecture-thumb-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: #0d0e14;
}

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

.lecture-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  opacity: 0.85;
  transition: var(--transition-fast);
}

.lecture-card:hover .lecture-play-overlay {
  opacity: 1;
  background: rgba(0, 230, 118, 0.25);
  color: var(--accent-green);
}

.lecture-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lecture-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.lecture-meta-tags {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.lecture-meta-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lecture-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-play-lecture {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: var(--accent-green);
  color: #031407;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
  white-space: nowrap;
}

.btn-play-lecture:hover {
  background: var(--accent-green-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.55);
}

.btn-play-lecture.btn-pdf-action {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-play-lecture.btn-pdf-action:hover {
  background: #dc2626;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
}

.btn-lecture-notes {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-lecture-notes:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.lecture-card.is-pdf-card:hover {
  border-color: rgba(239, 68, 68, 0.45);
}

.lecture-play-overlay.pdf-overlay {
  background: rgba(0, 0, 0, 0.5);
  color: #ef4444;
}

.lecture-card:hover .lecture-play-overlay.pdf-overlay {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.thumb-pdf-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-complete-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-complete-check:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn-complete-check.completed {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #000;
}

/* ==========================================================================
   TELEGRAM MODAL (MATCHING USER SCREENSHOT)
   ========================================================================== */

.telegram-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.telegram-modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.telegram-modal-card {
  background: #14151c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(36, 161, 222, 0.15);
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.telegram-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.telegram-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.telegram-squircle-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 10px 25px rgba(2, 136, 209, 0.45);
}

.telegram-modal-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.telegram-modal-desc {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.btn-join-telegram {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.5rem;
  background: #24a1de;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 6px 20px rgba(36, 161, 222, 0.45);
}

.btn-join-telegram:hover {
  background: #2ab6f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(36, 161, 222, 0.65);
}

/* ==========================================================================
   STEALTH SHADOW LOADING (SHADOW PULSE SKELETONS)
   ========================================================================== */

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skeleton-card {
  background: #111219;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 310px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  animation: shadowPulse 1.8s infinite ease-in-out;
}

.skeleton-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.skeleton-folder-card {
  background: #111219;
  border-radius: var(--radius-md);
  height: 180px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.skeleton-folder-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  animation: shadowPulse 1.8s infinite ease-in-out;
}

@keyframes shadowPulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Video Player Modal */
.player-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.player-modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.player-modal-box {
  background: #11121a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.player-modal-header {
  padding: 1rem 1.5rem;
  background: #161722;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.player-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.player-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.player-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.35);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.player-badge.pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.player-stage-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-video-tag {
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
}

/* Fast Stream Loading Overlay */
.player-loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 10, 16, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  z-index: 25;
  transition: opacity 0.25s ease;
}

.player-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3.5px solid rgba(0, 230, 118, 0.15);
  border-top-color: var(--accent-green);
  animation: spinLoader 0.75s infinite linear;
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.4);
}

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

.player-loader-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.player-loader-text span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.player-loader-text small {
  display: none !important;
}

/* ==========================================================================
   STUDYPANDA & CLASSEX PLYR PLAYER THEMING
   ========================================================================== */
.sf-player-container .plyr {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 8 !important;
}

.plyr {
  width: 100% !important;
  height: 100% !important;
  background: #000 !important;
  --plyr-color-main: var(--accent-green, #00e676);
  --plyr-video-control-color: rgba(255, 255, 255, 0.9);
  --plyr-video-control-color-hover: #00e676;
  --plyr-video-control-background-hover: rgba(0, 230, 118, 0.2);
  --plyr-video-progress-buffered-background: rgba(255, 255, 255, 0.16);
  --plyr-video-range-track-background: rgba(255, 255, 255, 0.16);
  --plyr-video-range-thumb-background: var(--accent-green, #00e676);
  --plyr-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.plyr--video {
  max-height: 100% !important;
}

.plyr__video-wrapper {
  background: #000 !important;
  height: 100% !important;
}

.plyr video {
  object-fit: contain !important;
  background: #000 !important;
}

.plyr__control--overlaid {
  background: var(--accent-green, #00e676) !important;
  color: #000000 !important;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.45) !important;
  padding: 18px !important;
  border-radius: 50% !important;
}

.plyr__control--overlaid svg {
  fill: #000000 !important;
  width: 22px !important;
  height: 22px !important;
}

.plyr__controls {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, transparent 100%) !important;
  padding: 30px 14px 10px !important;
}

.plyr__menu__container {
  background: rgba(18, 20, 28, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 12px !important;
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
}

.plyr__menu__container [role='menuitemradio'][aria-checked='true']::before {
  background: var(--accent-green, #00e676) !important;
}

/* Dedicated Official PDF Study Material Stage */
.player-pdf-stage {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #171926 0%, #0c0d13 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 4;
}

.player-pdf-card {
  width: 100%;
  max-width: 820px;
  background: #13141d;
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 230, 118, 0.1);
  max-height: 85vh;
  overflow-y: auto;
}

.player-pdf-icon-ring {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(0, 230, 118, 0.12);
  border: 1.5px solid rgba(0, 230, 118, 0.4);
  color: var(--accent-green, #00e676);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.25);
  margin-bottom: 0.25rem;
}

.player-pdf-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-green, #00e676);
  text-transform: uppercase;
}

.player-pdf-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
}

.player-pdf-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.player-pdf-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 0.5rem;
}

.player-pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  background: var(--accent-green, #00e676);
  color: #021a0a;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 10px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.35);
}

.player-pdf-download-btn:hover {
  background: var(--accent-green-bright, #25ff8d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.55);
}

/* Stream Error & Recovery Stage */
.player-error-stage {
  position: absolute;
  inset: 0;
  background: #0d0e15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 4;
}

.player-error-card {
  max-width: 480px;
  background: #14151e;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.player-error-icon {
  font-size: 2.5rem;
  color: #f59e0b;
  margin-bottom: 0.25rem;
}

.player-error-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.player-error-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.player-error-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Player Modal Footer Controls */
.player-modal-footer {
  padding: 0.85rem 1.25rem;
  background: #14151e;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.player-controls-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   STUDY FOX CUSTOM ON-VIDEO HIGH-SPEED PLAYER CONTROLS
   ========================================================================== */

.sf-player-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.sf-player-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Gesture & Double-Tap Touch Zones (Mobile & Desktop 10s Seek) */
.sf-touch-layers {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 6;
  pointer-events: auto;
}

.sf-touch-zone {
  height: 100%;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sf-touch-left {
  flex: 0 0 35%;
}

.sf-touch-center {
  flex: 1;
}

.sf-touch-right {
  flex: 0 0 35%;
}

/* Double-Tap / Click Seek Ripple Indicator */
.sf-seek-ripple {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.22);
  border: 1.5px solid rgba(0, 230, 118, 0.5);
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.4);
  color: var(--accent-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 1.1rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.65);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sf-seek-ripple span {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sf-seek-ripple.active {
  opacity: 1;
  transform: scale(1.1);
  animation: sfRipplePulse 0.45s ease forwards;
}

.sf-ripple-playpause {
  background: rgba(14, 15, 25, 0.75);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.4rem;
}

@keyframes sfRipplePulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Big Center Play / Pause Disc Button */
.sf-center-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(12, 14, 22, 0.78);
  border: 2px solid rgba(0, 230, 118, 0.7);
  box-shadow: 0 0 35px rgba(0, 230, 118, 0.35), 0 8px 30px rgba(0, 0, 0, 0.6);
  color: var(--accent-green);
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 8;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, opacity 0.25s, box-shadow 0.2s;
  padding-left: 4px; /* Optical center for play icon */
}

.sf-center-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(0, 230, 118, 0.18);
  box-shadow: 0 0 45px rgba(0, 230, 118, 0.6);
}

.sf-center-play-btn.playing {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

/* Sleek Floating Glassmorphism Control Bar */
.sf-ctrl-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(7, 8, 13, 0.96) 0%, rgba(7, 8, 13, 0.75) 55%, transparent 100%);
  padding: 1.5rem 1rem 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  z-index: 10;
  pointer-events: auto;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.sf-player-container.sf-controls-hidden .sf-ctrl-bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.sf-player-container.sf-controls-hidden {
  cursor: none;
}

/* Scrubber Timeline Bar */
.sf-timeline-wrap {
  position: relative;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.sf-timeline-track {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: visible;
  transition: height 0.15s ease;
}

.sf-timeline-wrap:hover .sf-timeline-track,
.sf-timeline-wrap.scrubbing .sf-timeline-track {
  height: 8px;
}

.sf-timeline-buffer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  pointer-events: none;
  transition: width 0.2s ease;
}

.sf-timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #00b0ff 0%, #00e676 100%);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.55);
  pointer-events: none;
}

.sf-timeline-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-green);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.9);
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-timeline-wrap:hover .sf-timeline-thumb,
.sf-timeline-wrap.scrubbing .sf-timeline-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.sf-timeline-tooltip {
  position: absolute;
  bottom: 24px;
  left: 0;
  transform: translateX(-50%);
  background: #141521;
  color: #fff;
  font-family: monospace, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.sf-timeline-wrap:hover .sf-timeline-tooltip {
  opacity: 1;
}

/* Controls Buttons Row */
.sf-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sf-controls-left,
.sf-controls-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sf-ctrl-btn {
  background: transparent;
  border: none;
  color: #f1f5f9;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  position: relative;
}

.sf-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-green);
  transform: scale(1.06);
}

.sf-seek-btn {
  position: relative;
  font-size: 0.95rem;
}

.sf-seek-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.6rem;
  font-weight: 900;
  background: rgba(0, 230, 118, 0.22);
  color: var(--accent-green);
  border-radius: 3px;
  padding: 0px 3px;
  line-height: 1.1;
  pointer-events: none;
}

/* Volume Control Group */
.sf-vol-group {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.sf-vol-slider-wrap {
  width: 0px;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}

.sf-vol-group:hover .sf-vol-slider-wrap,
.sf-vol-group:focus-within .sf-vol-slider-wrap {
  width: 68px;
}

.sf-vol-slider {
  width: 62px;
  height: 4px;
  accent-color: var(--accent-green);
  cursor: pointer;
}

/* Time Counter */
.sf-time-display {
  font-family: monospace, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 0.4rem;
  user-select: none;
}

.sf-time-sep {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Text Buttons (Speed & Quality) */
.sf-text-ctrl-btn {
  width: auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 0.35rem;
  color: #f1f5f9;
}

.sf-text-ctrl-btn:hover {
  background: rgba(0, 230, 118, 0.18);
  border-color: rgba(0, 230, 118, 0.45);
  color: var(--accent-green);
}

/* Popup Menus (Speed & Quality Dropdowns) */
.sf-menu-container {
  position: relative;
}

.sf-popup-menu {
  position: absolute;
  bottom: 46px;
  right: 0;
  background: #141521;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  min-width: 140px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 230, 118, 0.12);
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: sfPopupFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-popup-menu.active {
  display: flex;
}

@keyframes sfPopupFade {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sf-menu-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sf-menu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}

.sf-menu-item {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.65rem;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sf-menu-item.active {
  background: rgba(0, 230, 118, 0.18);
  color: var(--accent-green);
  font-weight: 800;
}

.sf-menu-item.active::after {
  content: "✓";
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--accent-green);
}

/* Responsive adjustments for Mobile & Small Tablets */
@media (max-width: 768px) {
  .player-modal-box {
    max-height: 100vh;
    border-radius: 0;
  }

  .player-modal-backdrop {
    padding: 0;
  }

  .sf-ctrl-btn {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .sf-vol-slider-wrap {
    display: none; /* Hide slider on mobile, volume toggle still active */
  }

  .sf-time-display {
    font-size: 0.72rem;
    margin-left: 0.15rem;
  }

  .sf-popup-menu {
    bottom: 52px;
    right: -10px;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 600px;
  margin: 2rem auto;
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 10000;
  pointer-events: none;
}

.toast-item {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: #181a24;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-left: 4px solid var(--accent-green);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 15, 22, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  z-index: 100;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  transition: var(--transition-fast);
}

.mobile-nav-item i {
  font-size: 1.2rem;
}

.mobile-nav-item.active {
  color: var(--accent-green);
}

/* Overview & Live tabs */
.tab-pane-content {
  display: none;
}
.tab-pane-content.active {
  display: block;
}

.course-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.overview-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.overview-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.overview-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.overview-features-list li i {
  color: var(--accent-green);
  margin-top: 3px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (LAPTOP & MOBILE)
   ========================================================================== */

@media (max-width: 900px) {
  .batches-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  .batches-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .filter-pills-left {
    display: flex;
    width: 100%;
    background: #111215;
    border: 1px solid #23252a;
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
  }

  .pill-btn {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.84rem;
  }

  .pill-btn.active {
    background: #23242a;
    color: #fff;
  }

  .batches-search-wrap {
    max-width: 100%;
    width: 100%;
  }

  .batches-search-input {
    border-radius: 12px;
    background: #121316;
    border: 1px solid #23252a;
    padding: 0.72rem 1rem 0.72rem 2.6rem;
    font-size: 0.88rem;
  }

  .batches-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .course-nav-tabs {
    display: flex;
    width: 100%;
  }

  .course-tab-item {
    flex: 1;
    padding: 0.6rem 0.5rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .course-breadcrumb-bar {
    display: none;
  }

  .folders-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .folder-card {
    padding: 0.75rem 0.95rem;
    border-radius: 16px;
    gap: 0.85rem;
  }

  .folder-thumb-box {
    width: 62px;
    height: 48px;
    min-width: 62px;
    border-radius: 10px;
  }

  .folder-thumb-square {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
  }

  .folder-title {
    font-size: 0.92rem;
  }

  .folder-subtitle {
    font-size: 0.74rem;
  }

  .btn-folder-open {
    padding: 0.45rem 1.15rem;
    font-size: 0.82rem;
    border-radius: 10px;
  }

  .lecture-card {
    grid-template-columns: 110px 1fr;
    gap: 0.85rem;
  }

  .lecture-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .main-content {
    padding-bottom: 5.5rem;
  }

  .telegram-modal-card {
    padding: 1.75rem 1.25rem 1.5rem 1.25rem;
    margin: 1rem;
  }
}

/* ==========================================================================
   FOOTER CREDIT: MADE BY ARISU
   ========================================================================== */

.app-footer {
  margin-top: 3.5rem;
  padding: 2.5rem 1.5rem 3rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, transparent 0%, rgba(7, 8, 12, 0.95) 100%);
}

.footer-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  background: rgba(18, 20, 30, 0.9);
  border: 1px solid rgba(0, 230, 118, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 230, 118, 0.15);
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-badge strong {
  color: var(--accent-green);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(0, 230, 118, 0.5);
}

.footer-heart {
  color: #ff3366;
  font-size: 0.9rem;
  animation: heartPulse 1.6s infinite ease-in-out;
  display: inline-block;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.7)); }
}

.footer-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 768px) {
  .app-footer {
    padding-bottom: 6.5rem; /* Leaves room for mobile bottom bar */
  }
}

