/* ═══════════════════════════════════════════════
   WATCH PAGE (STREAMING HUB) - LIGHT THEME
   ════════════════════════════════════════════════ */

.page-watch {
  background-color: #050505; /* Deep dark background */
  color: #f1f1f1;
}

.page-watch .header {
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
  border-bottom: none;
}

/* Ensure the logo and text are readable over the hero image */
.page-watch .logo,
.page-watch .nav-link {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.page-watch .header.scrolled {
  background: rgba(10, 10, 10, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-watch .header.scrolled .logo {
  color: #fff;
  text-shadow: none;
}

.page-watch .header.scrolled .nav-link {
  color: #ccc;
  text-shadow: none;
}

.page-watch .header.scrolled .nav-link:hover,
.page-watch .header.scrolled .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ─── HERO CAROUSEL ────────────────────────────── */
.watch-hero {
  position: relative;
  height: 80vh;
  min-height: 600px;
  width: 100%;
  background: var(--primary-dark);
  overflow: hidden;
}

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

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}

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

/* Cinematic dark vignette overlay */
.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #050505 0%, rgba(5,5,5,0.4) 50%, transparent 100%),
              linear-gradient(90deg, #050505 0%, rgba(5,5,5,0.4) 40%, transparent 100%);
}

.slide-content {
  position: absolute;
  bottom: 15%;
  left: 5%;
  width: 90%;
  max-width: 800px;
  z-index: 2;
  color: #fff;
}

.slide-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.slide-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.slide-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
  max-width: 650px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  line-height: 1.5;
}

.slide-actions {
  display: flex;
  gap: 16px;
}

.btn-play {
  background: #fff;
  color: #050505;
  border: none;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}
.btn-play:hover {
  background: #e6e6e6;
  transform: scale(1.05);
}

.btn-more {
  background: rgba(109, 109, 110, 0.7);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.btn-more:hover {
  background: rgba(109, 109, 110, 0.9);
  transform: scale(1.05);
}

.carousel-nav {
  position: absolute;
  bottom: 30px;
  right: 5%;
  z-index: 2;
  display: flex;
  gap: 10px;
}

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

.dot.active {
  background: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.carousel-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* ─── CONTENT RAILS ───────────────────────────── */
.content-rails {
  padding: 60px 0 100px;
  background: #050505;
  min-height: 50vh;
}

.rail-container {
  margin-bottom: 50px;
  position: relative;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  margin-bottom: 24px;
}

.rail-title {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

.view-all-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #aaa;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.3s ease;
}
.view-all-link:hover {
  color: #fff;
}

/* ── Search Bar Section ── */
.watch-search-section {
  padding: 40px 5% 0;
  background: #050505;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 12px 20px;
  gap: 12px;
  transition: all 0.3s ease;
  width: 300px;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255,255,255,0.05);
  width: 400px;
}

.search-box svg {
  color: #aaa;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}

.search-box input::placeholder {
  color: #666;
}

@media (max-width: 768px) {
  .watch-search-section {
    padding-top: 30px;
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
  }
  .search-box, .search-box:focus-within {
    width: 100%;
    max-width: 100%;
  }
  .sort-controls {
    justify-content: center;
    margin-top: 8px;
  }
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ccc;
}

.sort-select {
  padding: 6px 12px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* ── Favorite Button Overlay ── */
.btn-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.rail-item:hover .btn-favorite {
  opacity: 1;
  transform: translateY(0);
}

.btn-favorite:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1) !important;
}

.btn-favorite.active {
  color: #e23636;
  opacity: 1;
  transform: translateY(0);
}
.btn-favorite.active svg {
  fill: #e23636;
}

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 20px 5%; /* padding allows hover scaling without clipping */
  scroll-behavior: smooth;
  scrollbar-width: none; 
}
.rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 calc(25vw - 20px);
  min-width: 260px;
  max-width: 380px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease, border 0.4s ease;
  aspect-ratio: 16 / 9;
  background: #111;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  border: 1px solid transparent;
}

@media (max-width: 768px) {
  .rail-item {
    flex: 0 0 calc(45vw - 20px);
  }
}
@media (max-width: 480px) {
  .rail-item {
    flex: 0 0 calc(85vw - 20px);
  }
}

.rail-item:hover {
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rail-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.rail-item:hover .rail-thumb {
  transform: scale(1.02);
}

.rail-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rail-item:hover .rail-info {
  opacity: 1;
}

.rail-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.rail-meta {
  font-size: 0.85rem;
  color: #aaa;
  font-weight: 500;
}

.spinner-sm {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

/* ─── INFO MODAL ─── */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.video-modal.active {
  opacity: 1;
  pointer-events: all;
}
.modal-close {
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.3s ease;
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
}

.info-modal-content {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Player iframe settings */
.iframe-container {
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 768px) {
  .info-modal-content {
    padding: 30px 20px;
  }
}

/* ─── CONTENT RATING BADGES ─── */
.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  z-index: 10;
  pointer-events: none;
}

.hero-rating-badge {
  display: inline-block;
  margin-left: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ─── LIVE TV SECTION & CARDS ─────────────────── */
.rail-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #ff3b30;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.live-dot-badge.offline {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #aaa;
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  background-color: #ff3b30;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff3b30;
  animation: livePulse 1.5s infinite;
}

.live-dot-badge.offline .live-dot-pulse {
  background-color: #888;
  box-shadow: none;
  animation: none;
}

@keyframes livePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(255, 59, 48, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

/* Live TV Card Overlay Badge on Rail Item */
.live-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  pointer-events: none;
}

/* ─── DEDICATED LIVE STREAM PAGE STYLES ───────── */
.page-live {
  background-color: #050505;
}

.live-player-section {
  max-width: 1240px;
  margin: 0 auto;
}

.live-player-card {
  background: linear-gradient(180deg, #121214 0%, #09090b 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.live-player-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.live-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.live-title-group h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.live-video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 72vh;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.live-channel-details h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.live-channel-details p {
  font-size: 1rem;
  color: #bbb;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .live-player-card {
    padding: 20px 16px;
    border-radius: 14px;
  }
}

/* Custom Plyr Theme Customization */
:root {
  --plyr-color-main: #e50914;
  --plyr-video-background: #000000;
  --plyr-control-radius: 8px;
}

.plyr--video {
  border-radius: 12px;
  height: 100%;
}

.plyr__control--overlaid {
  background: rgba(229, 9, 20, 0.9) !important;
}

.plyr__control--overlaid:hover {
  background: #e50914 !important;
}



