/* ==========================================================================
   Design System & Variables
   ========================================================================== */
   :root {
    --bg-color: #0b0510;
    --grid-color: #ff2a75;
    --text-primary: #ffffff;
    --text-secondary: #b3a5c3;
    --primary-color: #ff2a75;
    --nav-bg: rgba(11, 5, 16, 0.8);
    --card-bg: #1a1025;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
  }
  
/* ==========================================================================
   Neon Grid Background
   ========================================================================== */
.neon-grid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, #1c0b2b 0%, #0b0510 100%);
  overflow: hidden;
}

.neon-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 42, 117, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 42, 117, 0.15) 1px, transparent 1px);
  background-size: 60px 60px;
}
  
  /* ==========================================================================
     Navigation
     ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(to bottom, rgba(11,5,16,0.9), transparent);
  z-index: 1000;

}

.navbar.scrolled {
  background: rgba(11, 5, 16, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 12px 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
  
  .nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
  }
  
  .logo {
    margin-right: 20px;
  }
  
  .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
  }
  
  .nav-link:hover, .nav-link.active {
    color: var(--text-primary);
  }
  
  .nav-link.active {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
  }
  
  .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  .search-box {
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 30px;
  padding: 6px;
  gap: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.search-box:focus-within, .search-box.active {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 42, 117, 0.5);
  box-shadow: 0 0 15px rgba(255, 42, 117, 0.3);
  padding: 8px 16px;
  gap: 12px;
}
.search-box i {
  color: #fff;
  font-size: 18px;
  transition: color 0.3s;
  padding: 4px;
}
.search-box:focus-within i, .search-box.active i {
  color: var(--primary-color);
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  width: 0;
  opacity: 0;
  padding: 0;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-box:focus-within input, .search-box.active input {
  width: 200px;
  opacity: 1;
  cursor: text;
}
.search-box:focus-within input:focus, .search-box.active input:focus {
  width: 260px;
}
.search-box input::placeholder {
  color: var(--text-secondary);
}
  
  .icon-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .icon-btn:hover {
    transform: scale(1.1);
  }
  
  /* ==========================================================================
     Main Content & Hero
     ========================================================================== */
  .main-content {
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 80vh;
}
.main-content.no-hero {
  padding-top: 100px;
}
  
  .hero-section {
  position: relative;
  width: 100vw;
  margin-left: -40px;
  margin-top: 0;
}

.hero-slider-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hero-slider-container::-webkit-scrollbar {
  display: none;
}

.hero-banner {
  flex: 0 0 100vw;
  scroll-snap-align: center;
  height: 80vh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease-in-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    linear-gradient(to top, var(--bg-color) 0%, transparent 40%),
    linear-gradient(to right, rgba(11,5,16,0.9) 0%, transparent 60%);
}

.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
}
.hero-section:hover .hero-nav-btn {
  opacity: 1;
}
.hero-nav-btn:hover {
  background: rgba(0,0,0,0.8);
  border-color: white;
  transform: translateY(-50%) scale(1.1);
}
.hero-nav-btn.prev {
  left: 20px;
}
.hero-nav-btn.next {
  right: 20px;
}

.hero-content {
  position: absolute;
  bottom: 15%;
  left: 40px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  text-align: left;
  line-height: 1.1;
  color: #fff;
  letter-spacing: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-desc {
  font-size: 14px;
  color: #e0e0e0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  right: 40px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.active {
  background: #e50914;
  width: 24px;
  border-radius: 4px;
}

.hero-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-play {
  background-color: #e50914;
  color: white;
}
.btn-play:hover {
  background-color: #f40612;
}

.btn-list {
  background-color: rgba(109, 109, 110, 0.7);
  color: white;
}
.btn-list:hover {
  background-color: rgba(109, 109, 110, 0.4);
}

/* ==========================================================================
   Genre Filter Bar
   ========================================================================== */
.genre-bar {
  padding: 0;
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.genre-bar::before {
  content: 'Genre';
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.genre-dropdown-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}
.genre-dropdown {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, rgba(255, 42, 117, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(255, 42, 117, 0.3);
  color: #fff;
  padding: 10px 44px 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  width: 100%;
}
.genre-dropdown:hover,
.genre-dropdown:focus {
  background: linear-gradient(135deg, rgba(255, 42, 117, 0.2), rgba(139, 92, 246, 0.2));
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(255, 42, 117, 0.25), inset 0 0 20px rgba(255, 42, 117, 0.05);
}
.genre-dropdown option {
  background: #140a1e;
  color: #fff;
  padding: 12px;
  font-weight: 500;
}
.genre-dropdown-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 11px;
  pointer-events: none;
  transition: transform 0.3s ease;
}
.genre-dropdown:focus + .genre-dropdown-icon {
  transform: translateY(-50%) rotate(180deg);
}

/* Genre Grid — flat grid with no row titles */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  padding: 15px 0;
}
  
  /* ==========================================================================
     Movie Rows (API Simulation)
     ========================================================================== */
  .movie-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .row-title {
    font-size: 18px;
    font-weight: 600;
    color: #ff8ab3; /* Lighter pink for titles */
    text-shadow: 0 0 5px rgba(255, 138, 179, 0.5);
  }
  
  .cards-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  .cards-container::-webkit-scrollbar {
    display: none;
  }
  
  .movie-card {
  min-width: 130px;
  width: 130px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.img-frame {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  /* Prevents border radius bleed on scale in webkit */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.card-quality-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.movie-card:hover .img-frame {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 42, 117, 0.6);
  transform: translateY(-8px);
}

.movie-card:hover .card-img {
  transform: scale(1.1);
}
  
  .card-title {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

/* Lazy Scroll */
.lazy-sentinel {
  padding: 30px 0;
  text-align: center;
}
.lazy-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 600;
}
.lazy-loader i {
  font-size: 22px;
}
.lazy-end {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 20px;
  opacity: 0.6;
}

/* ==========================================================================
   Modals & Player (Retro Theme)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 5, 16, 0.85);
  backdrop-filter: blur(5px);
}
.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 42, 117, 0.3);
  border: 1px solid rgba(255, 42, 117, 0.3);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.modal.open .modal-content {
  transform: translateY(0) scale(1);
}
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(11, 5, 16, 0.7);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}
.close-btn:hover { background: var(--primary-color); }

.modal-content.new-detail-layout {
  max-width: 900px;
  background: #0b0510;
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  padding: 0;
  border-radius: 12px;
}
.detail-backdrop-container {
  position: relative;
  width: 100%;
  height: 400px;
}
.detail-backdrop-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0b0510 0%, transparent 60%);
}
.detail-body {
  padding: 0 40px 40px;
  position: relative;
  z-index: 2;
  margin-top: -100px;
  overflow-y: auto;
}
.detail-header-row {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 25px;
}
.detail-poster-wrap {
  width: 160px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.detail-poster-wrap img {
  width: 100%;
  display: block;
}
.detail-title-block {
  flex: 1;
  padding-bottom: 10px;
}
.detail-title-block h1 {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.1;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
}
.meta-dot { color: #666; }
.meta-star { color: #f5c518; }
.meta-badge {
  background: rgba(229, 9, 20, 0.2);
  color: #e50914;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.detail-action-row {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}
.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}
.genre-tag {
  border: 1px solid rgba(255,255,255,0.2);
  color: #ccc;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
}
.detail-overview {
  color: #ddd;
  line-height: 1.6;
  font-size: 16px;
  max-width: 800px;
}

/* Episodes */
/* Season Selection (Horizontal) */
.season-list-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 15px 5px 20px 5px; /* Added padding to prevent shadow clipping */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.season-list-container::-webkit-scrollbar {
  height: 6px;
}
.season-list-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.season-list-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
}
.season-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.season-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 8px 20px;
  border-radius: 30px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.season-pill:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}
.season-pill.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 42, 117, 0.6);
  position: relative;
  z-index: 10;
}
.ep-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ep-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-btn:hover { 
  background: rgba(255, 255, 255, 0.15); 
  border-color: rgba(255, 255, 255, 0.3);
}
.ep-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 42, 117, 0.6);
}

/* Player */
.player-modal {
  background: var(--bg-color);
  flex-direction: column;
}
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background: rgba(11, 5, 16, 0.95);
  border-bottom: 1px solid rgba(255, 42, 117, 0.2);
  width: 100%;
  position: relative;
  z-index: 100;
}
#player-title {
  font-weight: 600;
  color: #fff;
}
.quality-badge {
  background: var(--primary-color);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(255, 42, 117, 0.4);
}
.player-frame-wrap {
  flex: 1;
  position: relative;
  width: 100%;
}
.player-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.player-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}
.player-control-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 42, 117, 0.5);
}
.player-circle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}
.player-circle-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(255, 42, 117, 0.5);
}
.player-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: rgba(20, 10, 30, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 42, 117, 0.3);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.player-menu-dropdown::-webkit-scrollbar {
  width: 6px;
}
.player-menu-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.player-menu-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}
.player-menu-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}
.player-menu-dropdown.show { display: flex; }
.player-menu-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 15px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.player-menu-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.player-menu-item.active { color: #fff; background: rgba(255, 42, 117, 0.2); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 80px;
  padding: 60px 40px;
  background: rgba(11, 5, 16, 0.95);
  border-top: 1px solid rgba(255, 42, 117, 0.2);
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  color: #737373;
}

.footer-socials {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}
.social-icon {
  color: #fff;
  font-size: 24px;
  text-decoration: none;
  transition: transform 0.2s, color 0.2s;
}
.social-icon:hover {
  transform: scale(1.1);
  color: var(--primary-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-links a {
  color: #737373;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.service-code {
  background: transparent;
  border: 1px solid #737373;
  color: #737373;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s;
}
.service-code:hover {
  color: #fff;
  border-color: #fff;
}

.copyright {
  color: #737373;
  font-size: 11px;
  text-align: center;
}

.tmdb-short-credit {
  color: #555;
  font-size: 13px;
  align-self: center;
  text-decoration: none;
  transition: color 0.3s;
}
.tmdb-short-credit:hover {
  color: #fff;
  text-decoration: underline;
}

/* ==========================================================================
   Mobile Bottom Navigation
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 380px;
  background: rgba(18, 9, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 42, 117, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 42, 117, 0.15);
  z-index: 1000;
  padding: 8px;
  border-radius: 40px;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #737373;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 12px;
  gap: 4px;
  flex: 1;
}
.mobile-nav-link i {
  font-size: 20px;
}
.mobile-nav-link span {
  white-space: nowrap;
}
.mobile-nav-link.active {
  color: var(--primary-color);
}

@media (max-width: 1024px) {
  .main-content { padding: 0 20px; }
  .navbar { padding: 15px 20px; }
  .hero-section { margin-left: -20px; }
  .cards-container { 
    display: flex; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    scroll-snap-type: x mandatory;
  }
  .movie-card { scroll-snap-align: start; flex: 0 0 auto; }
}

@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
  .main-content { padding-bottom: 80px; } /* Space for bottom nav */
  .site-footer { margin-bottom: 70px; }
  
  .nav-link { display: none; }
  
  /* Top navbar mobile polish */
  .navbar {
    padding: 12px 16px;
    background: rgba(11, 5, 16, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  .navbar.scrolled {
    padding: 10px 16px;
  }
  .logo span {
    font-size: 18px !important;
  }
  .nav-left { gap: 15px; }
  .search-box { padding: 5px; }
  .search-box i { font-size: 16px; }
  .search-box:focus-within, .search-box.active { padding: 6px 12px; }
  .search-box:focus-within input, .search-box.active input { width: 110px; font-size: 13px; }
  .search-box:focus-within input:focus, .search-box.active input:focus { width: 140px; }
  
  .hero-title { font-size: 32px; }
  .hero-desc { font-size: 14px; }

  .genre-bar { padding: 0; margin-top: 0; gap: 10px; }
  .genre-bar::before { font-size: 12px; }
  .genre-dropdown { font-size: 13px; padding: 8px 36px 8px 14px; min-width: 130px; border-radius: 10px; }
  .genre-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px 0; }
  
  .cards-container { 
    display: flex; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 12px; 
    -webkit-overflow-scrolling: touch; 
    scroll-snap-type: x mandatory;
  }
  .movie-card { scroll-snap-align: start; flex: 0 0 auto; width: 120px; min-width: 120px; }
  
  /* ---- Detail Modal: Full-screen mobile layout ---- */
  .modal-content,
  .modal-content.new-detail-layout {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  .detail-backdrop-container {
    height: 280px;
  }
  .detail-body {
    padding: 0 20px 100px;
    margin-top: -80px;
  }
  .detail-header-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .detail-poster-wrap {
    width: 130px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.8), 0 0 15px rgba(255, 42, 117, 0.15);
  }
  .detail-title-block {
    text-align: center;
    width: 100%;
    padding-bottom: 0;
  }
  .detail-title-block h1 {
    font-size: 24px;
    word-break: break-word;
  }
  .detail-meta {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
  }
  .detail-action-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  .detail-action-row .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
  }
  .detail-genres {
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
  }
  .genre-tag {
    font-size: 11px;
    padding: 4px 10px;
  }
  .detail-overview {
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
  }
  .close-btn {
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    width: 34px;
    height: 34px;
    font-size: 16px;
    z-index: 20;
  }
  /* Episodes section mobile */
  .season-list-container {
    gap: 8px;
    padding: 10px 0 15px;
  }
  .season-pill {
    padding: 6px 14px;
    font-size: 13px;
  }
  .ep-grid {
    gap: 8px;
  }
  .ep-btn {
    width: 42px;
    height: 42px;
    font-size: 14px;
    border-radius: 8px;
  }
  
  .player-header { padding: 10px 15px; }
  #player-title { font-size: 12px; }
  .player-control-btn {
    font-size: 0;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
  .player-control-btn i { font-size: 14px; }
  .quality-badge { font-size: 9px; padding: 2px 5px; }
  
  .footer-links { flex-direction: column; gap: 15px; align-items: center; }
}

@media (max-width: 480px) {
  .cards-container { 
    display: flex; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 10px; 
    -webkit-overflow-scrolling: touch; 
    scroll-snap-type: x mandatory;
  }
  .movie-card { scroll-snap-align: start; flex: 0 0 auto; width: 110px; min-width: 110px; }
  .hero-title { font-size: 26px; }
  .hero-desc { display: none; }
  .search-box { padding: 6px; }
  .search-box:focus-within input, .search-box.active input { width: 100px; }
  .search-box:focus-within input:focus, .search-box.active input:focus { width: 130px; }

  /* Extra-small detail modal polish */
  .detail-backdrop-container { height: 220px; }
  .detail-body { padding: 0 16px 100px; }
  .detail-poster-wrap { width: 110px; }
  .detail-title-block h1 { font-size: 20px; }
  .detail-overview { font-size: 13px; }
  .detail-action-row .btn { padding: 10px 12px; font-size: 12px; }
  .ep-btn { width: 38px; height: 38px; font-size: 13px; }
}
