/* Main Variables */
:root {
  --primary: #8b5cf6; /* Vibrant purple */
  --primary-hover: #7c3aed;
  --primary-light: rgba(139, 92, 246, 0.2);
  --primary-dark: #6d28d9;
  --secondary: #ec4899; /* Pink accent */
  --secondary-light: rgba(236, 72, 153, 0.2);
  --dark: #0f172a; /* Deep blue-black */
  --dark-lighter: #1e293b;
  --dark-card: #334155;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(148, 163, 184, 0.1);
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --gradient-1: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-2: linear-gradient(45deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--dark);
  color: var(--text-light);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 20%);
}

.main-content {
  flex: 1;
  padding-top: 120px;
  padding-bottom: 50px;
  margin-bottom: 50px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5em;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: var(--gradient-1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--text-shadow);
  position: relative;
  display: inline-block;
  
}

.page-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-1);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.section:hover .section-title::after {
  width: 100%;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 20px;
}

/* Logo Improvements */
.logo a {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-light);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.logo-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.logo-accent {
  color: var(--secondary);
  margin-left: 2px;
}

.logo a:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* Navigation Improvements */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.nav-link i {
  font-size: 16px;
  opacity: 0.8;
}

.nav-link span {
  font-weight: 600;
}

/* Dropdown Improvements */
.nav-item.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  left: 0;
  min-width: 300px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(5px);
}

.dropdown-item i {
  width: 18px;
  color: var(--primary);
  opacity: 0.8;
  text-align: center;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.dropdown-divider {
  margin: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Breaking News Indicator */
.breaking-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px #ef4444;
}

/* Search Container Improvements */
.search-container {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 18px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  color: var(--text-light);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  background: rgba(30, 41, 59, 0.95);
  transform: scale(1.02);
}

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

.search-button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.search-button:hover {
  background: var(--primary-hover);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Auth Buttons Improvements */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  /* padding: 8px 16px; */
  /* padding-right: 8px; */
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 25px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
}

.user-profile-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.username {
  font-weight: 600;
  font-size: 14px;
}

.btn {
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-login {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  filter: brightness(1.1);
}

.btn-logout {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  flex-direction: column;
  gap: 4px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text-light);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle:hover {
  background: var(--primary-light);
}

.mobile-menu-toggle:hover .hamburger-line {
  background: var(--primary);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav.active {
  display: flex;
  opacity: 1;
}

.mobile-nav-content {
  width: 320px;
  max-width: 85%;
  height: 100%;
  background: var(--dark-lighter);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-content {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

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

.mobile-search {
  margin-bottom: 30px;
}

.mobile-search .search-input {
  width: 100%;
  padding: 14px 50px 14px 18px;
  font-size: 16px;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-item {
  margin-bottom: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 18px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-1);
  transition: left 0.3s ease;
  z-index: -1;
}

.mobile-nav-link:hover::before {
  left: 0;
}

.mobile-nav-link:hover {
  color: white;
  transform: translateX(5px);
}

.mobile-nav-link i {
  width: 24px;
  text-align: center;
  font-size: 18px;
  opacity: 0.8;
}

.dropdown-arrow {
  margin-left: auto;
  font-size: 14px;
  transition: transform 0.3s ease;
}

/* Mobile Dropdown */
.mobile-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-top: 8px;
}

.mobile-dropdown.active {
  max-height: 500px;
}

.mobile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 50px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 4px 8px;
}

.mobile-dropdown-item:hover {
  color: var(--primary);
  background: var(--primary-light);
  transform: translateX(5px);
}

.mobile-auth {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-auth-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.mobile-auth-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-auth-link.logout {
  color: #ef4444;
}

.mobile-auth-link.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.mobile-login-btn {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.mobile-nav-overlay {
  flex: 1;
  cursor: pointer;
}

/* Improved Main Nav Styles */
.main-nav {
  background-color: transparent;
  padding: 0;
  width: 100%;
}

.nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 15px 25px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

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

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

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--gradient-1);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 3px;
}

.nav-item:hover::after {
  width: 70%;
}

.nav-item.active::after {
  width: 70%;
}

/* Video Grid Styles */
.section {
  margin-bottom: 25px;
  position: relative;
}

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

.view-all {
  font-size: 15px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 12px;
  background-color: var(--primary-light);
}

.view-all:hover {
  background-color: var(--primary);
  color: white;
  transform: translateX(5px);
}

.video-slider {
  position: relative;
  margin: 0 -20px;
  padding: 0 20px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background-color: var(--glass-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: white;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slider-arrow:hover {
  background: var(--gradient-1);
  transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
  left: 10px;
}

.next-arrow {
  right: 10px;
}

.video-grid {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 15px 5px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.video-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.video-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
  padding: 10px 0;
}

/* Video Card Styles
.video-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  perspective: 1000px;
  box-shadow: var(--card-shadow);
  background-color: var(--dark-lighter);
}

.video-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.video-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.video-card:hover .poster-img {
  transform: scale(1.1);
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
}

.video-card:hover .video-overlay {
  opacity: 1;
  transform: translateY(0);
}
.video-title {
  font-size: 16px;  
  font-weight: 700;  
  margin-bottom: 8px;   
  text-shadow: var(--text-shadow);
}
 .video-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: var(--text-shadow);
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.video-year,
.video-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.video-rating i {
  color: #fbbf24;
} */
/* Video Card Styles */
.video-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  perspective: 1000px;
  box-shadow: var(--card-shadow);
  background-color: var(--dark-lighter);
  /* Ensure flex item behavior for grid layouts */
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.video-poster {
  position: relative;
  /* Use a fixed aspect ratio for consistent card heights */
  aspect-ratio: 2 / 3;
  overflow: hidden;
  width: 100%; /* Ensure it fills the card width */
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.video-card:hover .poster-img {
  transform: scale(1.1);
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px; /* Slightly more padding for better touch */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  display: flex; /* Use flexbox for vertical alignment */
  flex-direction: column;
  justify-content: flex-end; /* Align content to the bottom */
  height: 100%; /* Ensure overlay covers full height for hover effect */
  color: #fff; /* Ensure text is visible on dark overlay */
}

.video-card:hover .video-overlay {
  opacity: 1;
  transform: translateY(0);
}

.video-info {
  width: 100%; /* Ensure info takes full width of overlay */
}

.video-title {
  font-size: 1.15rem; /* Use rem for better scaling */
  font-weight: 800; /* Bolder title */
  margin-bottom: 8px;
  text-shadow: var(--text-shadow);
  color: #fff; /* Explicitly set color for clarity over transparent background */

  /* Multi-line text for video title */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis if truncated */
  line-height: 1.3; /* Adjust line height for readability */
}

.video-meta {
  display: flex;
  gap: 10px; /* Slightly reduced gap */
  font-size: 0.85rem; /* Smaller font for meta info */
  color: var(--text-muted);
}

.video-year,
.video-rating {
  display: flex;
  align-items: center;
  gap: 4px; /* Reduced gap */
}

.video-rating i {
  color: #fbbf24;
  font-size: 0.9em; /* Slightly smaller star icon */
}

/* Watchlist Toggle Icon */
.watchlist-toggle-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  z-index: 15; /* Ensure it's above the overlay */
  opacity: 0.8;
}

.watchlist-toggle-icon:hover {
  background-color: var(--primary-color);
  opacity: 1;
  transform: scale(1.1);
}

.watchlist-toggle-icon.active {
  color: var(--primary-color); /* Highlight when active/liked */
  background-color: rgba(var(--primary-color-rgb), 0.2); /* Slightly transparent background */
}
/* Video Detail Styles */
.video-detail-section {
  margin-top: 30px;
}

.video-title {
  font-size: 16px; /* Or 24px, depending on your preference */
  font-weight: 700; /* Or 800 */
  margin-bottom: 8px; /* Or 5px */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limits to 2 lines */
  line-clamp: 2; /* Standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden; /* Important for truncation */
  text-overflow: ellipsis; /* For ellipsis on truncation */
  text-shadow: var(--text-shadow);
}

.episode-selector {
  margin-bottom: 25px;
}

.episode-dropdown {
  width: 100%;
  max-width: 350px;
  padding: 12px 15px;
  background-color: var(--dark-lighter);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.episode-dropdown:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

.video-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: black;
  margin-bottom: 30px;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  margin-top: 30px;
}

.video-player-container:hover {
  transform: scale(1.01);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
}

.video-player-container:hover .video-controls {
  opacity: 1;
  transform: translateY(0);
}

.play-button,
.mute-button,
.fullscreen-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.play-button:hover,
.mute-button:hover,
.fullscreen-button:hover {
  background-color: var(--primary);
  transform: scale(1.1);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.progress-filled {
  height: 100%;
  background: var(--gradient-1);
  width: 0;
  border-radius: 3px;
}

.video-info-container {
  margin-bottom: 40px;
  margin-top: 40px;
  background-color: var(--dark-lighter);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
}

.video-description {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 4px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  background-color: var(--dark);
  padding: 8px 15px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.meta-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-3px);
}

.video-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-tag {
  padding: 8px 15px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.genre-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.episode-navigation {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
}

.prev-episode,
.next-episode,
.series-link {
  padding: 12px 20px;
  background-color: var(--dark-lighter);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}

.prev-episode:hover,
.next-episode:hover,
.series-link:hover {
  background: var(--gradient-1);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

/* Comments Section */
.comments-section {
  margin-top: 60px;
}

.comments-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

.comments-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.comment-form-container {
  margin-bottom: 40px;
}

.comment-form {
  background-color: var(--dark-lighter);
  padding: 25px;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
}

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

.form-control {
  width: 100%;
  padding: 12px 18px;
  background-color: var(--dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  outline: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.captcha {
  width: 120px;
  height: 40px;
  background-color: var(--dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.captcha-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-input {
  flex: 1;
  padding: 12px 18px;
  background-color: var(--dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.captcha-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

.submit-button {
  padding: 12px 24px;
  background: var(--gradient-1);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(139, 92, 246, 0.2);
}

.submit-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.submit-button:hover::before {
  left: 100%;
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(139, 92, 246, 0.3);
}

.login-to-comment {
  background-color: var(--dark-lighter);
  padding: 25px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
}

.login-to-comment a {
  color: var(--primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.login-to-comment a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.comment {
  background-color: var(--dark-lighter);
  padding: 20px;
  border-radius: 16px;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.comment::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient-1);
  transition: height 0.3s ease;
}

.comment:hover::before {
  height: 100%;
}

.comment:hover {
  transform: translateX(5px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-name {
  font-weight: 700;
  font-size: 16px;
}

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

.comment-content {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 15px;
}

.comment-actions {
  display: flex;
  gap: 20px;
}

.like-button,
.dislike-button,
.reply-button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 20px;
}

.like-button:hover,
.reply-button:hover {
  color: var(--primary);
  background-color: var(--primary-light);
  transform: scale(1.05);
}

.dislike-button:hover {
  color: var(--secondary);
  background-color: var(--secondary-light);
  transform: scale(1.05);
}

.like-button.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

.dislike-button.active {
  color: var(--secondary);
  background-color: var(--secondary-light);
}

.comment-replies {
  margin-top: 20px;
  margin-left: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.comment-replies::before {
  content: "";
  position: absolute;
  top: 0;
  left: -15px;
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
  border-radius: 1px;
}

.reply {
  background-color: var(--dark);
}

.replying-to {
  background-color: var(--dark);
  padding: 12px 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid var(--border-color);
}

.replying-to span {
  font-weight: 700;
  color: var(--primary);
}

.cancel-reply {
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  margin-left: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cancel-reply:hover {
  text-decoration: underline;
}

/* Improved Search Page Styles */
.search-results-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

.search-filters {
  background-color: var(--dark-lighter);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 40px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}

.search-filters:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-light);
  font-size: 15px;
}

.filter-select {
  width: 100%;
  padding: 12px 15px;
  background-color: var(--dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

.genre-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: 180px;
  overflow-y: auto;
  padding: 15px;
  background-color: var(--dark);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--dark);
}

.genre-checkboxes::-webkit-scrollbar {
  width: 6px;
}

.genre-checkboxes::-webkit-scrollbar-track {
  background: var(--dark);
  border-radius: 3px;
}

.genre-checkboxes::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 3px;
}

.genre-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.genre-checkbox:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.genre-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--dark);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.genre-checkbox input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.genre-checkbox input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.filter-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 25px;
}

.filter-button {
  padding: 12px 24px;
  background: var(--gradient-1);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.reset-button {
  padding: 12px 24px;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.reset-button:hover {
  background-color: var(--dark);
  transform: translateY(-3px);
  border-color: var(--text-muted);
}

.results-count {
  margin-bottom: 25px;
  font-size: 16px;
  color: var(--text-muted);
  padding: 12px 20px;
  background-color: var(--dark-lighter);
  border-radius: 12px;
  display: inline-block;
  font-weight: 600;
  border: 1px solid var(--glass-border);
}

.no-results {
  text-align: center;
  padding: 80px 0;
  background-color: var(--dark-lighter);
  border-radius: 16px;
  margin-top: 30px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
}

.no-results p {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: var(--dark-lighter);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}

.page-link:hover {
  background: var(--gradient-1);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.current-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--gradient-1);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

/* Auth Pages */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px 0;
}

.auth-box {
  width: 100%;
  max-width: 480px;
  background-color: var(--dark-lighter);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.auth-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--primary-light) 0%, transparent 70%);
  opacity: 0.1;
  z-index: -1;
  transform: scale(0);
  transition: transform 0.5s ease;
}

.auth-box:hover::before {
  transform: scale(1);
}

.auth-box:hover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(-10px);
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-light);
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 40px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.auth-errors {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.error-message {
  color: #ef4444;
  font-size: 14px;
  font-weight: 500;
}

.auth-form .form-group {
  margin-bottom: 0;
}

.auth-form .form-control {
  background-color: var(--dark);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  outline: none;
  transform: translateY(-3px);
}

.auth-form .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.auth-button {
  padding: 15px;
  background: var(--gradient-1);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.auth-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
  filter: brightness(1.1);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  font-size: 15px;
}

.forgot-password,
.register-link,
.login-link {
  color: var(--primary);
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 600;
}

.forgot-password:hover,
.register-link:hover,
.login-link:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Profile page styles */
.profile-section {
  padding-top: 40px;
  padding-bottom: 60px;
}
.email-verification-status{
  display: flex;
}
.left-email-status{
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.right-email-status{
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-card {
  background-color: var(--dark-lighter);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.profile-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

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

.profile-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-light);
  margin: 0;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-actions {
  display: flex;
  gap: 15px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.form-row .form-group {
  flex: 1;
  min-width: 250px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-light);
  font-size: 15px;
}

.form-submit {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}

/* Password reset section in profile */
.password-reset-section {
  background-color: var(--dark);
  border-radius: 16px;
  padding: 25px;
  margin-top: 30px;
  border: 1px solid var(--glass-border);
}

.password-reset-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-light);
}

.password-reset-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-reset-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

/* Footer */
.site-footer {
  background-color: var(--glass-bg);
  padding: 30px 0;
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo a {
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.telegram-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #0088cc 0%, #0099ff 100%);
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 136, 204, 0.2);
}

.telegram-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 136, 204, 0.3);
}

.telegram-button i {
  font-size: 24px;
  margin-bottom: 8px;
}

.telegram-button small {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 500;
}

/* 404 Error Page Styles */
.error-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.error-content {
  text-align: center;
  max-width: 600px;
  z-index: 10;
}

.error-code {
  font-size: 180px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 30px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.error-film-strip {
  position: relative;
  height: 50px;
  background-color: #000;
  margin: -30px auto 40px;
  width: 350px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  border-radius: 5px;
}

.film-strip-hole {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: var(--dark);
  border: 2px solid var(--primary);
  box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.5);
}

.error-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 20px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-message {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  color: var(--primary-light);
  opacity: 0.7;
  animation: float 8s ease-in-out infinite;
  filter: drop-shadow(0 0 15px var(--primary-light));
}

.popcorn {
  top: 15%;
  left: 15%;
  animation-delay: 0.5s;
}

.camera {
  top: 25%;
  right: 20%;
  animation-delay: 1.5s;
}

.ticket {
  bottom: 20%;
  left: 25%;
  animation-delay: 2.5s;
}

.clapperboard {
  bottom: 30%;
  right: 15%;
  animation-delay: 3.5s;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .video-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .video-grid {
    gap: 0px;
  }
}

@media (max-width: 992px) {
  .video-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .video-grid {
    gap: 0px;
  }
  .auth-box {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .header-top {
    flex-wrap: wrap;
  }

  .logo {
    order: 1;
  }

  .auth-buttons {
    order: 2;
  }

  .search-container {
    order: 3;
    width: 100%;
    margin-top: 15px;
  }

  .nav-list {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 10px;
    justify-content: normal;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    padding: 15px 15px;
    font-size: 14px;
  }

  .video-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
  }

  .video-title {
    font-size: 28px;
  }

  .form-actions {
    flex-direction: column;
  }

  .captcha {
    width: 100%;
  }

  .captcha-input {
    width: 100%;
  }

  .submit-button {
    width: 100%;
  }

  .episode-navigation {
    flex-direction: column;
    gap: 15px;
  }

  .prev-episode,
  .next-episode,
  .series-link {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .video-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));

  }

  .auth-box {
    padding: 25px;
  }

  .slider-arrow {
    width: 35px;
    height: 35px;
  }

  .prev-arrow {
    left: 5px;
  }

  .next-arrow {
    right: 5px;
  }

  .error-code {
    font-size: 120px;
  }

  .error-film-strip {
    width: 280px;
  }

  .error-actions {
    flex-direction: column;
    gap: 15px;
  }

  .error-actions .btn {
    width: 100%;
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

.pulse {
  animation: pulse 2s infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

.rotate-slow {
  animation: rotateSlow 8s linear infinite;
}

/* Use more efficient selectors */
.search-input,
.form-control,
.btn,
.auth-button,
.submit-button {
  transition: all 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rotateSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Enhance form elements */
.form-control {
  background-color: var(--dark);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  transition: all 0.3s ease;
}

.form-control:focus {
  background-color: var(--dark);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
  color: var(--text-light);
  outline: none;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--dark);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.form-check-label {
  color: var(--text-light);
  font-size: 15px;
  padding-left: 8px;
}

/* Enhance buttons */
.btn-primary {
  background: var(--gradient-1);
  border: none;
  color: white;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
  filter: brightness(1.1);
}

.btn-outline-primary {
  color: var(--primary);
  border: 1px solid var(--primary);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

/* Enhance list groups */
.list-group-item {
  background-color: var(--dark);
  border-color: var(--border-color);
  transition: all 0.3s ease;
  padding: 15px;
  border-radius: 8px !important;
  margin-bottom: 8px;
}

.list-group-item:hover {
  background-color: var(--dark-lighter);
  transform: translateX(5px);
}

.badge.bg-primary {
  background: var(--gradient-1) !important;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}

/* Improved logout button */
.btn-logout {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
}

.btn-logout:hover {
  background-color: #ef4444;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

.text-muted {
  color: var(--text-muted) !important;
  font-size: 13px;
  margin-top: 5px;
}

/* Logout page styles */
.logout-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-outline-light {
  border: 1px solid var(--border-color);
  color: var(--text-light);
  background-color: transparent;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background-color: var(--dark-card);
  transform: translateY(-3px);
  border-color: var(--text-light);
}

/* Custom glassmorphism cards */
.glass-card {
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}

.glass-card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

/* Featured section with gradient overlay */
.featured-section {
  position: relative;
  padding-top: 30px;
  padding-bottom: 60px;
  overflow: hidden;
}

.featured-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, var(--dark) 0%, transparent 100%);
  z-index: 1;
}

.featured-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--dark) 0%, transparent 100%);
  z-index: 1;
}

.featured-section .container {
  position: relative;
  z-index: 2;
}

/* Animated background gradient */
.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  background: linear-gradient(-45deg, var(--primary-dark), var(--dark), var(--primary-dark), var(--secondary));
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}



/* Dropdown Menu */
.nav-item.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 6px;
  transition: var(--transition);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 280px;
  background: var(--dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item i {
  width: 16px;
  color: var(--primary);
  opacity: 0.8;
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-divider {
  margin: 8px 0;
  border-top: 1px solid var(--glass-border);
}

/* Search Container */
.search-container {
  position: relative;
  width: 300px;
  max-width: 100%;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  background: var(--dark-bg);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  color: var(--text-light);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.search-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.search-button:hover {
  background: #5046e5;
  transform: translateY(-50%) scale(1.05);
}

/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: max-content;
  background: var(--dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-poster {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.search-result-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.search-result-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}


.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.username {
  font-weight: 500;
  font-size: 0.9rem;
}

.btn {
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-login {
  background: var(--primary);
  color: white;
}

.btn-login:hover {
  background: #5046e5;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

.btn-logout:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  z-index: 9999;
}

.mobile-nav.active {
  display: flex;
  animation: slideIn 0.3s ease;
}

.mobile-nav-content {
  width: 280px;
  height: 100%;
  background: var(--dark-card);
  border-right: 1px solid var(--glass-border);
  padding: 20px;
  overflow-y: auto;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.mobile-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-item {
  margin-bottom: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-item.active .mobile-nav-link {
  background: var(--primary);
  color: white;
}

.mobile-nav-link i {
  width: 20px;
  text-align: center;
  opacity: 0.8;
}

/* Mobile Dropdown */
.mobile-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-dropdown.active {
  max-height: 500px;
}

.mobile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 48px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.mobile-dropdown-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.mobile-auth {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.mobile-search {
  margin-bottom: 20px;
}

/* Overlay */
.mobile-nav-overlay {
  flex: 1;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .search-container {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .main-nav,
  .search-container,
  .auth-buttons {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-top {
    padding: 15px 0;
  }

  .logo a {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .mobile-nav-content {
    width: 100%;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.breaking-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .search-container {
    width: 280px;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 13px;
  }

  .nav-link span {
    display: none;
  }

  .nav-link i {
    font-size: 18px;
  }
}

@media (max-width: 992px) {
  .search-container {
    width: 240px;
  }

  .dropdown-menu {
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  .main-nav,
  .search-container {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

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

  .logo a {
    font-size: 24px;
  }

  .auth-buttons .btn-text {
    display: none;
  }

  .auth-buttons .btn {
    padding: 10px;
    min-width: 40px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .mobile-nav-content {
    width: 100%;
    max-width: 100%;
  }

  .logo a {
    font-size: 20px;
  }

  .auth-buttons {
    gap: 8px;
  }
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}
/* Video details header */
/* Main Container for Movie Details */
.container-details {
  width: 100%;
  max-width: 1280px; /* Max width for desktop */
  margin: 0 auto; /* Center the container horizontally */
  display: flex; /* Flexbox for side-by-side layout on desktop */
  background-color: #1e1e1e; /* Main dark background for the container */
  border-radius: 12px; /* Smoother rounded corners */
  overflow: hidden; /* Ensures child elements respect border-radius */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Subtle shadow */
  padding: 0; /* Remove padding from here as internal elements will have it */
}

/* Movie Poster Section */
.movie-poster {
  flex: 1; /* Takes up 2 parts of available space on desktop */
  position: relative;
  min-width: 280px; /* Ensure poster doesn't get too small on wider screens */
  background-color: #1e293b; /* Fallback/base for poster area */
  display: flex; /* Helps center image if needed */
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Important for object-fit */

  /* **NEW/MODIFIED:** Control the aspect ratio/height of the poster container */
  /* Using padding-top for responsive height based on width, or a fixed height */
  padding-top: 30%; /* Example: 30% of its width. Adjust this value to make it smaller/larger */
  /* Alternative to padding-top if you prefer fixed height on desktop for this section: */
  /* height: 400px; /* Adjust this to your desired desktop poster height */
}

.movie-poster img {
  /* KEY FOR RESPONSIVE IMAGE */
  max-width: 100%; /* Image will not exceed its natural size */
  height: 100%;   /* Fill container height if possible */
  width: 100%;    /* Fill container width */
  display: block; /* Remove extra space below image */
  object-fit: cover; /* Important: Scales image to cover container, cropping if necessary */
  position: absolute; /* Needed with padding-top to position image correctly */
  top: 0;
  left: 0;
  padding: 30px;
  border-radius: 12px; /* Match container's rounded corners */
}

.overlay-text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  font-size: clamp(1.5em, 4vw, 3em); /* Responsive font size */
  font-weight: 700;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8); /* Stronger text shadow */
  z-index: 10; /* Ensure text is above image if needed */
}

/* Movie Details Section */
.movie-details {
  flex: 3; /* Takes up 3 parts of available space on desktop */
  background-color: #1e293b; /* Slightly lighter dark background for details */
  padding: 30px; /* Internal padding */
  /* display: flex; */
  flex-direction: column; /* Stack details vertically */
  justify-content: space-between; /* Pushes feedback buttons to the bottom */
}

.detail-item {
  display: flex;
  justify-content: space-between; /* Label and value opposite ends */
  align-items: center; /* Vertically align them */
  padding: 14px 0; /* More vertical padding */
  border-bottom: 1px solid #3a3a3a; /* Subtle separator lines */
}

.detail-item:last-of-type { /* Targets the last .detail-item before feedback-buttons */
  border-bottom: none; /* No border on the very last item */
  margin-bottom: 25px; /* Space before feedback buttons */
}

.label {
  color: #b0b0b0; /* Lighter grey for labels */
  font-size: 0.95em;
  text-transform: uppercase; /* Match the original image style */
  letter-spacing: 0.5px;
}

.value {
  color: #ffffff; /* White for values */
  font-weight: 400; /* Adjust font weight for values */
  text-align: right;
  line-height: 1.4; /* Improve readability */
}

.age-rating {
  background-color: #007bff; /* Blue background for 16+ */
  padding: 6px 14px;
  border-radius: 20px; /* More rounded pill shape */
  font-weight: 700;
  color: white;
  font-size: 0.9em;
  display: inline-flex; /* Allows padding and alignment */
  align-items: center;
  justify-content: center;
  min-width: 50px; /* Ensure minimum size */
  text-align: center;
}

/* Feedback Buttons (Thumbs Up/Down) */
.feedback-buttons {
  display: flex;
  gap: 15px; /* Space between buttons */
  justify-content: flex-end; /* Align to the right on desktop */
  padding-top: 20px; /* Space above buttons from the last detail item */
  border-top: 1px solid #3a3a3a; /* Separator above feedback buttons */
  margin-top: auto; /* Pushes feedback buttons to the bottom if content is short */
}

.feedback-item {
  display: flex;
  align-items: center;
  background-color: #333; /* Darker background for buttons */
  padding: 10px 18px; /* Larger clickable area */
  border-radius: 25px; /* Fully rounded pill shape */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effects */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.feedback-item:hover {
  background-color: #4a4a4a;
  transform: translateY(-2px); /* Slight lift on hover */
}

.feedback-item .icon {
  font-size: 1.2em; /* Size of the emoji icon */
  margin-right: 8px;
  line-height: 1; /* Align emoji vertically */
}

.feedback-item .count {
  font-weight: 700;
}

.feedback-item.thumb-up .count {
  color: #4CAF50; /* Green for up */
}

.feedback-item.thumb-down .count {
  color: #f44336; /* Red for down */
}


/* --- Media Queries for Responsiveness --- */

/* Tablet and Mobile View (max-width: 992px) */
@media (max-width: 992px) {
  .container-details {
      flex-direction: column; /* Stack movie poster and details vertically */
      max-width: 90%; /* Allow container to take more width on tablets */
      border-radius: 8px; /* Slightly smaller border-radius */
  }

  .movie-poster {
      width: 100%; /* Take full width when stacked */
      min-width: unset; /* Remove min-width for stacking */
      
      /* **MODIFIED:** Adjust padding-top for mobile poster height */
      padding-top: 60%; /* Example: For a more portrait look on mobile. Adjust as needed. */
      /* If using fixed height for mobile, uncomment the line below and adjust */
      /* height: 350px; */ 

      border-bottom: 1px solid #3a3a3a; /* Separator below poster */
  }

  /* Image inside movie-poster now has absolute positioning, which pairs with padding-top */
  .movie-poster img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      padding: 0%;
      flex: ;
  }


  .overlay-text {
      font-size: clamp(1.2em, 6vw, 2.5em); /* Adjust responsive font size for tablets */
      bottom: 15px;
      left: 15px;
  }

  .movie-details {
      padding: 25px; /* Slightly less padding on smaller screens */
  }

  .detail-item {
      flex-direction: column; /* Stack label and value vertically */
      align-items: flex-start; /* Align text to the left */
      gap: 5px; /* Space between label and value */
      padding: 12px 0;
  }

  .label {
      font-size: 0.9em;
  }

  .value {
      font-size: 1em;
      text-align: left; /* Align value text to the left */
  }

  .feedback-buttons {
      justify-content: center; /* Center buttons on mobile */
      margin-top: 20px;
      gap: 10px;
  }
}

/* Mobile View (max-width: 600px) */
@media (max-width: 600px) {
  body {
      padding: 10px; /* Less padding around the body */
  }

  .container-details {
      border-radius: 0; /* No rounded corners on very small screens */
      max-width: 100%; /* Take full width */
  }

  .movie-poster {
      /* **MODIFIED:** Adjust padding-top for even smaller mobile screens */
      padding-top: 90%; /* Makes the image taller relative to its width on very small screens */
      /* If using fixed height, adjust here: */
      height: 280px;
  }

  .overlay-text {
      font-size: clamp(1em, 7vw, 2em); /* Further adjust font size */
      bottom: 10px;
      left: 10px;
  }

  .movie-details {
      padding: 15px;
  }

  .detail-item {
      padding: 10px 0;
  }

  .feedback-item {
      padding: 8px 14px; /* Smaller buttons */
      font-size: 0.9em;
  }

  .feedback-item .icon {
      font-size: 1em;
      margin-right: 6px;
  }
}

/* Episode Selector Container */
.episode-selector {
  position: relative; /* Needed for absolute positioning of dropdown list */
  width: 100%; /* Or a specific max-width/width */
  max-width: 350px; /* Adjust based on your layout */
  margin: 20px auto; /* Center it if needed, or adjust for your context */
  z-index: 10; /* Ensure dropdown appears above other content */
}

/* Custom Dropdown Styling */
.custom-dropdown {
  width: 100%;
  background-color: #2b2b2b; /* Darker background for the dropdown */
  border: 1px solid #444; /* Subtle border */
  border-radius: 8px;
  cursor: pointer;
  position: relative; /* For dropdown-list positioning */
  user-select: none; /* Prevent text selection on click */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Soft shadow */
  transition: all 0.2s ease-in-out;
}

.custom-dropdown.open {
  border-color: #007bff; /* Highlight border when open */
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Dropdown Header (Always Visible Part) */
.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 1.1em;
  font-weight: 500;
  color: #e0e0e0; /* Light text color */
}

.dropdown-header .dropdown-arrow {
  margin-left: 10px;
  transition: transform 0.3s ease; /* Smooth rotation for arrow */
  color: #b0b0b0; /* Lighter arrow color */
}

.custom-dropdown.open .dropdown-header .dropdown-arrow {
  transform: rotate(180deg); /* Rotate arrow when open */
}

/* Dropdown List (Hidden by Default) */
.dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 100%; /* Position right below the header */
  left: 0;
  width: 100%;
  max-height: 250px; /* Max height before scrolling */
  overflow-y: auto; /* Enable scrolling for many options */
  background-color: #2b2b2b; /* Same background as header */
  border: 1px solid #007bff; /* Border color when open */
  border-top: none; /* No top border, connects to header visually */
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
  display: none; /* Hidden by default, shown by JS */
  z-index: 9; /* Below the header but above other content */
}

.custom-dropdown.open .dropdown-list {
  display: block; /* Show when open */
}

/* Individual Dropdown List Items */
.dropdown-list-item {
  padding: 10px 18px;
  color: #c0c0c0; /* Slightly darker text for items */
  font-size: 1em;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis for long text */
}

.dropdown-list-item:hover {
  background-color: #3a3a3a; /* Darker background on hover */
  color: #e0e0e0; /* Lighter text on hover */
}

.dropdown-list-item.active {
  background-color: #0056b3; /* Blue background for active item */
  color: white;
  font-weight: 500;
}

/* Optional: Scrollbar styling for Webkit browsers */
.dropdown-list::-webkit-scrollbar {
  width: 8px;
}
.dropdown-list::-webkit-scrollbar-track {
  background: #333;
  border-radius: 10px;
}
.dropdown-list::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px;
}
.dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #777;
}