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

: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-action-glass.btn-sm,
.btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  gap: 0.4rem;
  border-radius: var(--radius-full);
}

.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 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.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;
}

.lessons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.modules-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: inline-flex;
  align-items: center;
}

.btn-text-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

/* ==========================================================================
   Module Accordions (Courses with multiple modules & bonus)
   ========================================================================== */
.module-accordion {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 0.75rem;
}

.module-accordion:hover {
  border-color: var(--border-card);
}

.module-accordion.is-open {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.module-accordion.has-active-lesson {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.module-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.module-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.module-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.module-icon-badge.bonus {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.module-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.module-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.module-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.module-badge-bonus {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.module-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.module-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.module-chevron {
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-accordion.is-open .module-chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.module-content {
  display: none;
  padding: 0.75rem 1rem 1rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.18);
  flex-direction: column;
  gap: 0.6rem;
}

.module-accordion.is-open .module-content {
  display: flex;
}

.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;
  }
}

/* ==========================================================================
   ADMIN & AUTH EXPANSION STYLES
   ========================================================================== */

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

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

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.auth-error-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Admin Panels */
.admin-header-row {
  margin-bottom: 1.5rem;
}

.admin-tabs-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  overflow-x: auto;
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.admin-tab-btn.active {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
}

.admin-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: rgba(14, 17, 24, 0.9);
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.role-badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.role-admin {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.role-student {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.perms-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 320px;
}

.perm-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.btn-gradient-small {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gradient-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.admin-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.admin-card-header {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.import-status-box {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.import-status-box.info {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-primary);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.permissions-tree-box {
  max-height: 250px;
  overflow-y: auto;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.perm-cat-node {
  margin-bottom: 0.75rem;
}

.perm-cat-header, .perm-sub-header, .perm-course-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.perm-cat-header {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.perm-sub-group {
  padding-left: 1.5rem;
  margin-top: 0.35rem;
}

.perm-sub-header {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.perm-course-group {
  padding-left: 1.5rem;
  margin-top: 0.25rem;
}

.perm-course-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Locked Course Card Overlay */
.course-card.locked {
  opacity: 0.75;
  filter: grayscale(0.4);
}

.course-card.locked:hover {
  transform: none;
  border-color: var(--border-card);
}

.lock-badge-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 10;
}

/* Admin Jobs Cards */
.admin-jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.job-status-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.job-status-downloading, .job-status-processing {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.job-status-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Course Visibility Toggle & Badges */
.private-badge-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 10;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.course-card.private-course {
  border-color: rgba(139, 92, 246, 0.4);
}

.course-card.private-course:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(139, 92, 246, 0.3);
}

.btn-toggle-course-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 1px solid transparent;
}

.btn-toggle-course-status.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-toggle-course-status.status-active:hover {
  background: rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-toggle-course-status.status-private {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.35);
}

.btn-toggle-course-status.status-private:hover {
  background: rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

/* Type Filter Tabs (Cursos, Shows, PDFs, Textos) */
.type-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
}
.type-filter-tabs::-webkit-scrollbar {
  display: none;
}

.type-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}
.type-filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
}
.type-filter-pill.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

/* Content Type Badge on Cards */
.content-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(14, 17, 24, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 5;
}
.content-type-badge.badge-course { color: #38bdf8; border-color: rgba(56, 189, 248, 0.4); }
.content-type-badge.badge-show { color: #f59e0b; border-color: rgba(245, 158, 11, 0.4); }
.content-type-badge.badge-pdf { color: #ec4899; border-color: rgba(236, 72, 153, 0.4); }
.content-type-badge.badge-text { color: #10b981; border-color: rgba(16, 185, 129, 0.4); }

/* PDF & Article Viewers */
.reader-header-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.reader-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 800;
  width: fit-content;
}
.reader-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.reader-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pdf-frame-container {
  width: 100%;
  height: 78vh;
  min-height: 500px;
  background: #111;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.pdf-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.article-content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.article-body {
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.article-body h1, .article-body h2, .article-body h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.article-body p {
  margin-bottom: 1rem;
}

/* Category Admin Layout */
.admin-subcard {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.cat-admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.cat-admin-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.cat-subs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sub-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.btn-del-sub {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}
.btn-del-sub:hover {
  color: var(--color-danger);
}

/* ==========================================================================
   METRONOME COMPONENT & WIDGET (OLED Neon Music Studio Style)
   ========================================================================== */

.btn-metronome-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.btn-metronome-pill:hover {
  background: rgba(0, 229, 255, 0.22);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

.metronome-speed-pill {
  border-color: rgba(0, 229, 255, 0.35) !important;
  color: var(--accent-primary) !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.metronome-speed-pill:hover,
.metronome-speed-pill.active {
  background: rgba(0, 229, 255, 0.2) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

/* Floating Metronome Card Container */
.metronome-widget {
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 1040;
  width: 360px;
  max-width: calc(100vw - 32px);
  animation: metronomeSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes metronomeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.metronome-card {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 229, 255, 0.15);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metronome-card.playing {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 229, 255, 0.25);
}

/* Header */
.metronome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.metronome-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.metronome-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: all 0.2s ease;
}

.metronome-live-dot.active {
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { transform: scale(0.85); opacity: 0.7; }
  to { transform: scale(1.25); opacity: 1; }
}

.metronome-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.metronome-title i {
  color: var(--accent-primary);
}

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

.metronome-ctrl-btn {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
}

/* Body */
.metronome-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Beat LED Indicators */
.metronome-beats-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
}

.metronome-beat-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.08s ease, background 0.08s ease, box-shadow 0.08s ease;
}

.metronome-beat-dot.accent {
  width: 17px;
  height: 17px;
  border-color: rgba(0, 229, 255, 0.4);
}

.metronome-beat-dot.medium {
  border-color: rgba(139, 92, 246, 0.4);
}

.metronome-beat-dot.flash {
  background: var(--accent-primary);
  border-color: #fff;
  box-shadow: 0 0 16px var(--accent-primary), 0 0 25px rgba(0, 229, 255, 0.8);
  transform: scale(1.35);
}

.metronome-beat-dot.flash.accent {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px #ffffff, 0 0 35px var(--accent-primary);
  transform: scale(1.45);
}

.metronome-beat-dot.flash.medium {
  background: var(--accent-secondary);
  border-color: #fff;
  box-shadow: 0 0 18px var(--accent-secondary), 0 0 28px rgba(139, 92, 246, 0.8);
  transform: scale(1.35);
}

/* Big Tempo Display */
.metronome-tempo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.5rem;
}

.metronome-bpm-val {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
  transition: color 0.1s ease;
}

.metronome-tempo-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.metronome-bpm-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
}

.metronome-tempo-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Stepper Controls */
.metronome-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.btn-tempo-step {
  flex: 1;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-tempo-step:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
  color: #fff;
  transform: translateY(-1px);
}

.btn-tempo-step:active {
  transform: scale(0.96);
}

.btn-tempo-tap {
  flex: 1.5;
  height: 36px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-sm);
  color: #c4b5fd;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-tempo-tap:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: var(--accent-secondary);
  color: #fff;
}

.btn-tempo-tap:active,
.btn-tempo-tap.tapped {
  background: var(--accent-secondary);
  color: #fff;
  transform: scale(0.95);
  box-shadow: 0 0 15px var(--accent-secondary-glow);
}

/* Slider Group */
.metronome-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metronome-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

#slider-current-label {
  color: var(--accent-primary);
  font-weight: 600;
}

.metronome-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.metronome-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.metronome-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 20px var(--accent-primary);
}

.metronome-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  box-shadow: 0 0 12px var(--accent-primary);
  cursor: pointer;
}

/* Presets Row */
.metronome-presets-row {
  display: flex;
  gap: 0.35rem;
  justify-content: space-between;
}

.metronome-preset-pill {
  flex: 1;
  padding: 0.3rem 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.metronome-preset-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-card);
  background: var(--bg-card);
}

.metronome-preset-pill.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 700;
}

/* Time Signature Section */
.metronome-section-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metronome-ts-row {
  display: flex;
  gap: 0.4rem;
}

.metronome-ts-pill {
  flex: 1;
  padding: 0.45rem 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.metronome-ts-pill:hover {
  background: var(--bg-card);
  border-color: var(--border-card);
  color: #fff;
}

.metronome-ts-pill.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

/* Big Play / Stop Button */
.btn-metronome-play {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #00e5ff 0%, #0099ff 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #07080c;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
}

.btn-metronome-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.55);
}

.btn-metronome-play:active {
  transform: translateY(0);
}

.btn-metronome-play.running {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-metronome-play.running:hover {
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
}

/* Minimized Compact Bar */
.metronome-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
}

.metronome-compact-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metronome-compact-bpm {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metronome-compact-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.metronome-live-dot.mini {
  width: 7px;
  height: 7px;
}

.btn-icon-glass.mini {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
}

@media (max-width: 640px) {
  .metronome-widget {
    bottom: 110px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ==========================================================================
   RESUME PLAYBACK ("Continuar de Onde Parou") STYLES
   ========================================================================== */

.resume-hero-banner {
  margin-bottom: 2rem;
  animation: resumeFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resumeFadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resume-card-wrapper {
  background: linear-gradient(135deg, rgba(16, 21, 32, 0.95), rgba(10, 13, 22, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 255, 0.1);
  transition: all 0.3s ease;
}

.resume-card-wrapper:hover {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 229, 255, 0.2);
}

.resume-card-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-primary), #3b82f6);
  box-shadow: 0 0 12px var(--accent-primary);
}

.resume-card-wrapper::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

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

.resume-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(0, 229, 255, 0.15); }
  100% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.35); }
}

.resume-details {
  flex: 1;
  min-width: 0;
}

.resume-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.resume-badge-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-primary);
  text-transform: uppercase;
  background: rgba(0, 229, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.resume-time-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.resume-course-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.resume-lesson-title {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.45rem;
}

.resume-lesson-title i {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.resume-progress-bar-bg {
  width: 100%;
  max-width: 380px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.35rem;
}

.resume-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #3b82f6);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--accent-primary);
  transition: width 0.3s ease;
}

.resume-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-resume-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #00b4d8 100%);
  color: #07080c;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
  transition: all 0.2s ease;
}

.btn-resume-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.55);
}

.btn-resume-cta:active {
  transform: translateY(0);
}

.btn-resume-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-resume-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

/* Playlist Banner Resume Pill Button */
.btn-resume-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.btn-resume-pill:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .resume-card-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.15rem;
    gap: 1rem;
  }

  .resume-card-actions {
    justify-content: space-between;
    width: 100%;
  }

  .btn-resume-cta {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   PWA MOBILE INSTALL MODAL / BOTTOM SHEET
   ========================================================================== */
.pwa-install-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.pwa-install-modal-backdrop.hidden {
  display: none !important;
}

.pwa-install-card {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 18, 28, 0.96);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  border-top: 1px solid rgba(0, 229, 255, 0.35);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 229, 255, 0.18);
  padding: 1.25rem 1.25rem 1.75rem;
  position: relative;
  animation: pwaSlideUpSheet 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pwa-install-drag-handle {
  width: 42px;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  margin: -0.25rem auto 1rem;
}

.pwa-modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pwa-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.pwa-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-right: 1.75rem;
}

.pwa-app-badge-box {
  position: relative;
  flex-shrink: 0;
}

.pwa-badge-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #00e5ff 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07080c;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.pwa-badge-icon {
  width: 28px;
  height: 28px;
}

.pwa-header-texts {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pwa-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.pwa-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseMetronomeLive 1.5s infinite;
}

.pwa-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.pwa-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pwa-benefits-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pwa-benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
}

.pwa-benefit-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-benefit-icon svg {
  width: 17px;
  height: 17px;
}

.pwa-benefit-text {
  display: flex;
  flex-direction: column;
}

.pwa-benefit-text strong {
  font-size: 0.84rem;
  color: var(--text-primary);
  font-weight: 700;
}

.pwa-benefit-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pwa-guide-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.btn-pwa-install-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #00e5ff 0%, #00b4d8 100%);
  color: #07080c;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.35);
  transition: all 0.2s ease;
  width: 100%;
}

.btn-pwa-install-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.55);
}

.btn-pwa-install-primary:active {
  transform: translateY(0);
}

.pwa-guide-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* iOS Safari Step-by-Step Instructions */
.pwa-ios-instructions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.pwa-ios-step-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pwa-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-subtle);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-desc {
  flex: 1;
}

.pwa-step-desc strong {
  color: #ffffff;
}

.pwa-step-icon {
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-step-icon svg {
  width: 18px;
  height: 18px;
}

.pwa-modal-footer-row {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

.btn-pwa-dismiss-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-pwa-dismiss-action:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

@media (min-width: 769px) {
  #btn-header-install {
    display: none !important;
  }

  .pwa-install-modal-backdrop {
    align-items: center;
    padding: 1.5rem;
  }

  .pwa-install-card {
    border-radius: 24px;
    border: 1px solid rgba(0, 229, 255, 0.35);
    animation: pwaFadeInScale 0.3s ease;
  }

  .pwa-install-drag-handle {
    display: none;
  }
}

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


