body {
  background-color: #141414;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom scrollbar for desktop */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #141414;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

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

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Smooth transitions for all interactive elements */
a, button, input {
  transition: all 0.2s ease-in-out;
}

/* Netflix-style row hover effect - only on desktop */
@media (min-width: 1024px) {
  .movie-row-container:hover .movie-card {
    opacity: 0.7;
  }

  .movie-row-container .movie-card:hover {
    opacity: 1;
    transform: scale(1.15);
    z-index: 50;
  }
  
  /* Adjust transform origin for cards at the edges to prevent clipping */
  .movie-row-container .movie-card:first-child:hover {
    transform-origin: left center;
  }
  
  .movie-row-container .movie-card:last-child:hover {
    transform-origin: right center;
  }
}

/* Skeleton pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Backdrop blur for modern UI */
.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Line clamp for descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prevent text selection on interactive elements */
.no-select {
  user-select: none;
  -webkit-user-select: none;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease-in-out;
}

.movie-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* Redesigned Top 10 header */
.top10-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, rgba(229, 9, 20, 1) 0%, rgba(229, 9, 20, 0.78) 55%, rgba(0, 0, 0, 0.25) 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.top10-badge__num {
  font-weight: 950;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.92);
}

.top10-badge__label {
  margin-top: 4px;
  font-weight: 950;
  font-size: 18px;
  line-height: 1;
  color: #fff;
}

/* Cleaner outlined rank numbers */
.top10-rank {
  font-size: 100px;
  line-height: 0.9;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.85);
  user-select: none;
  margin-right: -16px;
  z-index: 10;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.22);
}

@media (min-width: 768px) {
  .top10-rank {
    font-size: 150px;
    margin-right: -32px;
  }
}

@media (min-width: 1024px) {
  .top10-rank {
    font-size: 180px;
    margin-right: -40px;
  }
}
