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

/* ===== GLOBAL VARIABLES ===== */
:root {
  --bg-color: hsl(222, 28%, 7%);
  --bg-darker: hsl(222, 33%, 4%);
  --bg-card: hsl(222, 24%, 10%);
  --text-primary: hsl(0, 0%, 100%);
  --text-secondary: hsl(220, 15%, 80%);
  --text-muted: hsl(220, 10%, 60%);

  --accent-primary: #1cb7ff;
  --accent-secondary: #2ff58b;
  --accent-gradient: linear-gradient(91deg, var(--accent-primary) 1.22%, var(--accent-secondary) 50.24%);
  --accent-glow: rgba(47, 245, 139, 0.15);

  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(11, 15, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --sidebar-width: 260px;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* Selection */
::selection {
  background: var(--accent-primary);
  color: var(--bg-darker);
}

/* Universal Hide Class */
.hidden {
  display: none !important;
}

/* Gradient Text helper */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ===== APP LAYOUT ===== */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ===== SIDEBAR (DESKTOP) ===== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--bg-darker);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 20px;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.sidebar-brand .logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.sidebar-brand .logo:hover {
  filter: brightness(1.2);
}

.sidebar-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: none;
}

.sidebar-links {
  list-style: none;
  flex-grow: 1;
}

.sidebar-links li {
  margin-bottom: 12px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition-smooth);
  border-left: 3px solid transparent;
}

.sidebar-links a i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  transition: var(--transition-smooth);
}

.sidebar-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-links a.active {
  color: var(--text-primary);
  background: rgba(28, 183, 255, 0.08);
  border-left-color: var(--accent-primary);
  font-weight: 600;
}

.sidebar-links a.active i {
  color: var(--accent-primary);
  filter: drop-shadow(0 0 8px rgba(28, 183, 255, 0.5));
}

.sidebar-channels {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 14px;
}

.sidebar-channels p {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.channels-grid {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.channels-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 18px;
  transition: var(--transition-bounce);
}

.channels-grid a:hover {
  transform: scale(1.18);
}

.channels-grid .whatsapp {
  background: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.channels-grid .telegram {
  background: #229ED9;
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.3);
}

.channels-grid .discord {
  background: #5865F2;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== TOP HEADER ===== */
.top-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: 75px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 999;
  transition: var(--transition-smooth);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  display: none;
}

.mobile-logo {
  display: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--text-primary);
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
  width: 300px;
  transition: var(--transition-smooth);
}

.search-box i {
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-size: 14px;
  font-family: var(--font-family);
}

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

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(28, 183, 255, 0.2);
  width: 340px;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  top: 75px;
  right: 0;
  left: var(--sidebar-width);
  height: calc(100vh - 75px);
  background-color: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 998;
  overflow-y: auto;
  transition: var(--transition-smooth);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
  padding: 40px;
}

.search-empty {
  text-align: center;
  margin-top: 140px;
  color: var(--text-secondary);
}

.search-empty h2 {
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 700;
}

.search-empty p {
  font-size: 16px;
  color: var(--text-muted);
}

/* ===== HERO BANNER ===== */
#hero {
  position: relative;
  height: 600px;
  width: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  color: var(--text-primary);
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(11, 15, 25, 0.85) 30%,
      rgba(11, 15, 25, 0.2) 60%,
      transparent 100%);
  z-index: 1;
}

.hero-fade-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 160px;
  background-image: linear-gradient(to top,
      var(--bg-color),
      rgba(11, 15, 25, 0));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 50px 100px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.hero-logo {
  max-width: 320px;
  max-height: 140px;
  margin-bottom: 20px;
  object-fit: contain;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 25px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.btn {
  padding: 12px 28px;
  border-radius: 30px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family);
  transition: var(--transition-smooth);
}

.btn.play {
  background: white;
  color: black;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn.play:hover {
  background: var(--accent-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 245, 139, 0.35);
}

.btn.info {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn.info:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Hero Carousel dots */
.hero-carousel {
  position: absolute;
  bottom: 40px;
  right: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.hero-dot.active {
  background: var(--accent-primary);
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-primary);
}

/* Sliding animations */
.hero-enter {
  transform: translateX(50px);
  opacity: 0;
}

.hero-active {
  transform: translateX(0);
  opacity: 1;
}

.hero-exit {
  transform: translateX(-50px);
  opacity: 0;
}

/* ===== MOVIE ROWS CONTAINER ===== */
.movie-rows-container {
  padding: 0 30px;
  margin-top: -30px;
  position: relative;
  z-index: 10;
}

.movie-rows-container > .row:first-of-type {
  margin-top: -70px;
}

.row {
  margin-bottom: 40px;
}

.row h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  margin-left: 10px;
  position: relative;
  padding-left: 14px;
}

.row h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* Slider Controls */
.row-slider {
  position: relative;
  display: flex;
  align-items: center;
}

.row-posters {
  display: flex;
  gap: 16px;
  overflow-x: scroll;
  scroll-behavior: smooth;
  padding: 10px 10px 25px;
  scrollbar-width: none;
  /* Firefox */
}

.row-posters::-webkit-scrollbar {
  display: none;
  /* Chrome */
}

/* Slider buttons */
.slider-btn {
  position: absolute;
  top: 10px;
  bottom: 25px;
  width: 50px;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  font-size: 24px;
  border: none;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.row-slider:hover .slider-btn {
  opacity: 1;
}

.slider-btn.left {
  left: 0;
  border-radius: 0 12px 12px 0;
  border-right: 1px solid var(--border-color);
}

.slider-btn.right {
  right: 0;
  border-radius: 12px 0 0 12px;
  border-left: 1px solid var(--border-color);
}

.slider-btn:hover {
  background: rgba(28, 183, 255, 0.8);
  color: black;
}

/* ===== MOVIE CARDS & POSTERS ===== */
.poster-card {
  position: relative;
  flex-shrink: 0;
  transition: var(--transition-bounce);
  border-radius: 14px;
  overflow: visible;
  /* to allow glow outside the card boundary */
  z-index: 1;
  background-color: var(--bg-card);
}

.poster-card:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 10;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(28, 183, 255, 0.3);
}

.poster {
  width: 155px;
  height: 232px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.poster-card:hover .poster {
  border-color: rgba(28, 183, 255, 0.5);
}

/* Rating Badge */
.rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffc107;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Provider Logo Badge */
.provider-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.provider-badge img {
  max-width: 16px;
  max-height: 16px;
  object-fit: contain;
}

/* ===== GRID SYSTEM (MOVIES/SERIES PAGES) ===== */
.page-header {
  margin-top: 110px;
  margin-bottom: 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.dual-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.logo-separator {
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 300;
}

.platform-logo {
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
  padding: 20px 40px 60px;
}

.grid .poster-card,
.search-results .poster-card {
  width: 100%;
}

.grid .poster,
.search-results .poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 60px;
}

.pagination button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.pagination button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  color: white;
}

.pagination button.active {
  background: var(--accent-gradient);
  color: black;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ===== DETAILS MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(5, 7, 12, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 850px;
  max-height: 85vh;
  background: rgba(16, 22, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: white;
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 2px rgba(255, 255, 255, 0.1) inset;
  z-index: 10001;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

/* Modal Hero Banner */
.modal-hero {
  position: relative;
  height: 380px;
}

.modal-hero img#modal-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(16, 22, 36, 1) 0%,
      rgba(16, 22, 36, 0.3) 70%,
      transparent 100%);
}

.modal-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 30px;
  width: 100%;
  z-index: 2;
}

.modal-logo {
  max-width: 300px;
  max-height: 110px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.modal-hero-overlay h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.modal-actions .btn.play {
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn.add,
.btn.like {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn.add:hover,
.btn.like:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.08);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(11, 15, 25, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--glass-border);
  color: white;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition-bounce);
}

.modal-close:hover {
  background: white;
  color: black;
  transform: rotate(90deg);
}

/* Modal Info Split */
.modal-info {
  display: flex;
  gap: 40px;
  padding: 30px;
}

.modal-left {
  flex: 1.8;
}

.modal-left p#modal-overview {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.meta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  flex-wrap: wrap;
}

.meta span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
}

.meta span#modal-rating {
  color: #ffc107;
  font-weight: 700;
}

.modal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-left: 1px solid var(--border-color);
  padding-left: 30px;
}

.modal-right p strong {
  color: var(--text-primary);
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.modal-right p span {
  color: var(--text-secondary);
}

/* TV Controls & Episodes */
.modal-stream {
  margin-top: 0px;
}

.tv-controls {
  padding: 0 30px 40px;
}

.season-selector {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.season-selector label {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.season-selector select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.season-selector select:focus {
  border-color: var(--accent-primary);
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.episode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
}

.episode:hover {
  background: rgba(28, 183, 255, 0.06);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(28, 183, 255, 0.15);
}

.episode-number {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-primary);
}

.episode div:last-child {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
}


/* ===== FOOTER ===== */
.footer {
  margin-top: auto;
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(to top, var(--bg-darker), transparent);
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-color);
}

.footer p {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.footer span {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== BOTTOM NAV (MOBILE) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background-color: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-color);
  display: none;
  /* hidden on desktop */
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding: 5px 10px env(safe-area-inset-bottom);
  /* safe area padding for iOS */
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  flex: 1;
  height: 100%;
  transition: var(--transition-smooth);
}

.bottom-nav-link i {
  font-size: 18px;
  transition: var(--transition-bounce);
}

.bottom-nav-link:hover {
  color: var(--text-primary);
}

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

.bottom-nav-link.active i {
  color: var(--accent-primary);
  filter: drop-shadow(0 0 8px rgba(28, 183, 255, 0.4));
  transform: translateY(-2px);
}

/* ===== SEARCH HISTORY ===== */
.search-history-container {
  max-width: 800px;
  margin: 40px auto 0;
  padding: 0 24px;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-history-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
}

.close-search-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  padding: 8px 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-search-btn i {
  font-size: 14px;
}

.close-search-btn:hover {
  background: var(--accent-gradient);
  color: var(--bg-darker);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.search-history-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.search-history-title i {
  color: var(--accent-primary);
}

.clear-history-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
}

.clear-history-btn:hover {
  color: #ff4a4a;
  background: rgba(255, 74, 74, 0.1);
  border-color: rgba(255, 74, 74, 0.2);
}

.search-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.search-history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(28, 183, 255, 0.08);
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

.history-item-left i {
  color: var(--text-muted);
  font-size: 13px;
}

.search-history-item:hover .history-item-left {
  color: var(--text-primary);
}

.search-history-item:hover .history-item-left i {
  color: var(--accent-primary);
}

.delete-history-item-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.delete-history-item-btn:hover {
  color: #ff4a4a;
  background: rgba(255, 74, 74, 0.15);
  transform: scale(1.1);
}

/* Suggestions / Trending Section when empty */
.search-suggestions-container {
  margin-top: 30px;
}

.search-suggestions-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-suggestions-title i {
  color: var(--accent-secondary);
}

.search-suggestions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.suggestion-pill {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.suggestion-pill:hover {
  background: var(--accent-gradient);
  color: var(--bg-darker);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
  transform: translateY(-2px);
  font-weight: 600;
}

/* ===== WATCHLIST & CONTINUE WATCHING ===== */
.continue-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.poster-wrapper {
  position: relative;
  width: fit-content;
  height: fit-content;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.continue-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

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

.play-icon-glow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(0.8);
  transition: var(--transition-bounce);
  padding-left: 3px;
}

.continue-card:hover .play-icon-glow {
  transform: scale(1.1);
}

.continue-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.continue-card:hover .continue-progress-container {
  background: rgba(11, 15, 25, 0.95);
}

.continue-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.continue-title-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.continue-episode-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}


.continue-badge i {
  color: var(--accent-primary);
}

.btn.add.added {
  background: var(--accent-secondary);
  color: var(--bg-darker);
  box-shadow: 0 0 12px rgba(47, 245, 139, 0.4);
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */

/* Screen <= 992px: Bottom Navigation Layout */
@media (max-width: 992px) {
  .sidebar {
    display: none !important;
    /* Hide sidebar completely */
  }

  .main-content {
    margin-left: 0 !important;
    padding-bottom: 75px;
    /* Add padding to prevent content from hiding behind bottom nav */
  }

  .top-header {
    left: 0 !important;
    padding: 0 20px;
    height: 70px;
  }

  .sidebar-toggle-btn {
    display: none !important;
    /* No toggle button needed, navigation is in the bottom bar */
  }

  .mobile-logo {
    display: block !important;
  }

  .movie-rows-container > .row:first-of-type {
    margin-top: 0 !important;
  }

  .search-overlay {
    left: 0 !important;
    top: 70px;
    height: calc(100vh - 70px - 65px);
    /* Leave room for bottom nav */
  }

  /* Bottom Navigation Bar */
  .bottom-nav {
    display: flex !important;
  }

  #hero {
    height: 500px;
  }

  .hero-content {
    padding: 0 30px 80px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* Screen <= 768px: Mobile layouts & Bottom Sheet Modal */
@media (max-width: 768px) {
  .top-header {
    height: 65px;
  }

  .search-overlay {
    top: 65px;
    height: calc(100vh - 65px - 65px);
  }

  .search-box {
    width: 180px;
    padding: 6px 12px;
  }

  .search-box:focus-within {
    width: 220px;
  }

  #hero {
    height: 70vh;
    align-items: flex-end;
  }

  .hero-content {
    padding: 0 20px 50px;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .hero-logo {
    max-width: 220px;
    margin: 0 auto 15px;
  }

  .hero-buttons {
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .hero-carousel {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 12px !important;
  }

  .movie-rows-container {
    padding: 0 16px;
    margin-top: 25px !important;
  }

  .row h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .row-posters {
    padding: 5px 5px 15px;
    gap: 12px;
  }

  .poster {
    width: 135px;
    height: 202px;
  }

  .slider-btn {
    display: none !important;
    /* Hide arrows on mobile touch */
  }

  .grid,
  .search-results {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 16px;
    padding: 10px 16px 40px;
  }

  .modal-content {
    width: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 20px;
    margin: 0;
    border: 1px solid var(--glass-border);
    border-bottom: none;
    transform: translateY(0);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  .modal-hero {
    height: 280px;
  }

  .modal-hero-overlay {
    padding: 20px;
  }

  .modal-hero-overlay h1 {
    font-size: 1.6rem;
  }

  .modal-logo {
    max-width: 180px;
  }

  .modal-info {
    flex-direction: column;
    padding: 20px 20px calc(40px + env(safe-area-inset-bottom)) 20px;
    /* Generous bottom padding */
    gap: 20px;
  }

  .modal-right {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
  }

  .tv-controls {
    padding: 0 20px calc(40px + env(safe-area-inset-bottom));
    /* Generous bottom padding */
  }

  .episode-list {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }

  .episode {
    padding: 12px 8px;
  }

  /* Mobile Search History Overrides */
  .search-history-container {
    margin: 20px auto 0;
    padding: 0 16px;
  }

  .search-history-top-bar {
    margin-bottom: 12px;
  }

  .close-search-btn {
    font-size: 12px;
    padding: 6px 14px;
  }

  .search-history-header {
    margin-bottom: 14px;
    padding-bottom: 8px;
  }

  .search-history-title {
    font-size: 14px;
    gap: 8px;
  }

  .clear-history-btn {
    font-size: 12px;
    padding: 4px 10px;
  }

  .search-history-item {
    padding: 10px 14px;
    border-radius: 10px;
  }

  .history-item-left {
    font-size: 13px;
    gap: 8px;
  }

  .delete-history-item-btn {
    font-size: 13px;
    width: 24px;
    height: 24px;
  }

  .search-suggestions-container {
    margin-top: 24px;
  }

  .search-suggestions-title {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .suggestion-pill {
    padding: 6px 14px;
    font-size: 13px;
  }
}

/* Screen <= 600px: Expanding search bar to cover header */
@media (max-width: 600px) {
  .top-header:has(.search-box:focus-within) .mobile-logo {
    display: none !important;
  }

  .top-header:has(.search-box:focus-within) .search-box {
    width: 100% !important;
    flex: 1;
  }
}

/* Screen <= 480px: Tiny Screens */
@media (max-width: 480px) {
  .mobile-logo {
    font-size: 16px !important;
  }

  #hero {
    height: 65vh;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: row;
    gap: 8px;
  }

  .btn {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
    font-size: 12px;
  }

  .grid,
  .search-results {
    grid-template-columns: repeat(2, 1fr);
    /* 2 cards per row looks very clean and prominent on tiny screens! */
    gap: 12px;
    padding: 10px 12px 40px;
  }

  .modal-actions {
    width: 100%;
    gap: 10px;
  }

  .modal-actions .btn.play {
    flex: 1;
    justify-content: center;
  }
}