:root{
  --bg:#061018; --panel:#0f1720; --muted:#9fb0bd; --accent:#e50914;
  --glass: rgba(255,255,255,0.03);
  --card-shadow: 0 14px 40px rgba(2,6,23,0.6);
}
*{box-sizing:border-box}

/* Smooth 3D-like scrolling */
html{
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body{
  height:100%;
  margin:0; font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial;
  background: linear-gradient(180deg,#02040a 0%,var(--bg) 50%);
  color:#eaf3f8; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

/* Enhanced smooth scrolling for all scrollable elements */
*, *::before, *::after {
  scroll-behavior: smooth;
}

/* 3D-like scroll effects for containers */
.grid, .carousel, .content-wrapper {
  scroll-behavior: smooth;
}

/* Smooth scroll for programmatic scrolling */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  /* Add momentum scrolling on webkit */
  body, .grid, .carousel {
    -webkit-overflow-scrolling: touch;
  }
  
  /* 3D-like scroll animations for cards */
  .card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }
  
  .card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(2,6,23,0.8);
  }
  
  /* Smooth carousel scrolling */
  .carousel {
    scroll-behavior: smooth;
  }
  
  /* Parallax-like effect for hero section */
  .hero-card {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  /* Smooth transitions for interactive elements */
  .btn, .pill, .genre-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}
/* Global link reset: remove default underlines */
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }
.header{
  position:fixed; top:0; left:0; right:0; height:72px; z-index:80;
  display:flex; align-items:center; gap:18px; padding:0 28px;
  background: linear-gradient(180deg, rgba(2,6,12,0.6), rgba(2,6,12,0.2));
  backdrop-filter: blur(8px);
  border-bottom:1px solid rgba(255,255,255,0.03);
  box-sizing: border-box;
}
.logo{display: flex; align-items: center; height: 30px}
.logo-img{height: 100%; width: auto; object-fit: contain; max-width: 120px}
.nav{display:flex; gap:14px; margin-left:6px; align-items:center}
.nav a{color:var(--muted); text-decoration:none; font-weight:600; font-size:14px; padding:8px 12px; border-radius:6px; transition: all 0.2s ease}
.nav a:not(.bmc-button):hover{color:#fff; background:rgba(255,255,255,0.05)}

/* Red Support button in nav */
.nav .nav-support{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--accent);
  color: #fff !important;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  will-change: transform, box-shadow;
}
.nav .nav-support:hover{
  background: #f40612; color:#fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(229, 9, 20, 0.45);
}
.nav .nav-support:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.35), 0 8px 24px rgba(229, 9, 20, 0.45);
}
.nav .nav-support .fa-wrench{ font-size: 16px; line-height: 1; }

/* Buy Me a Coffee Button */
.bmc-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #FFDD00;
  color: #000 !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 221, 0, 0.2);
  margin-left: 6px;
}

.bmc-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 221, 0, 0.3);
  background: #ffea61;
}

.bmc-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 5px rgba(255, 221, 0, 0.2);
}

.bmc-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
/* Genre Selector */
.genre-selector-container {
  margin: 20px 0;
  width: 100%;
  overflow-x: auto;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.genre-selector {
  display: flex;
  gap: 10px;
  padding: 0 28px;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
}

.genre-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.genre-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.genre-btn.active {
  background: var(--accent);
  color: white;
}

/* Hero Card Rotation */
#heroCard {
  transition: opacity 0.3s ease-in-out;
  position: relative;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  padding: 0 20px;
}

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

.hero-dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.hero-dot.active {
  background-color: var(--accent);
  transform: scale(1.2);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.genre-selector-container::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.genre-selector-container {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.search{margin-left:auto; display:flex; gap:8px; align-items:center}
#globalSearchForm{display:flex; align-items:center; gap:6px; position:relative}
.search input{
  height: 36px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 12px; padding-right: 38px;
  border-radius: 10px; color: inherit;
  width: clamp(180px, 28vw, 320px);
  transition: box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
  font-size: 14px; font-weight: 600; line-height: 1.2; caret-color: var(--accent);
  font-style: normal; font-family: inherit; letter-spacing: .2px;
  font-variant-numeric: proportional-nums; text-rendering: optimizeLegibility;
}
.search input::placeholder{color:rgba(255,255,255,0.5); font-weight:500; font-style: normal; letter-spacing:.1px}
.search input:hover{border-color: rgba(255,255,255,0.12)}
.search input:focus{
  outline: none;
  border-color: rgba(229, 9, 20, 0.6);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.25), 0 8px 30px rgba(0,0,0,0.6);
}

.search .search-btn{
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; right: 2px; top: 2px;
  height: 32px; min-width: 34px; padding: 0 10px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(229, 9, 20, 0.35);
  font-weight: 800; letter-spacing: .1px;
}
.search .search-btn i{font-size: 14px}
.search .search-btn:hover{background: #f40612; transform: translateY(-1px)}
.search .search-btn:active{transform: translateY(0)}
.search .search-btn:disabled{opacity:.7; cursor:not-allowed}

/* Login button — subtle glass outline */
#loginBtn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: #eaf3f8; border: 1px solid rgba(255,255,255,0.16);
  font-weight: 700; font-size: 13px; letter-spacing: .1px;
  transition: background-color .18s ease, transform .18s ease, border-color .18s ease, color .18s ease;
  backdrop-filter: blur(6px);
}
#loginBtn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
  transform: translateY(-1px);
}
#loginBtn:active{ transform: translateY(0); }
#loginBtn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
#loginBtn:disabled, #loginBtn[disabled]{ opacity: .6; cursor: not-allowed; transform: none; }

/* Main content */
main {
  padding-top: 72px; /* Height of the fixed header */
  min-height: 100vh;
  box-sizing: border-box;
}

/* hero */
.hero{padding:28px}
.hero-card{
  position:relative; border-radius:14px; min-height:360px; overflow:hidden;
  display:flex; gap:18px; align-items:flex-end; padding:28px;
  background-size:cover; background-position:center; box-shadow:var(--card-shadow);
  transition: transform .25s ease;
}
.hero-card:hover{transform:translateY(-6px)}
.hero-gradient{position:absolute; inset:0; background:linear-gradient(180deg, rgba(3,6,10,0.03) 30%, rgba(3,8,12,0.9) 100%)}
.hero-info{position:relative; z-index:2; max-width:64%}
.badge{background:rgba(0,0,0,0.5); padding:6px 10px; border-radius:999px; display:inline-block; font-weight:700}
.hero-title{font-size:34px; margin:8px 0 10px}
.hero-meta{color:var(--muted); max-width:90%; line-height:1.4}

/* ctas */
.cta{display:flex; gap:12px; margin-top:12px}
.btn{padding:10px 16px; border-radius:8px; border:0; cursor:pointer; font-weight:700}
.play{background:var(--accent); color:#fff}
.info{background: rgba(255,255,255,0.06); color:#fff}

/* sections & carousels */
.section{padding:18px 28px}
.section .row-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}
.section h2{margin:0; font-size:18px}
.carousel{display:flex; gap:12px; overflow-x:auto; padding-bottom:12px; -webkit-overflow-scrolling:touch; position: relative; scroll-behavior: smooth}
.carousel::-webkit-scrollbar{height:4px; width: 4px}
.carousel::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.25); border-radius:999px; border: none; transition: all 0.2s ease}
.carousel::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.4)}
.carousel::-webkit-scrollbar-track{background:rgba(255,255,255,0.06); border-radius:999px; margin: 0 30px; transition: background 0.3s ease}
.carousel::-webkit-scrollbar-corner{background:transparent}

/* Firefox scrollbar support */
.carousel {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) rgba(255,255,255,0.06);
}

/* Enhanced carousel scrollbar styling */
.carousel:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
}

/* Responsive scrollbar adjustments */
@media (max-width: 768px) {
  .carousel::-webkit-scrollbar {
    height: 3px;
    width: 3px;
  }
}

/* Enhanced scrollbar for larger screens */
@media (min-width: 1200px) {
  .carousel::-webkit-scrollbar {
    height: 5px;
    width: 5px;
  }
}

/* Support Page */
.support-page { padding-top: 72px; }

.support-hero {
  padding: 60px 28px 30px;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(229, 9, 20, 0.25), transparent 50%),
              radial-gradient(900px 400px at 80% 0%, rgba(0, 108, 255, 0.18), transparent 50%);
}

.support-hero-content { max-width: 900px; margin: 0 auto; }
.support-hero h1 { font-size: 42px; margin: 0 0 10px; }
.support-hero p { color: var(--muted); margin: 0 0 16px; line-height: 1.7; }
.support-hero-badges { display:flex; gap:8px; flex-wrap:wrap; }

.support-options { padding: 10px 28px 40px; }
.support-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.support-card {
  background: rgba(15, 23, 32, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.support-card-head h2 { margin: 0 0 6px; font-size: 22px; }
.support-card-head .muted { color: var(--muted); margin: 0 0 8px; }

.support-card .body { color: #c9d6e0; line-height: 1.75; margin: 6px 0 10px; }
.support-card .body p { margin: 0 0 10px; }
.support-card .body .inline-note { color: var(--muted); font-size: 13px; margin-top: 4px; }

.benefits {
  margin: 14px 0 18px;
  padding-left: 18px;
  color: #c9d6e0;
  line-height: 1.7;
}

.cta-row { display:flex; align-items:center; gap:12px; }

.custom-pay { display:flex; flex-direction:column; gap:12px; margin-top: 8px; }
.custom-row { display:flex; align-items:center; gap:12px; }
.custom-row label { color: #c9d6e0; font-weight:600; }
.amount-wrap { display:flex; align-items:center; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.08); padding:6px 10px; border-radius:8px; }
.amount-wrap .currency { color:#c9d6e0; margin-right:6px; font-weight:700; }
.amount-wrap input { width:100px; background:transparent; border:0; color:#fff; font-size:16px; outline:none; }

.providers { display:flex; gap:10px; flex-wrap:wrap; margin-top: 4px; }

.tiny-note { color: var(--muted); font-size: 12px; margin: 6px 0 0; }

.support-thanks { padding: 30px 0 60px; }
.support-thanks .content-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.thanks-grid { display:flex; gap:8px; flex-wrap:wrap; margin-top: 12px; }
.thanks-pill { background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.08); color:#c9d6e0; padding:6px 10px; border-radius:999px; font-size:12px; }

/* Custom support refinements */
.amount-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.amount-pill {
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #c9d6e0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.amount-pill:hover { background: rgba(255,255,255,0.1); }
.amount-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.providers .btn { white-space: nowrap; }
.btn[disabled], .btn:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 560px) {
  .providers { justify-content: center; }
  .providers .bmc-button { width: 100%; justify-content: center; }
}

/* Detail Page Styles */
.detail-page {
  padding-top: 80px;
  min-height: 100vh;
  position: relative;
}

.detail-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70vh;
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0.3;
}

.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 60px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: flex-start;
}

.detail-poster {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.detail-poster:hover {
  transform: translateY(-10px);
}

.detail-poster img {
  width: 100%;
  display: block;
  border-radius: 12px;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #0a121b;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn i {
  font-size: 16px;
}

.btn.play {
  background: var(--accent);
  color: white;
}

.btn.play:hover {
  background: #f40612;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

.btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

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

.detail-content {
  color: #e6f0f7;
}

.detail-header h1 {
  font-size: 42px;
  margin: 0 0 12px;
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.detail-meta {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 15px;
}

.detail-tagline {
  font-style: italic;
  color: #b8c5d0;
  margin: 12px 0 24px;
  font-size: 16px;
}

.detail-overview {
  margin-bottom: 30px;
  line-height: 1.7;
  max-width: 800px;
}

.detail-overview h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: white;
}

.detail-overview p {
  margin: 0;
  color: #c9d6e0;
}

.detail-info {
  background: rgba(15, 23, 32, 0.6);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row {
  display: flex;
  margin-bottom: 12px;
  line-height: 1.5;
  align-items: flex-start;
}

.info-label {
  color: #a3b8c7;
  min-width: 140px;
  font-size: 14px;
  margin-right: 10px;
  flex-shrink: 0;
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.genre-tag {
  background: rgba(229, 9, 20, 0.1);
  color: #ff6b6b;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(229, 9, 20, 0.2);
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 8px;
}

.rating-badge i {
  color: #ffd700;
}

.vote-count {
  font-size: 13px;
  opacity: 0.8;
  font-weight: normal;
}

/* Full-width sections */
.full-width-section {
  width: 100%;
  background: rgba(9, 14, 20, 0.7);
  padding: 40px 0;
  margin: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.full-width-section .content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Seasons & Episodes */
.seasons-container {
  margin: 0;
  padding: 20px 0;
}

.seasons-container,
.cast-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.seasons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.seasons-header h3 {
  margin: 0;
  font-size: 20px;
}

.season-selector {
  position: relative;
  display: inline-block;
  min-width: 180px;
}

.season-selector select {
  background: rgba(20, 30, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23e6f0f7' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.season-selector select:hover {
  background-color: rgba(30, 40, 50, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
}

.season-selector select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

.season-selector::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(90deg, transparent, rgba(20, 30, 40, 0.5));
  border-radius: 0 6px 6px 0;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 30px;
  transform: none;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.episode-card {
  background: rgba(15, 23, 32, 0.6);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.episode-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.episode-poster {
  position: relative;
  padding-top: 56.25%;
  background-size: cover;
  background-position: center;
  background-color: #0a121b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 40px;
}

.episode-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(229, 9, 20, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.episode-card:hover .episode-play {
  opacity: 1;
}

.episode-info {
  padding: 16px;
}

.episode-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.episode-header h4 {
  margin: 0;
  font-size: 16px;
  color: white;
  flex: 1;
}

.episode-rating {
  color: #ffd700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
}

.episode-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.episode-overview {
  color: #b8c5d0;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cast */
.cast-container {
  margin: 40px 0;
  width: 100%;
  overflow: hidden;
}

.cast-container h3 {
  margin: 0 0 20px;
  font-size: 20px;
  padding: 0 4px;
}

.cast-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 4px 20px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.cast-scroll::-webkit-scrollbar {
  display: none;
  height: 6px;
}

.cast-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.cast-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.cast-card {
  flex: 0 0 120px;
  background: rgba(15, 23, 32, 0.6);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cast-card:hover {
  transform: translateY(-5px);
}

.cast-photo {
  width: 120px;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #0a121b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.1);
  font-size: 30px;
}

.cast-info {
  padding: 12px;
}

.cast-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-character {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading State */
.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* Error State */
.error-container {
  max-width: 600px;
  margin: 100px auto;
  text-align: center;
  padding: 40px;
  background: rgba(229, 9, 20, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(229, 9, 20, 0.1);
}

.error-container h2 {
  color: #ff4d4d;
  margin-top: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .detail-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .detail-poster {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .detail-header h1 {
    font-size: 32px;
  }
  
  .episodes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .detail-container {
    padding: 0 20px 40px;
  }
  
  .detail-header h1 {
    font-size: 28px;
  }
  
  .info-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .info-label {
    margin-bottom: 0;
  }
  
  .detail-actions {
    justify-content: center;
  }
}
.card {
  flex: 0 0 180px;
  width: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.poster-container {
  position: relative;
  width: 100%;
  padding-top: 150%; /* 3:2 aspect ratio */
  overflow: hidden;
}

.poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a121b;
  transition: transform 0.3s ease;
}

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

.card-content {
  padding: 12px;
  background: var(--panel);
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card .meta {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
}

.card .sub {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.rating svg {
  width: 10px;
  height: 10px;
  fill: #ffd700;
  flex-shrink: 0;
}

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -2px 0 2px 0;
  padding-top: 0;
}

.genre-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.3;
}

.overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

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

.overview {
  font-size: 11px;
  line-height: 1.4;
  color: #e0e0e0;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-height: 4.2em; /* 3 lines * 1.4 line-height */
}

/* Ensure the card has a fixed height to prevent layout shifts */
.grid .card {
  height: 350px; /* Adjust based on your content */
}

/* Make sure the poster container takes full height of the card */
.poster-container {
  flex-shrink: 0;
}

/* Fix for webkit line-clamp */
.overview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.2em;
  line-height: 1.4;
}

/* grid (used on movies/tv/search) */
.grid{padding:18px; display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
.big-title{padding:18px 28px; font-size:22px; font-weight:800}

/* detail */
.detail-wrap{display:flex; gap:22px; padding:22px}
.detail-left{flex:1}
.poster-large{width:100%; border-radius:8px; box-shadow:0 10px 40px rgba(0,0,0,0.6)}
.detail-right{width:360px; color:var(--muted)}
.detail-right h3{margin:0 0 6px; font-size:20px}
.genre{display:inline-block; padding:6px 8px; margin:6px 6px 6px 0; border-radius:8px; background:var(--glass); color:var(--muted)}
.select{width:100%; padding:10px; border-radius:8px; border:1px solid rgba(255,255,255,0.05); background:transparent; color:inherit}

/* watch */
.watch-wrapper{height:100vh; display:flex; align-items:center; justify-content:center; background:black}
.watch-iframe{width:100%; height:100%; border:0}

/* misc */
.pill{padding:8px 10px; border-radius:999px; background:var(--glass); color:var(--muted)}
.loading{color:var(--muted); padding:12px; text-align:center}
.small-meta{color:var(--muted); font-size:13px}
.hidden{display:none}

/* hover overlay for poster (on large screens) */
.card .overlay{position:absolute; inset:0; display:flex; align-items:flex-end; padding:12px; opacity:0; transition:opacity .16s; background:linear-gradient(180deg,transparent 30%, rgba(0,0,0,0.6)); color:#fff}
.card:hover .overlay{opacity:1}

/* responsiveness */
@media (max-width:900px){
  .hero-title{font-size:22px}
  .card{flex:0 0 130px; width:130px}
  .poster{height:200px}
  .detail-wrap{flex-direction:column}
  .detail-right{width:100%}
}

/* Adblock Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: rgba(15, 23, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
  padding: 22px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #cfd8e3;
  font-size: 26px;
  cursor: pointer;
  border-radius: 8px;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.modal-header h3 {
  margin: 0 28px 8px 0;
  font-size: 22px;
}

.modal-body p {
  margin: 0 0 14px 0;
  color: var(--muted);
}

.modal-recommend {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

/* Device Block Overlay (mobile phones) */
.device-block-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  backdrop-filter: blur(2px);
}

.device-block-overlay.open { display: flex; }

.device-block-card {
  max-width: 560px;
  width: 100%;
  background: rgba(15, 23, 32, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.device-block-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.device-block-card p {
  margin: 0;
  color: var(--muted);
}

/* App Loading Overlay */
.app-loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  backdrop-filter: blur(2px);
}

.app-loading-overlay.show {
  display: flex;
}

.app-loading-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.app-loading-logo img {
  width: 120px;
  max-width: 50vw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
}

.app-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: appSpin 0.8s linear infinite;
  margin-top: 12px;
}

.app-loading-text {
  margin-top: 8px;
  color: #cfd8e3;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

@keyframes appSpin { 
  to { transform: rotate(360deg); } 
}

/* Developer Tools Protection Warning */
#devtools-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  text-align: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}

#devtools-warning h2 {
  color: #ff6b6b;
  margin-bottom: 20px;
  font-size: 28px;
  font-weight: 600;
}

#devtools-warning p {
  margin: 10px 0;
  color: #e0e0e0;
  font-size: 16px;
  line-height: 1.5;
}

/* Additional protection styles */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection only in specific areas if needed */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Dev Tools Protection Styles */
#devToolsWarning {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.3);
  max-width: 300px;
  word-wrap: break-word;
  animation: slideInRight 0.3s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Full protection overlay */
.dev-tools-protection-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000000, #1a1a1a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-align: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.dev-tools-protection-overlay h1 {
  color: #ff4444;
  margin-bottom: 20px;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dev-tools-protection-overlay p {
  margin: 10px 0;
  color: #e0e0e0;
  font-size: 18px;
  line-height: 1.6;
  max-width: 500px;
}

.dev-tools-protection-overlay .warning-icon {
  font-size: 48px;
  color: #ff4444;
  margin-bottom: 20px;
}

/* Disable text selection globally when protection is active */
body.protection-active {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  cursor: default !important;
}

/* Prevent drag and drop */
body.protection-active * {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
}
