/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:      #111111;
  --bg2:     #1a1a1a;
  --bg3:     #222222;
  --yellow:  #ffe400;
  --text:    #cccccc;
  --muted:   #777777;
  --border:  #2a2a2a;
  --card:    #181818;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ── PWA install bar ─────────────────────────── */
.pwa-install-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 12px;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.pwa-install-bar[hidden] { display: none; }
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 24px;
  background: #7848d5;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(55, 17, 115, .28);
  transition: background .2s, transform .2s;
  pointer-events: auto;
}
.pwa-install-btn:hover { background: #8457e3; transform: translateY(-1px); }
.pwa-install-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

/* ── Navbar ─────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 60px; background: rgba(17,17,17,.97);
  border-bottom: 1px solid #1c1c1c;
  display: flex; align-items: center;
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo {
  font-size: 20px; font-weight: 700; color: var(--yellow);
  letter-spacing: 2px; margin-right: 20px; flex-shrink: 0;
}
.nav-menu { display: flex; align-items: stretch; height: 60px; list-style: none; flex: 1; }
.nav-menu li { position: relative; }
.nav-menu a {
  display: flex; align-items: center; gap: 4px;
  height: 60px; padding: 0 14px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  color: #ddd; white-space: nowrap; transition: color .2s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--yellow); }
.nav-menu a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--yellow); border-radius: 2px 2px 0 0;
}
/* Dropdown */
.nav-dropdown {
  display: none; position: absolute; top: 60px; left: 0;
  min-width: 580px; background: #191919;
  border-top: 3px solid var(--yellow);
  padding: 14px; z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,.8);
  border-radius: 0 0 8px 8px;
}
.nav-menu li:hover .nav-dropdown { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; }
.nav-dropdown a { height: auto; padding: 6px 10px; font-size: 11px; color: var(--muted); border-radius: 4px; text-transform: none; letter-spacing: 0; }
.nav-dropdown a:hover { background: var(--yellow); color: #111; }

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 6px; margin-right: 4px; }
.nav-toggle svg { display: block; }

/* Mobile nav — always hidden unless .open is toggled inside the breakpoint */
.nav-mobile { display: none; }

/* ── Main layout ─────────────────────────── */
.page-wrap { padding-top: 60px; min-height: 100vh; }

/* ── Hero ─────────────────────────── */
.hero {
  min-height: 280px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1a1400 0%, #111 70%);
  text-align: center; padding: 48px 16px;
}
.hero h1 { font-size: clamp(20px, 4vw, 34px); font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.3; }
.hero p { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.hero-search { display: flex; gap: 8px; max-width: 580px; margin: 0 auto 18px; }
.hero-search input {
  flex: 1; background: #1c1c1c; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; color: #fff; outline: none;
  font-size: 14px; transition: border-color .2s;
}
.hero-search input:focus { border-color: var(--yellow); }
.hero-search button {
  background: var(--yellow); color: #111; border: none; border-radius: 8px;
  padding: 12px 24px; font-weight: 700; cursor: pointer; white-space: nowrap;
  font-size: 14px; transition: opacity .2s;
}
.hero-search button:hover { opacity: .85; }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.hero-links a {
  padding: 6px 16px; border-radius: 20px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); color: var(--muted); font-size: 12px;
  transition: all .2s;
}
.hero-links a:hover { background: var(--yellow); color: #111; border-color: var(--yellow); }

/* ── Container ─────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { margin-bottom: 40px; }

/* ── Section header ─────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-title { font-size: 16px; font-weight: 700; color: #fff; border-left: 3px solid var(--yellow); padding-left: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.view-more { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; transition: color .2s; white-space: nowrap; }
.view-more:hover { color: var(--yellow); }

/* Tabs */
.tab-group { display: flex; gap: 4px; }
.tab { padding: 4px 12px; border-radius: 4px; font-size: 11px; font-weight: 600; cursor: pointer; border: none; background: #1c1c1c; color: var(--muted); transition: all .2s; }
.tab.active { background: var(--yellow); color: #111; }

/* ── Film grid ─────────────────────────── */
.film-grid { display: grid; gap: 10px; grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1100px) { .film-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 768px)  { .film-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }
@media (max-width: 500px)  { .film-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
@media (max-width: 360px)  { .film-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }

/* ── Film card — clean thumbnail ─────────────────────────── */
.film-card-link { display: block; }
.film-card {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg3);
}

/* Poster image */
.film-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.film-card:hover img { transform: scale(1.04); }

/* Quality badge — top right */
.quality-badge {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  background: var(--yellow); color: #111; font-size: 9px; font-weight: 700;
  padding: 2px 5px; border-radius: 3px; letter-spacing: .5px;
}

/* Hover overlay — gradient at bottom with title */
.film-card-overlay {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(to top,
    rgba(0,0,0,.88) 0%,
    rgba(0,0,0,.18) 45%,
    transparent 100%);
  opacity: 0;
  transition: opacity .28s ease;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 8px;
}
.film-card:hover .film-card-overlay { opacity: 1; }

/* Play icon — centered, inside overlay */
.film-card-play {
  position: absolute; top: 50%; left: 50%; z-index: 4;
  transform: translate(-50%, -50%) scale(.75);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .28s ease, transform .28s ease;
  font-size: 14px; color: #111; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.film-card:hover .film-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Text inside overlay */
.imdb-badge { display: inline-flex; align-items: center; gap: 3px; background: #f5c518; color: #000; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px; margin-bottom: 4px; width: fit-content; }
.fc-title { font-size: 11px; font-weight: 600; color: #fff; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-meta { font-size: 10px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* Skeleton loader */
.film-card-skeleton { aspect-ratio: 2/3; border-radius: 6px; background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Episode badge — bottom left of TV show cards (S1 · EP10) */
.ep-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.82);
  color: #ffe400;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .4px;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(255, 228, 0, 0.35);
}

/* ── Filters ─────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-select { padding: 7px 12px; background: #1c1c1c; border: 1px solid var(--border); border-radius: 6px; color: var(--text); outline: none; cursor: pointer; font-size: 12px; transition: border-color .2s; }
.filter-select:focus { border-color: var(--yellow); }

/* ── Pagination ─────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.page-btn { padding: 6px 12px; border-radius: 6px; background: #1c1c1c; border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 12px; transition: all .2s; }
.page-btn:hover, .page-btn.active { background: var(--yellow); color: #111; border-color: var(--yellow); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Player area ─────────────────────────── */
.player-cover {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; overflow: hidden; cursor: pointer;
}
/* Clean backdrop — full brightness, cinematic */
.player-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.82);
}
/* Subtle gradient only at bottom for text readability */
.player-cover-gradient {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.72) 0%,
    rgba(0,0,0,.18) 35%,
    transparent 65%
  );
  pointer-events: none;
}
/* Title + year overlay at bottom-center */
.player-cover-info {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  text-align: center; z-index: 4; pointer-events: none;
}
.player-cover-title {
  font-size: clamp(14px, 2.2vw, 22px); font-weight: 600; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); white-space: nowrap;
}
.player-cover-year {
  font-size: clamp(11px, 1.4vw, 14px); color: rgba(255,255,255,.7);
  margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
/* Play button — yellow */
.play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -58%);
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--yellow);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #111;
  transition: transform .2s, box-shadow .2s;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.play-btn:hover {
  transform: translate(-50%, -58%) scale(1.1);
  box-shadow: 0 6px 32px rgba(0,0,0,.5);
}
.player-iframe { width: 100%; height: 100%; border: none; position: absolute; inset: 0; }
.server-bar {
  background: #0d0d0d; border-bottom: 1px solid #1a1a1a;
  padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.server-label-text { font-size: 11px; color: #555; margin-right: 2px; white-space: nowrap; }
.server-btn {
  padding: 5px 14px; border-radius: 4px; border: 1px solid var(--border);
  background: #1c1c1c; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 600;
  transition: all .2s;
}
.server-btn.active { background: var(--yellow); color: #111; border-color: var(--yellow); }
.lights-btn {
  margin-left: auto; padding: 5px 14px; border-radius: 4px; border: 1px solid var(--border);
  background: #1c1c1c; color: var(--muted); cursor: pointer; font-size: 11px; transition: all .2s;
}
.lights-btn.on { background: var(--yellow); color: #111; border-color: var(--yellow); }
.lights-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 900; }
.lights-overlay.active { display: block; }

/* ── Breadcrumb ─────────────────────────── */
.breadcrumb { font-size: 11px; color: #555; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb a { color: #666; transition: color .2s; }
.breadcrumb a:hover { color: var(--yellow); }

/* ── Film detail ─────────────────────────── */
.film-info-grid { display: grid; grid-template-columns: 180px 1fr; gap: 24px; margin-bottom: 28px; }
.film-info-poster img { border-radius: 8px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,.6); }
.film-title { font-size: clamp(17px, 3vw, 26px); font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.3; }
.watch-label-badge { font-size: 13px; font-weight: 400; color: var(--yellow); vertical-align: middle; }
.film-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.meta-pill {
  padding: 3px 10px; border-radius: 4px; font-size: 11px;
  background: #1c1c1c; border: 1px solid var(--border); color: var(--text);
  display: inline-flex; align-items: center; gap: 4px;
}
.meta-pill.quality { background: var(--yellow); color: #111; font-weight: 700; border-color: var(--yellow); }
.genre-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.genre-tag { padding: 4px 10px; border-radius: 20px; font-size: 11px; background: #1c1c1c; border: 1px solid var(--border); color: var(--muted); transition: all .2s; }
.genre-tag:hover { background: var(--yellow); color: #111; border-color: var(--yellow); }
.film-desc { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 14px; }
.film-crew { font-size: 13px; color: var(--muted); line-height: 1.8; }
.film-crew strong { color: var(--text); }
.watch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: #111; border: none; border-radius: 8px;
  padding: 11px 26px; font-weight: 700; font-size: 14px; cursor: pointer;
  margin-top: 14px; transition: opacity .2s; letter-spacing: .3px;
}
.watch-btn:hover { opacity: .85; }

/* ── Episodes ─────────────────────────── */
.episode-section { margin-bottom: 32px; }
.ep-section-title { font-size: 15px; font-weight: 700; color: #fff; border-left: 3px solid var(--yellow); padding-left: 10px; margin-bottom: 14px; }
.season-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.season-tab {
  padding: 6px 14px; border-radius: 4px; border: 1px solid var(--border);
  background: #1c1c1c; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600;
  transition: all .2s;
}
.season-tab.active { background: var(--yellow); color: #111; border-color: var(--yellow); }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.ep-btn {
  padding: 7px 4px; border-radius: 4px; border: 1px solid var(--border);
  background: #1c1c1c; color: var(--muted); cursor: pointer; font-size: 11px;
  font-weight: 600; text-align: center; transition: all .2s;
}
.ep-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.ep-btn.active { background: var(--yellow); color: #111; border-color: var(--yellow); }

/* ── SEO text block ─────────────────────────── */
.seo-block {
  background: #161616; border: 1px solid var(--border); border-radius: 8px;
  padding: 20px 24px; margin-top: 8px; margin-bottom: 40px;
}
.seo-block h2 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.seo-block p { font-size: 13px; color: var(--muted); line-height: 1.75; }

/* ── Empty state ─────────────────────────── */
.empty { padding: 60px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty a { color: var(--yellow); }

/* ── Footer ─────────────────────────── */
.footer { background: #0a0a0a; border-top: 1px solid #1c1c1c; padding: 32px 16px; margin-top: 48px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-size: 18px; font-weight: 700; color: var(--yellow); letter-spacing: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { font-size: 12px; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { max-width: 1200px; margin: 16px auto 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); text-align: center; }

/* ── Admin ─────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; padding-top: 60px; }
.admin-header { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: var(--bg); border-bottom: 1px solid #1c1c1c; display: flex; align-items: center; padding: 0 24px; gap: 16px; z-index: 100; }
.admin-logo { font-size: 18px; font-weight: 700; color: var(--yellow); }
.admin-sidebar { width: 200px; flex-shrink: 0; background: var(--bg); border-right: 1px solid #1c1c1c; position: fixed; top: 60px; bottom: 0; overflow-y: auto; padding: 12px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; color: var(--muted); font-size: 13px; margin-bottom: 2px; transition: all .2s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,228,0,.08); color: var(--yellow); }
.admin-main { flex: 1; margin-left: 200px; padding: 24px; }
.admin-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 20px; }
.card { background: #1a1a1a; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: #1a1a1a; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.stat-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: #fff; }

/* Admin table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 14px; text-align: left; font-size: 11px; color: var(--muted); background: #1a1a1a; border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px 14px; border-bottom: 1px solid #1c1c1c; font-size: 13px; vertical-align: middle; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 12px; font-weight: 600; transition: opacity .2s; }
.btn:hover { opacity: .85; }
.btn-primary { background: var(--yellow); color: #111; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* Admin form */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px; background: #111; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); outline: none; font-size: 13px;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--yellow); }
.form-textarea { resize: vertical; min-height: 100px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { display: none; }
.toggle-slider { position: absolute; inset: 0; background: #333; border-radius: 12px; cursor: pointer; transition: .3s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; left: 3px; top: 3px; transition: .3s; }
.toggle input:checked + .toggle-slider { background: var(--yellow); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.alert-success { background: rgba(46,204,113,.15); border: 1px solid rgba(46,204,113,.3); color: #2ecc71; }
.alert-error { background: rgba(231,76,60,.15); border: 1px solid rgba(231,76,60,.3); color: #e74c3c; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.genre-item { background: #1a1a1a; border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.genre-name { font-size: 14px; color: #fff; font-weight: 500; }
.genre-count { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tmdb-import { background: rgba(255,228,0,.05); border: 1px solid rgba(255,228,0,.2); border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.tmdb-import h3 { font-size: 13px; color: var(--yellow); margin-bottom: 12px; }
.import-row { display: flex; gap: 8px; flex-wrap: wrap; }
.import-row .form-input { flex: 1; min-width: 140px; }

/* ═══════════════════════════════════════
   RESPONSIVE — Mobile First
═══════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
  .nav-menu    { display: none; }
  .nav-toggle  { display: flex; }
  .nav-mobile {
    display: none; position: fixed; inset: 0; top: 60px;
    background: #111; z-index: 999; overflow-y: auto; padding: 16px;
  }
  .nav-mobile.open { display: block; }
  .nav-mobile a {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: 8px; color: var(--text); font-size: 15px; margin-bottom: 4px;
    border: 1px solid transparent;
  }
  .nav-mobile a:hover, .nav-mobile a.active {
    background: rgba(255,228,0,.08); color: var(--yellow); border-color: rgba(255,228,0,.15);
  }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
  .nav-dropdown { display: none !important; }
}

/* Mobile */
@media (max-width: 600px) {
  .film-info-grid { grid-template-columns: 130px 1fr; gap: 14px; }
  .film-title { font-size: 16px; }
  .watch-btn { width: 100%; justify-content: center; }
  .server-bar { padding: 8px 10px; gap: 5px; }
  .server-btn { padding: 5px 10px; font-size: 10px; }
  .lights-btn { padding: 5px 10px; font-size: 10px; }
  .hero { padding: 36px 14px; }
  .hero h1 { font-size: 19px; }
  .hero-search { flex-direction: row; }
  .hero-search input { font-size: 13px; padding: 10px 12px; }
  .hero-search button { padding: 10px 16px; font-size: 13px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .seo-block { padding: 14px 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { gap: 12px; }
  .breadcrumb { font-size: 10px; }
  .season-tabs { gap: 4px; }
  .season-tab { padding: 5px 10px; font-size: 11px; }
  .episode-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
  .ep-btn { padding: 6px 2px; font-size: 10px; }
}

/* Small mobile */
@media (max-width: 400px) {
  .film-info-grid { grid-template-columns: 1fr; }
  .film-info-poster { display: none; }
  .nav-logo { font-size: 17px; }
  .film-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
  .hero-links a { font-size: 11px; padding: 5px 12px; }
}

/* ── 404 Error Page ──────────────────────────────────── */
.err404-wrap {
  padding: 48px 16px 32px;
}
.err404-code {
  font-size: 96px;
  font-weight: 800;
  color: var(--yellow, #ffe400);
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 12px;
  text-shadow: 0 0 60px rgba(255,228,0,.25);
}
.err404-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}
.err404-desc {
  font-size: 14px;
  color: #888;
  max-width: 440px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.err404-home-btn {
  display: inline-block;
  background: var(--yellow, #ffe400);
  color: #111;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity .2s;
}
.err404-home-btn:hover { opacity: .85; }
@media (max-width: 480px) {
  .err404-code { font-size: 72px; }
  .err404-title { font-size: 20px; }
}
