/* ============================================================
   JFlix Modern Loading, Empty & Error State System
   ============================================================ */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-0, #ffffff);
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  width: 100%;
  min-height: 240px;
}

.loading::before {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--brand, #e50914);
  border-right-color: #ff3b3b;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(229, 9, 20, 0.45);
  animation: jflixSmoothSpin 1.1s cubic-bezier(0.4, 0.05, 0.2, 0.95) infinite;
  will-change: transform;
}

.error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-1, #c4c5d6);
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  text-align: center;
  width: 100%;
  min-height: 240px;
  background: rgba(231, 76, 60, 0.05);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 18px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
}

.error::before {
  content: '⚠';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  background: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
  font-size: 22px;
  border-radius: 50%;
  border: 1px solid rgba(231, 76, 60, 0.35);
  box-shadow: 0 0 24px rgba(231, 76, 60, 0.25);
}

.no-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  color: var(--text-2, #8a8c9e);
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  text-align: center;
  width: 100%;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  margin: 20px 0;
}

.no-content::before {
  content: '🎬';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Category specific glow & colors */
.loading.anime::before {
  border-top-color: var(--brand-anime, #8a70ff);
  border-right-color: #b5a4ff;
  box-shadow: 0 0 22px rgba(138, 112, 255, 0.45);
}

.loading.korean::before {
  border-top-color: var(--brand-korean, #ff4d94);
  border-right-color: #ff85b8;
  box-shadow: 0 0 22px rgba(255, 77, 148, 0.45);
}

.loading.movies::before {
  border-top-color: var(--brand-movies, #e50914);
  border-right-color: #ff4d55;
  box-shadow: 0 0 22px rgba(229, 9, 20, 0.45);
}

.loading.tvshows::before {
  border-top-color: var(--brand-tv, #0084ff);
  border-right-color: #4da6ff;
  box-shadow: 0 0 22px rgba(0, 132, 255, 0.45);
}

.loading.cartoon::before {
  border-top-color: var(--brand-cartoon, #ffaa00);
  border-right-color: #ffc44d;
  box-shadow: 0 0 22px rgba(255, 170, 0, 0.45);
}

/* Responsive spacing */
@media (max-width: 768px) {
  .loading, .error, .no-content {
    padding: 32px 16px;
    min-height: 180px;
  }
}
