/* ==========================================================================
   CSS CUSTOM VARIABLES & RESET
   ========================================================================== */
:root {
  --bg-primary: #09090b;
  --bg-secondary: #121215;
  --bg-card: rgba(22, 22, 28, 0.6);
  --accent: #e50914;
  --accent-hover: #b80710;
  --accent-glow: rgba(229, 9, 20, 0.35);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  
  --text-main: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --border-color: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --glass-bg: rgba(13, 13, 17, 0.75);
  --glass-blur: blur(14px);
  --glass-border: rgba(255, 255, 255, 0.05);
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.logo-accent {
  color: var(--accent);
}
.logo-dot {
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text-secondary);
}
.logo:hover {
  transform: scale(1.02);
}

/* Search Bar */
.search-bar-container {
  position: relative;
  flex: 1;
  max-width: 500px;
}
.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition);
}
#search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 0.75rem 2.8rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: var(--font-family);
  transition: var(--transition);
}
#search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}
#search-input:focus + .search-icon {
  color: var(--accent);
}
.clear-btn {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
}
.clear-btn:hover {
  color: var(--text-main);
}

/* Navigation Menu & Dropdowns */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.55rem 1.25rem;
  border-radius: 20px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
  text-decoration: none;
}
.menu-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.menu-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.menu-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  z-index: 150;
  padding: 0.5rem;
  backdrop-filter: var(--glass-blur);
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content button,
.dropdown-content a {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.dropdown-content button:hover,
.dropdown-content a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding-left: 1.25rem;
}

.dropdown-content button.active,
.dropdown-content a.active {
  color: var(--accent);
  background: rgba(229, 9, 20, 0.08);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(5px); }
  to { opacity: 1; transform: translateX(-50%) translateY(10px); }
}

/* ==========================================================================
   HERO FEATURE SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  height: 75vh;
  min-height: 500px;
  max-height: 750px;
  display: flex;
  align-items: center;
  padding: 0 8%;
  overflow: hidden;
  margin-bottom: 2rem;
  margin-top: 4.8rem;
}
.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 20%;
  z-index: 1;
  transition: opacity 0.5s ease;
}
.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #09090b 10%, rgba(9, 9, 11, 0.8) 45%, rgba(9, 9, 11, 0) 90%),
              linear-gradient(0deg, #09090b 0%, rgba(9, 9, 11, 0.4) 50%, rgba(9, 9, 11, 0) 100%);
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
  animation: fadeInUp 0.8s ease-out;
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-description {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hero-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.meta-item i {
  color: var(--accent);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.btn-accent {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}
.btn-accent:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--success-glow);
}
.btn-dark {
  background: #18181b;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-dark:hover {
  background: #27272a;
}
.btn-block {
  display: flex;
  width: 100%;
  margin-bottom: 0.75rem;
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* ==========================================================================
   MAIN LAYOUT & GENRE SLIDER
   ========================================================================== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.genres-filter-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 2.5rem;
  padding: 0.25rem 0;
}
.genres-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.genres-scroll::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}
.genre-pill {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.genre-pill:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}
.genre-pill.active {
  background: rgba(229, 9, 20, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   CATALOG GRID & CARDS
   ========================================================================== */
.catalog-section {
  width: 100%;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.catalog-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem 1.5rem;
}

/* Catalog Movie Card */
.card-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card-poster-container {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  overflow: hidden;
  background: #18181b;
}
.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(9, 9, 11, 0.95) 10%, rgba(9, 9, 11, 0.4) 60%, rgba(9, 9, 11, 0) 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  z-index: 2;
}
.card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  background: rgba(9, 9, 11, 0.8);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(5px);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Card Details */
.card-details {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}
.card-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.card-type {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
}

/* Hover Effects */
.card-item:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
}
.card-item:hover .card-poster {
  transform: scale(1.05);
}
.card-item:hover .card-overlay {
  opacity: 1;
}

/* ==========================================================================
   LOADER & SKELETON ANIMS
   ========================================================================== */
.loader-skeleton {
  aspect-ratio: 2/3;
  background: linear-gradient(90deg, #18181b 25%, #27272a 50%, #18181b 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 500px;
  margin: 2rem auto;
}
.no-results-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.no-results h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.no-results p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================================================
   DETAILS MODAL OVERLAY
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
}

.modal-container {
  background: #111115;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 950px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Modal Banner Header */
.modal-banner {
  height: 320px;
  position: relative;
  background-size: cover;
  background-position: center 20%;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}
.modal-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(17, 17, 21, 0.2) 0%, rgba(17, 17, 21, 0.95) 100%);
}
.modal-banner-content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.modal-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.modal-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Modal Body Layout */
.modal-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-height: calc(100vh - 420px);
  overflow-y: auto;
}
.modal-info-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.modal-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Meta Data Grid */
.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.meta-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.meta-val {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Actions Sidebar */
.modal-actions-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.action-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.action-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.action-card h4 i {
  color: var(--accent);
}
.action-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.action-btn-rave {
  font-size: 0.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}
.action-btn-rave:last-child {
  margin-bottom: 0;
}

/* Built-in Video Player Box */
.web-player-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  margin-top: 1rem;
}
.player-header {
  background: #141417;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}
#html5-video-player {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

/* Seasons / Episodes Selector Structure */
.series-episodes-container {
  margin-top: 1rem;
}
.series-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}
.series-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Custom Select Dropdown Styling */
.custom-select-wrapper {
  position: relative;
  min-width: 160px;
}
#season-selector {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 2rem 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
}
#season-selector:hover {
  border-color: var(--border-hover);
}
.select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  font-size: 0.75rem;
}

/* Episodes Scrollable List */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}
.episode-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.episode-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}
.episode-item.active {
  background: rgba(229, 9, 20, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}
.ep-number {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 24px;
}
.episode-item.active .ep-number {
  color: var(--accent);
}
.ep-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ep-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.ep-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ep-play-indicator {
  font-size: 0.8rem;
  opacity: 0;
  transition: var(--transition);
}
.episode-item:hover .ep-play-indicator {
  opacity: 1;
  color: var(--text-secondary);
}
.episode-item.active .ep-play-indicator {
  opacity: 1;
  color: var(--accent);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 300;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 25px var(--success-glow);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}
.toast-notification.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .modal-body {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .modal-container {
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-banner {
    height: 240px;
  }
  
  /* Header Grid Layout for Mobile */
  .header-container {
    display: grid;
    grid-template-areas: 
      "logo search"
      "menu menu";
    grid-template-columns: auto 1fr;
    row-gap: 0.75rem;
    column-gap: 1rem;
    padding: 0 1.25rem;
    align-items: center;
  }
  
  .logo {
    grid-area: logo;
  }
  
  .search-bar-container {
    grid-area: search;
    max-width: 200px;
    width: 100%;
    justify-self: end;
  }
  
  #search-input {
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    font-size: 0.85rem;
    border-radius: 20px;
  }
  
  .search-icon {
    left: 0.8rem;
    font-size: 0.85rem;
  }
  
  .clear-btn {
    right: 0.8rem;
  }
  
  .nav-menu {
    grid-area: menu;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .menu-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 600px) {
  .header-container {
    padding: 0 1rem;
  }
  .main-content {
    padding: 0 1rem 3rem;
  }
  .hero-section {
    padding: 0 1.5rem;
    height: auto;
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2.5rem;
  }
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem 1rem;
  }
  .card-details {
    padding: 0.6rem;
  }
  .card-title {
    font-size: 0.85rem;
  }
  .card-meta-bottom {
    font-size: 0.75rem;
  }
  .modal-overlay {
    padding: 0.5rem;
  }
  .modal-banner {
    height: 180px;
    padding: 1rem;
  }
  .modal-body {
    padding: 1rem;
  }
}

/* ==========================================================================
   HOMEPAGE WIDGETS & HORIZONTAL SLIDERS
   ========================================================================== */
.widget-section {
  width: 100%;
  margin-bottom: 3rem;
  position: relative;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.widget-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-title i {
  color: var(--accent);
}

.widget-view-all {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: rgba(229, 9, 20, 0.08);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(229, 9, 20, 0.2);
  transition: var(--transition);
  cursor: pointer;
}

.widget-view-all:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--accent-glow);
}

.slider-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.2rem 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: #27272a var(--bg-primary);
}

/* Custom scrollbar styling for Chrome/Safari inside the sliders */
.slider-container::-webkit-scrollbar {
  height: 6px;
}
.slider-container::-webkit-scrollbar-track {
  background: transparent;
}
.slider-container::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 10px;
  transition: var(--transition);
}
.slider-container::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

.slider-card {
  width: 175px;
  flex-shrink: 0;
  scroll-snap-align: start;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.slider-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

/* Adjust card aspect inside slider */
.slider-card-poster-container {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  overflow: hidden;
}

/* Special styling for episode card thumbnails (aspect-ratio 16/9 like zonaaps) */
.slider-card-episode {
  width: 250px;
}

.slider-card-episode .slider-card-poster-container {
  aspect-ratio: 16/9;
}

.slider-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.slider-card-details {
  padding: 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.slider-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.badge-episode-num {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Responsive tweaks for sliders */
@media (max-width: 600px) {
  .slider-card {
    width: 135px;
  }
  .slider-card-episode {
    width: 200px;
  }
  .widget-title {
    font-size: 1.2rem;
  }
  .widget-view-all {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
  }
}
