* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #0b0b0b;
  color: #fff;
  overflow-x: hidden;
}

.app-offset {
  margin-left: 0;
}

.header-offset {
  left: 0;
}

@media (min-width: 768px) {
  .app-offset {
    margin-left: 16rem;
  }
  .sidebar-collapsed .app-offset {
    margin-left: 0;
  }
  .header-offset {
    left: 16rem;
  }
  .sidebar-collapsed .header-offset {
    left: 0 !important;
  }
}

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

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

.nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: #a1a1aa;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover {
  background: #18181b;
  color: #fff;
  transform: translateX(4px);
}

.nav-link.active {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.poster-card {
  min-width: 150px;
  max-width: 200px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.poster-card:hover {
  transform: translateY(-8px);
  z-index: 10;
}

@media (min-width: 640px) {
  .poster-card {
    min-width: 180px;
  }
}

@media (min-width: 1024px) {
  .poster-card {
    min-width: 200px;
  }
}

.overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: transparent;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

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

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out;
}

.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;
}

button:focus, a:focus, input:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}

#searchInput {
  transition: all 0.3s ease;
}

#searchInput:focus {
  transform: scale(1.01);
}

img {
  image-rendering: -webkit-optimize-contrast;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.snap-x {
  scroll-snap-type: x mandatory;
}

.snap-mandatory {
  scroll-snap-stop: always;
}

.poster-card {
  scroll-snap-align: start;
}
