/*
  CineStream — Premium Design System
  Colors, Variables, Base Styles, and Accessibility Utilities
*/

/* ── Accessibility: Skip Navigation ─────────────────────────────────────────── */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary, #ff4757);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  z-index: 99999;
  transition: top 0.2s ease;
}
.skip-to-main:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── Screen-reader only text ─────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────────── */
.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted, #b3b3b3);
}
.breadcrumb-list a {
  color: var(--text-muted, #b3b3b3);
  text-decoration: none;
}
.breadcrumb-list a:hover { color: var(--primary, #ff4757); }
.breadcrumb-list li + li::before {
  content: '›';
  margin-right: 0.4rem;
  color: var(--text-muted, #b3b3b3);
}

/* ── Search clear button reset ───────────────────────────────────────────────── */
.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted, #b3b3b3);
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  font-size: 1rem;
  line-height: 1;
}
.search-clear-btn:hover { color: #fff; }

/* Custom Search Clear/Cancel Button (Webkit) */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b3b3b3'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  margin-right: 4px;
  transition: transform 0.2s;
}
input[type="search"]::-webkit-search-cancel-button:hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>");
  transform: scale(1.1);
}


:root {
  --primary: #e50914;
  /* Netflix Red */
  --primary-hover: #b20710;
  --bg-dark: #0f0f0f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-modal: rgba(15, 15, 15, 0.98);
  --text-main: #ffffff;
  --text-muted: #b3b3b3;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  --transition-smooth: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --hindi-badge: #ff0000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
  padding-top: 80px;
}

/* Scrollbar Global */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  /* Added height for any default horizontal scroll */
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Specific Premium Horizontal Scrollbar for Continue Watching & Favorites */
#recently-viewed-grid,
#favorites-grid {
  /* Firefox support */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) var(--glass);
}

#recently-viewed-grid::-webkit-scrollbar,
#favorites-grid::-webkit-scrollbar {
  height: 6px;
}

#recently-viewed-grid::-webkit-scrollbar-track,
#favorites-grid::-webkit-scrollbar-track {
  background: var(--glass);
  border-radius: 10px;
  margin: 0px 10px;
}

#recently-viewed-grid::-webkit-scrollbar-thumb,
#favorites-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

#recently-viewed-grid::-webkit-scrollbar-thumb:hover,
#favorites-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  cursor: pointer;
}

/* Layout Utilities */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 2rem 0 1.2rem;
  color: white;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  font-family: 'Outfit', sans-serif;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }

  100% {
    background-position: 468px 0;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Glassmorphism utility */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff3d47);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: calc(var(--border-radius) / 2);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--glass);
  color: white;
  border: 1px solid var(--glass-border);
  padding: 12px 24px;
  border-radius: calc(var(--border-radius) / 2);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Sticky Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease-out;
  background: linear-gradient(to bottom, rgba(15, 15, 15, 0.9), transparent);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

nav.scrolled {
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  height: 90px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span {
  color: white;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active {
  font-weight: 700;
  text-shadow: 0 0 12px rgba(229, 9, 20, 0.5);
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.search-icon-wrapper {
  position: absolute;
  right: 4px;
  left: auto;
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  z-index: 2;
  pointer-events: none;
}

.search-container input {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 10px 65px 10px 15px;
  border-radius: 50px;
  color: white;
  outline: none;
  transition: var(--transition-smooth);
}

.search-container input::placeholder {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.search-container input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

.search-container:focus-within {
  max-width: 400px;
}

#search-clear {
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

#search-clear:hover {
  color: white;
}

/* Mobile Responsive Navbar */
@media (max-width: 768px) {
  body {
    padding-top: 140px;
  }

  nav {
    height: auto;
    padding: 10px 0;
  }

  .nav-content {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 15px;
  }

  .search-container {
    width: 100%;
    max-width: 100% !important;
  }

  .search-container input:focus {
    width: 100%;
  }

  .search-container:focus-within {
    max-width: 100% !important;
  }

  #modal-language {
    display: none !important;
  }

  .modal-meta {
    font-size: 0.85rem !important;
    gap: 10px !important;
  }
}

/* Movie Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

@media (max-width: 600px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  #search-results-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 2.5rem 0 3rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-muted);
  padding: 0 4px;
  font-size: 0.95rem;
  line-height: 42px;
}

/* Movie Card */
.movie-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--bg-card);
  aspect-ratio: 2/3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
  will-change: transform, box-shadow;
}

.movie-card:hover {
  box-shadow: var(--shadow-premium);
  z-index: 10;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.movie-card:hover img {
  filter: brightness(0.6);
}

.movie-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition-smooth);
}

.movie-card:hover .movie-card-info {
  transform: translateY(0);
  opacity: 1;
}

.movie-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hindi-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 936px 100%;
  animation: shimmer 2s infinite linear;
}

/* Filters Component */
.filters-section {
  padding: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.filter-chip,
.filter-dropdown-select {
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.filter-chip:hover,
.filter-chip.active,
.filter-dropdown-select:hover,
.filter-dropdown-select.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

#genre-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b3b3b3' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C2.185 5.355 2.408 5 2.811 5h9.447c.403 0 .626.355.361.658l-4.796 5.482a.503.503 0 0 1-.776 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  padding-right: 30px;
  cursor: pointer;
  outline: none;
}

#genre-select option {
  background: var(--bg-dark);
  color: white;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-modal);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  height: 90vh;
  background: #000;
  border-radius: var(--border-radius);
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(0, 0, 0, 1);
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-hero {
  position: relative;
  width: 100%;
  height: 60%;
  overflow: hidden;
}

.modal-hero iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 60%, #000);
  pointer-events: none;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  /* Ensure it's always on top */
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: 0.3s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

.modal-sound-toggle {
  position: absolute;
  top: 20px;
  right: 70px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: 0.3s;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-back-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

.modal-body {
  padding: 2rem;
  display: flex;
  gap: 3rem;
  position: relative;
  z-index: 10;
  margin-top: -120px;
}

.modal-poster-container {
  position: relative;
  width: 250px;
  flex-shrink: 0;
  animation: slideUp 0.8s ease;
  margin-bottom: 0;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-poster {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 1);
  border: 4px solid #1a1a1a;
  display: block;
}

.watch-overlay-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.6);
  z-index: 5;
  white-space: nowrap;
}

.watch-overlay-btn:hover {
  transform: translateX(-50%) translateY(-2px);
}

.modal-details {
  flex: 1;
  padding-top: 0;
}

.modal-details h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-star {
  color: #ffcc00;
}

.modal-description {
  font-size: 1.1rem;
  color: #ccc;
  max-width: 800px;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-ad {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  align-items: center;
}

.admin-panel {
  display: none;
  background: #1a1a1a;
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-top: 2rem;
}

.admin-panel.active {
  display: block;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-premium);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  /* ── Modal Overlay: full viewport on mobile ── */
  .modal-overlay {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  /* ── Modal content: flex column, fill parent fully ── */
  .modal-overlay.active .modal-content,
  .modal-content {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  /* ── Hero trailer: 200px on mobile details, full height when watching ── */
  .modal-hero {
    display: block !important;
    height: 200px !important;
    min-height: 200px;
    flex-shrink: 0 !important;
    width: 100% !important;
    overflow: hidden;
  }

  .modal-overlay.watching .modal-content {
    overflow: hidden !important;
  }

  .modal-overlay.watching .modal-hero {
    flex: 1 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  /* ── Modal body: natural height, scrolls inside modal-content ── */
  .modal-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    flex: 1;
    margin: 0 !important;
    padding: 1rem 0.75rem 2rem;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .modal-body::-webkit-scrollbar {
    display: none;
  }

  /* ── Poster: smaller on mobile ── */
  .modal-poster-container {
    width: 120px !important;
    flex-shrink: 0;
    margin-bottom: 0.15rem !important;
  }

  .mobile-only-meta {
    display: flex !important;
    color: var(--text-muted);
    font-size: 0.82rem;
  }

  /* ── Details: tighter text ── */
  .modal-details {
    width: 100%;
  }

  .modal-details h1 {
    font-size: 1.25rem !important;
    line-height: 1.3;
    margin-top: -8px !important;
    margin-bottom: 0.35rem;
  }

  .modal-meta {
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
  }

  #modal-rating, #modal-year {
    display: none !important;
  }

  #modal-genres {
    font-size: 0.75rem !important;
  }

  .modal-description {
    font-size: 0.85rem;
    margin: 0 auto 1rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* Buttons row */
  .modal-details div[style*="display: flex"] {
    order: -1;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem !important;
    margin-top: 0 !important;
  }

  /* Hide wishlist button on mobile */
  #modal-wishlist-btn {
    display: none !important;
  }

  /* Close button position */
  .modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  /* Sound toggle: smaller on mobile */
  .modal-sound-toggle {
    top: 10px;
    right: 52px;
    padding: 4px 9px;
    font-size: 0.72rem;
    gap: 3px;
    border-radius: 14px;
  }

  .modal-sound-toggle span {
    display: none; /* hide "Muted" text, keep only icon */
  }

  /* Poster: bigger on mobile */
  .modal-poster-container {
    width: 160px !important;
  }

}

/* Additional styles for very small screens (iPhone SE) */
@media (max-width: 375px) {

  /* Ensure buttons are visible on small screens */
  .modal-details div[style*="display: flex"] {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  #modal-watch-btn,
  #modal-wishlist-btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  /* Ensure wishlist button shows properly */
  #modal-wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  #modal-wishlist-btn::before {
    font-size: 1.1rem;
  }
}

/* Professional Footer Styling */
.main-footer {
  background-color: #0a0a0a;
  padding: 60px 0 20px;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 40px;
}

.footer-brand p {
  color: #888;
  font-size: 0.9rem;
  margin-top: 10px;
}

.footer-links {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #bbb;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
  color: #666;
  font-size: 0.85rem;
}

/* Mobile Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .footer-links {
    justify-content: center;
    gap: 15px 30px;
  }

  .footer-bottom {
    max-width: 80%;
    margin: 0 auto;
    padding-top: 15px;
  }

  /* Reduce SEO Hero size on mobile */
  #seo-hero {
    padding: 0.8rem 0 0.2rem !important;
    margin-bottom: 0.2rem !important;
  }
  #seo-hero h1 {
    font-size: 1.1rem !important;
  }
  #seo-hero p {
    font-size: 0.76rem !important;
    line-height: 1.45 !important;
  }
}

/* Info Pages Professional Styling */
.info-container {
  padding: 120px 0 80px;
  min-height: 80vh;
}

.info-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.info-content h1 {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-transform: capitalize;
}

.info-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #ccc;
  margin-bottom: 20px;
  text-transform: capitalize;
}

.contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px;
  border-radius: 20px;
  height: fit-content;
  text-transform: capitalize;
}

.contact-card h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: #fff;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 5px;
  text-transform: capitalize;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.contact-item i {
  width: 45px;
  height: 45px;
  background: rgba(229, 9, 20, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-item .text h4 {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 3px;
}

.contact-item .text p {
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
}

@media (max-width: 992px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .info-container {
    padding-top: 100px;
  }
}

/* Final Global Responsiveness Polish */
.container {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  #movie-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  #movie-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .logo {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  #movie-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .nav-content {
    padding: 15px 0;
  }

  .logo {
    font-size: 1.3rem;
  }

  .info-content h1 {
    font-size: 2rem;
  }

  .contact-card {
    padding: 25px;
  }
}

#trailer-video {
  pointer-events: none;
}

/* Modal Loading Screen Overlay */
.modal-loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-loading-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-loading-screen .loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: modal-spin 0.8s infinite linear;
}

@keyframes modal-spin {
  to {
    transform: rotate(360deg);
  }
}

/* APK Download Button styling */
.logo-wrapper {
  display: flex;
  align-items: center;
}

.apk-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-smooth);
  cursor: pointer;
  height: 38px;
}

.apk-download-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.apk-download-btn svg.apk-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

@media (max-width: 768px) {
  .nav-content {
    position: relative;
  }
  .apk-download-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    justify-content: center;
    background: rgba(229, 9, 20, 0.15);
  }
  .apk-download-btn .btn-text {
    display: none;
  }
  .apk-download-btn svg.apk-icon {
    width: 18px;
    height: 18px;
  }
}