/* Base styles */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom components */
@layer components {
  .step-pill {
    @apply px-3 py-1 rounded-full text-center transition-colors duration-300;
    @apply bg-gray-700 text-gray-400;
  }

  .step-pill.completed {
    @apply bg-green-500 text-white;
  }

  .step-pill.current {
    @apply bg-blue-500 text-white;
  }
}

/* Navigation buttons */
.nav-btn {
  @apply px-4 py-2 rounded-lg transition-all duration-200 font-medium;
  @apply bg-gray-700/50 text-gray-300 hover:bg-gray-600/50 hover:text-white;
  @apply border border-gray-600/50 hover:border-gray-500/50;
  @apply backdrop-blur-sm;
}

.nav-btn.active {
  @apply bg-gradient-to-r from-blue-600 to-purple-600 text-white;
  @apply border-blue-500/50 shadow-lg;
  @apply transform scale-105;
}

/* Video player styling */
video {
  aspect-ratio: 9/16;
  object-fit: cover;
  width: 100%;
  height: auto;
  background-color: #000;
}

/* Text input styling */
#video-text, #voice-text-input {
  @apply w-full p-4 rounded-xl border border-gray-600 bg-gray-700/50 text-white;
  @apply focus:ring-2 focus:ring-blue-500 focus:border-blue-500;
  @apply backdrop-blur-sm transition-all duration-200;
  min-height: 120px;
  caret-color: #3b82f6;
  resize: none;
}

#video-text::placeholder, #voice-text-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

#voice-text-input {
  background-color: #374151 !important; /* bg-gray-700 */
  color: #ffffff !important; /* text-white */
}

/* Watermark overlay */
#watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-container:hover #watermark-overlay,
#watermark-overlay:hover {
  opacity: 1;
  pointer-events: auto;
}

/* Progress bars */
#progress-container {
    @apply space-y-6 w-full;
}

#queue-progress-container,
#processing-progress-container {
    @apply w-full;
}

#queue-progress-bar {
    @apply bg-gradient-to-r from-blue-500 to-purple-500 h-3 rounded-full transition-all duration-500;
}

#processing-progress-bar {
    @apply bg-gradient-to-r from-green-500 to-blue-500 h-3 rounded-full transition-all duration-500;
}

.progress-bar-container {
    @apply w-full bg-gray-700 rounded-full h-3 mb-1;
}

.progress-status {
    @apply flex justify-between mb-3;
}

.progress-status span {
    @apply text-sm font-medium text-gray-300;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Toast notifications */
.toast {
  @apply px-6 py-4 rounded-xl shadow-2xl;
  @apply text-white animate__animated animate__fadeInUp;
  @apply backdrop-blur-md border border-gray-600/50;
  @apply max-w-sm w-full;
}

.toast.info {
  @apply bg-blue-600/90;
}

.toast.success {
  @apply bg-green-600/90;
}

.toast.warning {
  @apply bg-yellow-600/90;
}

.toast.error {
  @apply bg-red-600/90;
}

/* Gallery styles */
.gallery-item {
    @apply bg-gray-800/50 backdrop-blur-sm rounded-xl overflow-hidden shadow-xl;
    @apply border border-gray-700/50 transition-all duration-300;
    @apply hover:scale-105 hover:shadow-2xl hover:border-gray-600/50;
}

.gallery-item video {
    @apply rounded-t-xl;
    aspect-ratio: 9/16;
    object-fit: cover;
}

.gallery-item-info {
    @apply p-4 bg-gray-800/80 backdrop-blur-sm;
}

.gallery-item-title {
    @apply text-sm font-medium text-gray-300 mb-2;
}

.gallery-item-actions {
    @apply flex gap-2;
}

.gallery-btn {
    @apply flex-1 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200;
    @apply transform hover:scale-105;
}

.gallery-download-btn {
    @apply bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white;
}

.gallery-premium-btn {
    @apply bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white;
}

/* Gallery empty state */
#gallery-empty {
    @apply flex flex-col items-center justify-center py-12;
}

#gallery-empty .empty-icon {
    @apply w-24 h-24 bg-gray-700 rounded-full flex items-center justify-center mb-4;
}

/* AI Voice Generator Styles */
.voice-card {
  background-color: rgba(31, 41, 55, 0.5); /* bg-gray-800/50 */
  backdrop-filter: blur(4px);
  border-radius: 0.75rem; /* rounded-xl */
  padding: 1.5rem; /* p-6 */
  transition: all 0.3s ease-in-out;
  border: 1px solid rgba(55, 65, 81, 0.5); /* border-gray-700/50 */
  cursor: pointer;
  transform-origin: center;
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 200px;
  padding: calc(var(--padding) * 0.5);
  font-size: 13px;
}

.voice-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  border-color: rgba(75, 85, 99, 0.5); /* hover:border-gray-600/50 */
}

.voice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.6s;
}

.voice-card:hover::before {
  left: 100%;
}

.voice-card.selected {
  border-color: rgba(168, 85, 247, 0.5); /* border-purple-500/50 */
  background-color: rgba(76, 29, 149, 0.2); /* bg-purple-900/20 */
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25); /* shadow-lg shadow-purple-500/25 */
}

.voice-avatar {
  width: 4rem; /* w-16 */
  height: 4rem; /* h-16 */
  border-radius: 9999px; /* rounded-full */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem; /* mb-4 */
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(to bottom right, #a855f7, #ec4899); /* bg-gradient-to-br from-purple-500 to-pink-500 */
  color: white;
  font-size: 1.5rem; /* text-2xl */
  font-weight: 700; /* font-bold */
  position: relative;
  overflow: hidden;
}

.voice-avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) skewX(-20deg); }
  100% { transform: translateX(100%) skewX(-20deg); }
}

.voice-name {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: white;
  margin-bottom: 0.5rem; /* mb-2 */
  text-align: center;
}

.voice-language {
  display: inline-block;
  padding: 0.25rem 0.75rem; /* px-3 py-1 */
  border-radius: 9999px; /* rounded-full */
  font-size: 0.75rem; /* text-xs */
  font-weight: 500; /* font-medium */
  background-color: rgba(55, 65, 81, 0.5); /* bg-gray-700/50 */
  color: #d1d5db; /* text-gray-300 */
  border: 1px solid rgba(75, 85, 99, 0.5); /* border-gray-600/50 */
}

.voice-preview {
  margin-top: 1rem; /* mt-4 */
  padding: 0.75rem; /* p-3 */
  background-color: rgba(55, 65, 81, 0.3); /* bg-gray-700/30 */
  border-radius: 0.5rem; /* rounded-lg */
  border: 1px solid rgba(75, 85, 99, 0.3); /* border-gray-600/30 */
}

.voice-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem; /* mt-4 */
}

.play-btn {
  width: 2.5rem; /* w-10 */
  height: 2.5rem; /* h-10 */
  border-radius: 9999px; /* rounded-full */
  background-color: #9333ea; /* bg-purple-600 */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.play-btn:hover {
  background-color: #7e22ce; /* hover:bg-purple-700 */
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.5);
}

.play-btn.playing {
  background-color: #dc2626; /* bg-red-600 */
  animation: pulse 1.5s infinite;
}
.play-btn.playing:hover {
  background-color: #b91c1c; /* hover:bg-red-700 */
}

.select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem; /* px-4 py-2 */
  border-radius: 0.5rem; /* rounded-lg */
  font-weight: 500; /* font-medium */
  transition: all 0.2s ease-in-out;
  background-image: linear-gradient(to right, #9333ea, #ec4899); /* bg-gradient-to-r from-purple-600 to-pink-600 */
  color: white;
}

.select-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.5);
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Enhanced Waveform Animation */
.waveform {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 20px;
  margin-top: 0.5rem;
  gap: 2px;
}

.waveform-bar {
  width: 3px;
  background: linear-gradient(to top, #a855f7, #ec4899);
  border-radius: 2px;
  transition: all 0.3s ease;
  height: 8px;
}

.waveform.animating .waveform-bar {
  animation: waveformAnimation 1.2s ease-in-out infinite;
}

.waveform.animating .waveform-bar:nth-child(1) { animation-delay: 0s; }
.waveform.animating .waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.waveform.animating .waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.waveform.animating .waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.waveform.animating .waveform-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveformAnimation {
  0%, 100% { 
    height: 8px; 
    opacity: 0.6;
  }
  50% { 
    height: 20px; 
    opacity: 1;
  }
}

/* Modal styles */
.modal-backdrop {
  @apply fixed inset-0 bg-black/80 backdrop-blur-sm;
  @apply flex items-center justify-center z-50;
  animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
  @apply bg-gray-800/90 backdrop-blur-md p-8 rounded-2xl shadow-2xl;
  @apply max-w-lg w-full mx-4 border border-gray-700/50;
  animation: modalSlideIn 0.3s ease-out;
}

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

@keyframes modalSlideIn {
  from { 
    opacity: 0; 
    transform: translateY(-50px) scale(0.95);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

/* Enhanced Loading States */
.loading-spinner {
  @apply animate-spin rounded-full border-b-2 border-current;
}

.loading-pulse {
  @apply animate-pulse bg-gray-700/50 rounded;
}

/* Voice Loading States */
.voice-loading-state {
  @apply bg-gray-800/50 backdrop-blur-sm p-8 rounded-2xl shadow-xl border border-gray-700/50;
  @apply max-w-md mx-auto text-center;
}

.voice-loading-progress {
  @apply w-full bg-gray-700 rounded-full h-2 mt-4;
}

.voice-loading-bar {
  @apply h-2 rounded-full transition-all duration-500;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Enhanced Button hover effects */
.btn-hover-effect {
  @apply transition-all duration-200 transform hover:scale-105;
  @apply hover:shadow-lg;
}

/* Card hover effects */
.card-hover-effect {
  @apply transition-all duration-300 transform hover:scale-105;
  @apply hover:shadow-xl hover:border-gray-600/50;
}

/* Text gradient effects */
.text-gradient {
  @apply bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent;
}

.text-gradient-purple {
  @apply bg-gradient-to-r from-purple-400 to-pink-400 bg-clip-text text-transparent;
}

/* Glass morphism effects */
.glass {
  @apply bg-gray-800/50 backdrop-blur-sm border border-gray-700/50;
}

.glass-light {
  @apply bg-gray-700/30 backdrop-blur-sm border border-gray-600/30;
}

/* Container constraints */
.container {
  @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
}

/* Ensure proper grid layout */
.grid {
  display: grid;
}

/* Ensure all sections have proper spacing */
section {
  position: relative;
  z-index: 1;
}

/* Fix for AI Voice section specifically */
#ai-voice-section {
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Ensure voice cards don't overlap header */
#voice-cards-container {
  position: relative;
  z-index: 1;
}

/* Fix modal z-index to be above header */
#voice-result-modal {
  z-index: 60;
}

/* Fix toast container z-index */
#toast-container {
  z-index: 70;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #video-text, #voice-text-input {
    min-height: 100px;
    padding: 0.75rem;
  }
  
  .step-pill {
    @apply px-2 py-0.5 text-sm;
  }
  
  .voice-card {
    @apply p-4;
  }
  
  .voice-avatar {
    @apply w-12 h-12 text-xl;
  }
  
  .voice-name {
    @apply text-base;
  }
  
  /* Fix container width on mobile */
  main {
    @apply px-3;
  }
  
  /* Enhanced mobile voice controls */
  .voice-controls {
    @apply flex-col gap-3;
  }
  
  .play-btn {
    @apply w-12 h-12;
  }
  
  .select-btn {
    @apply w-full justify-center;
  }
  
  /* Mobile waveform */
  .waveform {
    @apply h-16;
  }
  
  .waveform-bar {
    @apply w-2;
  }
}

@media (max-width: 768px) {
  .nav-btn {
    @apply px-3 py-2 text-sm;
  }
  
  .nav-btn i {
    @apply mr-1;
  }
  
  /* Mobile voice gallery */
  #voice-cards-container {
    @apply grid-cols-1;
  }
  
  /* Mobile modal adjustments */
  .modal-content {
    @apply mx-2 p-6;
  }
}

@media (max-width: 1024px) {
  /* Limit container width on larger screens */
  main {
    @apply max-w-6xl;
  }
  
  /* Tablet voice gallery */
  #voice-cards-container {
    @apply grid-cols-2;
  }
}

@media (min-width: 1280px) {
  /* Set maximum width for very large screens */
  main {
    @apply max-w-7xl;
  }
  
  /* Desktop voice gallery */
  #voice-cards-container {
    @apply grid-cols-3;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .voice-card,
  .play-btn,
  .select-btn,
  .waveform-bar {
    animation: none !important;
    transition: none !important;
  }
}

/* Focus states for accessibility */
.voice-card:focus,
.play-btn:focus,
.select-btn:focus {
  @apply outline-none ring-2 ring-purple-500 ring-offset-2 ring-offset-gray-900;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .voice-card {
    border: 2px solid #ffffff;
  }
  
  .voice-avatar {
    border: 2px solid #ffffff;
  }
}

.selected-voice-notification {
  margin-bottom: 0.5rem;
  color: #a855f7;
  font-weight: 500;
  text-align: left;
}

:root {
  --plyr-color-main: #a78bfa; /* Tailwind purple-400 */
  --plyr-audio-controls-background: #232946; /* dark background */
  --plyr-audio-control-color: #fff;
  --plyr-audio-control-color-hover: #a78bfa;
  --plyr-range-fill-background: #a78bfa;
  --plyr-range-thumb-background: #a78bfa;
  --plyr-tooltip-background: #232946;
  --plyr-tooltip-color: #fff;
  --padding: 0.7rem;
  --margin: 0.7rem;
  --font-h1: 24px;
  --font-h2: 18px;
  --font-body: 14px;
  --input-height: 2.2rem;
  --button-height: 2.4rem;
  --card-gap: 0.6rem;
  --voice-card-width: 180px;
  --voice-card-padding: 12px;
  --button-padding-v: 6px;
  --button-padding-h: 12px;
  --button-font-size: 12px;
  --heading-margin: 8px;
}
.plyr--audio .plyr__controls {
  border-radius: 0.75rem;
  box-shadow: 0 2px 16px 0 rgba(80,80,120,0.15);
}

/* CSS Variables for sizing */
:root {
  --padding: 0.7rem;
  --margin: 0.7rem;
  --font-h1: 24px;
  --font-h2: 18px;
  --font-body: 14px;
  --input-height: 2.2rem;
  --button-height: 2.4rem;
  --card-gap: 0.6rem;
}

body {
  font-size: var(--font-body) !important;
  margin: 0;
  padding: 0;
}

h1, .text-2xl, .text-3xl {
  font-size: var(--font-h1) !important;
}
h2, .text-xl {
  font-size: var(--font-h2) !important;
}

input, textarea, select {
  font-size: var(--font-body);
  height: var(--input-height);
  padding: calc(var(--padding) * 0.7);
}

button {
  font-size: var(--font-body);
  height: var(--button-height);
  padding: 0 calc(var(--padding) * 1.2);
}

/* Reduce padding/margin globally */
[class*="p-"] {
  padding: calc(var(--padding) * 0.7) !important;
}
[class*="m-"] {
  margin: calc(var(--margin) * 0.7) !important;
}

/* Custom Scrollbar for main scroll area */
.main-scroll::-webkit-scrollbar {
  width: 8px;
  background: #222;
}
.main-scroll::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 6px;
}
.main-scroll::-webkit-scrollbar-thumb:hover {
  background: #666;
}
/* Firefox */
.main-scroll {
  scrollbar-width: thin;
  scrollbar-color: #444 #222;
}

/* Remove conflicting absolute/fixed for overlays */
.preview-overlay, .modal, .fixed, .absolute {
  position: static !important;
}

/* Voice selection grid improvements */
.voice-grid, #voice-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--voice-card-width), 1fr));
  gap: var(--card-gap, 0.6rem);
}
.voice-card {
  max-width: var(--voice-card-width) !important;
  min-width: 0;
  padding: var(--voice-card-padding) !important;
  font-size: var(--font-body) !important;
}

/* Consistent spacing for cards */
.voice-card + .voice-card {
  margin-top: 0;
}

/* Make all cards, buttons, and form fields more compact */
.card, .voice-card, .form-field, .input, .button {
  padding: calc(var(--padding) * 0.7) !important;
  font-size: var(--font-body) !important;
}

/* Remove top margin/padding from first child in main scroll area */
.main-scroll > div:first-child,
.main-scroll > section:first-child,
.main-scroll .text-center:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Make audio controls and buttons smaller in voice cards */
.voice-card audio,
.voice-card button {
  height: 2rem;
  font-size: 13px;
  padding: 0 0.7rem;
}

/* End compact UI overrides */

/* === Compact, balanced slider for voice cards === */
/*
input[type=range], .voice-card input[type=range] {
  height: 1.1rem !important;
  min-height: 1.1rem !important;
  font-size: 1rem !important;
  margin: 0.3rem 0.5rem !important;
}

input[type=range]::-webkit-slider-thumb {
  height: 0.9rem;
  width: 0.9rem;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  box-shadow: 0 0 2px #a855f7aa;
}
input[type=range]::-moz-range-thumb {
  height: 0.9rem;
  width: 0.9rem;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  box-shadow: 0 0 2px #a855f7aa;
}
input[type=range]::-ms-thumb {
  height: 0.9rem;
  width: 0.9rem;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  box-shadow: 0 0 2px #a855f7aa;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 0.35rem;
  border-radius: 0.2rem;
  background: linear-gradient(90deg, #a855f7, #ec4899);
}
input[type=range]::-moz-range-track {
  height: 0.35rem;
  border-radius: 0.2rem;
  background: linear-gradient(90deg, #a855f7, #ec4899);
}
input[type=range]::-ms-fill-lower, input[type=range]::-ms-fill-upper {
  height: 0.35rem;
  border-radius: 0.2rem;
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

input[type=range]:focus {
  outline: none;
  box-shadow: 0 0 0 1.5px #a855f7aa;
}
*/
/* === End remove legacy/conflicting slider styles === */

/* === Force 3-column grid for voice cards on desktop and up === */
@media (min-width: 768px) {
  .voice-grid, #voice-cards-container {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
/* === End 3-column grid override === */

/* === Limit slider width and align controls in voice cards === */
.voice-card .voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}
.voice-card input[type=range] {
  max-width: 70px;
  flex: 0 0 70px;
}
/* === End slider width/controls fix === */

/* === Compact progress and volume sliders in voice cards === */
.voice-card .voice-progress {
  max-width: 100px;
  width: 100px;
  min-width: 0;
  flex: 0 0 100px;
  margin-left: 0.5rem !important;
  margin-right: 0.5rem !important;
}
.voice-card .voice-volume {
  max-width: 70px;
  flex: 0 0 70px;
}
/* === End compact progress/volume sliders === */

/* === Compact, balanced voice card slider styles === */
.voice-card .voice-slider {
  width: 100%;
  max-width: 180px;
  margin-top: 8px;
  margin-bottom: 0.7rem;
  display: block;
  box-sizing: border-box;
  background: transparent;
}

.voice-card .voice-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
}
.voice-card .voice-slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3f51b5;
  cursor: pointer;
  margin-top: -4px;
  box-shadow: 0 0 2px #3f51b5aa;
  border: none;
}
.voice-card .voice-slider:focus::-webkit-slider-thumb {
  outline: 2px solid #3f51b5;
}

/* Mozilla */
.voice-card .voice-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3f51b5;
  cursor: pointer;
  border: none;
}
.voice-card .voice-slider::-moz-range-track {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
}

/* Active fill for Mozilla */
.voice-card .voice-slider::-moz-range-progress {
  height: 4px;
  background: #3f51b5;
  border-radius: 2px;
}

/* IE/Edge */
.voice-card .voice-slider::-ms-fill-lower {
  background: #3f51b5;
  border-radius: 2px;
}
.voice-card .voice-slider::-ms-fill-upper {
  background: #e0e0e0;
  border-radius: 2px;
}
.voice-card .voice-slider::-ms-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3f51b5;
  cursor: pointer;
  border: none;
}
.voice-card .voice-slider:focus {
  outline: none;
}

/* Remove default appearance for all browsers */
.voice-card .voice-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Proper spacing above Select Voice button */
.voice-card .voice-slider + button {
  margin-top: 0.7rem;
}
/* === End compact voice card slider styles === */

.video-stats {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  font-size: 12px;
  align-items: center;
}
.video-stats button {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0;
  font-size: 13px;
  transition: color 0.2s;
}
.video-stats .like-btn.liked {
  color: #e53e3e;
}
.video-stats .like-btn:hover {
  color: #f87171;
}
.video-stats .download-btn:hover {
  color: #60a5fa;
}

/* --- Responsive Navigation Bar --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #181f2a;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.5rem;
  color: #fff;
  font-weight: bold;
}
/* --- Enhanced Navigation Tabs --- */
.nav-tabs {
  display: flex;
  gap: 16px;
  background: #23293a;
  border-radius: 12px;
  padding: 4px 8px;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.08);
}
.nav-tab {
  color: #b3b8c5;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  background: transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: none;
  border: none;
  outline: none;
  position: relative;
}
.nav-tab.active, .nav-tab:focus, .nav-tab:hover {
  color: #fff;
  background: linear-gradient(90deg, #6a5af9 0%, #8f6af9 100%);
  box-shadow: 0 2px 8px 0 rgba(106,90,249,0.15);
  z-index: 1;
}
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
  }
  .logo {
    margin-bottom: 12px;
    text-align: center;
  }
  .nav-tabs {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 4px;
    margin-bottom: 0;
    margin-top: 4px;
  }
  .nav-tab {
    font-size: 1rem;
    padding: 10px 0;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
}
/* --- End Enhanced Navigation Tabs --- */

footer {
  background: #181f2a;
  color: #b3b8c5;
  text-align: center;
  padding: 18px 8px 10px 8px;
  border-top: 1px solid #23293a;
  font-size: 0.98rem;
  margin-top: 32px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #b3b8c5;
  text-decoration: none;
  transition: color 0.2s;
  padding: 0 6px;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
@media (max-width: 600px) {
  .footer-links {
    gap: 12px;
    font-size: 1rem;
  }
  footer {
    font-size: 0.97rem;
    padding: 16px 4px 8px 4px;
  }
}