/* CSS Variables for Landing Page Color Scheme */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0c0c0d;
    --dark-secondary: #1a1a1b;
    --dark-tertiary: #2d2d30;
    --purple-deep: #5d45a7;
    --purple-bright: #a855f7;
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --gradient-3: linear-gradient(135deg, #5d45a7 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-bg: linear-gradient(135deg, #0c0c0d 0%, #1a1a1b 50%, #2d2d30 100%);
}

/* Body styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--dark);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header styles - Beautiful Transparent Design with Gradient Blur */
.header {
  width: 100vw;
  height: 90px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg,
    rgba(12, 12, 13, 0.9) 0%,
    rgba(26, 26, 27, 0.8) 50%,
    rgba(45, 45, 48, 0.6) 100%);
  position: fixed;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: none;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
  padding: 0 2rem;
  max-width: 100%;
  box-sizing: border-box;
}

/* Header scroll effect */
.header.scrolled {
  background: linear-gradient(180deg,
    rgba(12, 12, 13, 0.95) 0%,
    rgba(26, 26, 27, 0.9) 50%,
    rgba(45, 45, 48, 0.8) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

/* Apply navbar class for consistency */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(180deg,
    rgba(12, 12, 13, 0.9) 0%,
    rgba(26, 26, 27, 0.8) 50%,
    rgba(45, 45, 48, 0.6) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Landing Page Logo Styling */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.logo img {
    width: 180px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 25px rgba(139, 92, 246, 0.8));
}

/* Navigation menu styles - Updated with Landing Page Colors */
.nav-menu {
  width: 100%;
  background: linear-gradient(135deg,
    rgba(12, 12, 13, 0.85) 0%,
    rgba(26, 26, 27, 0.8) 25%,
    rgba(45, 45, 48, 0.75) 50%,
    rgba(139, 92, 246, 0.2) 75%,
    rgba(236, 72, 153, 0.15) 100%);
  position: fixed;
  top: 80px;
  z-index: 1001;
  padding: 12px 0;
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
              0 4px 16px rgba(139, 92, 246, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Enhanced nav-menu hover effect */
.nav-menu:hover {
  background: linear-gradient(135deg,
    rgba(12, 12, 13, 0.9) 0%,
    rgba(26, 26, 27, 0.85) 25%,
    rgba(45, 45, 48, 0.8) 50%,
    rgba(139, 92, 246, 0.25) 75%,
    rgba(236, 72, 153, 0.2) 100%);
  border-bottom: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
              0 6px 20px rgba(139, 92, 246, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Close Button - Global Styles */
.mobile-menu-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(139, 92, 246, 0.15);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  z-index: 1004;
  opacity: 0;
  transform: scale(0.8) rotate(90deg);
  pointer-events: none;
}

.mobile-menu-close svg {
  color: var(--primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.mobile-menu-close:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.mobile-menu-close:hover svg {
  color: white;
  transform: rotate(90deg);
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.8));
}

.mobile-menu-close:active {
  transform: scale(0.95) rotate(0deg);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.6);
}

/* Show close button when mobile menu is active */
.nav-menu.active .mobile-menu-close {
  display: flex;
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: all;
  animation: closeButtonFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes closeButtonFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(90deg);
  }
  50% {
    transform: scale(1.1) rotate(45deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* Navigation menu transitions */
.nav-item {
  margin: 0 15px;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-item:hover::before {
  width: 80%;
}

.nav-item.active::before {
  width: 90%;
}

/* Navigation active highlight animation - Updated with Landing Page Colors */
.nav-item.active {
  background: var(--gradient-2);
  border-radius: 8px;
  animation: pulse-purple 0.5s cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-purple {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

.nav-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-item a:hover {
  color: var(--primary);
}

.nav-item:hover {
  background-color: rgba(139, 92, 246, 0.1);
}

.nav-item.active a {
  color: white;
  font-weight: 600;
}

/* Dropdown styles for genre navigation */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(26, 26, 27, 0.95);
  min-width: 700px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 20px;
  z-index: 30;
  border: 1px solid rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(20px);
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.dropdown-content {
  flex-wrap: wrap;
}

.dropdown-column {
  flex: 1;
  min-width: 150px;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the content inside columns */
}

.dropdown-column h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 18px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding-bottom: 5px;
  text-align: center;
  width: 100%;
  font-weight: 600;
}

.dropdown-content a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0;
  display: block;
  font-size: 16px;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
  position: relative;
}

.dropdown-content a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.dropdown-footer {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(141, 22, 201, 0.3);
}

.view-all-genres {
  display: inline-block !important;
  background-color: rgba(141, 22, 201, 0.2);
  padding: 8px 20px !important;
  border-radius: 4px;
  font-weight: 500;
}

.view-all-genres:hover {
  background-color: rgba(141, 22, 201, 0.5);
  transform: translateY(-2px) !important;
}

/* Mobile dropdown adjustments */
@media screen and (max-width: 768px) {
  .dropdown-content {
    min-width: 90vw;
    left: 0;
    right: 0;
    transform: none;
  }

  .dropdown-column {
    flex-basis: 100%;
    margin-bottom: 20px; /* Increased margin for better spacing */
    padding: 15px; /* Added padding for better spacing */
    background-color: rgba(20, 20, 20, 0.95); /* Added background color */
    border-radius: 8px; /* Added border radius for rounded corners */
    border: 1px solid rgba(141, 22, 201, 0.5); /* Added border to match desktop */
  }

  /* Set minimum gap between columns on mobile */
  .dropdown-column + .dropdown-column {
    margin-top: 20px; /* Add space between columns */
  }
}

/* Logo styles - Updated for Landing Page Design */
#netflix-logo {
  width: 180px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.5));
  transition: all 0.3s ease;
  margin: 0;
}

#netflix-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.7));
}

/* Landing Page CTA Button Styling */
.cta-button {
  background: var(--gradient-2);
  color: white;
  padding: 16px 32px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Legacy WatchList button styles for backward compatibility */
.watchList-Btn {
  width: auto;
  min-width: 130px;
  height: 50px;
  margin: 0;
  padding: 14px 28px;
  font-size: 1rem;
  color: white;
  border: none;
  border-radius: 20px;
  background: var(--gradient-2);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.watchList-Btn:hover,
.watchList-Btn:focus {
  color: white;
  background: var(--gradient-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  outline: none;
}

.input-container {
  width: 40%;
  margin: auto 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  flex: 1;
  max-width: 500px;
  z-index: 24; /* Higher z-index to ensure search results display properly */
}

/* Landing Page Search Container Styling */
.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 1rem;
  flex: 1;
}

#banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 10%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.1) 80%);
  z-index: 1;
  pointer-events: none; /* This allows clicks to pass through to elements below */
}

/* Landing Page Search Input Styling */
.search-input {
  width: 100%;
  padding: 16px 20px;
  padding-right: 55px;
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 20px;
  background: rgba(26, 26, 27, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  outline: none;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  background: rgba(26, 26, 27, 0.8);
}

/* Legacy input styles for compatibility */
input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 5px 15px;
  font-size: 18px;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(26, 26, 27, 0.6);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

input:focus {
  border-color: var(--primary);
  background: rgba(26, 26, 27, 0.8);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

input::-webkit-input-placeholder {
  color: var(--text-muted);
}

/* Landing Page Search Button */
.search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-2);
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  width: 38px;
  height: 38px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.search-button:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.search-button svg {
  color: white;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Search Results - Updated with Landing Page Styling */
#searchResults {
  position: fixed !important;
  top: 90px !important; /* Updated for new header height */
  left: 51.3% !important;
  transform: translateX(-50%) !important;
  width: 500px !important;
  background: rgba(26, 26, 27, 0.95) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
  z-index: 1001 !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  backdrop-filter: blur(20px) !important;
}

#searchResults p {
  color: #fff;
  text-align: center;
  margin: 10px 0;
}

/* Search Results Items - Updated with Landing Page Styling */
.movie-list {
  padding: 12px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  background-color: rgba(26, 26, 27, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow-x: hidden;
  box-sizing: border-box;
}

.movie-list:hover {
  background-color: rgba(139, 92, 246, 0.1);
  transform: translateX(2px);
}

/* Mobile search results responsive styles */
@media screen and (max-width: 768px) {
  #searchResults {
    top: 80px !important;
    left: 51.3% !important;
    width: 90% !important;
    max-width: 400px !important;
    margin: 0 !important;
  }
}

@media screen and (max-width: 480px) {
  #searchResults {
    top: 75px !important;
    width: 95% !important;
    max-width: none !important;
    left: 51.3% !important;
    transform: translateX(-50%) !important;
  }

  .movie-list {
    padding: 10px;
    font-size: 14px;
  }
}

.search-item-thumbnail {
  width: 50px;
  height: 75px;
  overflow: hidden;
  margin-right: 10px;
}

.search-item-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-item-info {
  flex: 1;
}

.search-item-info h3 {
  font-size: 14px;
  margin: 0 0 5px 0;
}

.search-item-info p {
  font-size: 12px;
  color: #999;
  margin: 0;
}

.watchListBtn {
  background: var(--gradient-2);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-weight: 600;
}

.watchListBtn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ----Banner---- */

#banner-container {
  width: 100vw;
  height: 100vh;
  margin-bottom: 70px;
  position: relative;
  margin-top: 0;
  z-index: 1;
}

/* Add proper spacing between banner and section headings */
#banner-container {
    margin-bottom: 40px !important;
    position: relative;
}

/* Add top margin for pages without banner */
.sections-container {
    margin-top: 120px !important; /* Account for header + nav menu height */
}

#banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Gradient overlay for banner to enhance header visibility */
#banner-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg,
    rgba(12, 12, 13, 0.8) 0%,
    rgba(26, 26, 27, 0.6) 30%,
    rgba(45, 45, 48, 0.4) 60%,
    transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Mobile responsive adjustments for header */
@media (max-width: 768px) {
  .header {
    height: 80px;
    padding: 0 1rem;
  }

  .navbar {
    height: 80px;
  }

  .nav-menu {
    top: 80px;
  }

  .sections-container {
    margin-top: 20px !important;
  }

  #banner-container::before {
    height: 150px;
  }
}

#details-container {
  position: absolute;
  bottom: 18%;
  left: 3%;
  display: flex;
  flex-direction: column;
  gap: 25px;
  z-index: 3; /* Above the gradient overlay */
}

#banner-title {
  margin: 0;
  color: white;
  font-size: 48px;
  font-weight: 800;
}

#button-container {
  display: flex;
  gap: 15px;
  position: relative;
  z-index: 3; /* Higher than the details container */
}

#more-info,
#play-button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 11px 32px;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  z-index: 3; /* Higher than the details container */
  pointer-events: auto; /* Ensure click events are captured */
  box-shadow: 0 2px 8px rgba(141, 22, 201, 0.08);
  outline: none;
  min-width: 120px;
  min-height: 48px;
  letter-spacing: 0.5px;
  user-select: none;
}

#play-button {
  background-color: #8d16c9;
  color: #ffffff;
  padding: 11px 36px;
  border: 2px solid #8d16c9;
}

#play-button:hover,
#play-button:focus {
  background-color: transparent;
  color: #8d16c9;
  border: 2px solid #8d16c9;
  box-shadow: 0 4px 16px rgba(141, 22, 201, 0.18);
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

#play-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(141, 22, 201, 0.1);
  background-color: rgba(141, 22, 201, 0.1);
  transition: all 0.1s;
}

#more-info {
  background-color: rgba(109, 109, 110, .7);
  color: #fff;
  border: 2px solid rgba(109, 109, 110, .7);
}

#more-info:hover,
#more-info:focus {
  background-color: transparent;
  color: #8d16c9;
  border: 2px solid #8d16c9;
  box-shadow: 0 4px 16px rgba(141, 22, 201, 0.18);
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

#more-info:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(141, 22, 201, 0.1);
  background-color: rgba(141, 22, 201, 0.1);
  transition: all 0.1s;
}

#info-icon {
  width: 18px;
  height: 18px;
}

#empty {
  width: 98.75vw;
  height: 7.4rem;
  background-image: linear-gradient(180deg, transparent, rgba(37, 37, 37, .5), #111);
  position: absolute;
  bottom: 0;
  pointer-events: none; /* Allow clicks to pass through */
}

/* ----Common Design all Sections---- */

/* Smooth transitions for sections */
.movie-section {
  margin-bottom: 30px;
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.movie-section.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.movie-section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.movie-section h1 {
  font-size: 2.2rem;
  color: #fff;
  margin-left: 20px;
  margin-bottom: 20px;
  margin-top: 30px;
  text-transform: uppercase;
  position: relative;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #a710e0 0%, #8a14ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(141, 22, 201, 0.5);
  display: inline-block;
  padding: 5px 0;
}

.movie-section h1::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #a710e0 0%, #8a14ca 100%);
  border-radius: 3px;
  box-shadow: 0 0 10px 1px rgba(141, 22, 201, 0.6);
}

/* Responsive adjustments for section titles */
@media only screen and (max-width: 768px) {
  .movie-section h1 {
    font-size: 1.8rem;
    margin-left: 15px;
    margin-top: 25px;
    margin-bottom: 15px;
  }
}

@media only screen and (max-width: 480px) {
  .movie-section h1 {
    font-size: 1.5rem;
    margin-left: 10px;
    margin-top: 20px;
    margin-bottom: 12px;
    letter-spacing: 1px;
  }

  .movie-section h1::after {
    height: 2px;
    bottom: -4px;
  }
}

/* Movies box styling */
.movie-container {
  position: relative;
  width: 100%;
  overflow: hidden; /* Ensure content doesn't spill out */
  margin-bottom: 20px;
}

/* Consolidated scrollbar styling - hide all movie container scrollbars */
.movies-box {
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: row;
  gap: 20px;
  overflow-x: scroll;
  scrollbar-width: none; /* Firefox: hide scrollbar */
  -ms-overflow-style: none; /* IE and Edge: hide scrollbar */
  width: 100%;
  min-height: 210px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbars for all browsers */
.movies-box::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Remove the anime-specific height since all containers now use landscape */
.anime-container {
  min-height: 200px !important;
}

/* Specific styles for anime containers that use landscape images */
.anime-section .movie-item {
  width: 290px;
  height: 170px;
  margin: 15px 5px;
}

.anime-section .image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.anime-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* Special heights for anime section navigation buttons */
.anime-section .navigation-button {
  height: 170px !important;
}

/* Adjust height for all anime containers */
.anime-section .movies-box {
  min-height: 200px;
}

/* Special height for Netflix container */
.netflix-container {
  min-height: 380px;
}

/* Movie item styling - Fixed rectangular dimensions */
.movie-item {
  flex: 0 0 auto;
  width: 290px;
  height: 170px;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.5s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  box-sizing: border-box;
  background-color: #0e0e0e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Add hover effect to all movie items like the upcoming anime section */
.movie-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(141, 22, 201, 0.4);
  z-index: 5; /* Ensure hovered items appear above others */
}

/* Add a subtle glow effect on hover */
.movie-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(141, 22, 201, 0);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.movie-item:hover::after {
  opacity: 1;
  box-shadow: 0 0 15px 3px rgba(141, 22, 201, 0.3);
}

/* Netflix Originals section with taller posters */
.netflix-container .movie-item {
  width: 250px;
  height: 340px;
  background-color: #0e0e0e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.5s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add hover effect to Netflix Originals */
.netflix-container .movie-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(141, 22, 201, 0.4);
  z-index: 5; /* Ensure hovered items appear above others */
}

/* Add the purple glow effect for Netflix Originals on hover */
.netflix-container .movie-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(141, 22, 201, 0);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.netflix-container .movie-item:hover::after {
  opacity: 1;
  box-shadow: 0 0 15px 3px rgba(141, 22, 201, 0.3);
}

.image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  background-color: #0e0e0e;
}

.movies-box .movie-item:hover .image-wrapper img {
  transform: scale(1.05);
}

.movies-box img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transition: all 0.5s ease-in-out;
  object-fit: cover;
  opacity: 0.95;
}

/* Movie info overlay styling */
.movie-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
  color: white;
  padding: 12px 15px;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.3s ease;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

/* Movie title styling */
.movie-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  max-width: 75%;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rating styling */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(141, 22, 201, 0.2);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(141, 22, 201, 0.3);
}

.rating-star {
  color: #8d16c9;
  font-size: 12px;
}

.rating-value {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}
/* Specific styles for anime containers that use landscape images */
.anime-section .movie-item {
  width: 290px;
  height: 170px;
  margin: 15px 5px;
}

.anime-section .image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.anime-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* Special heights for anime section navigation buttons */
.anime-section .navigation-button {
  height: 170px !important;
}

/* Adjust height for all anime containers */
.anime-section .movies-box {
  min-height: 200px;
}

/* Special height for Netflix container */
.netflix-container {
  min-height: 380px;
}

/* Movie item styling - Fixed rectangular dimensions */
.movie-item {
  flex: 0 0 auto;
  width: 290px;
  height: 170px;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.5s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  box-sizing: border-box;
  background-color: #0e0e0e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Add hover effect to all movie items like the upcoming anime section */
.movie-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(141, 22, 201, 0.4);
  z-index: 5; /* Ensure hovered items appear above others */
}

/* Add a subtle glow effect on hover */
.movie-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(141, 22, 201, 0);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.movie-item:hover::after {
  opacity: 1;
  box-shadow: 0 0 15px 3px rgba(141, 22, 201, 0.3);
}

/* Netflix Originals section with taller posters */
.netflix-container .movie-item {
  width: 250px;
  height: 340px;
  background-color: #0e0e0e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.5s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add hover effect to Netflix Originals */
.netflix-container .movie-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(141, 22, 201, 0.4);
  z-index: 5; /* Ensure hovered items appear above others */
}

/* Add the purple glow effect for Netflix Originals on hover */
.netflix-container .movie-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(141, 22, 201, 0);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.netflix-container .movie-item:hover::after {
  opacity: 1;
  box-shadow: 0 0 15px 3px rgba(141, 22, 201, 0.3);
}

.image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  background-color: #0e0e0e;
}

.movies-box .movie-item:hover .image-wrapper img {
  transform: scale(1.05);
}

.movies-box img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transition: all 0.5s ease-in-out;
  object-fit: cover;
  opacity: 0.95;
}

/* Movie info overlay styling */
.movie-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
  color: white;
  padding: 12px 15px;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.3s ease;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

/* Movie title styling */
.movie-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  max-width: 75%;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rating styling */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(141, 22, 201, 0.2);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(141, 22, 201, 0.3);
}

.rating-star {
  color: #8d16c9;
  font-size: 12px;
}

.rating-value {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

@media only screen and (max-width: 560px) {
  .movie-overlay {
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.65) 80%, transparent 100%);

  }

  .movie-title {
    font-size: 11px;
    font-weight: 600;
    max-width: 75%;
    letter-spacing: 0.3px;
  }

  .rating {
    padding: 2px 4px;
  }

  .rating-star {
    font-size: 10px;
  }

  .rating-value {
    font-size: 10px;
    font-weight: 600;
  }

  /* ADDED: Make Top Rated Anime Movies, Drama Anime, and Adventure Anime titles match Ongoing Anime on mobile */
  #top-rated-anime-movies h1,
  #drama-anime h1,
  #adventure-anime h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Restore Netflix Originals poster size on mobile */
  .netflix-container .movie-item {
    width: 250px;
    height: 340px;
  }
  .netflix-previous, .netflix-next {
    height: 340px;
  }

  /* Match font-size for these h1 sections to latest anime */
  #disney-popular h1,
  #adventure-movies h1,
  #mystery-movies h1,
  #fantasy-movies h1,
  #romance-movies h1,
  #action-movies h1,
  #drama-movies h1,
  #action-adventure-tv h1,
  #mystery-tv h1,
  #fantasy-tv h1,
  #reality-tv h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
}

.image-wrapper:hover .movie-overlay {
  opacity: 1;
}

.movie-title {
  font-size: 14px;
  font-weight: bold;
  margin: 0;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
  letter-spacing: 0.5px;
  color: white;
}

.movie-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.rating-star {
  color: #8d16c9;
  font-size: 15px;
  text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.8);
}

.rating-value {
  font-size: 13px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);
  color: white;
}

.movie-container img {
    width: 100%;
    height: auto;
}

/* ----Special styling for the UPCOMING ANIME section heading---- */
#anime-upcoming-new h1 {
  background-color: #000;
  color: #fff;
  display: inline-block;
  padding: 10px 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 4px solid #8d16c9;
  margin-bottom: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 5;
}

#anime-upcoming-new {
  position: relative;
  margin-top: 30px;
  margin-bottom: 40px;
}

#anime-upcoming-new .movie-container {
  margin-top: 15px;
}

#anime-upcoming-new .movie-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ----Media Query---- */

@media only screen and (max-width: 560px) {
  /* Adjust hover effect for mobile devices */
  .movie-item:hover {
    transform: translateY(-5px); /* Smaller lift effect for mobile */
    box-shadow: 0 8px 15px rgba(141, 22, 201, 0.4);
  }

  .movie-item::after {
    display: none; /* Disable glow effect on mobile for better performance */
  }

  /* Fixed header positioning - Updated for Landing Page Design */
  .header {
    flex-direction: row;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(12, 12, 13, 0.95);
    backdrop-filter: blur(20px);
  }

  #netflix-logo {
    margin: 0;
    width: 120px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
  }

  .watchList-Btn {
    margin: 10px 5px 10px 0;
    padding: 5px 10px;
    font-size: 14px;
    height: 32px;
    width: auto;
    min-width: 100px; /* Ensure minimum width for text */
    background-color: rgb(141, 22, 201);
    border: none;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 4px rgba(141, 22, 201, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .watchList-Btn:hover,
  .watchList-Btn:focus {
    color: rgb(140, 82, 255);
    background-color: black;
    border: 1.5px solid rgb(141, 22, 201);
    box-shadow: 0 2px 8px rgba(141, 22, 201, 0.18);
    transform: translateY(-1px) scale(1.03);
    outline: none;
  }

  .input-container {
    width: 50%;
    margin: 10px 5px;
    flex: 1;
  }

  input {
    height: 32px;
    font-size: 14px;
    background-color: rgba(50, 50, 50, 0.8);
    border: 1px solid #333;
    border-radius: 6px;
  }

  #searchResults {
    width: 90vw !important;
    max-width: 90vw !important;
    max-height: 300px !important;
    left: 51.3% !important;
    right: auto !important;
    top: 80px !important; /* Updated for new header height */
    transform: translateX(-50%) !important;
    z-index: 1001 !important;
  }

  /* Fixed nav menu positioning - Updated for Landing Page Design */
  .nav-menu {
    top: 70px;
    height: 50px;
    display: flex;
    align-items: center;
    background-color: rgba(12, 12, 13, 0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0;
    position: fixed;
    z-index: 999;
  }

  .nav-list {
    justify-content: space-around;
    width: 100%;
    padding: 0;
  }

  .nav-item {
    margin: 0 2px;
    padding: 5px 8px;
    border-radius: 8px;
  }

  .nav-item a {
    font-size: 14px;
    font-weight: 500;
  }

  .nav-item.active {
    background-color: rgb(141, 22, 201);
    border-radius: 8px;
    animation: pulse-purple 0.5s cubic-bezier(0.4, 0, 0.6, 1);
  }

  /* Banner adjustments - Updated for Landing Page Design */
  #banner-container {
    width: 100vw;
    height: 60vh;
    margin-top: 25px; /* Ultra-tight spacing for mobile - creates modern, immersive layout with minimal gap */
    margin-bottom: 15px !important;
    position: relative;
  }

  #banner-title {
    font-size: 26px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }

  #details-container {
    bottom: 15%;
    gap: 12px;
    padding: 0 15px;
    z-index: 2; /* Ensure z-index is consistent with desktop */
  }

  #empty {
    width: 100vw;
    height: 7rem;
    background-image: linear-gradient(180deg, transparent, rgba(37, 37, 37, .4), #111);
    pointer-events: none; /* Allow clicks to pass through */
  }

  #button-container {
    gap: 10px;
  }

  #more-info, #play-button {
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: 6px;
    min-width: 90px;
    min-height: 36px;
  }

  #more-info:hover, #more-info:focus,
  #play-button:hover, #play-button:focus {
    background-color: transparent;
    color: #8d16c9;
    border: 2px solid #8d16c9;
    box-shadow: 0 3px 10px rgba(141, 22, 201, 0.15);
    transform: translateY(-1px) scale(1.02);
  }

  #more-info:active, #play-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 5px rgba(141, 22, 201, 0.1);
    background-color: rgba(141, 22, 201, 0.1);
  }

  /* Section adjustments */
  .movie-section {
    margin-bottom: 30px;
    padding-bottom: 10px;
    position: relative;
  }

  /* Specific styling for Netflix Originals section to fix spacing */
  #netflix-originals {
    margin-top: 5px;
  }

  .movie-section h1 {
    font-size: 0.85rem; /* Consistent sizing with Documentary TV Shows */
    margin-left: 10px;
    margin-bottom: 8px;
    margin-top: 12px;
    padding: 5px 10px;
    text-transform: uppercase;
    font-weight: 600; /* Slightly reduced weight */
    letter-spacing: 0.3px; /* Reduced letter spacing */
    background-color: rgba(0, 0, 0, 0.8);
    display: inline-block;
    border: 1px solid rgba(141, 22, 201, 0.5);
    border-left: 3px solid #8d16c9; /* Thinner left border */
    border-radius: 4px;
    max-width: 90%; /* Prevent overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* All section headers now use the same font style as Netflix Originals */
  #netflix-originals h1,
  #trending-now h1,
  #top-rated-movies h1,
  #horror-movies h1,
  #comedy-movies h1,
  #thriller-movies h1,
  #adventure-movies h1,
  #drama-tv h1,
  #crime-tv h1,
  #comedy-tv h1,
  #scifi-tv h1,
  #documentary-tv h1,
  #anime-section h1,
  #anime-comedy h1,
  #anime-romance h1,
  #anime-popular h1,
  #anime-top-rated h1,
  #anime-ongoing h1,
  #anime-upcoming-new h1 {
    font-size: 0.85rem; /* Consistent size for all section headers */
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* ADDED: Make Top Rated Anime Movies, Drama Anime, and Adventure Anime titles match Ongoing Anime on mobile */
  #top-rated-anime-movies h1,
  #drama-anime h1,
  #adventure-anime h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Match font-size for these h1 sections to latest anime */
  #disney-popular h1,
  #adventure-movies h1,
  #mystery-movies h1,
  #fantasy-movies h1,
  #romance-movies h1,
  #action-movies h1,
  #drama-movies h1,
  #action-adventure-tv h1,
  #mystery-tv h1,
  #fantasy-tv h1,
  #reality-tv h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Scrolling containers */
  .movies-box {
    gap: 15px;
    min-height: 160px;
    padding-left: 0;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: none;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  /* Movie items */
  .movie-item {
    flex: 0 0 auto;
    width: 220px;
    height: 130px;
    margin: 10px 0;
    box-sizing: border-box;
    scroll-snap-align: start;
  }

  /* Netflix and anime containers - standardized to same size as other containers */
  .netflix-container .movie-item, .anime-container .movie-item {
    width: 220px;
    height: 130px;
  }

  .movies-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .movie-title {
    font-size: 12px;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rating-star, .rating-value {
    font-size: 12px;
  }

  /* Navigation buttons */
  .navigation-button {
    width: 36px;
    height: 130px;
    font-size: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.6);
    color: #8d16c9;
  }

  .netflix-previous, .netflix-next {
    height: 130px; /* Match the standard height */
  }

  .anime-section .movie-item {
    width: 220px;
    height: 130px;
  }

  .anime-section .navigation-button {
    height: 130px !important;
  }

  .anime-section .movies-box {
    min-height: 150px;
  }

  /* Set Netflix container to same height as other containers in mobile */
  .netflix-container {
    min-height: 150px;
  }

  /* Back to top button */
  #back-to-top-btn {
    width: 36px;
    height: 36px;
    bottom: 15px;
    right: 15px;
  }

  #back-to-top-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Custom small scrollbars for mobile */
  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  /* Restore Netflix Originals poster size on mobile */
  .netflix-container .movie-item {
    width: 250px;
    height: 340px;
  }
  .netflix-previous, .netflix-next {
    height: 340px;
  }

  /* Match anime posters to horror movies size on mobile */
  .anime-container .movie-item,
  .anime-section .movie-item {
    width: 220px;
    height: 130px;
  }
}

/* Custom smaller Netflix Originals on mobile */
@media only screen and (max-width: 560px) {
  .netflix-container .movie-item {
    width: 180px;
    height: 260px;
  }
  .netflix-previous, .netflix-next {
    height: 260px;
  }
}

@media only screen and (min-width: 561px) and (max-width: 780px) {
  /* Adjust hover effect for tablets */
  .movie-item:hover {
    transform: translateY(-7px); /* Medium lift effect for tablets */
    box-shadow: 0 10px 20px rgba(141, 22, 201, 0.4);
  }

  .header {
    height: 65px;
    align-items: center;
    padding: 0 10px;
  }

  #netflix-logo {
    margin: 12px 0 12px 15px;
    width: 110px;
    height: 36px;
  }

  .watchList-Btn {
    margin: 12px 15px 12px 0;
    padding: 6px 12px;
    font-size: 18px;
    height: 36px;
    min-width: 120px; /* Ensure minimum width for text */
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 4px rgba(141, 22, 201, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .watchList-Btn:hover,
  .watchList-Btn:focus {
    color: rgb(140, 82, 255);
    background-color: black;
    border: 1.5px solid rgb(141, 22, 201);
    box-shadow: 0 2px 8px rgba(141, 22, 201, 0.18);
    transform: translateY(-1px) scale(1.03);
    outline: none;
  }

  .input-container {
    width: 45%;
  }

  input {
    height: 36px;
  }

  #searchResults {
    width: 45vw !important;
    max-width: 45vw !important;
    z-index: 1000 !important;
    left: auto !important;
    right: 20px !important;
    transform: none !important;
  }

  .nav-menu {
    height: 45px;
    top: 65px;
  }

  .nav-item {
    margin: 0 8px;
    padding: 6px 10px;
  }

  .nav-item a {
    font-size: 15px;
  }

  #banner-container {
    width: 100vw;
    height: 60vh;
    margin-top: 110px;
  }

  #details-container {
    bottom: 12%;
    gap: 15px;
    left: 4%;
  }

  #banner-title {
    font-size: 38px;
  }

  #button-container {
    gap: 12px;
  }

  #more-info, #play-button {
    padding: 10px 22px;
    font-size: 1rem;
    border-radius: 6px;
    min-width: 100px;
    min-height: 40px;
  }

  #more-info:hover, #more-info:focus,
  #play-button:hover, #play-button:focus {
    background-color: transparent;
    color: #8d16c9;
    border: 2px solid #8d16c9;
    box-shadow: 0 3px 12px rgba(141, 22, 201, 0.16);
    transform: translateY(-1px) scale(1.03);
  }

  #more-info:active, #play-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 6px rgba(141, 22, 201, 0.1);
    background-color: rgba(141, 22, 201, 0.1);
  }

  #empty {
    width: 100vw;
    pointer-events: none; /* Allow clicks to pass through */
  }

  .movie-section {
    margin-bottom: 28px;
  }

  .movie-section h1 {
    font-size: 1.3rem;
    margin-left: 16px;
    margin-bottom: 10px;
    margin-top: 19px;
    padding: 8px 12px;
  }

  .movies-box {
    gap: 15px;
    min-height: 140px;
    padding-left: 15px;
    padding-right: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .movie-item {
    flex: 0 0 auto;
    width: 220px;
    height: 120px;
    margin: 10px 0;
    box-sizing: border-box;
  }

  .netflix-container .movie-item, .anime-container .movie-item {
    width: 220px;
    height: 120px;
  }

  .movies-box img {
    width: 100%;
    height: 100%;
  }

  .movie-title {
    font-size: 11px;
    max-width: 70%;
  }

  .rating-star, .rating-value {
    font-size: 10px;
  }

  .navigation-button {
    width: 40px;
    height: 120px;
    font-size: 2.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8d16c9;
  }

  .movie-container:hover .navigation-button {
    opacity: 0.8;
  }

  .netflix-previous, .netflix-next {
    height: 120px;
  }

  .anime-previous, .anime-next {
    height: 120px;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
    background: transparent;
  }

  #anime-upcoming-new h1 {
    font-size: 1.2rem;
    padding: 9px 16px;
    margin-left: 12px;
    margin-bottom: 18px;
  }

  .anime-section .movie-item {
    width: 220px;
    height: 130px;
  }

  .anime-section .navigation-button {
    height: 140px !important;
  }
}

/* Desktop layout search fixes - Added to fix search results display */
@media only screen and (min-width: 781px) {
  #searchResults {
    z-index: 1000 !important;
    position: fixed !important;
    top: 60px !important;
    left: 51.3% !important;
    transform: translateX(-50%) !important;
    width: 500px !important;
    max-width: 500px !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8) !important;
    border: none !important;
    margin-top: 0 !important;
    right: auto !important;
  }

  /* Critical fix: Make sure the input container is independent */
  .input-container {
    position: relative;
    z-index: 24; /* Make sure the container is above other elements but below results */
  }

  /* Additional fix to ensure search results are properly isolated and appear above all elements */
  .header .input-container #searchResults {
    isolation: isolate; /* Create a new stacking context */
    position: fixed !important;
    z-index: 1000 !important;
    left: 51.3% !important;
    right: auto !important;
    top: 60px !important;
    width: 500px !important;
    max-width: 500px !important;
    margin-top: 0 !important;
    transform: translateX(-50%) !important;
  }

  /* Make search items more compact on desktop */
  #searchResults .movie-list {
    padding: 10px;
    background-color: #1a1a1a;
    position: relative;
    z-index: 1001;
    border-bottom: 1px solid #333;
  }

  /* Ensure buttons in search results remain visible */
  #searchResults .movie-list .watchListBtn {
    z-index: 1002;
    position: static;
    right: auto;
    top: auto;
    transform: none;
  }

  /* Add a subtle hover effect */
  #searchResults .movie-list:hover {
    background-color: #2a2a2a;
  }
}

@media only screen and (min-width:781px) and (max-width: 1250px) {
  .search-item-thumbnail {
    width: 15%;
  }

  .search-item-info h3 {
    font-size: 0.9rem;
  }

  .search-item-info p {
    font-size: 0.8rem;
  }

  .watchListBtn {
    position: relative;
    top: 0;
    right: 5px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 80px;
    min-height: 32px;
  }

  .watchListBtn:hover,
  .watchListBtn:focus {
    background-color: black;
    border: 1.5px solid rgb(154, 14, 224);
    color: rgb(154, 14, 224);
    box-shadow: 0 2px 8px rgba(154, 14, 224, 0.18);
    transform: translateY(-1px) scale(1.03);
    outline: none;
  }

  #banner-container {
    width: 100vw;
    margin-top: 121px;
  }

  #details-container {
    bottom: 14%;
    gap: 15px;
  }

  #empty {
    width: 100vw;
  }

  .movie-section {
    margin-bottom: 28px;
  }

  .movie-section h1 {
    font-size: 1.35rem;
    margin-left: 18px;
    margin-bottom: 10px;
    margin-top: 19px;
  }

  .movie-item {
    flex: 0 0 auto;
    width: 250px;
    height: 160px;
    margin: 15px 0;
    box-sizing: border-box;
  }

  .netflix-container .movie-item, .anime-container .movie-item {
    width: 170px;
    height: 260px;
  }

  .movies-box img {
    width: 100%;
    height: 100%;
  }

  .movie-title {
    font-size: 12px;
    max-width: 68%;
  }

  .rating-star, .rating-value {
    font-size: 11px;
  }

  .navigation-button {
    width: 55px;
    height: 160px;
    font-size: 2.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8d16c9;
  }

  .netflix-previous, .netflix-next {
    height: 260px;
  }

  .anime-previous, .anime-next {
    height: 260px;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }

  #anime-upcoming-new h1 {
    font-size: 1.3rem;
    padding: 10px 18px;
    margin-left: 15px;
    margin-bottom: 20px;
  }
}

/* Banner Navigation Buttons */
.banner-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

#banner-prev {
    left: 20px;
}

#banner-next {
    right: 20px;
}

#banner-container:hover .banner-nav-button {
    opacity: 1;
}

.banner-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Style section headings to make them more visible and properly spaced */
.movie-section h1, .tv-section h1, .anime-section h1 {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 10px 0;
    font-weight: bold;
    position: relative;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.7);
    display: inline-block;
    padding-right: 20px;
    border-left: 4px solid #8d16c9;
    padding-left: 15px;
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Add proper spacing between sections */
.sections-container {
    padding-top: 30px;
}

/* Back to top button */
#back-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: rgba(141, 22, 201, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top-btn:hover {
  background-color: rgb(141, 22, 201);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#back-to-top-btn svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

/* Keep main page scrollbar styled */
html::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #8d16c9, #a020f0);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #a020f0, #8d16c9);
}

/* Hide scrollbars but keep functionality */
.movies-box {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom small scrollbars for mobile */
@media only screen and (max-width: 560px) {
    #back-to-top-btn {
        width: 36px;
        height: 36px;
        bottom: 15px;
        right: 15px;
    }

    #back-to-top-btn svg {
        width: 18px;
        height: 18px;
    }

    .movies-box::-webkit-scrollbar {
        display: none;
        height: 0;
    }
}

/* Update tablet styles to hide scrollbars while keeping swipe functionality */
@media only screen and (min-width: 561px) and (max-width: 780px) {
    .movies-box::-webkit-scrollbar {
        display: none;
        height: 0;
    }
}

/* Additional styles for very small screens */
@media only screen and (max-width: 375px) {
  .movie-section h1 {
    font-size: 0.75rem; /* Consistent size for all headers on very small screens */
    padding: 4px 8px;
    margin-left: 8px;
    margin-top: 10px;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    border-left: 2px solid #8d16c9;
  }

  /* All section headers now use the same font style as Netflix Originals */
  #netflix-originals h1,
  #trending-now h1,
  #top-rated-movies h1,
  #horror-movies h1,
  #comedy-movies h1,
  #thriller-movies h1,
  #adventure-movies h1,
  #drama-tv h1,
  #crime-tv h1,
  #comedy-tv h1,
  #scifi-tv h1,
  #documentary-tv h1,
  #anime-section h1,
  #anime-comedy h1,
  #anime-romance h1,
  #anime-popular h1,
  #anime-top-rated h1,
  #anime-ongoing h1,
  #anime-upcoming-new h1 {
    font-size: 0.75rem;
    padding: 4px 8px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.3px;
  }
}

/* --- PATCH: Always show navigation buttons on movie containers, but not banners --- */

/* Always show navigation buttons on movie containers */
.movie-container .navigation-button {
  opacity: 1 !important;
}

/* Ensure banner nav buttons remain hover-only */
.banner-nav-button {
  opacity: 0;
}
.banner-nav-button:hover {
  opacity: 1;
}

/* Slimmer right-side navigation button */
.navigation-button.next {
  width: 25px !important;
}
.navigation-button.netflix-next {
  width: 25px !important;
}

/* Genre Overlay Styles */
#genre-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.genre-grid-container {
    max-width: 1200px;
    margin: 80px auto 20px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    position: relative;
}

.genre-grid-container h2 {
    grid-column: 1 / -1;
    color: #e50914;
    margin-bottom: 20px;
    font-size: 28px;
}

.genre-grid-container h3 {
    grid-column: 1 / -1;
    color: #fff;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.genre-grid-container a {
    background-color: rgba(229, 9, 20, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.genre-grid-container a:hover {
    background-color: rgba(229, 9, 20, 0.5);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .genre-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 15px;
        margin-top: 60px;
    }

    .genre-grid-container a {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .genre-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 10px;
    }

    .genre-grid-container a {
        padding: 10px;
        font-size: 12px;
    }
}

/* Genre Dropdown Styles */
#genre-dropdown {
  position: absolute;
  background-color: rgba(20, 20, 20, 0.98);
  width: 500px;
  box-shadow: 0 8px 20px 0 rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  border-radius: 8px;
  border: 1px solid rgba(141, 22, 201, 0.5);
  backdrop-filter: blur(10px);
  padding: 12px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  transform-origin: top center;
  animation: dropdownFadeIn 0.2s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 22, 201, 0.5) rgba(20, 20, 20, 0.2);
}

/* Mobile dropdown styles */
@media (max-width: 768px) {
  #genre-dropdown {
    width: 90%;
    max-width: none;
    left: 5% !important;
    right: 5%;
    position: fixed;
    top: 50% !important;
    transform: translateY(-50%);
    max-height: 80vh;
  }

  .genre-dropdown-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #genre-dropdown {
    width: 95%;
    left: 2.5% !important;
    max-height: 75vh;
  }

  .genre-dropdown-container {
    grid-template-columns: 1fr;
  }
}

#genre-dropdown::-webkit-scrollbar {
  width: 6px;
  height: 0; /* Remove horizontal scrollbar */
}

#genre-dropdown::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.2);
  border-radius: 10px;
}

#genre-dropdown::-webkit-scrollbar-thumb {
  background-color: rgba(141, 22, 201, 0.5);
  border-radius: 10px;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.genre-dropdown-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

#genre-dropdown h3 {
  color: rgb(164, 57, 207);
  margin-bottom: 10px;
  font-size: 16px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(141, 22, 201, 0.3);
  text-align: center;
}

#genre-dropdown h4 {
  color: #fff;
  margin-top: 0;
  margin-bottom: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#genre-dropdown a {
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 0;
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

#genre-dropdown a:hover {
  color: rgb(164, 57, 207);
  padding-left: 5px;
  transform: translateX(2px);
}

#genre-dropdown a:before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  height: 100%;
  width: 3px;
  background: rgb(164, 57, 207);
  transform: scaleY(0);
  transition: transform 0.2s ease;
  opacity: 0;
}

#genre-dropdown a:hover:before {
  transform: scaleY(1);
  opacity: 1;
}

@media (max-width: 768px) {
  #genre-dropdown {
    width: 450px;
    left: 51.3% !important;
    transform: translateX(-50%);
    transform-origin: top center;
  }
  .genre-dropdown-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  #genre-dropdown {
    width: 95%;
    max-width: 320px;
    left: 51.3% !important;
    transform: translateX(-50%);
  }
  .genre-dropdown-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  #genre-dropdown h3 {
    font-size: 15px;
  }

  #genre-dropdown h4 {
    font-size: 13px;
  }

  #genre-dropdown a {
    font-size: 12px;
    padding: 3px 0;
  }
}

/* Mobile Genre Dropdown Styles */
@media (max-width: 768px) {
  #genre-dropdown {
    position: fixed !important;
    width: 90% !important;
    left: 51.3% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
    max-width: none !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
  }
}

@media (max-width: 480px) {
  #genre-dropdown {
    width: 95% !important;
    max-height: 70vh;
  }

  .genre-dropdown-container {
    grid-template-columns: 1fr !important;
  }
}/* Specific styles for anime containers that use landscape images */
.anime-section .movie-item {
  width: 290px;
  height: 170px;
  margin: 15px 5px;
}

.anime-section .image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.anime-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* Special heights for anime section navigation buttons */
.anime-section .navigation-button {
  height: 170px !important;
}

/* Adjust height for all anime containers */
.anime-section .movies-box {
  min-height: 200px;
}

/* Special height for Netflix container */
.netflix-container {
  min-height: 380px;
}

/* Movie item styling - Fixed rectangular dimensions */
.movie-item {
  flex: 0 0 auto;
  width: 290px;
  height: 170px;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.5s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  box-sizing: border-box;
  background-color: #0e0e0e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Add hover effect to all movie items like the upcoming anime section */
.movie-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(141, 22, 201, 0.4);
  z-index: 5; /* Ensure hovered items appear above others */
}

/* Add a subtle glow effect on hover */
.movie-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(141, 22, 201, 0);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.movie-item:hover::after {
  opacity: 1;
  box-shadow: 0 0 15px 3px rgba(141, 22, 201, 0.3);
}

/* Netflix Originals section with taller posters */
.netflix-container .movie-item {
  width: 250px;
  height: 340px;
  background-color: #0e0e0e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.5s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add hover effect to Netflix Originals */
.netflix-container .movie-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(141, 22, 201, 0.4);
  z-index: 5; /* Ensure hovered items appear above others */
}

/* Add the purple glow effect for Netflix Originals on hover */
.netflix-container .movie-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(141, 22, 201, 0);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.netflix-container .movie-item:hover::after {
  opacity: 1;
  box-shadow: 0 0 15px 3px rgba(141, 22, 201, 0.3);
}

.image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  background-color: #0e0e0e;
}

.movies-box .movie-item:hover .image-wrapper img {
  transform: scale(1.05);
}

.movies-box img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transition: all 0.5s ease-in-out;
  object-fit: cover;
  opacity: 0.95;
}

/* Movie info overlay styling */
.movie-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
  color: white;
  padding: 12px 15px;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.3s ease;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

/* Movie title styling */
.movie-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  max-width: 75%;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rating styling */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(141, 22, 201, 0.2);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(141, 22, 201, 0.3);
}

.rating-star {
  color: #8d16c9;
  font-size: 12px;
}

.rating-value {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

@media only screen and (max-width: 560px) {
  .movie-overlay {
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.65) 80%, transparent 100%);

  }

  .movie-title {
    font-size: 11px;
    font-weight: 600;
    max-width: 75%;
    letter-spacing: 0.3px;
  }

  .rating {
    padding: 2px 4px;
  }

  .rating-star {
    font-size: 10px;
  }

  .rating-value {
    font-size: 10px;
    font-weight: 600;
  }

  /* ADDED: Make Top Rated Anime Movies, Drama Anime, and Adventure Anime titles match Ongoing Anime on mobile */
  #top-rated-anime-movies h1,
  #drama-anime h1,
  #adventure-anime h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Restore Netflix Originals poster size on mobile */
  .netflix-container .movie-item {
    width: 250px;
    height: 340px;
  }
  .netflix-previous, .netflix-next {
    height: 340px;
  }

  /* Match font-size for these h1 sections to latest anime */
  #disney-popular h1,
  #adventure-movies h1,
  #mystery-movies h1,
  #fantasy-movies h1,
  #romance-movies h1,
  #action-movies h1,
  #drama-movies h1,
  #action-adventure-tv h1,
  #mystery-tv h1,
  #fantasy-tv h1,
  #reality-tv h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
}

.image-wrapper:hover .movie-overlay {
  opacity: 1;
}

.movie-title {
  font-size: 14px;
  font-weight: bold;
  margin: 0;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
  letter-spacing: 0.5px;
  color: white;
}

.movie-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.rating-star {
  color: #8d16c9;
  font-size: 15px;
  text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.8);
}

.rating-value {
  font-size: 13px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);
  color: white;
}

.movie-container img {
    width: 100%;
    height: auto;
}

/* ----Special styling for the UPCOMING ANIME section heading---- */
#anime-upcoming-new h1 {
  background-color: #000;
  color: #fff;
  display: inline-block;
  padding: 10px 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 4px solid #8d16c9;
  margin-bottom: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 5;
}

#anime-upcoming-new {
  position: relative;
  margin-top: 30px;
  margin-bottom: 40px;
}

#anime-upcoming-new .movie-container {
  margin-top: 15px;
}

#anime-upcoming-new .movie-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ----Media Query---- */

@media only screen and (max-width: 560px) {
  /* Adjust hover effect for mobile devices */
  .movie-item:hover {
    transform: translateY(-5px); /* Smaller lift effect for mobile */
    box-shadow: 0 8px 15px rgba(141, 22, 201, 0.4);
  }

  .movie-item::after {
    display: none; /* Disable glow effect on mobile for better performance */
  }

  /* Fixed header positioning - Updated for Landing Page Design */
  .header {
    flex-direction: row;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(12, 12, 13, 0.95);
    backdrop-filter: blur(20px);
  }

  #netflix-logo {
    margin: 0;
    width: 120px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
  }

  .watchList-Btn {
    margin: 10px 5px 10px 0;
    padding: 5px 10px;
    font-size: 14px;
    height: 32px;
    width: auto;
    min-width: 100px; /* Ensure minimum width for text */
    background-color: rgb(141, 22, 201);
    border: none;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 4px rgba(141, 22, 201, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .watchList-Btn:hover,
  .watchList-Btn:focus {
    color: rgb(140, 82, 255);
    background-color: black;
    border: 1.5px solid rgb(141, 22, 201);
    box-shadow: 0 2px 8px rgba(141, 22, 201, 0.18);
    transform: translateY(-1px) scale(1.03);
    outline: none;
  }

  .input-container {
    width: 50%;
    margin: 10px 5px;
    flex: 1;
  }

  input {
    height: 32px;
    font-size: 14px;
    background-color: rgba(50, 50, 50, 0.8);
    border: 1px solid #333;
    border-radius: 6px;
  }

  #searchResults {
    width: 90vw !important;
    max-width: 90vw !important;
    max-height: 300px !important;
    left: 51.3% !important;
    right: auto !important;
    top: 80px !important; /* Updated for new header height */
    transform: translateX(-50%) !important;
    z-index: 1001 !important;
  }

  /* Fixed nav menu positioning - Updated for Landing Page Design */
  .nav-menu {
    top: 70px;
    height: 50px;
    display: flex;
    align-items: center;
    background-color: rgba(12, 12, 13, 0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0;
    position: fixed;
    z-index: 999;
  }

  .nav-list {
    justify-content: space-around;
    width: 100%;
    padding: 0;
  }

  .nav-item {
    margin: 0 2px;
    padding: 5px 8px;
    border-radius: 8px;
  }

  .nav-item a {
    font-size: 14px;
    font-weight: 500;
  }

  .nav-item.active {
    background-color: rgb(141, 22, 201);
    border-radius: 8px;
    animation: pulse-purple 0.5s cubic-bezier(0.4, 0, 0.6, 1);
  }

  /* Banner adjustments - Updated for Landing Page Design */
  #banner-container {
    width: 100vw;
    height: 60vh;
    margin-top: 25px; /* Ultra-tight spacing for mobile - creates modern, immersive layout with minimal gap */
    margin-bottom: 15px !important;
    position: relative;
  }

  #banner-title {
    font-size: 26px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }

  #details-container {
    bottom: 15%;
    gap: 12px;
    padding: 0 15px;
    z-index: 2; /* Ensure z-index is consistent with desktop */
  }

  #empty {
    width: 100vw;
    height: 7rem;
    background-image: linear-gradient(180deg, transparent, rgba(37, 37, 37, .4), #111);
    pointer-events: none; /* Allow clicks to pass through */
  }

  #button-container {
    gap: 10px;
  }

  #more-info, #play-button {
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: 6px;
    min-width: 90px;
    min-height: 36px;
  }

  #more-info:hover, #more-info:focus,
  #play-button:hover, #play-button:focus {
    background-color: transparent;
    color: #8d16c9;
    border: 2px solid #8d16c9;
    box-shadow: 0 3px 10px rgba(141, 22, 201, 0.15);
    transform: translateY(-1px) scale(1.02);
  }

  #more-info:active, #play-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 5px rgba(141, 22, 201, 0.1);
    background-color: rgba(141, 22, 201, 0.1);
  }

  /* Section adjustments */
  .movie-section {
    margin-bottom: 30px;
    padding-bottom: 10px;
    position: relative;
  }

  /* Specific styling for Netflix Originals section to fix spacing */
  #netflix-originals {
    margin-top: 5px;
  }

  .movie-section h1 {
    font-size: 0.85rem; /* Consistent sizing with Documentary TV Shows */
    margin-left: 10px;
    margin-bottom: 8px;
    margin-top: 12px;
    padding: 5px 10px;
    text-transform: uppercase;
    font-weight: 600; /* Slightly reduced weight */
    letter-spacing: 0.3px; /* Reduced letter spacing */
    background-color: rgba(0, 0, 0, 0.8);
    display: inline-block;
    border: 1px solid rgba(141, 22, 201, 0.5);
    border-left: 3px solid #8d16c9; /* Thinner left border */
    border-radius: 4px;
    max-width: 90%; /* Prevent overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* All section headers now use the same font style as Netflix Originals */
  #netflix-originals h1,
  #trending-now h1,
  #top-rated-movies h1,
  #horror-movies h1,
  #comedy-movies h1,
  #thriller-movies h1,
  #adventure-movies h1,
  #drama-tv h1,
  #crime-tv h1,
  #comedy-tv h1,
  #scifi-tv h1,
  #documentary-tv h1,
  #anime-section h1,
  #anime-comedy h1,
  #anime-romance h1,
  #anime-popular h1,
  #anime-top-rated h1,
  #anime-ongoing h1,
  #anime-upcoming-new h1 {
    font-size: 0.85rem; /* Consistent size for all section headers */
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* ADDED: Make Top Rated Anime Movies, Drama Anime, and Adventure Anime titles match Ongoing Anime on mobile */
  #top-rated-anime-movies h1,
  #drama-anime h1,
  #adventure-anime h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Match font-size for these h1 sections to latest anime */
  #disney-popular h1,
  #adventure-movies h1,
  #mystery-movies h1,
  #fantasy-movies h1,
  #romance-movies h1,
  #action-movies h1,
  #drama-movies h1,
  #action-adventure-tv h1,
  #mystery-tv h1,
  #fantasy-tv h1,
  #reality-tv h1 {
    font-size: 0.85rem;
    max-width: 95%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Scrolling containers */
  .movies-box {
    gap: 15px;
    min-height: 160px;
    padding-left: 0;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: none;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  /* Movie items */
  .movie-item {
    flex: 0 0 auto;
    width: 220px;
    height: 130px;
    margin: 10px 0;
    box-sizing: border-box;
    scroll-snap-align: start;
  }

  /* Netflix and anime containers - standardized to same size as other containers */
  .netflix-container .movie-item, .anime-container .movie-item {
    width: 220px;
    height: 130px;
  }

  .movies-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .movie-title {
    font-size: 12px;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rating-star, .rating-value {
    font-size: 12px;
  }

  /* Navigation buttons */
  .navigation-button {
    width: 36px;
    height: 130px;
    font-size: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.6);
    color: #8d16c9;
  }

  .netflix-previous, .netflix-next {
    height: 130px; /* Match the standard height */
  }

  .anime-section .movie-item {
    width: 220px;
    height: 130px;
  }

  .anime-section .navigation-button {
    height: 130px !important;
  }

  .anime-section .movies-box {
    min-height: 150px;
  }

  /* Set Netflix container to same height as other containers in mobile */
  .netflix-container {
    min-height: 150px;
  }

  /* Back to top button */
  #back-to-top-btn {
    width: 36px;
    height: 36px;
    bottom: 15px;
    right: 15px;
  }

  #back-to-top-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Custom small scrollbars for mobile */
  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  /* Restore Netflix Originals poster size on mobile */
  .netflix-container .movie-item {
    width: 250px;
    height: 340px;
  }
  .netflix-previous, .netflix-next {
    height: 340px;
  }

  /* Match anime posters to horror movies size on mobile */
  .anime-container .movie-item,
  .anime-section .movie-item {
    width: 220px;
    height: 130px;
  }
}

/* Custom smaller Netflix Originals on mobile */
@media only screen and (max-width: 560px) {
  .netflix-container .movie-item {
    width: 180px;
    height: 260px;
  }
  .netflix-previous, .netflix-next {
    height: 260px;
  }
}

@media only screen and (min-width: 561px) and (max-width: 780px) {
  /* Adjust hover effect for tablets */
  .movie-item:hover {
    transform: translateY(-7px); /* Medium lift effect for tablets */
    box-shadow: 0 10px 20px rgba(141, 22, 201, 0.4);
  }

  .header {
    height: 65px;
    align-items: center;
    padding: 0 10px;
  }

  #netflix-logo {
    margin: 12px 0 12px 15px;
    width: 110px;
    height: 36px;
  }

  .watchList-Btn {
    margin: 12px 15px 12px 0;
    padding: 6px 12px;
    font-size: 18px;
    height: 36px;
    min-width: 120px; /* Ensure minimum width for text */
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 4px rgba(141, 22, 201, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .watchList-Btn:hover,
  .watchList-Btn:focus {
    color: rgb(140, 82, 255);
    background-color: black;
    border: 1.5px solid rgb(141, 22, 201);
    box-shadow: 0 2px 8px rgba(141, 22, 201, 0.18);
    transform: translateY(-1px) scale(1.03);
    outline: none;
  }

  .input-container {
    width: 45%;
  }

  input {
    height: 36px;
  }

  #searchResults {
    width: 45vw !important;
    max-width: 45vw !important;
    z-index: 1000 !important;
    left: auto !important;
    right: 20px !important;
    transform: none !important;
  }

  .nav-menu {
    height: 45px;
    top: 65px;
  }

  .nav-item {
    margin: 0 8px;
    padding: 6px 10px;
  }

  .nav-item a {
    font-size: 15px;
  }

  #banner-container {
    width: 100vw;
    height: 60vh;
    margin-top: 110px;
  }

  #details-container {
    bottom: 12%;
    gap: 15px;
    left: 4%;
  }

  #banner-title {
    font-size: 38px;
  }

  #button-container {
    gap: 12px;
  }

  #more-info, #play-button {
    padding: 10px 22px;
    font-size: 1rem;
    border-radius: 6px;
    min-width: 100px;
    min-height: 40px;
  }

  #more-info:hover, #more-info:focus,
  #play-button:hover, #play-button:focus {
    background-color: transparent;
    color: #8d16c9;
    border: 2px solid #8d16c9;
    box-shadow: 0 3px 12px rgba(141, 22, 201, 0.16);
    transform: translateY(-1px) scale(1.03);
  }

  #more-info:active, #play-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 6px rgba(141, 22, 201, 0.1);
    background-color: rgba(141, 22, 201, 0.1);
  }

  #empty {
    width: 100vw;
    pointer-events: none; /* Allow clicks to pass through */
  }

  .movie-section {
    margin-bottom: 28px;
  }

  .movie-section h1 {
    font-size: 1.3rem;
    margin-left: 16px;
    margin-bottom: 10px;
    margin-top: 19px;
    padding: 8px 12px;
  }

  .movies-box {
    gap: 15px;
    min-height: 140px;
    padding-left: 15px;
    padding-right: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .movie-item {
    flex: 0 0 auto;
    width: 220px;
    height: 120px;
    margin: 10px 0;
    box-sizing: border-box;
  }

  .netflix-container .movie-item, .anime-container .movie-item {
    width: 220px;
    height: 120px;
  }

  .movies-box img {
    width: 100%;
    height: 100%;
  }

  .movie-title {
    font-size: 11px;
    max-width: 70%;
  }

  .rating-star, .rating-value {
    font-size: 10px;
  }

  .navigation-button {
    width: 40px;
    height: 120px;
    font-size: 2.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8d16c9;
  }

  .movie-container:hover .navigation-button {
    opacity: 0.8;
  }

  .netflix-previous, .netflix-next {
    height: 120px;
  }

  .anime-previous, .anime-next {
    height: 120px;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    height: 0;
    background: transparent;
  }

  #anime-upcoming-new h1 {
    font-size: 1.2rem;
    padding: 9px 16px;
    margin-left: 12px;
    margin-bottom: 18px;
  }

  .anime-section .movie-item {
    width: 220px;
    height: 130px;
  }

  .anime-section .navigation-button {
    height: 140px !important;
  }
}

/* Desktop layout search fixes - Added to fix search results display */
@media only screen and (min-width: 781px) {
  #searchResults {
    z-index: 1000 !important;
    position: fixed !important;
    top: 60px !important;
    left: 51.3% !important;
    transform: translateX(-50%) !important;
    width: 500px !important;
    max-width: 500px !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8) !important;
    border: none !important;
    margin-top: 0 !important;
    right: auto !important;
  }

  /* Critical fix: Make sure the input container is independent */
  .input-container {
    position: relative;
    z-index: 24; /* Make sure the container is above other elements but below results */
  }

  /* Additional fix to ensure search results are properly isolated and appear above all elements */
  .header .input-container #searchResults {
    isolation: isolate; /* Create a new stacking context */
    position: fixed !important;
    z-index: 1000 !important;
    left: 51.3% !important;
    right: auto !important;
    top: 60px !important;
    width: 500px !important;
    max-width: 500px !important;
    margin-top: 0 !important;
    transform: translateX(-50%) !important;
  }

  /* Make search items more compact on desktop */
  #searchResults .movie-list {
    padding: 10px;
    background-color: #1a1a1a;
    position: relative;
    z-index: 1001;
    border-bottom: 1px solid #333;
  }

  /* Ensure buttons in search results remain visible */
  #searchResults .movie-list .watchListBtn {
    z-index: 1002;
    position: static;
    right: auto;
    top: auto;
    transform: none;
  }

  /* Add a subtle hover effect */
  #searchResults .movie-list:hover {
    background-color: #2a2a2a;
  }
}

@media only screen and (min-width:781px) and (max-width: 1250px) {
  .search-item-thumbnail {
    width: 15%;
  }

  .search-item-info h3 {
    font-size: 0.9rem;
  }

  .search-item-info p {
    font-size: 0.8rem;
  }

  .watchListBtn {
    position: relative;
    top: 0;
    right: 5px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 80px;
    min-height: 32px;
  }

  .watchListBtn:hover,
  .watchListBtn:focus {
    background-color: black;
    border: 1.5px solid rgb(154, 14, 224);
    color: rgb(154, 14, 224);
    box-shadow: 0 2px 8px rgba(154, 14, 224, 0.18);
    transform: translateY(-1px) scale(1.03);
    outline: none;
  }

  #banner-container {
    width: 100vw;
    margin-top: 121px;
  }

  #details-container {
    bottom: 14%;
    gap: 15px;
  }

  #empty {
    width: 100vw;
  }

  .movie-section {
    margin-bottom: 28px;
  }

  .movie-section h1 {
    font-size: 1.35rem;
    margin-left: 18px;
    margin-bottom: 10px;
    margin-top: 19px;
  }

  .movie-item {
    flex: 0 0 auto;
    width: 250px;
    height: 160px;
    margin: 15px 0;
    box-sizing: border-box;
  }

  .netflix-container .movie-item, .anime-container .movie-item {
    width: 170px;
    height: 260px;
  }

  .movies-box img {
    width: 100%;
    height: 100%;
  }

  .movie-title {
    font-size: 12px;
    max-width: 68%;
  }

  .rating-star, .rating-value {
    font-size: 11px;
  }

  .navigation-button {
    width: 55px;
    height: 160px;
    font-size: 2.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8d16c9;
  }

  .netflix-previous, .netflix-next {
    height: 260px;
  }

  .anime-previous, .anime-next {
    height: 260px;
  }

  .movies-box::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
  }

  #anime-upcoming-new h1 {
    font-size: 1.3rem;
    padding: 10px 18px;
    margin-left: 15px;
    margin-bottom: 20px;
  }
}

/* Banner Navigation Buttons */
.banner-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

#banner-prev {
    left: 20px;
}

#banner-next {
    right: 20px;
}

#banner-container:hover .banner-nav-button {
    opacity: 1;
}

.banner-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Style section headings to make them more visible and properly spaced */
.movie-section h1, .tv-section h1, .anime-section h1 {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 10px 0;
    font-weight: bold;
    position: relative;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.7);
    display: inline-block;
    padding-right: 20px;
    border-left: 4px solid #8d16c9;
    padding-left: 15px;
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Add proper spacing between sections */
.sections-container {
    padding-top: 30px;
}

/* Back to top button */
#back-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: rgba(141, 22, 201, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top-btn:hover {
  background-color: rgb(141, 22, 201);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#back-to-top-btn svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

/* Keep main page scrollbar styled */
html::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #8d16c9, #a020f0);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #a020f0, #8d16c9);
}

/* Hide scrollbars but keep functionality */
.movies-box {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom small scrollbars for mobile */
@media only screen and (max-width: 560px) {
    #back-to-top-btn {
        width: 36px;
        height: 36px;
        bottom: 15px;
        right: 15px;
    }

    #back-to-top-btn svg {
        width: 18px;
        height: 18px;
    }

    .movies-box::-webkit-scrollbar {
        display: none;
        height: 0;
    }
}

/* Update tablet styles to hide scrollbars while keeping swipe functionality */
@media only screen and (min-width: 561px) and (max-width: 780px) {
    .movies-box::-webkit-scrollbar {
        display: none;
        height: 0;
    }
}

/* Additional styles for very small screens */
@media only screen and (max-width: 375px) {
  .movie-section h1 {
    font-size: 0.75rem; /* Consistent size for all headers on very small screens */
    padding: 4px 8px;
    margin-left: 8px;
    margin-top: 10px;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    border-left: 2px solid #8d16c9;
  }

  /* All section headers now use the same font style as Netflix Originals */
  #netflix-originals h1,
  #trending-now h1,
  #top-rated-movies h1,
  #horror-movies h1,
  #comedy-movies h1,
  #thriller-movies h1,
  #adventure-movies h1,
  #drama-tv h1,
  #crime-tv h1,
  #comedy-tv h1,
  #scifi-tv h1,
  #documentary-tv h1,
  #anime-section h1,
  #anime-comedy h1,
  #anime-romance h1,
  #anime-popular h1,
  #anime-top-rated h1,
  #anime-ongoing h1,
  #anime-upcoming-new h1 {
    font-size: 0.75rem;
    padding: 4px 8px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.3px;
  }
}

/* --- PATCH: Always show navigation buttons on movie containers, but not banners --- */

/* Always show navigation buttons on movie containers */
.movie-container .navigation-button {
  opacity: 1 !important;
}

/* Ensure banner nav buttons remain hover-only */
.banner-nav-button {
  opacity: 0;
}
.banner-nav-button:hover {
  opacity: 1;
}

/* Slimmer right-side navigation button */
.navigation-button.next {
  width: 25px !important;
}
.navigation-button.netflix-next {
  width: 25px !important;
}

/* Genre Overlay Styles */
#genre-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

.genre-grid-container {
    max-width: 1200px;
    margin: 80px auto 20px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    position: relative;
}

.genre-grid-container h2 {
    grid-column: 1 / -1;
    color: #e50914;
    margin-bottom: 20px;
    font-size: 28px;
}

.genre-grid-container h3 {
    grid-column: 1 / -1;
    color: #fff;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.genre-grid-container a {
    background-color: rgba(229, 9, 20, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.genre-grid-container a:hover {
    background-color: rgba(229, 9, 20, 0.5);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .genre-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 15px;
        margin-top: 60px;
    }

    .genre-grid-container a {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .genre-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 10px;
    }

    .genre-grid-container a {
        padding: 10px;
        font-size: 12px;
    }
}

/* Genre Dropdown Styles */
#genre-dropdown {
  position: absolute;
  background-color: rgba(20, 20, 20, 0.98);
  width: 500px;
  box-shadow: 0 8px 20px 0 rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  border-radius: 8px;
  border: 1px solid rgba(141, 22, 201, 0.5);
  backdrop-filter: blur(10px);
  padding: 12px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  transform-origin: top center;
  animation: dropdownFadeIn 0.2s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 22, 201, 0.5) rgba(20, 20, 20, 0.2);
}

/* Mobile dropdown styles */
@media (max-width: 768px) {
  #genre-dropdown {
    width: 90%;
    max-width: none;
    left: 5% !important;
    right: 5%;
    position: fixed;
    top: 50% !important;
    transform: translateY(-50%);
    max-height: 80vh;
  }

  .genre-dropdown-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #genre-dropdown {
    width: 95%;
    left: 2.5% !important;
    max-height: 75vh;
  }

  .genre-dropdown-container {
    grid-template-columns: 1fr;
  }
}

#genre-dropdown::-webkit-scrollbar {
  width: 6px;
  height: 0; /* Remove horizontal scrollbar */
}

#genre-dropdown::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.2);
  border-radius: 10px;
}

#genre-dropdown::-webkit-scrollbar-thumb {
  background-color: rgba(141, 22, 201, 0.5);
  border-radius: 10px;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.genre-dropdown-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

#genre-dropdown h3 {
  color: rgb(164, 57, 207);
  margin-bottom: 10px;
  font-size: 16px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(141, 22, 201, 0.3);
  text-align: center;
}

#genre-dropdown h4 {
  color: #fff;
  margin-top: 0;
  margin-bottom: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#genre-dropdown a {
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 0;
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

#genre-dropdown a:hover {
  color: rgb(164, 57, 207);
  padding-left: 5px;
  transform: translateX(2px);
}

#genre-dropdown a:before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  height: 100%;
  width: 3px;
  background: rgb(164, 57, 207);
  transform: scaleY(0);
  transition: transform 0.2s ease;
  opacity: 0;
}

#genre-dropdown a:hover:before {
  transform: scaleY(1);
  opacity: 1;
}

@media (max-width: 768px) {
  #genre-dropdown {
    width: 450px;
    left: 51.3% !important;
    transform: translateX(-50%);
    transform-origin: top center;
  }
  .genre-dropdown-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  #genre-dropdown {
    width: 95%;
    max-width: 320px;
    left: 51.3% !important;
    transform: translateX(-50%);
  }
  .genre-dropdown-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  #genre-dropdown h3 {
    font-size: 15px;
  }

  #genre-dropdown h4 {
    font-size: 13px;
  }

  #genre-dropdown a {
    font-size: 12px;
    padding: 3px 0;
  }
}

/* Mobile Genre Dropdown Styles */
@media (max-width: 768px) {
  #genre-dropdown {
    position: fixed !important;
    width: 90% !important;
    left: 51.3% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
    max-width: none !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
  }
}

@media (max-width: 480px) {
  #genre-dropdown {
    width: 95% !important;
    max-height: 70vh;
  }

  .genre-dropdown-container {
    grid-template-columns: 1fr !important;
  }
}
