/* ==========================================================================
   Dizi Play - Modern Premium UI Design System
   ========================================================================== */

/* Modern Reset & Base Rules */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg-color: #07090e;
  --panel-bg: rgba(13, 20, 36, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --primary-color: #00d2ff; /* Electric Cyan */
  --primary-hover: #38bdf8;
  --primary-glow: rgba(0, 210, 255, 0.4);
  --accent-color: #ff3366; /* Coral Flame */
  --accent-glow: rgba(255, 51, 102, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Glow Elements */
.glow-bg-1 {
  position: fixed;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.12) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

.glow-bg-2 {
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 51, 102, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #07090e;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Header & Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
  user-select: none;
}

.logo span {
  display: inline-block;
  color: #fff;
}

.neon-icon {
  color: var(--primary-color);
  filter: drop-shadow(0 0 10px var(--primary-glow));
  font-size: 1.8rem;
  transition: var(--transition);
}

.logo:hover .neon-icon {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search Bar */
.search-container {
  position: relative;
  width: 40%;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition);
}

#search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

#search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
  box-shadow: 0 0 18px var(--primary-glow);
}

#search-input:focus + .search-icon {
  color: var(--primary-color);
}

.clear-btn {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}
.clear-btn:hover {
  color: var(--text-main);
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: var(--primary-color);
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.25);
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(10, 16, 28, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.dropdown-item img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
}

.dropdown-item:hover {
  background: rgba(0, 210, 255, 0.1);
  color: #fff;
  transform: translateX(4px);
}

/* Main Content Area */
.main-content {
  padding: 2.5rem 4%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 180px);
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #fff;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

/* Skeleton Loading Card */
.skeleton-card {
  height: 300px;
  border-radius: 12px;
  background: linear-gradient(90deg, #0d1527 25%, #1e293b 50%, #0d1527 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Movie/Show Card */
.media-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 210, 255, 0.2);
}

.poster-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  overflow: hidden;
  background-color: #0b111e;
}

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

.media-card:hover .poster-img {
  transform: scale(1.06);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 9, 14, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

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

.play-icon-wrapper {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 25px var(--primary-glow);
  transform: scale(0.8);
  transition: var(--transition);
}

.media-card:hover .play-icon-wrapper {
  transform: scale(1);
}

.play-icon-wrapper i {
  color: #000;
  font-size: 1.4rem;
  margin-left: 3px;
}

.badge-container {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-badge {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-rating {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.badge-type {
  background: rgba(0, 210, 255, 0.9);
  color: #07090e;
  font-weight: 800;
}

.card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-grow: 1;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

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

/* Modals General Backdrops */
.player-modal, .settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-modal.open, .settings-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop, .settings-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Main Player Modal Content */
.modal-content {
  position: relative;
  background: rgba(10, 16, 28, 0.96);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 20px;
  width: 90%;
  max-width: 1280px;
  height: 85vh;
  z-index: 1010;
  overflow: hidden;
  display: grid;
  grid-template-rows: 60% 40%;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 210, 255, 0.15);
}

.player-modal.open .modal-content {
  transform: translateY(0);
}

.close-modal-btn, .close-settings-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.close-modal-btn:hover, .close-settings-btn:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Video Section */
.video-section {
  display: flex;
  flex-direction: column;
  background: #000;
  position: relative;
}

/* Source Switcher Header */
.source-selector {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: #080d18;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
}

.source-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
}

.source-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.source-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.source-tab.active {
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%);
  border-color: var(--primary-color);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Iframe Frame */
.iframe-container {
  position: relative;
  flex-grow: 1;
  width: 100%;
  height: 100%;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.player-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #07090e;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 10;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 210, 255, 0.15);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Info Section (Details + Season/Episode picker) */
.info-section {
  background: #090e1a;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 2rem;
  border-top: 1px solid var(--border-color);
}

.media-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.media-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.meta-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.rating-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.year-badge, .type-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.media-overview {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.4rem;
  max-height: 120px;
  overflow-y: auto;
}

/* TV Series Selector Area */
.tv-selector-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.season-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.season-selector-wrapper label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.season-select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  outline: none;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.season-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-glow);
}

.episode-list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.episodes-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: 0.8rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.episode-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.episode-btn:hover, .episode-btn.active {
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%);
  color: #000;
  font-weight: 700;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Settings Modal Specifics */
.settings-content {
  position: relative;
  background: rgba(10, 16, 28, 0.98);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  padding: 2.5rem;
  z-index: 1010;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}

.settings-modal.open .settings-content {
  transform: translateY(0);
}

.settings-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.settings-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: white;
  outline: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-glow);
}

.form-group small {
  color: var(--text-dark);
  font-size: 0.75rem;
}

.save-settings-btn {
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%);
  border: none;
  color: #000;
  padding: 0.8rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition);
}

.save-settings-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--primary-glow);
}

/* Footer styling */
.main-footer {
  padding: 2rem 4%;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: rgba(7, 9, 14, 0.9);
  font-size: 0.8rem;
  color: var(--text-dark);
}

/* Responsive media queries */
@media (max-width: 900px) {
  .modal-content {
    grid-template-rows: 50% 50%;
    height: 90vh;
  }
  
  .info-section {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1.2rem;
  }
  
  .media-overview {
    max-height: 80px;
  }
  
  .episode-grid {
    max-height: 100px;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 4%;
  }

  .search-container {
    width: 100%;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
  }
  
  .section-header h2 {
    font-size: 1.6rem;
  }
}

/* Sports Live TV styling */
.sports-poster-wrapper {
  background: linear-gradient(135deg, #0c1a2e 0%, #05080f 100%) !important;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sports-logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 1rem;
  width: 100%;
  height: 100%;
  transition: var(--transition);
  background: radial-gradient(circle at center, rgba(0, 210, 255, 0.1) 0%, transparent 70%);
}

.sports-logo-placeholder i {
  font-size: 3.5rem;
  color: var(--primary-color);
  filter: drop-shadow(0 0 10px var(--primary-glow));
  animation: float-icon 4s ease-in-out infinite;
}

.sports-logo-placeholder .channel-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--text-main);
  background: linear-gradient(135deg, #fff 0%, #00d2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.4));
}

.sports-card:hover .sports-logo-placeholder {
  transform: scale(1.05);
  background: radial-gradient(circle at center, rgba(0, 210, 255, 0.2) 0%, transparent 80%);
}

.sports-card:hover .sports-logo-placeholder i {
  color: #38bdf8;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

@keyframes float-icon {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Custom skin adjustment for HLS player */
#hls-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  outline: none;
  background-color: #000;
  border-radius: 8px;
}

/* ------------------------------------- */
/* FILTER BAR                            */
/* ------------------------------------- */
.filter-bar {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.5s ease;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.filter-group label {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.filter-group label i {
  margin-right: 0.3rem;
  color: var(--primary-color);
}

.custom-select-wrapper {
  position: relative;
  user-select: none;
  min-width: 200px;
}

.custom-select-trigger {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.custom-select-trigger:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.25);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--primary-color);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 16, 28, 0.98);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  backdrop-filter: blur(20px);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
  transform: translateY(-10px);
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

.custom-option {
  padding: 0.8rem 1.2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-option:hover {
  background: rgba(0, 210, 255, 0.12);
  color: white;
  padding-left: 1.5rem;
}

.custom-option.selected {
  color: var(--primary-color);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

/* Scrollbar for options */
.custom-options::-webkit-scrollbar {
  width: 6px;
}
.custom-options::-webkit-scrollbar-track {
  background: transparent;
}
.custom-options::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    gap: 1rem;
  }
  .custom-select-wrapper {
    width: 100%;
  }
}

/* ------------------------------------- */
/* HERO SLIDER (PREMIUM STREAMING STYLE) */
/* ------------------------------------- */

.hero-slider-container {
  width: 100%;
  max-width: 1400px;
  height: 60vh;
  min-height: 400px;
  max-height: 600px;
  margin: 0 auto 3rem auto;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.8s ease forwards;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: top center;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.5) 50%, rgba(7, 9, 14, 0.1) 100%),
              linear-gradient(to top, rgba(7, 9, 14, 1) 0%, rgba(7, 9, 14, 0) 40%);
  display: flex;
  align-items: flex-end;
  padding: 4rem;
}

.hero-slide-content {
  max-width: 600px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.hero-slide.active .hero-slide-content {
  transform: translateY(0);
  opacity: 1;
}

.hero-slide-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.hero-slide-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.hero-slide-overview {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #e5e7eb;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.hero-slide-buttons {
  display: flex;
  gap: 1rem;
}

.hero-btn {
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: none;
}

.hero-btn-play {
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%);
  color: #000;
  box-shadow: 0 0 20px var(--primary-glow);
}

.hero-btn-play:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.7);
  transform: scale(1.05);
}

.hero-btn-details {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-btn-details:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.hero-slider-dots {
  position: absolute;
  bottom: 2rem;
  right: 4rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: var(--primary-color);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--primary-glow);
}

@media (max-width: 768px) {
  .hero-slider-container {
    height: 50vh;
    border-radius: 12px;
  }
  .hero-slide-overlay {
    padding: 2rem;
    background: linear-gradient(to top, rgba(7, 9, 14, 1) 0%, rgba(7, 9, 14, 0.2) 60%);
  }
  .hero-slide-title {
    font-size: 2.2rem;
  }
  .hero-slide-overview {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
  }
  .hero-slider-dots {
    right: 2rem;
    bottom: 1rem;
  }
}

/* ------------------------------------- */
/* DETAILS PAGE (Premium Layout)        */
/* ------------------------------------- */

.details-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: top center;
  z-index: -3;
  opacity: 0.3;
  filter: blur(15px);
  transform: scale(1.1);
}

.details-backdrop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to bottom, rgba(7, 9, 14, 0.5) 0%, rgba(7, 9, 14, 1) 100%);
  z-index: -2;
}

.page-loader {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.details-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4% 2rem;
  animation: fadeIn 0.8s ease forwards;
}

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

.details-hero {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
  align-items: flex-end;
}

.details-poster-wrapper {
  flex-shrink: 0;
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.details-poster {
  width: 100%;
  height: auto;
  display: block;
}

.details-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding-bottom: 2rem;
}

.details-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.details-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
}

.genres-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  border-left: 2px solid var(--border-color);
  padding-left: 1rem;
}

.details-overview {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e5e7eb;
  max-width: 900px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.details-actions {
  display: flex;
  gap: 1rem;
}

.details-actions .nav-btn {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
}

/* Player Section */
.player-section {
  margin-top: 4rem;
  border-radius: 16px;
  background: rgba(10, 16, 28, 0.65);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  padding: 2rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.player-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.video-container-wrapper {
  display: flex;
  flex-direction: column;
}

.video-container-wrapper .source-selector {
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.8rem 1.2rem;
  background: rgba(0,0,0,0.5);
}

.details-tv-selector {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
}

.details-tv-selector .episode-grid {
  max-height: 400px;
}

@media (max-width: 1024px) {
  .details-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .details-poster-wrapper {
    width: 250px;
  }
  .details-title {
    font-size: 2.5rem;
  }
  .details-meta-row {
    justify-content: center;
    flex-wrap: wrap;
  }
  .player-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Report Error Modal --- */
.report-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.report-modal-overlay.active {
  opacity: 1; pointer-events: auto;
}
.report-modal-content {
  background: rgba(10, 16, 28, 0.98);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 16px; width: 90%; max-width: 450px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}
.report-modal-overlay.active .report-modal-content {
  transform: translateY(0) scale(1);
}
.report-modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: none; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease;
}
.report-modal-close:hover {
  background: rgba(255, 60, 60, 0.2); color: #ff8b8b;
}
.report-modal-title {
  font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700;
  color: #ff8b8b; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.report-modal-desc {
  color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem;
}
.report-options-grid {
  display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin-bottom: 1.5rem;
}
.report-option-label {
  display: flex; align-items: center; gap: 0.8rem;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.8rem 1rem; border-radius: 8px; cursor: pointer;
  transition: all 0.2s ease; font-size: 0.9rem; color: var(--text-main);
}
.report-option-label:hover { background: rgba(255, 255, 255, 0.06); }
.report-option-label input { accent-color: #ff3c3c; width: 16px; height: 16px; }
.report-option-label:has(input:checked) {
  border-color: rgba(255, 60, 60, 0.4); background: rgba(255, 60, 60, 0.05);
  color: #ff8b8b; font-weight: 600;
}
.report-textarea {
  width: 100%; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px; padding: 1rem; color: #fff; font-family: inherit;
  resize: vertical; min-height: 80px; margin-bottom: 1.5rem; transition: border-color 0.3s;
}
.report-textarea:focus { outline: none; border-color: #ff3c3c; }
.report-submit-btn {
  width: 100%; background: linear-gradient(45deg, #ff3c3c, #ff6b6b);
  border: none; border-radius: 8px; padding: 1rem; color: #fff;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all 0.3s ease; display: flex;
  align-items: center; justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(255, 60, 60, 0.3);
}
.report-submit-btn:hover {
  transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 60, 60, 0.4);
}
.report-success {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 0; animation: fadeInScale 0.4s ease forwards;
}
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.report-success i { font-size: 3.5rem; color: #4ade80; margin-bottom: 1rem; }
.report-success h3 { font-family: 'Outfit', sans-serif; color: #fff; margin-bottom: 0.5rem; font-size: 1.4rem; }
.report-success p { color: var(--text-muted); font-size: 0.9rem; }

/* Auth Section UI */
.auth-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.signup-btn {
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%) !important;
  color: #000 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 15px var(--primary-glow);
}

.signup-btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--primary-glow);
}

.profile-btn {
  color: #fff !important;
  font-weight: 600 !important;
  padding-left: 0.5rem !important;
}

.profile-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.dropdown-menu-right {
  left: auto !important;
  right: 0 !important;
  transform: translateX(0) translateY(10px) !important;
}

.nav-dropdown:hover .dropdown-menu-right {
  transform: translateX(0) translateY(0) !important;
}

/* Auth Modal Styles */
.auth-modal-content {
  background: rgba(10, 16, 28, 0.98);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  padding: 0;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  width: 100%;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.auth-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.auth-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.submit-btn {
  background: linear-gradient(135deg, #00d2ff 0%, #0099ff 100%);
  color: #000;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.auth-alert {
  margin: 1rem 1.5rem 0;
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.auth-alert.error {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.2);
}

.auth-alert.success {
  background: rgba(46, 213, 115, 0.1);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.2);
}

/* Auth Modal Overlay Classes */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1; pointer-events: auto;
}
.modal-overlay.active .auth-modal-content {
  transform: translateY(0) scale(1);
}
.close-modal-btn {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: none; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease;
  z-index: 10;
}
.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.1); color: #fff;
}
.modal-header {
  position: relative;
}
