/* ==========================================================================
   DESIGN SYSTEM - UI/UX PRO MAX: Dark OLED Modern Theme (PulseCast)
   ========================================================================== */

:root {
  /* Color Palette - Deep OLED Tech Glow */
  --bg-app: #07080c;
  --bg-surface: #0e1118;
  --bg-card: #141824;
  --bg-card-hover: #1c2234;
  --bg-glass: rgba(14, 17, 24, 0.75);
  --bg-glass-strong: rgba(10, 12, 18, 0.88);

  /* Primary Accent: Electric Cyan / Neon Sky */
  --accent-primary: #00e5ff;
  --accent-primary-hover: #38bdf8;
  --accent-glow: rgba(0, 229, 255, 0.35);
  --accent-subtle: rgba(0, 229, 255, 0.12);

  /* Secondary Accent: Violet Pulse */
  --accent-secondary: #8b5cf6;
  --accent-secondary-glow: rgba(139, 92, 246, 0.3);

  /* Text Hierarchy */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-active: rgba(0, 229, 255, 0.5);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(0, 229, 255, 0.25);
  --shadow-player: 0 -10px 40px rgba(0, 0, 0, 0.85);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Sizing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-width: 1040px;
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: 140px; /* Space for bottom floating player */
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.glow-1 {
  width: 350px;
  height: 350px;
  background: var(--accent-glow);
  top: -100px;
  right: -50px;
}
.glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-secondary-glow);
  bottom: 100px;
  left: -150px;
}

/* Layout Container */
.main-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.25rem;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.brand-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.brand-icon {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-accent {
  color: var(--accent-primary);
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-active);
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn-action-glass {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-action-glass:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.btn-action-glass.active-mode {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-icon-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-icon-glass:hover {
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   Auth / Login Screen
   ========================================================================== */
.auth-wrapper {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.auth-icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-subtle);
  border: 1px solid var(--border-active);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.auth-lock-icon {
  width: 28px;
  height: 28px;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
  line-height: 1.45;
}

.pin-inputs-container {
  margin-bottom: 1.5rem;
}

.pin-input-field {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.8rem;
  letter-spacing: 12px;
  text-align: center;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.25s ease;
}

.pin-input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.btn-gradient-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), #0284c7);
  color: #040812;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.25s ease;
}

.btn-gradient-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.auth-footer {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ==========================================================================
   Video Player Card
   ========================================================================== */
.video-container-card {
  background: #000;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-header-bar {
  background: #090a0f;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.video-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-header-right {
  display: flex;
  align-items: center;
}

.btn-pip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-primary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pip-badge:hover {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 12px var(--accent-glow);
}

.video-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.video-status-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 500;
}

#yt-player-container {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 520px;
  background: #000;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   Section Headers & Catalog Grid
   ========================================================================== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.courses-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Category & Subcategory Hierarchy Filter System */
.category-filter-wrapper {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.category-tabs-container, .subcategory-tabs-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none; /* Firefox */
}

.category-tabs-container::-webkit-scrollbar, .subcategory-tabs-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.category-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.category-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(139, 92, 246, 0.15));
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
}

.category-tab-btn .tab-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.category-tab-btn.active .tab-count {
  background: var(--accent-primary);
  color: #000;
  font-weight: 800;
}

/* Subcategory level */
.subcategory-tabs-container {
  padding-left: 0.5rem;
  position: relative;
}

.subcategory-tabs-container::before {
  content: '↳';
  color: var(--accent-primary);
  font-weight: bold;
  font-size: 1rem;
  margin-right: -0.2rem;
}

.subcategory-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.subcategory-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
}

.subcategory-tab-btn.active {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Category Badges on Cards and Banner */
.course-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 2;
}

.course-category-badge .cat-sub {
  color: var(--text-secondary);
}

.empty-state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--text-dim);
  margin: 0 auto 1rem auto;
}

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

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 229, 255, 0.15);
}

.course-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #090a0f;
  overflow: hidden;
}

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

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

.course-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.course-card:hover .course-play-overlay {
  opacity: 1;
}

.overlay-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--accent-glow);
}

.course-badge-lessons {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(7, 8, 12, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.course-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.course-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
}

/* ==========================================================================
   Playlist / Lesson View
   ========================================================================== */
.playlist-nav-bar {
  margin-bottom: 1.25rem;
}

.btn-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-back-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.playlist-banner {
  background: linear-gradient(135deg, rgba(14, 17, 24, 0.95), rgba(20, 24, 36, 0.95));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.playlist-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent-glow);
  filter: blur(80px);
  pointer-events: none;
}

.course-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.playlist-banner-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.playlist-meta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.meta-item i {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.lessons-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.lessons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lessons-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.lessons-tip {
  font-size: 0.78rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lesson-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lesson-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  transform: translateX(4px);
}

.lesson-card.active {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.lesson-card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.lesson-idx-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.lesson-card.active .lesson-idx-badge {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

.lesson-details {
  min-width: 0;
}

.lesson-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

.lesson-card.active .lesson-card-title {
  color: var(--accent-primary);
}

.lesson-duration {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lesson-card-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.lesson-play-icon {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.lesson-card.active .lesson-play-icon {
  color: var(--accent-primary);
}

/* ==========================================================================
   Sticky Bottom Player (Running / Outdoor Optimized)
   ========================================================================== */
.player-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-card);
  padding: 0.85rem 1.25rem;
  z-index: 100;
  box-shadow: var(--shadow-player);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-glow-line {
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.8;
}

.player-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Track Info */
.player-track-box {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
}

.track-playing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  padding: 2px;
}

.track-playing-indicator .bar {
  width: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
  height: 6px;
  transition: height 0.2s ease;
}

.isPlaying .bar-1 { animation: soundBar 0.8s ease-in-out infinite alternate; }
.isPlaying .bar-2 { animation: soundBar 1.1s ease-in-out infinite alternate 0.2s; }
.isPlaying .bar-3 { animation: soundBar 0.7s ease-in-out infinite alternate 0.4s; }

@keyframes soundBar {
  0% { height: 4px; }
  100% { height: 18px; }
}

.track-text-group {
  min-width: 0;
}

.track-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-course {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Transport Controls */
.player-controls-cluster {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-transport {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-transport:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.btn-seek {
  height: 42px;
  padding: 0 0.8rem;
  gap: 0.35rem;
}

.btn-seek i {
  width: 17px;
  height: 17px;
}

.seek-label {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.btn-next {
  width: 42px;
  height: 42px;
}

.btn-play-hero {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #0ea5e9);
  color: #040812;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-play-hero:hover {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.5);
}

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

.btn-play-hero i {
  width: 24px;
  height: 24px;
}

/* Speed Cluster */
.speed-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.speed-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.speed-pill-group {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.speed-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-pill:hover {
  color: var(--text-primary);
}

.speed-pill.active {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Animations */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.section-fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Responsive Mobile Optimization (for Outdoor/Jogging)
   ========================================================================== */
@media (max-width: 768px) {
  .player-inner {
    flex-direction: column;
    gap: 0.8rem;
  }

  .player-track-box {
    width: 100%;
    justify-content: flex-start;
  }

  .player-controls-cluster {
    width: 100%;
    justify-content: space-around;
  }

  .btn-seek {
    padding: 0 1rem;
    height: 46px;
  }

  .btn-play-hero {
    width: 56px;
    height: 56px;
  }

  .speed-cluster {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .speed-pill-group {
    flex: 1;
    justify-content: space-between;
    margin-left: 0.5rem;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .btn-label {
    display: none;
  }
}
