/* ==========================================
   MovieBox - 4D Premium Cinema Theme
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* 4D Glassmorphism Premium Palette */
  --bg-primary:    #0A0E17;   /* Deep Space Blue-Black */
  --bg-secondary:  rgba(17, 22, 37, 0.7); /* #111625 Glass content */
  --bg-card:       rgba(17, 22, 37, 0.85); /* #111625 Glass card */
  --bg-hover:      rgba(255, 255, 255, 0.08); /* Hover state */
  --navbar-bg:     rgba(10, 14, 23, 0.75);      /* Glass navbar */

  /* Premium Accents */
  --accent:        #FF9F1C;   /* Orange/Yellow for buttons and stars */
  --accent-dark:   #e58b14;   /* Dark Orange */
  --accent-glow:   rgba(255, 159, 28, 0.25);
  --brand-green:   #1DB954;   /* Brand Green for Logo/Icons */

  /* Text */
  --text-primary:  #FFFFFF;   /* Main Text */
  --text-secondary:#8E9AA8;   /* Secondary Text */
  --text-muted:    #6B7894;

  /* Borders & Shadows */
  --border:        rgba(255,255,255,0.08);
  --border-glass:  rgba(255,255,255,0.15);
  --border-hover:  rgba(245,166,35,0.4);
  --shadow:        0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow:   0 0 32px rgba(245,166,35,0.2);
  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --glass-blur:    blur(20px);

  --radius:        4px;
  --radius-lg:     8px;
  --radius-xl:     16px;
  --transition:    all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --navbar-h:      64px;
  --sidebar-w:     260px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(124,92,191,0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(245,166,35,0.05), transparent 25%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  background: var(--navbar-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 32px rgba(0,0,0,0.5), inset 0 -1px 0 rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  padding: 0 max(16px, calc((100vw - 1352px) / 2 + 16px));
  gap: 16px;
  overflow: visible;
}

/* Mobile hamburger — hidden on desktop */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.search-mobile-toggle {
  margin-right: 4px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-logo {
  height: 40px;
  width: 165px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, var(--brand-green), #158a3e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1;
}

.navbar-brand span {
  font-size: 1.3rem;
  font-weight: 800;
  color: #f1f5f9;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.navbar-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.navbar-search-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 0;
  line-height: 1;
}
.navbar-search-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Side Ads */
.side-ad {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border-radius: 8px;
}
.side-ad::-webkit-scrollbar { display: none; }
.side-ad.left-ad { left: 8px; }
.side-ad.right-ad { right: 8px; }

@media (max-width: 1400px) {
  .side-ad { display: none; }
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
}
.dropdown:hover > .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.dropdown-menu a:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-toggle::after { content: ' ▾'; font-size: 0.7rem; }

/* Genres Dropdown - 3 Column Grid */
.genres-dropdown-menu {
  display: none;
  min-width: 420px;
  max-width: 480px;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 12px;
}
.dropdown:hover > .genres-dropdown-menu {
  display: grid;
}
.genres-dropdown-menu a {
  text-align: center;
  padding: 8px 6px;
  border-radius: 6px;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  transition: var(--transition);
}
.genres-dropdown-menu a:hover {
  background: rgba(229,9,20,0.12);
  border-color: rgba(229,9,20,0.3);
  color: var(--primary);
}

/* Submenu */
.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -8px;
  margin-left: 0;
}
.dropdown-submenu:hover > .dropdown-menu { display: block; }
.dropdown-submenu > a::after {
  content: ' ▸';
  float: right;
  font-size: 0.7rem;
  margin-top: 2px;
}
.subcategory-item > a::after {
  content: none !important;
}

/* 3-Column layout for main categories */
.category-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  min-width: 400px;
  padding: 8px;
}
.category-columns > a,
.category-columns .dropdown-submenu > a {
  margin-bottom: 0;
  font-size: 0.75rem; /* Make the titles smaller */
  padding: 4px 8px;   /* Reduce padding */
}

/* Icons */
.menu-icon {
  margin-right: 6px;
  font-size: 1.1em;
  vertical-align: middle;
}

/* Subcategory Icon Grid */
.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 6px;
  padding: 8px;
  min-width: 0; /* Override default 180px */
  width: max-content;
}

.subcategory-item {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  font-size: 1.3rem !important;
  border-radius: 8px !important;
  position: relative;
  background: rgba(255,255,255,0.05);
}

.subcategory-item:hover {
  background: var(--bg-hover) !important;
}

/* Tooltip for Subcategory */
.subcategory-item::after {
  content: attr(data-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--navbar-bg);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 1000;
}

.subcategory-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-6px);
}

/* ==========================================
   SEARCH BAR INLINE — sits inside navbar as a flex item
   Logo always stays on the left
   ========================================== */

/* Hidden by default — zero width, invisible */
.search-bar-inline {
  flex: 0 0 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  margin-left: auto; /* sits at far right, after nav links */
  transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}

/* Active: expands to fill remaining space on the right */
.search-bar-inline.active {
  flex: 0 1 35%; /* Reduced from 55% to prevent pushing nav links */
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
}

@media (max-width: 768px) {
  .search-bar-inline.active {
    flex: 1; /* Take all remaining space so nothing gets cut off */
    margin-left: 6px;
  }
  /* Make search bar EXTREMELY compact and thin on mobile */
  .search-input-wrap {
    padding: 0px 4px 0px 6px;
    gap: 0px;
    border-radius: 12px;
    height: 28px; /* Force a thin height */
  }
  #searchInput {
    font-size: 0.7rem;
    padding: 2px 0px;
    height: 24px;
  }
  .search-action-btn {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 0.65rem;
    border-radius: 4px;
    padding: 0;
  }
  .search-close-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    font-size: 0.7rem;
    border-radius: 4px;
    padding: 0;
  }
  .search-divider {
    height: 10px;
    margin: 0 2px;
  }
  .search-box {
    gap: 2px;
  }
}

.search-box {
  width: 100%;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}


.search-input-wrap {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(17, 22, 37, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2px 6px 2px 12px;
  gap: 2px;
  box-shadow: 0 0 0 1px rgba(29,185,84,0.15);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(29,185,84,0.12);
}

#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  padding: 5px 4px;
  min-width: 0;
}
#searchInput::placeholder { color: var(--text-muted); }

/* AI Search Action Buttons */
.search-action-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  position: relative;
}
.search-action-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.search-action-btn.active { background: rgba(29,185,84,0.2); color: var(--accent); }
.search-action-btn.listening {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%  { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

.search-divider { width: 1px; height: 16px; background: rgba(255,255,255,0.08); flex-shrink: 0; }

.search-close-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.search-close-btn:hover { background: transparent; color: #ff6b6b; }

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 12px;
  background: rgba(17,22,37,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
}
.search-suggestions.visible { display: block; }

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover { background: rgba(255,255,255,0.05); }
.search-suggestion-item img {
  width: 40px; height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.search-suggestion-item .sug-info .sug-title { font-size: 0.9rem; font-weight: 600; color: #fff; }
.search-suggestion-item .sug-info .sug-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.search-suggestion-icon { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; }

/* Voice Status Bar */
.voice-status {
  position: absolute;
  top: 100%; left: 0; width: 100%;
  display: none;
  margin-top: 12px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444;
  font-size: 0.9rem;
  font-weight: 500;
  align-items: center;
  gap: 10px;
  animation: voiceFadeIn 0.3s ease;
}
.voice-status.visible { display: flex; }
@keyframes voiceFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.voice-status .wave { display: flex; gap: 3px; align-items: center; }
.voice-status .wave span {
  display: block; width: 3px; background: #ef4444; border-radius: 2px;
  animation: waveBar 0.7s ease-in-out infinite alternate;
}
.voice-status .wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-status .wave span:nth-child(3) { animation-delay: 0.2s; }
.voice-status .wave span:nth-child(4) { animation-delay: 0.3s; }
@keyframes waveBar {
  from { height: 4px; } to { height: 18px; }
}

/* Image Search Preview */
.image-search-preview {
  position: absolute;
  top: 100%; left: 0; width: 100%;
  display: none;
  margin-top: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(29,185,84,0.05);
  border: 1px solid rgba(29,185,84,0.2);
  align-items: center;
  gap: 16px;
}
.image-search-preview.visible { display: flex; }
.image-search-preview img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.image-search-preview .img-info { flex: 1; }
.image-search-preview .img-info p { font-size: 0.85rem; color: var(--text-muted); }
.image-search-preview .img-info strong { color: var(--accent); }
.img-search-spinner { display: none; }
.img-search-spinner.active {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.85rem;
}

/* Search Hint Bar */
.search-hint-bar {
  position: absolute;
  top: 100%; left: 0; width: 100%;
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.search-hint-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.search-hint-tag:hover { background: rgba(29,185,84,0.12); border-color: rgba(29,185,84,0.3); color: var(--accent); }

/* Mobile Search Adjustments */
@media (max-width: 768px) {
  .search-overlay { padding-top: 40px; padding-left: 16px; padding-right: 16px; }
  #searchInput { font-size: 1rem; }
  .search-action-btn, .search-close-btn { width: 40px; height: 40px; min-width: 40px; }
}

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px;
}

/* ==========================================
   HERO SLIDER
   ========================================== */
.hero {
  position: relative;
  width: calc(100% - 48px);
  max-width: 1352px;
  margin: 24px auto 24px;
  height: 320px;
  overflow: hidden;
  background: var(--bg-secondary);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

/* ==========================================
   EMERGENCY ADMIN PANEL FIX
   ========================================== */
.admin-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
}

.admin-sidebar {
    width: 260px !important;
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.admin-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    min-width: 0 !important;
}

.hero-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  max-width: 500px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 1px 1px 4px #000, 0 0 10px #000;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-meta .rating {
  color: #fbbf24;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-actions { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* Hero dots */
.hero-dots {
  position: absolute;
  bottom: 16px;
  right: 24px;
  display: flex;
  gap: 6px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition);
}
.hero-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }

/* ==========================================
   LAYOUT
   ========================================== */
.container {
  width: 100%;
  max-width: 1352px;
  margin: 0 auto;
  padding: 0 24px;
  background: var(--bg-secondary);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border-glass);
  border-right: 1px solid var(--border-glass);
  box-shadow: 0 0 80px rgba(0,0,0,0.5);
}

.main-layout {
  display: flex;
  gap: 24px;
  padding: 16px 0 32px;
}

.main-content { flex: 1; min-width: 0; }

.sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* ==========================================
   SECTIONS
   ========================================== */
.section { margin-bottom: 20px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.view-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all:hover { color: var(--accent-dark); }

/* ==========================================
   MOVIE GRID
   ========================================== */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.movies-scroll {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 8px; /* Reduced padding since scrollbar is gone */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.movies-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}
.movies-scroll .movie-card {
  flex: 0 0 160px;
}

.movie-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
  cursor: pointer;
}

.movie-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }

.movie-card-poster {
  display: block;
  position: relative;
  padding-bottom: 150%;
  overflow: hidden;
}

.movie-card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .movie-card-poster img { transform: scale(1.05); }

.movie-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.movie-card:hover .movie-card-overlay { opacity: 1; }

.play-btn {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transform: scale(0.8);
  transition: var(--transition);
}
.movie-card:hover .play-btn { transform: scale(1); }

/* Badges */
.badge {
  position: absolute;
  top: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-quality { left: 8px; }
.badge-rating  { right: 8px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: #fbbf24; }
.badge-hd      { background: #2563eb; color: #fff; }
.badge-fullhd  { background: #7c3aed; color: #fff; }
.badge-4k      { background: #dc2626; color: #fff; }
.badge-cam     { background: #64748b; color: #fff; }

.movie-card-info {
  padding: 10px 10px 12px;
}

.movie-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================
   AD ZONES — CLEAN SYSTEM
   ========================================== */

/* Base: all ad containers are transparent, centered blocks */
.ad-zone {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  margin-bottom: 20px;
  overflow: visible;
}

/* Images inside ads */
.ad-zone img,
.side-ad img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* iframes inside ads */
.ad-zone iframe,
.side-ad iframe {
  max-width: 100%;
  display: inline-block;
  border: 0;
}

/* INS tags (Adsense style) */
.ad-zone ins,
.side-ad ins {
  display: inline-block !important;
  text-decoration: none !important;
}

/* Hide any label text */
.ad-zone-label,
.ad-label {
  display: none !important;
}

/* Header Ad (top of page, leaderboard) */
.ad-zone-header {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 auto 12px auto;
  padding: 8px 0;
  background: transparent;
}

/* Footer Ad (above footer, leaderboard) */
.ad-zone-footer {
  display: block;
  width: 100%;
  text-align: center;
  margin: 16px auto;
  padding: 8px 0;
  background: transparent;
}

/* ==========================================
   SIDEBAR WIDGETS
   ========================================== */
.widget {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Categories Simple List */
.categories-simple-list {
  display: flex;
  flex-direction: column;
}

.simple-cat-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.2s, background 0.2s;
}

.simple-cat-item:last-child {
  border-bottom: none;
}

.simple-cat-item i {
  margin-right: 12px;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.simple-cat-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.simple-cat-item:hover i {
  color: var(--accent);
}


.genre-list { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-tag {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.genre-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ==========================================
   MOVIE DETAIL PAGE
   ========================================== */
.movie-detail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.movie-poster-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.movie-poster-wrap img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.movie-info-section h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.movie-genre-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.movie-genre-tag {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}
.movie-genre-tag:hover { background: var(--accent); color: #fff; }

/* Movie Meta Blur Background */
.movie-meta-blur-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.movie-meta-blur-bg {
  position: absolute;
  inset: 0;
  background-image: var(--movie-poster);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.3) saturate(1.5);
  transform: scale(1.1);
  z-index: 0;
}

.movie-meta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.movie-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}

.movie-meta-icon {
  width: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.movie-meta-label { color: var(--text-muted); margin-right: 4px; }

.movie-meta-item .rating-val {
  color: #fbbf24;
  font-weight: 700;
}

/* Description */
.movie-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Stats bar */
.movie-stats {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.movie-stats span { display: flex; align-items: center; gap: 6px; }

/* Synopsis / Screenshots */
.synopsis-section {
  margin-bottom: 32px;
}

.synopsis-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.synopsis-section h2::before {
  content: '';
  display: block;
  width: 4px; height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.screenshot-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.screenshot-item:hover img { transform: scale(1.03); }

/* Download Links */
.download-section {
  margin-bottom: 32px;
}

.download-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-section h2::before {
  content: '';
  display: block;
  width: 4px; height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.download-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  gap: 12px;
  flex-wrap: nowrap;
}

.download-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.download-quality {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.download-lang {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.download-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 20px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.download-btn:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ==========================================
   COMMENTS
   ========================================== */
.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

textarea.form-control { resize: vertical; min-height: 100px; }

.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-user { font-weight: 600; font-size: 0.9rem; }

.comment-date { font-size: 0.75rem; color: var(--text-muted); }

.comment-body { font-size: 0.875rem; color: var(--text-secondary); }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: #07090f;
  border-top: 1px solid rgba(245,166,35,0.12);
  padding: 24px 0 16px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; }
.footer-desc { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; }

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ==========================================
   ALERTS / FLASH MESSAGES
   ========================================== */
.alert {
  padding: 12px 20px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-success { background: rgba(245,166,35,0.1); color: #F5A623; border: 1px solid rgba(245,166,35,0.3); }
.alert-error   { background: rgba(239,68,68,0.12); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.alert-info    { background: rgba(124,92,191,0.12); color: #7C5CBF; border: 1px solid rgba(124,92,191,0.3); }

/* ==========================================
   ADMIN PANEL
   ========================================== */
.admin-body {
  background: #06080f;
  min-height: 100vh;
  display: flex;
  align-items: flex-start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.admin-sidebar {
  width: var(--sidebar-w);
  background: rgba(13,17,32,0.6);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.admin-logo {
  padding: 24px 20px;
  font-size: 1.2rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(245,166,35,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0d1120 0%, #111829 100%);
  color: var(--text-primary);
}

.admin-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--brand-green);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.admin-nav { padding: 16px 12px; flex: 1; }

.admin-nav-group {
  margin-bottom: 24px;
}

.admin-nav-group-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 8px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
  margin-bottom: 2px;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.admin-nav a.active { font-weight: 600; }

.admin-nav a .nav-icon { width: 18px; font-size: 1rem; }

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: 64px;
  background: rgba(9,17,30,0.7);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.admin-topbar h2 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

.admin-topbar-right { display: flex; align-items: center; gap: 12px; }

.admin-content { padding: 28px; flex: 1; background: #0a0f1c; }

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.green  { background: rgba(245,166,35,0.12); color: #F5A623; }
.stat-icon.blue   { background: rgba(124,92,191,0.15); color: #7C5CBF; }
.stat-icon.purple { background: rgba(168,85,247,0.15); color: #a855f7; }
.stat-icon.orange { background: rgba(249,115,22,0.15); color: #f97316; }
.stat-icon.red    { background: rgba(239,68,68,0.15); color: #ef4444; }
.stat-icon.yellow { background: rgba(234,179,8,0.15); color: #eab308; }

.stat-info .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Admin Tables */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: var(--bg-hover);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.admin-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}

.admin-table tr:hover td { background: var(--bg-hover); }

/* Admin Forms */
.admin-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }

/* Badges */
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-active   { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-inactive { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-pending  { background: rgba(234,179,8,0.15); color: #eab308; }

/* Action Buttons */
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 6px; }
.btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; }
.btn-danger:hover { background: #ef4444; color: #fff; }
.btn-edit { background: rgba(59,130,246,0.15); color: #3b82f6; }
.btn-edit:hover { background: #3b82f6; color: #fff; }
.btn-success { background: var(--accent); color: #fff; }
.btn-success:hover { background: var(--accent-dark); color: #fff; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* Admin Login */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, rgba(34,197,94,0.08) 0%, var(--bg-primary) 70%);
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.admin-login-logo .logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 12px;
}

.admin-login-logo h1 { font-size: 1.5rem; font-weight: 800; }
.admin-login-logo p  { color: var(--text-muted); font-size: 0.875rem; }

/* TMDB Search */
.tmdb-search-results {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 300px;
  overflow-y: auto;
  margin-top: 4px;
}

.tmdb-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.tmdb-result-item:hover { background: var(--bg-hover); }

.tmdb-result-poster {
  width: 36px; height: 52px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.tmdb-result-info .title { font-weight: 600; font-size: 0.875rem; }
.tmdb-result-info .year  { font-size: 0.75rem; color: var(--text-muted); }

/* Download links builder */
.link-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  background: var(--bg-secondary);
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .sidebar { width: 250px; }
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 768px) {
  :root { --navbar-h: 56px; }

  /* Mobile Navbar: Hamburger | Logo | flex search bar */
  .navbar {
    padding: 0 12px;
    gap: 8px;
    justify-content: flex-start;
  }
  /* On mobile, logo takes natural space, search bar expands into remaining */
  .navbar-brand {
    flex: 0 0 auto;
    justify-content: flex-start;
    font-size: 1rem;
  }
  .navbar-brand span { font-size: 1rem; }
  .navbar-site-name { display: none; }
  .navbar-nav { display: none; }
  .mobile-toggle { display: flex; }

  /* Center the logo on mobile */
  .navbar {
    position: relative;
    justify-content: space-between;
  }
  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.2s, transform 0.2s;
  }
  /* When search is open, hide the brand */
  .navbar.search-open .navbar-brand {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0.9);
  }

  .hero { height: 130px; margin-top: 6px; margin-bottom: 10px; border-radius: 8px; width: calc(100% - 16px); }
  .hero-content { left: 10px; bottom: 8px; max-width: 70%; }
  .hero-title { font-size: 0.95rem; margin-bottom: 3px; line-height: 1.2; }
  .hero-badge { font-size: 0.55rem; padding: 2px 6px; margin-bottom: 4px; }
  .hero-meta { font-size: 0.7rem; gap: 8px; margin-bottom: 6px; }
  .hero-actions .btn { padding: 5px 12px; font-size: 0.72rem; }
  .hero-desc { display: none; }

  .main-layout { flex-direction: column; padding: 20px 0; }
  .sidebar { display: none !important; }

  .movie-detail {
    grid-template-columns: 140px 1fr;
    gap: 16px;
  }

  .movie-info-section h1 { font-size: 1.4rem; }
  .movie-meta-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }

  .admin-sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .download-table { font-size: 0.8rem; }

  /* Hide footer on mobile — bottom nav handles navigation */
  .footer { display: none !important; }

  /* Hide mic & camera buttons on mobile */
  #voiceBtn, #imgSearchBtn, .search-divider:nth-of-type(1) { display: none !important; }
}

@media (max-width: 480px) {
  .hero { height: 160px; }
  .hero-content { left: 10px; bottom: 8px; max-width: 65%; }
  .hero-title { font-size: 0.9rem; }
  .hero-badge { font-size: 0.5rem; padding: 2px 5px; }
  .btn { padding: 10px 18px; font-size: 0.85rem; }

  .movie-detail { grid-template-columns: 1fr; }
  .movie-poster-wrap { max-width: 180px; margin: 0 auto; }

  .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .movies-scroll .movie-card { flex: 0 0 140px; }
  .movie-card-info { padding: 8px 10px 10px; }
  .movie-card-title { font-size: 0.85rem; }
  .movie-card-meta { display: block; font-size: 0.7rem; }
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0,0,0,0.9);
  flex-direction: column;
  padding: 20px;
}

.mobile-nav-overlay.active { display: flex; }
.mobile-nav-overlay a {
  display: block;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 16px;
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1200;
  background: rgba(10, 13, 25, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

.bottom-nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255,255,255,0.45);
  font-size: 0.6rem;
  font-weight: 500;
  padding: 4px 2px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, transform 0.15s;
  position: relative;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav-item i {
  font-size: 1.15rem;
  display: block;
}

.bottom-nav-item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav-item:active {
  transform: scale(0.88);
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item.active i {
  filter: drop-shadow(0 0 6px rgba(29,185,84,0.5));
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
  }
  /* Push content above bottom bar */
  body {
    padding-bottom: 64px;
  }
}


/* Loading Spinner */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Utility Classes */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.mb-2         { margin-bottom: 8px; }
.mb-4         { margin-bottom: 16px; }
.w-100        { width: 100%; }
.mt-4         { margin-top: 16px; }
.p-0          { padding: 0; }

/* Movies Header Section */
.movies-header-section { margin-bottom: 24px; }
@media (max-width: 768px) {
  .movies-header-section {
    margin-bottom: 12px !important;
    gap: 8px !important;
  }
  .movies-header-section h1 {
    font-size: 1.2rem !important;
  }
  .movies-header-section form select {
    font-size: 0.8rem !important;
    padding: 6px 8px !important;
  }
}

/* =====================================================
   AD ZONE — CLEAN PROFESSIONAL SYSTEM
   ===================================================== */

/* Strip background/border from all ad containers */
.ad-zone,
.ad-zone-header,
.ad-zone-footer,
.side-ad {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* HEADER BANNER AD */
.ad-zone-header {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 auto 16px auto;
  padding: 8px 0;
}

/* FOOTER BANNER AD */
.ad-zone-footer {
  display: block;
  width: 100%;
  text-align: center;
  margin: 16px auto;
  padding: 8px 0;
}

/* ALL INLINE ADS (before download, bypass, sidebar) */
.ad-zone {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

/* Images and iframes inside ad zones */
.ad-zone img, .side-ad img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}
.ad-zone iframe, .side-ad iframe {
  max-width: 100%;
  display: inline-block;
  border: 0;
}

/* LEFT / RIGHT STICKY SIDE ADS */
.side-ad {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 999 !important;
  display: block !important;
  text-align: center !important;
  background: transparent !important;
  padding: 0 !important;
}
.side-ad.left-ad  { left: 4px !important;  right: auto !important; }
.side-ad.right-ad { right: 4px !important; left: auto !important;  }

/* Strip table wrappers some ad scripts inject */
.ad-zone table, .ad-zone tr, .ad-zone td, .ad-zone th {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Hide ad labels */
.ad-zone-label, .ad-label, .ad-title-label { display: none !important; }

/* Hide sticky side ads on small screens */
@media (max-width: 1400px) {
  .side-ad { display: none !important; }
}
