/* Magis TV - Neon glass theme */
:root {
  --bg: #070b16;
  --card: #10182a;
  --card-hover: #18243d;
  --text: #ecf2ff;
  --muted: #9aaccc;
  --accent: #5d76ff;
  --accent-soft: rgba(93, 118, 255, 0.24);
  --gold: #54d8ff;
  --radius: 12px;
  --font: 'Outfit', system-ui, sans-serif;
}

html[data-theme="light"] {
  --bg: #f3f7ff;
  --card: #ffffff;
  --card-hover: #eef3ff;
  --text: #131c2f;
  --muted: #5e6a84;
  --accent: #3752ff;
  --accent-soft: rgba(55, 82, 255, 0.22);
  --gold: #0488c9;
}

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

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at 12% 8%, rgba(84, 216, 255, 0.12), transparent 36%),
    radial-gradient(circle at 88% 4%, rgba(93, 118, 255, 0.14), transparent 34%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.site-header {
  background: linear-gradient(180deg, rgba(7,11,22,0.95) 0%, rgba(7,11,22,0.75) 60%, transparent 100%);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}
.header-search-input {
  width: 100%;
  padding: 0.5rem 2.25rem 0.5rem 0.9rem;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search-input::placeholder { color: var(--muted); }
.header-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 22px rgba(93, 118, 255, 0.2);
}
.header-search-icon {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 1rem;
}
.header-search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.35rem;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
}
.search-suggestion-empty {
  padding: 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover {
  background: var(--card-hover);
}
.search-suggestion-item img {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--card-hover);
  flex-shrink: 0;
}
.search-suggestion-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.search-suggestion-info strong {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-suggestion-info span {
  font-size: 0.8rem;
  color: var(--muted);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.theme-toggle {
  border: 1px solid rgba(255,255,255,0.2);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 760px;
  margin: 0 auto;
}

/* Featured home slider */
.featured-section {
  padding-top: 0;
}
.featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.featured-switcher {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.3rem;
  background: var(--card);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
}
.featured-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.featured-tab.is-active {
  background: var(--accent);
  color: #fff;
}
.featured-track-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}
.featured-track {
  position: relative;
  display: none;
  min-height: 430px;
  background: #000;
}
.featured-track.is-active {
  display: block;
}
.featured-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  min-height: 430px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease-in-out;
}
.featured-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.featured-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--card-hover);
  filter: brightness(0.82);
}
.featured-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.48) 48%, rgba(0,0,0,0.12) 100%),
    linear-gradient(to top, rgba(0,0,0,0.66) 0%, transparent 48%);
}
.featured-slide-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 2rem 2rem 4.3rem;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.featured-rating {
  display: inline-flex;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.25rem 0.48rem;
  margin-bottom: 0.45rem;
  background: #f5c518;
  color: #111;
}
.featured-slide-tag {
  display: inline-flex;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.55rem;
}
.featured-slide-content h3 {
  font-size: clamp(1.6rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.72);
}
.featured-slide-content p {
  margin: 0;
  font-size: 0.96rem;
  max-width: 560px;
  line-height: 1.45;
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 5px rgba(0,0,0,0.56);
}
.featured-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.featured-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0.56rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
}
.featured-btn-primary {
  background: #fff;
  color: #111;
}
.featured-btn-ghost {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
}
.featured-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.featured-nav:hover {
  background: rgba(0,0,0,0.8);
}
.featured-nav-prev { left: 0.9rem; }
.featured-nav-next { right: 0.9rem; }
.featured-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 3;
}
.featured-dot {
  border: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}
.featured-dot.is-active {
  width: 22px;
  background: rgba(255,255,255,0.95);
}

/* Sections */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(93, 118, 255, 0.35);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.card-poster {
  aspect-ratio: 2/3;
  object-fit: cover;
  width: 100%;
  background: var(--card-hover);
}

.card-info {
  padding: 0.75rem;
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Detail page */
.detail-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  margin-bottom: 2rem;
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 50%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.detail-poster-wrap {
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.detail-poster {
  aspect-ratio: 2/3;
  object-fit: cover;
  width: 100%;
}

.detail-meta {
  flex: 1;
  min-width: 0;
}

.detail-meta h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 0.5rem; }
.detail-tagline { color: var(--muted); font-style: italic; margin-bottom: 0.75rem; }
.detail-facts { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.detail-overview { max-width: 640px; color: var(--text); opacity: 0.95; }

/* Movie page - reference layout (hero + meta + pills + actions + actors) */
.movie-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  padding: 2rem 2rem 3rem;
  margin-bottom: 0;
}
.movie-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  filter: blur(2px);
  transform: scale(1.03);
}
.movie-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 40%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
}
.movie-hero-back {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.movie-hero-back:hover { opacity: 0.85; }
.movie-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.movie-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0 0 0.75rem;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.movie-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}
.movie-meta-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.movie-meta-icon { opacity: 0.9; }
.movie-genre-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.movie-genre-pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
}
.movie-hero-overview {
  max-width: 640px;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}
.movie-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.movie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, opacity 0.2s;
}
.movie-btn-play {
  background: rgba(255,255,255,0.9);
  color: #000;
  padding: 0.7rem 1.5rem;
}
.movie-btn-play:hover { background: #fff; }
.movie-btn-play[aria-disabled="true"] {
  background: rgba(255,255,255,0.4);
  cursor: default;
}
.movie-btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}
.movie-btn-icon:hover { background: rgba(255,255,255,0.3); }
.movie-btn-secondary {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.movie-btn-secondary:hover { background: rgba(255,255,255,0.3); }
.movie-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.movie-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.movie-section-title::before {
  content: '';
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
}
.movie-actors-section { margin-bottom: 2.5rem; }
.movie-actors-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.movie-actors-scroll::-webkit-scrollbar { height: 6px; }
.movie-actors-scroll::-webkit-scrollbar-track { background: var(--card); border-radius: 3px; }
.movie-actors-scroll::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }
.movie-actor-card {
  flex-shrink: 0;
  width: 120px;
  text-align: center;
  scroll-snap-align: start;
}
.movie-actor-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.5rem;
  background: var(--card-hover);
}
.movie-actor-name { font-weight: 600; font-size: 0.9rem; }
.movie-actor-role { font-size: 0.8rem; color: var(--muted); }
.movie-similar-section { margin-bottom: 2.5rem; }
.movie-similar-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.movie-similar-scroll::-webkit-scrollbar { height: 6px; }
.movie-similar-scroll::-webkit-scrollbar-track { background: var(--card); border-radius: 3px; }
.movie-similar-scroll::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }
.movie-similar-card {
  flex-shrink: 0;
  width: 140px;
  color: var(--text);
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform 0.2s;
}
.movie-similar-card:hover { transform: translateY(-4px); }
.movie-similar-card img {
  aspect-ratio: 2/3;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
  background: var(--card-hover);
}
.movie-similar-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Movie page - pro layout */
.pro-movie {
  max-width: 1060px;
  margin: 1rem auto 0;
  padding: 0 1.25rem;
}
.pro-movie-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.pro-movie-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,11,22,0.34), rgba(93,118,255,0.24));
  z-index: 1;
}
.pro-movie-back {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,12,15,0.55);
  color: #fff;
  font-size: 1.2rem;
}
.pro-movie-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #54d8ff, #5d76ff);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.pro-movie-card {
  display: flex;
  gap: 1.1rem;
  padding: 1rem;
  background: #10182a;
  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;
  border-radius: 0 0 12px 12px;
}
.pro-movie-poster-wrap {
  width: 136px;
  flex-shrink: 0;
}
.pro-movie-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--card-hover);
}
.pro-movie-main {
  flex: 1;
  min-width: 0;
}
.pro-movie-title {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.pro-movie-overview {
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pro-movie-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
}
.pro-meta-col p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.pro-meta-col strong {
  color: #fff;
  font-weight: 600;
}
.pro-movie-actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pro-btn {
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.pro-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(93, 118, 255, 0.3);
}
.pro-btn-primary.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}
.pro-btn-ghost {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.movie-quality {
  display: inline-flex;
  align-items: center;
  padding: 0.06rem 0.45rem;
  background: var(--gold);
  color: #111;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
}
@media (max-width: 640px) {
  .pro-movie-card {
    flex-direction: column;
  }
  .pro-movie-poster-wrap {
    width: 92px;
  }
  .pro-movie-meta {
    grid-template-columns: 1fr;
  }
}

/* Watch Trailer section - cool styled embed only */
.watch-trailer-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}
.watch-trailer-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.watch-trailer-title::before {
  content: '';
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
}
.watch-trailer-box {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  max-width: 880px;
  background: var(--card);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.06);
}
.watch-trailer-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.watch-trailer-locked {
  max-width: 880px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1rem;
}
.watch-trailer-locked p {
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.watch-unlock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
}

/* Locker modal (in-page) */
.locker-modal[hidden] { display: none !important; }
.locker-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.locker-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}
.locker-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 760px);
  margin: 6vh auto 0;
  background: #14141c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1rem;
}
.locker-modal-dialog h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}
.locker-modal-dialog p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}
.locker-close-btn {
  position: absolute;
  right: 0.55rem;
  top: 0.45rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}
.locker-embed-wrap {
  background: #0f0f15;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  min-height: 320px;
  padding: 0.5rem;
  overflow: auto;
}
.locker-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}
.locker-btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.locker-btn-primary {
  background: var(--accent);
  color: #fff;
}

/* Cast */
.cast-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.cast-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.cast-card {
  text-align: center;
}

.cast-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.5rem;
  background: var(--card-hover);
}

.cast-card .name { font-weight: 600; font-size: 0.9rem; }
.cast-card .character { font-size: 0.8rem; color: var(--muted); }

/* Detail layout */
.detail-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.detail-body .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.detail-body .back-link:hover { color: var(--gold); }

/* Page title strip (movie/TV/show name) */
.detail-page-title {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem 0.5rem;
  font-size: 1.1rem;
  color: var(--muted);
}
.detail-page-title strong { color: var(--gold); font-weight: 600; }

/* Episodes section - inspiration: dark UI, season dropdown, episode cards */
.episodes-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}
.episodes-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.episodes-section-title::before {
  content: '';
  width: 4px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
}
.episodes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.episodes-season-label { display: block; }
.episodes-season-select {
  appearance: none;
  background: var(--card-hover);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 2rem 0.6rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 140px;
}
.episodes-season-select:focus {
  outline: none;
  border-color: var(--accent);
}
.episodes-search-wrap {
  display: flex;
  align-items: center;
  background: var(--card-hover);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0 0.75rem;
  flex: 1;
  max-width: 280px;
}
.episodes-search-icon {
  color: var(--muted);
  margin-right: 0.5rem;
  font-size: 1rem;
}
.episodes-search {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.6rem 0;
  font-size: 0.95rem;
  font-family: inherit;
}
.episodes-search::placeholder { color: var(--muted); }
.episodes-search:focus { outline: none; }
.episodes-list-wrap { position: relative; }
.episodes-section .season-block {
  margin: 0;
  background: transparent;
}
.episodes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.episode-card {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border-right: 3px solid var(--accent);
}
.episode-card-thumb {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  min-height: 124px;
  background: var(--card-hover);
}
.episode-card-thumb .ep-still,
.episode-card-thumb .ep-still-placeholder {
  width: 100%;
  height: 100%;
  min-height: 124px;
  object-fit: cover;
  display: block;
}
.episode-card-thumb .ep-still-placeholder {
  aspect-ratio: 16/9;
}
.ep-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  color: #fff;
  transition: background 0.2s;
}
.ep-play-overlay svg {
  width: 48px;
  height: 48px;
  opacity: 0.95;
}
.episode-card:hover .ep-play-overlay {
  background: rgba(0,0,0,0.25);
}
.ep-num-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.episode-card-body {
  flex: 1;
  padding: 1rem 1.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.episode-card-body .ep-name {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.episode-card-body .ep-date {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}
.episode-card-body .ep-overview {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.episode-card-border {
  display: none;
}
@media (max-width: 640px) {
  .episode-card-thumb { width: 140px; min-height: 79px; }
  .episode-card-thumb .ep-still,
  .episode-card-thumb .ep-still-placeholder { min-height: 79px; }
  .ep-play-overlay svg { width: 36px; height: 36px; }
}

/* Loading & empty */
.loading, .error-msg {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}

.error-msg { color: var(--accent); }

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 3rem;
}

.site-footer a { color: var(--gold); }

/* -------------------- */
/* Mobile responsiveness */
/* -------------------- */
@media (max-width: 768px) {
  .site-header { padding: 0.75rem 1rem; }
  .header-inner { gap: 0.75rem; }

  .logo { flex: 0 0 auto; }
  .header-search-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
  .nav-links {
    order: 2;
    width: 100%;
    justify-content: flex-end;
    gap: 1rem;
  }
  .theme-toggle {
    order: 4;
  }
  .featured-track,
  .featured-slide,
  .featured-slide-content {
    min-height: 360px;
  }
  .featured-slide-content {
    padding: 1.2rem 1rem 3.8rem;
  }
  .featured-slide-content p {
    font-size: 0.86rem;
  }
  .featured-nav {
    display: none;
  }
}

@media (max-width: 540px) {
  .nav-links {
    justify-content: space-between;
    gap: 0.75rem;
  }
  .nav-links a { font-size: 0.9rem; }

  .section, .detail-body, .cast-section, .episodes-section { padding: 1.25rem 1rem; }
  .hero { padding: 2.25rem 1rem 1.25rem; }

  .watch-trailer-section { padding: 0 1rem 1.25rem; }
  .watch-trailer-box { max-width: 100%; }
}

@media (max-width: 640px) {
  /* Pro movie page */
  .pro-movie { padding: 0 1rem; }
  .pro-movie-hero { aspect-ratio: 16 / 9; }
  .pro-movie-play { width: 76px; height: 76px; font-size: 1.7rem; }
  .pro-movie-card { padding: 0.85rem; }
  .pro-movie-title { font-size: 1.35rem; }

  /* Episode toolbar */
  .episodes-toolbar { gap: 0.75rem; }
  .episodes-search-wrap { max-width: none; width: 100%; }
  .episodes-season-select { width: 100%; }
}
