/* Force Prompt font globally */
body, input, select, textarea, button {
  font-family: 'Prompt', sans-serif !important;
}

/* Global Font Size scaling overrides */
body {
  font-size: 16px !important;
}
.text-\[10px\],
.text-\[9px\],
.text-xs {
  font-size: 15px !important;
}
.text-sm {
  font-size: 16px !important;
}
.text-base {
  font-size: 17.5px !important;
}

/* Plyr theming overrides for dark UI */
:root {
  --plyr-color-main: #6366f1;
  --plyr-video-background: #000;
  --plyr-menu-background: rgba(8, 12, 28, 0.95);
  --plyr-menu-color: #f8fafc;
  --plyr-tab-focus-color: #6366f1;
  --plyr-control-icon-size: 18px;
  --plyr-control-spacing: 12px;
}

[x-cloak] { display: none !important; }

/* Make Plyr fill its parent (the aspect-ratio: 16/9 box) */
.plyr,
.plyr--video {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

/* Keep the controls bar fully visible (YouTube-like) — Plyr's default fades them out */
.plyr--video .plyr__controls {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85)) !important;
  padding: 20px 15px 15px !important;
}

/* Ensure the big "play" button is visible while paused */
.plyr__control--overlaid {
  background: rgba(99, 102, 241, 0.9) !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
}
.plyr__control--overlaid:hover {
  background: #6366f1 !important;
  transform: scale(1.08);
}

/* Custom premium scrollbar for dark theme */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(8, 12, 28, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.15); border-radius: 9999px; transition: all 0.3s; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.45); }

/* line-clamp helper */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Modern Premium Glassmorphism and Cards */
.glass-nav {
  background: rgba(8, 12, 28, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.25), 0 0 1px 1px rgba(99, 102, 241, 0.2);
}

.active-genre {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  color: white;
}

/* Premium Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Form glows */
.input-glow:focus {
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.6) !important;
}

/* Mobile Plyr controls adjustments to prevent overlaps and allow draggable progress bar */
@media (max-width: 640px) {
  .plyr__controls {
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 12px 10px 10px !important;
  }
  
  .plyr__progress {
    flex-basis: 100% !important;
    order: -1 !important;
    margin: 0 0 6px 0 !important;
    padding: 4px 0 !important;
    min-width: 100% !important;
  }
  
  .plyr__time {
    margin-right: auto !important; /* Push settings and fullscreen to the right */
    padding-left: 4px !important;
  }
  
  /* Hide volume control completely on mobile to save space */
  .plyr__volume {
    display: none !important;
  }
  
  /* Give buttons more touch space and breathing room */
  .plyr__controls > button,
  .plyr__controls > .plyr__time,
  .plyr__controls > .plyr__menu {
    margin: 2px 5px !important;
  }
  
  .plyr__controls button {
    padding: 6px !important;
  }
}
