/* ─── Base ─────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  padding-bottom: 100px;
}

/* ─── Animations ───────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out both;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out both;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out both;
}

/* Staggered delays for grid items */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* ─── Navbar scroll shadow ─────────────────── */
.navbar-scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.dark .navbar-scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* ─── Cards ────────────────────────────────── */
.card-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
}

.station-logo, .channel-logo {
  height: 150px;
  object-fit: contain;
  padding: 10px;
}

/* ─── Player Bar ───────────────────────────── */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.player-controls {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  border-radius: 8px;
}

.player-controls input[type=range] {
  width: 100%;
  margin: 5px 0;
}

/* Custom volume slider */
input[type="range"].volume-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"].volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #DC2626;
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="range"].volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
input[type="range"].volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #DC2626;
  border: none;
  cursor: pointer;
}

/* ─── Back to top ──────────────────────────── */
#back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ─── Image loading ────────────────────────── */
img[loading="lazy"] {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.dark img[loading="lazy"] {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
  background-size: 200% 100%;
}

/* ─── Skeleton loading ──────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.375rem;
}
.dark .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

/* ─── Section transitions ───────────────────── */
.section-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Custom scrollbar (refined) ────────────── */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb { background: #475569; }
