/* ===================================================
   PUTLOCKER.MX REPLICA DESIGN SYSTEM & STYLESHEET
   =================================================== */

:root {
  --bg-black: #000000;
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-card-hover: #242424;
  --border-dark: #222222;
  --border-light: rgba(255, 255, 255, 0.1);
  --primary-green: #8ec641;
  --primary-green-hover: #7ab636;
  --primary-green-bright: #9ed421;
  --gold-rating: #ffd700;
  --text-white: #ffffff;
  --text-gray: #cccccc;
  --text-muted: #888888;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 50px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.5);
  --shadow-green: 0 4px 20px rgba(142, 198, 65, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* ===================================================
   1. PUTLOCKER LOGO
   =================================================== */

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.logo-text {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  position: relative;
  box-shadow: 0 2px 8px rgba(142, 198, 65, 0.4);
}

.logo-icon::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 12px solid #ffffff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}

.logo-icon-large {
  width: 76px;
  height: 76px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  position: relative;
  box-shadow: 0 4px 20px rgba(142, 198, 65, 0.5);
}

.logo-icon-large::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 24px solid #ffffff;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  margin-left: 6px;
}

.logo-icon-small {
  width: 28px;
  height: 28px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.logo-icon-small::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 9px solid #ffffff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

/* ===================================================
   2. NAVBAR
   =================================================== */

.navbar {
  background-color: var(--bg-black);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: background-color 0.3s ease;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-green);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 6px 14px;
  transition: all 0.25s ease;
}

.nav-search:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-green);
  box-shadow: 0 0 10px rgba(142, 198, 65, 0.3);
}

.nav-search-icon {
  width: 16px;
  height: 16px;
  color: #aaaaaa;
  margin-right: 8px;
}

.nav-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14px;
  width: 160px;
}

.nav-search-input::placeholder {
  color: #888888;
}

.nav-search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  max-height: 420px;
  width: 320px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 1010;
}

.nav-search-autocomplete.show {
  display: block;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #222222;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: #262626;
}

.autocomplete-poster {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background-color: #333333;
}

.autocomplete-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.autocomplete-cast {
  font-size: 11px;
  color: #666666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.btn-magnet {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #222222;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-magnet:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #000000;
}

.btn-magnet svg {
  width: 15px;
  height: 15px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===================================================
   3. HERO LANDING SECTION (Putlocker.mx Front Splash)
   =================================================== */

.hero-section {
  background-color: var(--bg-black);
  padding: 60px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-dark);
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  font-size: 64px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 35px;
  color: #ffffff;
  line-height: 1.3;
}

.search-container {
  max-width: 760px;
  margin: 0 auto 35px;
  display: flex;
  background-color: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(142, 198, 65, 0.25);
}

.search-input {
  flex: 1;
  padding: 18px 24px;
  font-size: 16px;
  border: none;
  outline: none;
  background-color: #ffffff;
  color: #111111;
}

.search-input::placeholder {
  color: #777777;
}

.search-button {
  padding: 0 35px;
  background-color: var(--primary-green);
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background-color: var(--primary-green-hover);
}

.hero-actions {
  margin-bottom: 25px;
}

.view-full-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 45px;
  background-color: var(--primary-green);
  color: #ffffff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-green);
}

.view-full-site-btn:hover {
  background-color: var(--primary-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(142, 198, 65, 0.5);
}

.view-full-site-btn::after {
  content: '→';
  font-size: 22px;
  line-height: 1;
}

.hero-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.quick-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #dddddd;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-tag:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #000000;
}

/* ===================================================
   4. CINEMATIC FEATURED HERO BANNER (home.html style)
   =================================================== */

.hero-banner {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: 60px 48px 48px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transition: background-image 0.6s ease;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(to right, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.6) 40%, transparent 80%),
    linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.5) 50%, transparent 100%);
}

.hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-banner-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
}

.hero-banner-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hero-badge {
  background: var(--primary-green);
  color: #000000;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-meta-item {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
}

.hero-meta-item.rating {
  color: var(--gold-rating);
  font-weight: 700;
}

.hero-genres {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.hero-banner-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-banner-buttons {
  display: flex;
  gap: 14px;
}

.hero-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-green);
  border: 1px solid var(--primary-green);
  color: #000000;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(142, 198, 65, 0.4);
}

.hero-watch-btn:hover {
  background: var(--primary-green-hover);
  border-color: var(--primary-green-hover);
  transform: translateY(-2px);
}

.hero-watch-btn svg {
  width: 18px;
  height: 18px;
  fill: #000000;
}

.hero-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-detail-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
}

.hero-detail-btn svg {
  width: 18px;
  height: 18px;
}

/* ===================================================
   5. CATALOG & MOVIE GRIDS
   =================================================== */

.catalog-section {
  background-color: var(--bg-dark);
}

.trending-section {
  padding: 40px 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 16px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
}

.section-count {
  font-size: 13px;
  color: var(--text-muted);
}

.toggle-buttons {
  display: flex;
  gap: 8px;
}

.toggle-btn {
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  border-color: var(--primary-green);
  color: #ffffff;
}

.toggle-btn.active {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #000000;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* Movie Card */
.movie-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  background-color: var(--bg-card);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
  border-color: rgba(142, 198, 65, 0.4);
}

.poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background-color: #161616;
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .movie-poster {
  transform: scale(1.05);
}

/* Card Badges */
.badge-type {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-quality {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--primary-green-bright);
  color: #000000;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
}

/* IMDb lists the title, but it is not out yet */
.badge-quality.badge-soon {
  background-color: #3a3a3a;
  color: #dddddd;
}

/* A line of text where a grid has nothing to show (loading, empty, failed) */
.grid-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--primary-green-bright);
}

/* Card Play Hover Overlay */
.card-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .card-play-overlay {
  opacity: 1;
}

.play-circle {
  width: 52px;
  height: 52px;
  background-color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transform: scale(0.85);
  transition: transform 0.25s ease;
}

.movie-card:hover .play-circle {
  transform: scale(1);
}

.play-circle::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 16px solid #000000;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.movie-info {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.movie-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.movie-rating {
  color: var(--gold-rating);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ===================================================
   6. LIVE SEARCH RESULTS SECTION
   =================================================== */

.search-results-section {
  background-color: var(--bg-black);
  padding: 40px 24px 60px;
  border-bottom: 1px solid var(--border-dark);
}

.search-results-section.hidden,
.search-loading.hidden {
  display: none !important;
}

.btn-close-search {
  background: transparent;
  border: 1px solid #444444;
  color: #cccccc;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-close-search:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--primary-green);
  font-size: 15px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(142, 198, 65, 0.2);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================================================
   7. PLAYER MODAL & THEATER VIEW
   =================================================== */

.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.player-modal.hidden {
  display: none;
}

.player-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.player-modal-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  max-height: 94vh;
  background-color: #111111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.player-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-dark);
  background-color: var(--bg-black);
}

.player-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-header-title h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.badge-live {
  background: var(--primary-green);
  color: #000000;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #999999;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  color: #ffffff;
  background-color: #222222;
}

/* Player Canvas */
.player-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000000;
  overflow: hidden;
  /* The pickers below must not squeeze the player until its controls are cut off */
  min-height: min(320px, 70vh, 45vw);
}

/* Stand-in for fullscreen where only the bare <video> can go fullscreen (iPhone): the
   system player has no seek bar for a remuxed stream, so the player fills the page instead */
.player-modal.page-fill .player-modal-box {
  overflow: visible;
}

.player-modal.page-fill .player-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  min-height: 0;
  z-index: 3000;
}

#videoEl {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.3s ease;
}

/* A stall in the middle of playback: the picture stays visible behind the spinner */
.player-overlay.buffering {
  background-color: rgba(10, 10, 10, 0.55);
}

.player-overlay.buffering .overlay-icon-wrap {
  display: none;
}

.player-overlay.hidden {
  display: none;
}

.player-overlay-content {
  text-align: center;
  max-width: 440px;
  padding: 20px;
}

.spinner-large {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(142, 198, 65, 0.2);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}

.overlay-icon-wrap {
  margin-bottom: 16px;
  display: inline-block;
}

.player-overlay h4 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
}

.player-overlay p {
  font-size: 14px;
  color: #aaaaaa;
}

/* Custom Controls */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  padding: 16px 20px 10px;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.progress-bar-container {
  position: relative;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: height 0.2s ease;
}

.progress-bar-container:hover {
  height: 9px;
}

/* The stretch of the video that is cached on disk (first 5 minutes) */
.progress-cached {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: rgba(142, 198, 65, 0.35);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.progress-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.progress-current {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--primary-green);
  border-radius: 3px;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ctrl-btn:hover {
  color: var(--primary-green);
  transform: scale(1.1);
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-slider {
  width: 70px;
  height: 4px;
  accent-color: var(--primary-green);
  cursor: pointer;
}

.time-display {
  font-size: 13px;
  color: #cccccc;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  white-space: nowrap;
}

.quality-badge-btn {
  background-color: rgba(142, 198, 65, 0.2);
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

/* Torrent Swarm Status Bar */
.torrent-status-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background-color: #0d0d0d;
  padding: 12px 20px;
  border-top: 1px solid var(--border-dark);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(142, 198, 65, 0.15);
  color: var(--primary-green);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
}

.pill-dot {
  width: 7px;
  height: 7px;
  background-color: var(--primary-green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.status-item {
  color: #aaaaaa;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-item strong {
  color: #ffffff;
}

.status-item svg {
  width: 14px;
  height: 14px;
  color: var(--primary-green);
}

.status-right {
  margin-left: auto;
}

.btn-stop-swarm {
  background-color: #2a1515;
  border: 1px solid #772222;
  color: #ff6666;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-stop-swarm:hover {
  background-color: #ff3333;
  color: #ffffff;
}

/* Series Picker */
.series-picker {
  padding: 20px 24px;
  border-top: 1px solid var(--border-dark);
}

.series-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.series-picker-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.seasons-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.season-btn {
  background-color: #222222;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.season-btn:hover {
  border-color: var(--primary-green);
}

.season-btn.active {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #000000;
}

.picker-note {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 13px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  max-height: 330px;
  overflow-y: auto;
}

.episode-card {
  background-color: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  padding: 0 0 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* The still IMDb has for the episode; without one the tile shows the number alone */
.episode-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #222222;
  margin-bottom: 8px;
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.episode-card.unaired {
  opacity: 0.45;
  cursor: default;
}

.episode-card.unaired:hover {
  background-color: #1a1a1a;
  border-color: #2a2a2a;
  transform: none;
}

.episode-card:hover {
  background-color: #262626;
  border-color: var(--primary-green);
  transform: translateY(-2px);
}

.episode-card.active {
  background-color: rgba(142, 198, 65, 0.2);
  border-color: var(--primary-green);
}

.episode-num {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background-color: rgba(0, 0, 0, 0.75);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.episode-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.episode-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
  margin-top: 3px;
}

/* Episode Ratings Grid: one column per season, one row per episode, each cell an episode's
   IMDb rating colored by its band. The labels stay in view while the grid scrolls. */
.ratings-graph {
  margin-top: 24px;
}

.ratings-graph-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 12px;
}

.ratings-graph-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.ratings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.ratings-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rating-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* Hugs the grid; a show of many seasons scrolls sideways */
.ratings-scroll {
  width: fit-content;
  max-width: 100%;
  max-height: min(640px, 70vh);
  overflow: auto;
  background-color: #111111;
  border: 1px solid #222222;
  border-radius: var(--radius-lg);
}

.ratings-table {
  display: grid;
  grid-template-columns: 44px repeat(var(--seasons), minmax(48px, 68px));
  gap: 6px;
  padding: 0 10px 10px 0;
  width: max-content;
}

.ratings-table .ratings-label {
  position: sticky;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111111;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 600;
}

/* Season labels along the top, episode labels down the side. The shadows cover the grid gap
   next to them and the panel edge behind them, so cells scrolling past do not show through. */
.ratings-label.season {
  top: 0;
  height: 34px;
  padding-top: 4px;
  box-shadow: 0 6px 0 #111111, 0 -2px 0 #111111;
}

.ratings-label.season.shown {
  color: var(--primary-green);
}

.ratings-label.episode {
  left: 0;
  box-shadow: 6px 0 0 #111111, -2px 0 0 #111111;
}

.ratings-label.corner {
  top: 0;
  left: 0;
  z-index: 2;
  box-shadow: 6px 0 0 #111111, 0 6px 0 #111111, 6px 6px 0 #111111, -2px -2px 0 2px #111111;
}

.rating-cell {
  height: 32px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.rating-cell:hover,
.rating-cell:focus-visible {
  outline: none;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px #ffffff;
}

/* The episode playing */
.rating-cell.active {
  box-shadow: 0 0 0 2px #111111, 0 0 0 4px #ffffff;
}

/* Rating bands, as on the usual IMDb rating charts */
.r9 { background-color: #1b6b3a; color: #ffffff; }
.r8 { background-color: #2eb062; color: #0b1a10; }
.r7 { background-color: #f2c94c; color: #0b1a10; }
.r6 { background-color: #ee8a2a; color: #0b1a10; }
.r5 { background-color: #d0433c; color: #ffffff; }
.r4 { background-color: #7a3a92; color: #ffffff; }

/* Aired but not rated yet */
.rating-cell.unrated {
  background-color: #262626;
  color: var(--text-muted);
}

.rating-cell.unaired {
  background-color: transparent;
  border: 1px dashed #333333;
  color: var(--text-muted);
  cursor: default;
}

.rating-cell.unaired:hover {
  transform: none;
  box-shadow: none;
}

/* Multi-file Picker */
.file-picker {
  padding: 16px 24px;
  border-top: 1px solid var(--border-dark);
}

.picker-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.picker-title svg {
  width: 15px;
  height: 15px;
  color: var(--primary-green);
}

.file-list {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #262626;
  border-radius: var(--radius-sm);
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #202020;
  font-size: 13px;
  cursor: pointer;
}

.file-row:hover {
  background-color: #1c1c1c;
}

.file-row.active {
  background-color: rgba(142, 198, 65, 0.15);
  color: var(--primary-green);
}

/* ===================================================
   8. DIRECT MAGNET & FILE UPLOAD MODAL
   =================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
  background-color: #141414;
  border: 1px solid #282828;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #222222;
  background-color: #0c0c0c;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
}

.modal-title-wrap h3 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.modal-body {
  padding: 24px;
}

.modal-desc {
  font-size: 14px;
  color: #aaaaaa;
  margin-bottom: 18px;
  line-height: 1.5;
}

.modal-desc code {
  color: var(--primary-green);
  background-color: #202020;
  padding: 2px 6px;
  border-radius: 3px;
}

.magnet-input-form {
  margin-bottom: 20px;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
  background-color: #202020;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.input-with-button input:focus {
  border-color: var(--primary-green);
}

.btn-green-submit {
  background-color: var(--primary-green);
  border: none;
  color: #000000;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.btn-green-submit:hover {
  background-color: var(--primary-green-hover);
}

.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #555555;
  font-size: 12px;
  font-weight: 700;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #262626;
}

.modal-divider span {
  padding: 0 10px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed #333333;
  border-radius: var(--radius-md);
  padding: 26px;
  background-color: #181818;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover {
  border-color: var(--primary-green);
  background-color: #1e1e1e;
}

.dropzone svg {
  width: 32px;
  height: 32px;
  color: var(--primary-green);
}

.dropzone span {
  font-size: 13px;
  color: #bbbbbb;
}

.dropzone input {
  display: none;
}

.sample-torrents {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #888888;
}

.btn-sample-tag {
  background-color: #222222;
  border: 1px solid #333333;
  color: #dddddd;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sample-tag:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #000000;
}

/* ===================================================
   9. PUTLOCKER CONTENT & SEO SECTION
   =================================================== */

.content-section {
  background-color: var(--bg-black);
  padding: 70px 24px;
  border-top: 1px solid var(--border-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.content-main-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-green);
  text-align: center;
  margin-bottom: 28px;
}

.content-sub-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 36px;
  margin-bottom: 16px;
}

.text-center {
  text-align: center;
}

.section-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-gray);
  margin-bottom: 40px;
}

.section-content p {
  margin-bottom: 18px;
}

.putlocker-bullet-list {
  padding-left: 20px;
  margin-bottom: 25px;
}

.putlocker-bullet-list li {
  margin-bottom: 12px;
}

.putlocker-bullet-list strong {
  color: #ffffff;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.feature-card {
  background-color: var(--bg-card);
  padding: 30px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #262626;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-green);
  box-shadow: 0 8px 24px rgba(142, 198, 65, 0.25);
}

.feature-icon {
  font-size: 36px;
  color: var(--primary-green);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.feature-description {
  font-size: 14px;
  color: #aaaaaa;
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-section {
  margin-top: 50px;
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-green);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: #222222;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  color: #888888;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: #cccccc;
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===================================================
   10. PROXY NOTICE & NETPRIME NETWORK
   =================================================== */

.proxy-notice {
  background: linear-gradient(135deg, #161616 0%, #242424 100%);
  padding: 18px;
  text-align: center;
  border-top: 1px solid #333333;
  border-bottom: 1px solid #333333;
}

.proxy-notice a {
  color: #4a9eff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 5px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.4);
  display: inline-block;
  transition: all 0.25s ease;
}

.proxy-notice a:hover {
  background: rgba(74, 158, 255, 0.2);
  transform: translateY(-2px);
}

.netprime-network {
  background-color: #121212;
  padding: 50px 24px;
  border-bottom: 1px solid var(--border-dark);
}

.network-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-green);
  text-align: center;
  margin-bottom: 8px;
}

.network-subtitle {
  font-size: 14px;
  color: #999999;
  text-align: center;
  margin-bottom: 30px;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.network-card {
  background: #1c1c1c;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(142, 198, 65, 0.2);
  transition: border-color 0.2s ease;
}

.network-card:hover {
  border-color: var(--primary-green);
}

.network-card h4 {
  font-size: 15px;
  color: var(--primary-green);
  margin-bottom: 6px;
}

.network-card p {
  font-size: 13px;
  color: #bbbbbb;
  line-height: 1.5;
}

/* ===================================================
   11. FOOTER
   =================================================== */

.footer {
  background-color: var(--bg-black);
  padding: 50px 24px 30px;
  border-top: 1px solid var(--border-dark);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #1c1c1c;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand .logo {
  margin-bottom: 14px;
}

.footer-description {
  color: #888888;
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-title {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  color: #888888;
  font-size: 13px;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-link:hover {
  color: var(--primary-green);
  transform: translateX(3px);
}

.footer-bottom {
  text-align: center;
}

.footer-copyright {
  color: #666666;
  font-size: 13px;
}

.heart {
  color: #ff4757;
}

/* ===================================================
   12. TOAST NOTIFICATIONS
   =================================================== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #222222;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-green);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease forwards;
}

.toast.hidden {
  display: none;
}

.toast.error {
  border-left-color: #ff4757;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===================================================
   13. RESPONSIVE BREAKPOINTS
   =================================================== */

@media (max-width: 992px) {
  .hero-logo {
    font-size: 52px;
  }

  .hero-logo-large {
    width: 64px;
    height: 64px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-black);
    border-top: 1px solid var(--border-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-menu.active {
    max-height: 280px;
  }

  .nav-menu ul {
    flex-direction: column;
    padding: 16px 24px;
    gap: 14px;
  }

  .hero-logo {
    font-size: 38px;
  }

  .hero-logo-large {
    width: 50px;
    height: 50px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-banner-title {
    font-size: 2rem;
  }

  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }

  .nav-search {
    display: none;
  }

  .hero-banner {
    padding: 40px 20px 30px;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    font-size: 30px;
  }

  .hero-logo-large {
    width: 42px;
    height: 42px;
  }

  .search-button {
    padding: 0 20px;
  }

  .view-full-site-btn {
    padding: 12px 30px;
    font-size: 15px;
  }

  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  /* Narrow phones: the control row stays on one line with the fullscreen button in reach */
  .custom-controls {
    padding: 12px 12px 8px;
  }

  .controls-left,
  .controls-right {
    gap: 6px;
  }

  .vol-slider,
  #btnQuality {
    display: none;
  }
}

/* Signed-in viewer in the header */
.nav-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-account-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-green);
  font-size: 13px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-account-name svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-account .btn-magnet {
  white-space: nowrap;
}


/* --- Viewer library: continue watching, My List, history --- */
.library-actions {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 12px;
}

.movie-card .card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.movie-card .card-progress > span {
  display: block;
  height: 100%;
  background: #e50914;
}

.movie-card .card-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 16px;
  line-height: 28px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.movie-card:hover .card-remove,
.movie-card .card-remove:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .movie-card .card-remove { opacity: 1; }
}

.movie-card .card-resume {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.7;
}

.btn-my-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.btn-my-list.on {
  border-color: #46d369;
  color: #46d369;
}

/* --- Account avatar (header, account page) --- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: #000;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.avatar-lg {
  width: 76px;
  height: 76px;
  font-size: 34px;
}

a.nav-account-name:hover #navAccountNameText {
  text-decoration: underline;
}

/* Phones: the header keeps the logo, Direct Stream as an icon and the way to the account.
   The admin link is in the footer, and signing out is on the account page. */
@media (max-width: 768px) {
  .nav-container {
    gap: 10px;
  }

  .nav-actions {
    gap: 8px;
  }

  #btnOpenMagnet span,
  #navAccountNameText,
  #btnOpenAdmin,
  #btnSignOut {
    display: none;
  }

  #btnOpenMagnet {
    padding: 8px;
  }
}

@media (max-width: 420px) {
  .navbar .logo-text {
    font-size: 20px;
  }

  .navbar .logo-icon {
    width: 30px;
    height: 30px;
  }
}

/* --- Thumbs in the player header --- */
.rate-group {
  display: inline-flex;
  gap: 6px;
  margin-right: 10px;
}

.rate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.rate-btn svg {
  width: 15px;
  height: 15px;
}

.rate-btn:hover {
  border-color: #fff;
}

.rate-btn.on {
  border-color: #46d369;
  color: #46d369;
  background: rgba(70, 211, 105, 0.12);
}

.rate-btn.on[data-thumb="2"] {
  border-color: #ff6b81;
  color: #ff6b81;
  background: rgba(255, 107, 129, 0.12);
}

.rate-btn.on[data-thumb="-1"] {
  border-color: #bbb;
  color: #bbb;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 600px) {
  .btn-my-list span {
    display: none;
  }

  .rate-btn {
    width: 30px;
    height: 30px;
  }
}

/* --- Recommended for you: rows that scroll sideways --- */
.for-you-section {
  padding-bottom: 20px;
}

.rec-row + .rec-row {
  margin-top: 28px;
}

.rec-row-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rec-row-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.rec-row-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.rec-row-scroller {
  position: relative;
}

.movies-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
  padding: 8px 2px 12px;
}

.movies-row .movie-card {
  scroll-snap-align: start;
}

.movies-row .grid-note {
  grid-column: auto;
  min-width: 260px;
}

.row-arrow {
  position: absolute;
  top: 8px;
  bottom: 12px;
  z-index: 4;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.row-arrow.left {
  left: 0;
  background: linear-gradient(to right, rgba(10, 10, 10, 0.95), transparent);
}

.row-arrow.right {
  right: 0;
  background: linear-gradient(to left, rgba(10, 10, 10, 0.95), transparent);
}

.row-arrow svg {
  width: 30px;
  height: 30px;
}

.rec-row-scroller:hover .row-arrow,
.row-arrow:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .row-arrow {
    display: none;
  }
}

.movie-card .card-reason {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

.movie-card .card-reason b {
  color: #46d369;
  font-weight: 700;
}

@media (max-width: 768px) {
  .movies-row {
    grid-auto-columns: 140px;
    gap: 12px;
  }
}

/* --- Episodes: where each was left --- */
.episode-thumb .card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
}

.episode-thumb .card-progress > span {
  display: block;
  height: 100%;
  background: #e50914;
}

.episode-seen {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #46d369;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

/* --- Up next, over the player when an episode ends --- */
.up-next {
  position: absolute;
  right: 20px;
  bottom: 84px;
  z-index: 12;
  display: grid;
  gap: 6px;
  max-width: min(340px, calc(100% - 40px));
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.up-next-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.up-next-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up-next-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.up-next-play,
.up-next-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.up-next-play {
  background: #fff;
  border: 1px solid #fff;
  color: #000;
}

.up-next-play svg {
  width: 15px;
  height: 15px;
}

.up-next-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

@media (max-width: 480px) {
  .up-next {
    right: 10px;
    bottom: 70px;
    max-width: calc(100% - 20px);
  }
}
