/* Custom styles for Selah365 H5 */

/* Safe area for iOS devices */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.h-safe-bottom {
  height: env(safe-area-inset-bottom, 0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Hide scrollbar for cleaner look on mobile */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Navigation item styles */
.nav-item {
  color: white; /* PC Unselected: Text White */
}

.nav-item.active {
  color: white; /* PC Selected: Text White */
  background: rgba(255, 255, 255, 0.2); /* PC Selected: bg-stone-50/50 (approx) */
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Card hover effects */
.song-card {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.song-card:active {
  transform: scale(0.98);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Category tag styles */
.category-tag {
  transition: all 0.2s ease;
}

.category-tag:active {
  transform: scale(0.95);
}

.category-tag.active {
  background: #C20C0C;
  border-color: #C20C0C;
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #C20C0C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Slide up animation for modals */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.3s ease forwards;
}

/* Progress bar touch area */
#progressTrack {
  touch-action: none;
}

/* Prevent text selection on buttons */
button {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Playing indicator animation */
.playing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.playing-indicator span {
  width: 3px;
  background: #C20C0C;
  border-radius: 1px;
  animation: soundwave 0.8s ease-in-out infinite;
}

.playing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.playing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.playing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes soundwave {
  0%, 100% {
    height: 4px;
  }
  50% {
    height: 16px;
  }
}

/* Repeat mode icon states */
.repeat-one::after {
  content: '1';
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  /* Tablet styles */
  .grid-cols-responsive {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  /* Mobile styles */
  .grid-cols-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Song list item */
.song-list-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease;
}

.song-list-item:active {
  background-color: rgba(255, 255, 255, 0.1);
}

.song-list-item.playing {
  background-color: rgba(255, 255, 255, 0.05); /* PC: bg-white/5 */
}

/* Swipe indicator */
.swipe-indicator {
  width: 32px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 8px auto;
}

