/* ═══════════════════════════════════════════════════
   LAGHLID STREAM — Clean Modern Theme
═══════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --accent-light:  #eff6ff;
  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --bg-card2:      #f1f5f9;
  --bg-modal:      #ffffff;
  --bg-navbar:     #ffffff;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --border:        #e2e8f0;
  --border-hover:  #cbd5e1;
  --green:         #16a34a;
  --yellow:        #d97706;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;

  --transition:  all 0.2s ease;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.15);

  --navbar-h:    64px;
  --row-item-w:  200px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.hidden { display: none !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-card2); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ═══════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: var(--bg-navbar);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.navbar.scrolled,
.navbar.solid {
  box-shadow: var(--shadow-md);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.logo-svg {
  width: 90px;
  height: 28px;
  overflow: visible;
}
.logo-text-svg {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 900;
  fill: var(--accent);
  letter-spacing: -1px;
}
.logo-sub {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translateY(-2px);
  opacity: 0.8;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg-card2);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

/* Navbar right */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search */
.search-container {
  display: flex;
  align-items: center;
  position: relative;
}
.search-toggle {
  color: var(--text-muted);
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.search-toggle svg { width: 18px; height: 18px; }
.search-toggle:hover {
  color: var(--text);
  background: var(--bg-card2);
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  gap: 8px;
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 0.35s ease, opacity 0.3s ease;
}
.search-bar.open {
  width: 280px;
  opacity: 1;
}
.search-icon-inner { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
#search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 2px 0;
}
#search-input::placeholder { color: var(--text-light); }
.search-clear {
  color: var(--text-light);
  font-size: 0.78rem;
  padding: 2px 4px;
  transition: var(--transition);
  flex-shrink: 0;
  border-radius: 4px;
}
.search-clear:hover { color: var(--text-muted); background: var(--border); }

/* Profile */
.nav-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.nav-profile:hover { background: var(--bg-card2); }
.profile-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
}
.caret {
  width: 14px; height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.nav-profile:hover .caret { transform: rotate(180deg); }
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 180px;
  padding: 6px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-4px);
}
.nav-profile:hover .profile-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.profile-item {
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.profile-item:hover { color: var(--text); background: var(--bg-card2); }
.profile-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ═══════════════════════════════════════════════════
   SEARCH RESULTS
═══════════════════════════════════════════════════ */
.search-results-overlay {
  position: fixed;
  inset: 0;
  top: var(--navbar-h);
  background: var(--bg);
  z-index: 150;
  overflow-y: auto;
  padding: 32px 5% 60px;
}
.search-results-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.search-results-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
}
.search-results-header h2 span { color: var(--text); font-weight: 700; }
#search-results-count {
  font-size: 0.82rem;
  color: var(--text-light);
  background: var(--bg-card2);
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.btn-load-more {
  margin: 40px auto 0;
  display: block;
  padding: 10px 36px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-md);
}
.btn-load-more:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.load-more-wrap { text-align: center; margin-top: 30px; }

/* ═══════════════════════════════════════════════════
   HERO BILLBOARD
═══════════════════════════════════════════════════ */
.hero-billboard {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 420px;
  overflow: hidden;
  background: var(--text);
  margin-top: var(--navbar-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: background-image 0.8s ease;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(15,23,42,0.82) 0%, rgba(15,23,42,0.45) 55%, rgba(15,23,42,0.2) 100%),
    linear-gradient(to top, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.2) 40%, transparent 70%);
}
.hero-content {
  position: absolute;
  bottom: 18%;
  left: 5%;
  max-width: 44%;
  z-index: 2;
}
.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-new { background: var(--accent); color: #fff; }
.badge-top { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); color: #fff; }
.badge-rating { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.25); color: #e2e8f0; }

.hero-logo-title { margin-bottom: 14px; }
.hero-title {
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hero-match { color: #4ade80; font-size: 0.88rem; font-weight: 700; }
.hero-year  { color: #cbd5e1; font-size: 0.83rem; }
.hero-rating-box {
  border: 1px solid #94a3b8;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
}
.hero-seasons { color: #cbd5e1; font-size: 0.83rem; }
.hero-hd {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #e2e8f0;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions { display: flex; gap: 10px; align-items: center; }

.btn-hero-play {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}
.btn-hero-play svg { width: 20px; height: 20px; }
.btn-hero-play:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-hero-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-hero-info svg { width: 20px; height: 20px; }
.btn-hero-info:hover { background: rgba(255,255,255,0.25); }

.hero-maturity {
  position: absolute;
  right: 0;
  bottom: 22%;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid rgba(255,255,255,0.4);
  padding: 6px 5% 6px 12px;
  color: #94a3b8;
  font-size: 0.82rem;
}

/* Hero slide arrows */
.hero-nav-arrows { position: absolute; right: 2%; bottom: 26%; z-index: 3; display: flex; gap: 8px; }
.hero-arrow {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.hero-arrow:hover { background: rgba(255,255,255,0.3); }

/* ═══════════════════════════════════════════════════
   CONTENT ROWS
═══════════════════════════════════════════════════ */
.rows-container {
  position: relative;
  z-index: 2;
  padding: 32px 0 60px;
  background: var(--bg);
}

.content-row {
  margin-bottom: 8px;
  padding: 0;
  position: relative;
}
.content-row:hover { z-index: 10; }

.row-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 5%;
  margin-bottom: 12px;
}
.row-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.row-explore {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 3px;
}
.content-row:hover .row-explore { opacity: 1; transform: translateX(0); }

.row-scroll-wrap {
  position: relative;
}

.row-scroll {
  display: flex;
  gap: 14px;
  padding: 8px 5%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.row-scroll::-webkit-scrollbar { display: none; }

/* Scroll arrows */
.scroll-arrow {
  position: absolute;
  top: 0; bottom: 0;
  width: 5%;
  min-width: 44px;
  background: linear-gradient(to right, var(--bg) 60%, transparent);
  color: var(--text);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease;
  border: none;
}
.scroll-arrow-right {
  background: linear-gradient(to left, var(--bg) 60%, transparent);
}
.content-row:hover .scroll-arrow { opacity: 1; }
.scroll-arrow-left { left: 0; }
.scroll-arrow-right { right: 0; }

/* ═══════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════ */
.ncard {
  flex-shrink: 0;
  width: var(--row-item-w);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.ncard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  z-index: 10;
}

.ncard-poster {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-card2);
  display: block;
}
.ncard-poster-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-card2) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--text-light);
}
.ncard-poster-placeholder .placeholder-icon { font-size: 1.8rem; }
.ncard-poster-placeholder .placeholder-title {
  font-size: 0.68rem;
  text-align: center;
  padding: 0 8px;
  line-height: 1.4;
  color: var(--text-muted);
  font-weight: 600;
}

/* Card hover panel */
.ncard-hover {
  padding: 10px 12px 12px;
  background: var(--bg-card);
}

.ncard-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ncard-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.ncard-btn svg { width: 14px; height: 14px; }
.ncard-btn-play {
  background: var(--accent);
  color: #fff;
}
.ncard-btn-play:hover { background: var(--accent-hover); }
.ncard-btn-add, .ncard-btn-like {
  background: var(--bg-card2);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.ncard-btn-add:hover, .ncard-btn-like:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ncard-btn-more {
  margin-left: auto;
  background: var(--bg-card2);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.ncard-btn-more:hover { border-color: var(--border-hover); color: var(--text); }

.ncard-match { color: var(--green); font-size: 0.72rem; font-weight: 700; margin-bottom: 3px; }
.ncard-title { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.ncard-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.ncard-year { font-size: 0.7rem; color: var(--text-muted); }
.ncard-hd   {
  font-size: 0.58rem;
  border: 1px solid var(--border-hover);
  color: var(--text-light);
  padding: 1px 4px;
  font-weight: 700;
  border-radius: 3px;
}
.ncard-ep   { font-size: 0.7rem; color: var(--text-muted); }
.ncard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ncard-tag {
  font-size: 0.63rem;
  color: var(--text-light);
}
.ncard-tag::after { content: '•'; color: var(--border-hover); margin-left: 4px; }
.ncard-tag:last-child::after { display: none; }

/* Shimmer */
.shimmer-card {
  flex-shrink: 0;
  width: var(--row-item-w);
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.shimmer-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ═══════════════════════════════════════════════════
   DETAIL MODAL
═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px 60px;
}

.modal-box {
  background: var(--bg-modal);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  animation: modalIn 0.25s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid var(--border);
}
@keyframes modalIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);     opacity: 1; }
}

/* TOP */
.modal-top {
  position: relative;
  height: 400px;
  background: var(--text);
  overflow: hidden;
}
.modal-backdrop-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
}
.modal-top-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-modal) 2%, rgba(255,255,255,0.05) 50%, transparent 80%);
}
.modal-close-btn {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  color: var(--text);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.modal-close-btn:hover { background: #fff; box-shadow: var(--shadow-md); }

.modal-top-content {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 28px;
  z-index: 3;
}
.modal-big-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.modal-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn-modal-play {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}
.btn-modal-play svg { width: 18px; height: 18px; }
.btn-modal-play:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-icon-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-icon-circle svg { width: 18px; height: 18px; }
.btn-icon-circle:hover { background: rgba(255,255,255,0.28); border-color: #fff; }

/* BOTTOM */
.modal-bottom {
  display: flex;
  gap: 28px;
  padding: 24px 28px 28px;
  background: var(--bg-card);
}
.modal-left-col { flex: 1.6; min-width: 0; }
.modal-right-col { flex: 1; min-width: 0; }

.modal-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.modal-match   { color: var(--green); font-size: 0.88rem; font-weight: 700; }
.modal-year    { color: var(--text-muted); font-size: 0.83rem; }
.modal-seasons { color: var(--text-muted); font-size: 0.83rem; }
.modal-hd {
  border: 1px solid var(--border-hover);
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.modal-maturity {
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-runtime { color: var(--text-muted); font-size: 0.83rem; }
.modal-vote {
  background: #fef9c3;
  border: 1px solid #fde68a;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.76rem;
  color: var(--yellow);
  font-weight: 700;
}

.modal-synopsis {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 16px;
}

.modal-cast, .modal-genres {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.7;
}
.modal-cast span, .modal-genres span { color: var(--text); }

/* Seasons in right col */
.seasons-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.seasons-select {
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  margin-bottom: 14px;
  outline: none;
  transition: var(--transition);
}
.seasons-select:focus { border-color: var(--accent); }
.seasons-select option { background: var(--bg-card); }

.ep-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.ep-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.ep-row:hover { background: var(--bg-card2); border-color: var(--border); }
.ep-num-badge {
  width: 26px;
  flex-shrink: 0;
  text-align: center;
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 700;
  padding-top: 4px;
}
.ep-thumb {
  width: 110px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
  flex-shrink: 0;
}
.ep-thumb-ph {
  width: 110px; height: 62px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.ep-info { flex: 1; }
.ep-title-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}
.ep-title { font-size: 0.83rem; font-weight: 700; color: var(--text); }
.ep-dur   { font-size: 0.72rem; color: var(--text-light); }
.ep-desc  {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SIMILAR */
.modal-similar-section {
  padding: 10px 28px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.modal-similar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.modal-similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.similar-card {
  background: var(--bg-card2);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.similar-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}
.similar-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-card2);
  display: block;
}
.similar-thumb-ph {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.similar-info { padding: 8px 10px 10px; }
.similar-meta { display: flex; justify-content: space-between; margin-bottom: 4px; }
.similar-year { font-size: 0.7rem; color: var(--text-muted); }
.similar-vote { font-size: 0.7rem; color: var(--green); font-weight: 700; }
.similar-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   PLAYER
═══════════════════════════════════════════════════ */
.player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 900;
  display: flex;
  flex-direction: column;
}
.player-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(15,23,42,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.player-back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.player-back-btn svg { width: 20px; height: 20px; }
.player-back-btn:hover { background: rgba(255,255,255,0.2); }
.player-now-title {
  flex: 1;
  font-size: 0.88rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-server-group { display: flex; gap: 6px; flex-shrink: 0; }
.psrv-btn {
  padding: 6px 14px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  transition: var(--transition);
}
.psrv-btn:hover { border-color: #fff; color: #fff; }
.psrv-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.player-frame-wrap {
  flex: 1;
  position: relative;
}
#click-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  background: transparent;
  /* Allow touch events to pass through after bypass */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#click-shield.bypassed { display: none; }
#click-shield::after {
  content: '▶  Tap to Play';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(37,99,235,0.95);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(37,99,235,0.4);
  white-space: nowrap;
}
/* On non-touch devices keep "Click to Play" */
@media (hover: hover) and (pointer: fine) {
  #click-shield::after { content: '▶  Click to Play'; }
}
#player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Critical for iOS Safari — enables native inline video playback */
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}
/* iOS safe-area support for notch/home-bar devices */
.player-overlay {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Wrap server buttons on small phones */
@media (max-width: 480px) {
  .player-server-group {
    flex-wrap: wrap;
    gap: 4px;
  }
  .psrv-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
  }
  .player-now-title {
    font-size: 0.78rem;
  }
}


/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════
   TOP 10 BADGE
═══════════════════════════════════════════════════ */
.top10-badge {
  position: absolute;
  bottom: 2px;
  left: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.top10-n {
  font-size: 3rem;
  font-weight: 900;
  color: var(--bg-card);
  line-height: 1;
  -webkit-text-stroke: 2px var(--border-hover);
}
.top10-label {
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: -4px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-content { max-width: 65%; }
  .modal-bottom { flex-direction: column; }
  .modal-similar-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-big-title { font-size: 1.6rem; }
}
@media (max-width: 640px) {
  :root { --row-item-w: 155px; }
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .hero-content { max-width: 90%; }
  .hero-billboard { height: 68vw; }
  .modal-top { height: 220px; }
  .modal-bottom { padding: 16px; }
  .modal-similar-section { padding: 10px 16px 24px; }
  .modal-similar-grid { grid-template-columns: 1fr 1fr; }
  .player-topbar { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════
   AUTO SERVER DETECTION — Button States & Loader
═══════════════════════════════════════════════════ */

/* Ensure the loader overlay positions inside the frame wrap */
.player-frame-wrap { position: relative !important; }

/* Being probed — pulsing amber */
.psrv-btn.srv-trying {
  background: rgba(234, 179, 8, 0.18) !important;
  border-color: #eab308 !important;
  color: #fbbf24 !important;
  animation: srv-pulse 0.75s ease-in-out infinite;
}

/* Probe failed — dim red strikethrough */
.psrv-btn.srv-failed {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: rgba(239, 68, 68, 0.45) !important;
  text-decoration: line-through;
  opacity: 0.5;
}

@keyframes srv-pulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%       { opacity: 0.6; transform: scale(0.96); }
}

