/* Custom fixes for genres and view-all pages */

/* Ensure proper page scrolling */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Fix for header overlap issues - Updated for non-fixed header */
header {
  position: relative;
  z-index: 40;
}

/* Ensure main content flows naturally after header */
main {
  position: relative;
  min-height: calc(100vh - 120px);
}

/* Fix for genres page scrolling */
.content-section {
  min-height: calc(100vh - 120px);
  position: relative;
}

/* Fix for filter dropdowns */
select {
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: #ffffff !important;
}

/* Force webkit browsers to show proper colors */
select::-webkit-color-swatch-wrapper {
  padding: 0;
}

select::-webkit-color-swatch {
  border: none;
}

/* Ensure dropdown options have proper styling - Multiple browser support */
select option {
  background-color: #1f2937 !important;
  background: #1f2937 !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
  border: none !important;
  outline: none !important;
}

/* Firefox specific option styling */
select option:checked {
  background-color: #fbbf24 !important;
  background: #fbbf24 !important;
  color: #1f2937 !important;
}

/* Webkit browsers option styling */
select option:hover {
  background-color: #374151 !important;
  background: #374151 !important;
  color: #fbbf24 !important;
}

/* Additional browser-specific fixes */
select optgroup {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}

/* Force select to maintain its styling */
#sort-select,
#year-select,
#genre-select {
  background-color: transparent !important;
  color: #ffffff !important;
}

/* Better focus states for selects */
select:focus {
  outline: 2px solid rgb(234, 179, 8);
  outline-offset: 2px;
  border-color: rgb(234, 179, 8);
}

/* Improved loading states */
.loading-skeleton {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Better card hover effects */
.movie-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Enhanced play button styling */
.movie-card .fa-play {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Improved hover states for movie cards */
.movie-card:hover .absolute.inset-0 {
  backdrop-filter: blur(2px);
}

/* Enhanced MoviesHub logo styling */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Fix for sticky filter bar - Updated for non-fixed header */
.sticky-filters {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px);
}

/* Ensure proper z-index for navigation */
nav {
  z-index: 50;
}

/* Fix for mobile scrolling */
@media (max-width: 768px) {
  body {
    -webkit-overflow-scrolling: touch;
  }
  
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}

/* Improved gradient effects */
.hero-gradient {
  background: linear-gradient(135deg, 
    rgba(17, 24, 39, 0.9) 0%, 
    rgba(31, 41, 55, 0.8) 25%, 
    rgba(55, 65, 81, 0.7) 50%, 
    rgba(31, 41, 55, 0.8) 75%, 
    rgba(17, 24, 39, 0.9) 100%);
}

/* Better focus states */
button:focus,
select:focus,
input:focus {
  outline: 2px solid rgb(234, 179, 8);
  outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
button,
select,
input,
.movie-card,
.genre-card {
  transition: all 0.2s ease-in-out;
}

/* Enhanced load more button - Modern design */
#load-more-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-width: 200px;
  font-weight: 600;
  border: none;
  outline: none;
  cursor: pointer;
}

#load-more-btn:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(234, 179, 8, 0.3);
}

#load-more-btn:focus {
  outline: 2px solid rgb(234, 179, 8);
  outline-offset: 2px;
}

/* Load more button container centering */
.flex.justify-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

footer div.flex a,.icon-width-40{
  width: 2.5rem !important;
}
/* Dropdown enhancement for better visibility */
.filter-dropdown {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Additional dropdown fixes for cross-browser compatibility */
.bg-gray-800\/80 select {
  background-color: transparent !important;
  color: #ffffff !important;
}

/* Force dropdown container styling */
.flex.items-center.gap-2.bg-gray-800\/80 {
  background-color: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Enhanced select element styling */
select[id$="-select"] {
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
}

/* Fix for Safari dropdown styling */
@supports (-webkit-appearance: none) {
  select[id$="-select"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent !important;
  }
  
  select[id$="-select"] option {
    background-color: #1f2937 !important;
    color: #ffffff !important;
  }
}

/* Fix for Chrome/Edge dropdown styling */
@supports not (-webkit-appearance: none) {
  select[id$="-select"] {
    appearance: none;
    background-color: transparent !important;
  }
}

/* Force option styling across all browsers */
#sort-select option,
#year-select option, 
#genre-select option {
  background-color: #1f2937 !important;
  background: #1f2937 !important;
  color: #ffffff !important;
  padding: 10px !important;
}

/* Hover states for options */
#sort-select option:hover,
#year-select option:hover,
#genre-select option:hover {
  background-color: #374151 !important;
  background: #374151 !important;
  color: #fbbf24 !important;
}

/* Loading skeleton improvements */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}
