/* FilmyFly v4 — responsive visual system */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #eef3f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #edf2f8;
  --text: #162033;
  --muted: #64748b;
  --muted-2: #8b9ab0;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #dff7f2;
  --accent: #f97316;
  --accent-2: #ea580c;
  --header: #0b1324;
  --header-2: #15233d;
  --on-brand: #ffffff;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, .06);
  --shadow: 0 12px 35px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .15);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --content-width: 1180px;
  --focus: 0 0 0 3px rgba(20, 184, 166, .28);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09111f;
  --bg-soft: #0d1728;
  --surface: #111d30;
  --surface-2: #152339;
  --surface-3: #1b2b43;
  --text: #edf4ff;
  --muted: #a8b6ca;
  --muted-2: #7d8fa8;
  --line: #263851;
  --line-strong: #38506d;
  --brand: #2dd4bf;
  --brand-strong: #14b8a6;
  --brand-soft: rgba(45, 212, 191, .15);
  --accent: #fb923c;
  --accent-2: #f97316;
  --header: #050b16;
  --header-2: #0d1b31;
  --on-brand: #06131c;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .2);
  --shadow: 0 14px 38px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 65px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 4% -10%, rgba(45, 212, 191, .12), transparent 30rem),
    radial-gradient(circle at 100% 12%, rgba(249, 115, 22, .08), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  transition: background-color .25s ease, color .25s ease;
}
body, button, input { font-family: inherit; }
h1, h2, h3, h4, h5, h6, p, a, button, input, label, span, strong, small { font-family: Arial, Helvetica, sans-serif; }
img { max-width: 100%; border: 0; vertical-align: middle; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { color: var(--accent-2); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: none; box-shadow: var(--focus); }
button, input { font-size: inherit; }
button { cursor: pointer; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  transform: translateY(-160%);
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.site-shell {
  width: 100%;
  max-width: var(--content-width);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}

/* Header */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: color-mix(in srgb, var(--header) 94%, transparent);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 8px 25px rgba(2, 8, 23, .15);
  backdrop-filter: blur(18px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 6px clamp(16px, 3vw, 34px);
}
.brand {
  display: inline-flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 1px;
  min-width: 0;
  color: #fff;
  line-height: 1;
}
.brand:hover { color: #fff; }
.brand-logo-wrap { display: inline-flex; align-items: center; min-height: 34px; }
.brand-logo { display: block; width: clamp(142px, 17vw, 184px); height: auto; max-height: 42px; object-fit: contain; }
.brand-fallback { display: block; color: #fff; font-size: 27px; font-weight: 850; letter-spacing: -.07em; }
.brand-fallback span { color: #39e27d; }
.brand-tagline { color: #9fb0c8; font-size: 8px; font-weight: 800; letter-spacing: .22em; }
.brand-tagline i { color: var(--accent); font-style: normal; padding: 0 2px; }
.primary-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  color: #b8c6da;
  font-size: 13px;
  font-weight: 650;
  transition: background .2s ease, color .2s ease;
}
.nav-link:hover, .nav-link-active { background: rgba(255, 255, 255, .10); color: #fff; }
.nav-link-active { color: #71f2d5; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  color: #e5edf8;
  font-size: 12px;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.search-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; min-height: 38px; border: 1px solid rgba(148, 163, 184, .28); border-radius: 10px; background: rgba(255, 255, 255, .07); color: #e5edf8; font-size: 21px; line-height: 1; text-decoration: none; }
.search-toggle:hover { border-color: rgba(113, 242, 213, .55); background: rgba(113, 242, 213, .13); color: #fff; }
.theme-toggle { padding: 0 11px; }
.theme-toggle:hover, .menu-toggle:hover { border-color: rgba(113, 242, 213, .55); background: rgba(113, 242, 213, .13); transform: translateY(-1px); }
.theme-icon { color: #ffd166; font-size: 17px; line-height: 1; }
.menu-toggle { display: none; width: 38px; padding: 0; font-size: 19px; }
.mobile-nav { display: none; }

.header-search {
  max-height: 0;
  overflow: hidden;
  background: #0e0d13;
  border-bottom: 1px solid transparent;
  padding: 0 14px;
  transition: max-height .25s ease, padding .25s ease, border-color .2s ease;
}
.header-search.is-open {
  max-height: 140px;
  padding: 18px 14px;
  border-bottom-color: #211d29;
}
.header-search::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 1px;
  background: #211d29;
  box-shadow:
    0 9px 0 rgba(107, 42, 88, 0.10),
    0 20px 0 rgba(107, 42, 88, 0.05);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.header-search.is-open::after {
  opacity: 1;
}

/* Premium navigation/search controls */
.premium-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.premium-search-btn,
.premium-menu-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.premium-search-btn:hover,
.premium-menu-btn:hover {
  background: rgba(168, 85, 247, .2);
  border-color: #a855f7;
}
.premium-menu-btn { display: none; }

.header-search.premium-search-panel {
  display: none;
  max-height: none;
  overflow: visible;
  padding: 16px 20px 20px;
  background: rgba(15, 15, 23, .98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-search.premium-search-panel.is-open { display: block; }
.header-search.premium-search-panel::after { display: none; }
.premium-search-panel .premium-search-form {
  display: block;
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.premium-search-panel .premium-search-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 58px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 60px;
  padding: 4px 4px 4px 20px;
  transition: all .2s ease;
}
.premium-search-panel .premium-search-wrapper:focus-within {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, .2);
}
.premium-search-panel .premium-search-wrapper .search-icon {
  position: relative;
  left: auto;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  transform: none;
  display: block;
}
.premium-search-panel .premium-search-wrapper .search-icon::before {
  width: 9px;
  height: 9px;
  border: 2px solid #6b7280;
}
.premium-search-panel .premium-search-wrapper .search-icon::after {
  width: 6px;
  height: 2px;
  background: #6b7280;
  left: 9px;
  top: 11px;
}
.premium-search-panel .premium-search-wrapper input,
.premium-search-panel .premium-search-wrapper input[type="search"] {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.premium-search-panel .premium-search-wrapper input::placeholder { color: #6b7280; }
.premium-search-panel .premium-search-wrapper .search-submit {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: 0;
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  flex: 0 0 84px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 60px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.premium-search-panel .premium-search-wrapper .search-submit:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}
@media (max-width: 760px) {
  .premium-menu-btn { display: inline-flex; }
  .premium-search-panel { padding: 16px 12px 20px; }
}

/* Search hero */
.search-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(360px, 1.45fr);
  align-items: center;
  gap: 24px;
  width: auto;
  max-width: calc(100% - clamp(28px, 6vw, 68px));
  margin: 20px clamp(14px, 3vw, 34px) 0;
  padding: clamp(24px, 4vw, 39px);
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #0b172a 0%, #102d43 48%, #123d45 100%);
  box-shadow: var(--shadow-lg);
}
.search-panel::before, .search-panel::after { position: absolute; content: ""; pointer-events: none; border-radius: 50%; }
.search-panel::before { width: 330px; height: 330px; top: -220px; right: -80px; background: rgba(45, 212, 191, .18); filter: blur(4px); }
.search-panel::after { width: 250px; height: 250px; bottom: -190px; left: 25%; background: rgba(249, 115, 22, .14); }
.search-copy, .search-form, .search-chips { position: relative; z-index: 1; }
.search-panel > *, .search-form, .search-input-wrap { min-width: 0; }
.search-copy .eyebrow { display: block; margin-bottom: 8px; color: #73ebd1; font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.search-copy h1 { color: #fff; font-size: clamp(24px, 3.1vw, 38px); letter-spacing: -.035em; }
.search-copy p { max-width: 340px; margin-top: 9px; color: #b4c9d7; font-size: 14px; }
.search-form { display: flex; align-items: stretch; gap: 9px; }
.search-input-wrap { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.search-icon { position: absolute; left: 15px; color: #69849c; font-size: 27px; line-height: 1; transform: translateY(-2px); pointer-events: none; }
.search-form input[type="search"], .search-form input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 0 15px 0 46px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, .97);
  color: #172033;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
}
.search-form input::placeholder { color: #8695a8; }
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 108px;
  min-height: 52px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(234, 88, 12, .30);
  transition: transform .2s ease, box-shadow .2s ease;
}
.search-submit:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 25px rgba(234, 88, 12, .4); }
.search-chips { grid-column: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; margin-top: -8px; overflow: hidden; color: #94adc1; font-size: 11px; }
.search-chips a { padding: 4px 9px; border: 1px solid rgba(148, 207, 205, .25); border-radius: 100px; color: #cae7e7; background: rgba(255, 255, 255, .06); }
.search-chips a:hover { color: #fff; border-color: #73ebd1; background: rgba(115, 235, 209, .14); }

.content-area { padding: 0 clamp(14px, 3vw, 34px) 46px; }
.site-header + .content-area { padding-top: 0; }
.content-area > .seo-header:first-child { margin-top: 0; }
.content-area > .content-section:first-child .section-heading { margin-top: 0; }
.content-area > h1:first-child { margin-bottom: 19px; }
.content-area > h1, .content-area > h2, .content-area > h3 {
  color: var(--text);
}
.content-area > h1:not(.page-title) {
  padding: 0;
  border: 0;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -.035em;
  text-align: left;
}
.content-area > h2, .content-area > div > h2, .content-area > center > h2 {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: clamp(19px, 2.4vw, 25px);
  letter-spacing: -.025em;
  text-align: left;
}
.content-area > h3 { font-size: 18px; }
.page-title { color: var(--text); font-size: clamp(22px, 3vw, 32px); letter-spacing: -.035em; }

.eyebrow { display: block; color: var(--brand-strong); font-size: 10px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.section-count { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 750; }
.seo-note { margin-top: 5px; color: var(--muted-2); font-size: 12px; }

/* Section labels and content blocks */
.section-heading, .content-area .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 14px;
}
.section-heading h2 { color: var(--text); font-size: clamp(20px, 2.5vw, 27px); }
.section-heading p { color: var(--muted); font-size: 12px; }
.section-heading .heading-accent { color: var(--accent); }
.section-heading .section-link { color: var(--brand-strong); font-size: 12px; font-weight: 750; white-space: nowrap; }
.category-section-heading { justify-content: center; text-align: center; }
.category-section-heading > div { width: 100%; }
.category-section-heading h2 { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.category-heading-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}
.category-heading-icon::before {
  position: absolute;
  left: 4px;
  top: 5px;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
}
.category-heading-icon::after {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 10px;
  height: 2px;
  content: "";
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
}
.screenshot-heading { justify-content: center; text-align: center; }
.screenshot-heading > div { width: 100%; }
.screenshot-heading h2 { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.screenshot-heading h2::before, .screenshot-heading h2::after { content: ""; width: 17px; height: 13px; border: 2px solid var(--brand-strong); border-radius: 4px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 24%, transparent); }
.seo-header, .seo-footer {
  margin: 0 0 24px;
  padding: clamp(17px, 3vw, 25px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.seo-header { margin-bottom: 18px; padding: 10px clamp(14px, 2.2vw, 22px) 12px; }
.seo-header h1, .seo-header h2, .seo-footer h2, .seo-footer h3 { border: 0; background: transparent; color: var(--text); text-align: left; }
.seo-header h1 { margin-bottom: 9px; font-size: clamp(20px, 2.8vw, 29px) !important; }
.seo-header h2, .seo-footer h3 { margin: 19px 0 6px; font-size: 15px; }
.seo-header h2 { margin: 0 0 5px; }
.seo-header p { padding: 2px 0; line-height: 1.55; }
.seo-header .seo-note { margin-top: 2px; }
.seo-footer p { padding: 4px 0; line-height: 1.7; }

/* Movie cards */
.movie-list, .latest-grid, .trending-grid {
  display: grid;
  /* Fit as many useful poster cards as the desktop width allows (normally 5–6). */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.trending-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-behavior: smooth;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.trending-grid::-webkit-scrollbar { height: 6px; }
.trending-grid::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, var(--brand) 42%, transparent); }
.trending-grid .movie-card { flex: 0 0 calc((100% - 70px) / 6); min-width: 150px; scroll-snap-align: start; scroll-snap-stop: normal; backface-visibility: hidden; transform: translateZ(0); contain: layout paint; }
.trending-grid .movie-card-body { display: none; }
.trending-grid .movie-card-media { aspect-ratio: 3 / 4; }
.movie-row, .A10 {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.movie-row:hover, .A10:hover { border-color: var(--brand); border-color: color-mix(in srgb, var(--card-accent, var(--brand)) 44%, var(--line)); box-shadow: var(--shadow); transform: translateY(-3px); }
.movie-card { display: flex; flex-direction: column; overflow: hidden; }
.movie-card-media {
  position: relative;
  display: block;
  width: 100%;
  /* Posters are portrait artwork; matching their ratio prevents face/title cropping. */
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
}
.poster-fallback { position: absolute; z-index: 0; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, color-mix(in srgb, var(--card-accent, var(--brand)) 78%, #10243a), #0b1728); color: rgba(255, 255, 255, .86); font-size: clamp(38px, 6vw, 70px); font-weight: 900; letter-spacing: 0; }
.movie-card-poster, .movie-card-media .row-thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  background: var(--surface-3);
  color: transparent;
  transition: opacity .2s ease, transform .35s ease, filter .35s ease;
}
.movie-card-poster.is-loading:not(.is-loaded), .movie-card-poster.is-failed { opacity: 0; }
.movie-card-poster.is-loaded { opacity: 1; }
.movie-card-media::after { position: absolute; inset: auto 0 0; height: 52%; content: ""; background: linear-gradient(transparent, rgba(3, 9, 20, .66)); pointer-events: none; }
.movie-card-hover {
  position: absolute;
  z-index: 1;
  right: 11px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 7px;
  background: rgba(5, 12, 25, .55);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.movie-card-hover span { font-size: 14px; line-height: .8; }
.movie-card:hover .movie-card-poster { filter: saturate(1.12); transform: scale(1.055); }
.movie-card:hover .movie-card-hover { opacity: 1; transform: translateY(0); }
.movie-card-body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: 13px 14px 12px; }
.movie-card-kicker { display: flex; align-items: center; min-width: 0; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
.movie-card-kicker > span:first-child { min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.movie-card-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--card-accent, var(--brand)); box-shadow: 0 0 0 3px rgba(20, 184, 166, .16); box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-accent, var(--brand)) 17%, transparent); }
.movie-card-year { margin-left: auto; color: var(--muted-2); font-size: 10px; }
.movie-card-title { min-height: 0; margin: 8px 0 9px; font-size: 15px; font-weight: 780; line-height: 1.28; letter-spacing: -.012em; }
.movie-card-title a { display: block; overflow-wrap: anywhere; color: var(--text); }
.movie-card-title a:hover { color: var(--brand-strong); }
.movie-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 23px; color: var(--muted); font-size: 11px; }
.movie-card-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movie-quality { padding: 3px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-strong); font-size: 10px; font-weight: 800; }
.movie-card-actions { display: none !important; }
.movie-card-link { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-strong); font-size: 11px; font-weight: 800; }
.movie-card-link span { font-size: 16px; line-height: .8; transition: transform .2s ease; }
.movie-card-link:hover span { transform: translateX(3px); }
/* Legacy wrappers remain valid for pages that have not been wrapped yet. */
.A10 { overflow: hidden; }
.A10 table { display: none; }
.row-title { color: inherit; }
.row-badge { display: inline-flex; }

/* Category and pagination */
#categories { scroll-margin-top: 76px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.cat, .foldername {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px 35px 12px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.cat::after, .foldername::after { position: absolute; right: 13px; content: "→"; color: var(--brand); font-size: 18px; }
.cat:hover, .foldername:hover { border-color: var(--brand); color: var(--brand-strong); transform: translateY(-2px); }
.page { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 26px 0 8px; padding: 0; }
.page a, .page span, .page input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  text-shadow: none;
}
.page a:hover, .page span, .page input[type="submit"]:hover { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }

/* Detail/download experience */
.movie-hero {
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: center;
  margin: 0 0 24px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}
.movie-hero-poster { position: relative; overflow: hidden; border-radius: 15px; background: var(--surface-3); box-shadow: var(--shadow-lg); }
.movie-hero-poster::after { position: absolute; inset: 0; content: ""; border: 1px solid rgba(255, 255, 255, .17); border-radius: inherit; pointer-events: none; }
.movie-hero-poster .movie-cover { display: block; width: 100%; height: auto; max-width: none; aspect-ratio: 14 / 19; object-fit: cover; }
.movie-hero-poster::before { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; content: "FF"; background: linear-gradient(145deg, var(--brand-strong), var(--header)); color: rgba(255, 255, 255, .78); font-size: 44px; font-weight: 900; letter-spacing: -.08em; }
.movie-hero-poster .movie-cover { position: relative; z-index: 1; }
.movie-hero-copy .eyebrow { display: inline-flex; margin-bottom: 8px; color: var(--brand-strong); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.movie-hero-copy h1 { max-width: 760px; color: var(--text); font-size: clamp(23px, 4vw, 40px); letter-spacing: -.04em; }
.movie-hero-copy .lead { max-width: 700px; margin-top: 12px; color: var(--muted); line-height: 1.7; }
.movie-hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.movie-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.movie-pill strong { color: var(--text); }
.movie-info { display: grid; grid-template-columns: 1fr; gap: 9px; margin: 0 0 23px; }
.fname { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.5; }
.fname strong { display: inline; margin: 0; color: var(--muted-2); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.fname > span { display: inline; overflow-wrap: anywhere; color: var(--text); font-weight: 650; }
.fname.desc > strong { display: block; margin-bottom: 3px; }
.fname.desc > span { display: block; }
.file-info-title, .content-area .file-info-title { margin: 24px 0 12px; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 20px; text-align: left; }
.dlbtn { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0 28px; text-align: center; }
.dlbtn a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: auto;
  min-width: min(100%, 360px);
  min-height: 56px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 12px 25px color-mix(in srgb, var(--brand) 25%, transparent);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dlbtn a::before { content: "↓"; font-size: 22px; line-height: 1; }
.dlbtn a:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px color-mix(in srgb, var(--brand) 35%, transparent); }
.bg1, .bg2, .bg3, .bg4, .bg5 { background: linear-gradient(135deg, var(--brand-strong), var(--brand)) !important; }
.download-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 390px); align-items: center; gap: 20px; margin: 20px 0 28px; padding: 20px 22px; border: 1px solid var(--line); border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); border-radius: var(--radius); background: var(--surface-2); background: linear-gradient(120deg, color-mix(in srgb, var(--brand-soft) 70%, var(--surface)), var(--surface)); }
.download-panel h2 { margin-top: 3px; color: var(--text); font-size: clamp(19px, 2.5vw, 25px); }
.download-panel p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.download-panel .dlbtn { margin: 0; }
.download-panel .dlbtn a { min-width: 100%; }
.related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.showimage { overflow: hidden; margin: 0 0 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; box-shadow: var(--shadow-sm); }
.ss img, .showimage img, .article img { display: block; width: 100%; max-width: none; height: auto; aspect-ratio: auto; object-fit: contain; }
.brcrmb { margin-top: 25px; padding: 12px 15px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.brcrmb a { font-weight: 700; }
.Atag { margin-top: 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.7; }
.Atag font { color: var(--brand-strong) !important; }
.description, .filedescription { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); text-align: center; }

/* Informational/legal pages use small page-local class names in the legacy templates. */
.info-page, .about-page, .contact-page, .legal-page { padding: 0; color: var(--muted); line-height: 1.7; }
.info-page h2, .info-page h3, .about-page h2, .about-page h3, .contact-page h2, .contact-page h3, .legal-page h2, .legal-page h3 { margin: 0 0 14px; color: var(--text); text-align: left; }
.info-box, .about-section, .contact-card, .legal-section { margin: 0 0 9px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); }
.info-box b, .about-section b, .contact-card b, .legal-section b { color: var(--brand-strong); }
.contact-note, .legal-note, .mini-note { margin: 0 0 12px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); }
.step-list { margin: 0 0 20px; padding: 0; list-style: none; }
.step-list li { margin: 0 0 7px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.quality-table { width: 100%; margin: 0 0 15px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.quality-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.quality-table tr:last-child td { border-bottom: 0; }
.quality-table td:first-child { width: 110px; color: var(--brand-strong); font-weight: 800; }
.dmca-list { color: var(--muted); }
.guide-video { display: block; width: 100%; max-width: 720px; height: auto; margin: 14px auto 22px; border: 1px solid var(--line); border-radius: 13px; background: #000; box-shadow: var(--shadow); }
html[data-theme="dark"] .info-box, html[data-theme="dark"] .about-section, html[data-theme="dark"] .contact-card, html[data-theme="dark"] .legal-section { border-color: var(--line) !important; background: var(--surface) !important; color: var(--muted) !important; }
html[data-theme="dark"] .contact-note, html[data-theme="dark"] .legal-note, html[data-theme="dark"] .mini-note { border-color: var(--line) !important; background: var(--surface-2) !important; color: var(--muted) !important; }
html[data-theme="dark"] .quality-table { border-color: var(--line) !important; background: var(--surface) !important; }
html[data-theme="dark"] .quality-table td { border-color: var(--line) !important; color: var(--muted) !important; }

/* Empty/error states */
.search-empty-state, .error-404-page, .link-broken-page { margin: 0; padding: 32px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; box-shadow: var(--shadow-sm); }
.search-empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 28px; font-weight: 850; line-height: 48px; }
.search-empty-state h2, .error-404-page h1, .link-broken-page > h2 { border: 0; background: transparent; color: var(--text); }
.search-empty-state p, .error-404-page p { max-width: 620px; margin: 10px auto 17px; color: var(--muted); line-height: 1.65; }
.search-empty-form { display: flex; justify-content: center; gap: 7px; width: 100%; max-width: 560px; margin: 0 auto; }
.search-empty-form input[type="text"] { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); }
.search-empty-form input[type="submit"], .search-empty-google, .error-404-button, .link-broken-home { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.search-empty-form input[type="submit"]:hover, .search-empty-google:hover, .error-404-button:hover, .link-broken-home:hover { color: var(--on-brand); background: var(--brand-strong); text-decoration: none; }
.error-404-code { color: var(--brand); font-size: 64px; font-weight: 900; }
.error-404-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.error-404-button-alt { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.error-404-button-alt:hover { color: var(--text); background: var(--surface-2); }
.link-broken-mark { margin-bottom: 10px; font-size: 46px; }
.link-broken-card { max-width: 760px; margin: 14px auto; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); text-align: left; }
.link-broken-card h3 { margin: -16px -16px 10px; padding: 10px 13px; border-radius: 11px 11px 0 0; background: var(--surface-3); color: var(--text); text-transform: none; }
.link-broken-card p { padding: 4px 0; color: var(--muted); }

/* Footer */
.site-footer { margin-top: 18px; padding: 36px clamp(16px, 3vw, 34px) 18px; background: var(--header); color: #aebdd0; }
.footer-main { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; max-width: 1000px; margin: 0 auto; }
.footer-brand-link { margin-bottom: 11px; }
.footer-brand p { max-width: 300px; margin-bottom: 16px; color: #93a6bd; font-size: 12px; line-height: 1.7; }
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-column h2 { margin: 0 0 4px; color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.footer-column a { color: #9fb1c8; font-size: 12px; }
.footer-column a:hover { color: #72efd5; }
.telegram-join { display: inline-flex; align-items: center; gap: 7px; min-height: 37px; padding: 0 13px; border-radius: 9px; background: #229ed9; color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 7px 15px rgba(34, 158, 217, .24); }
.telegram-join:hover { color: #fff; background: #168bc3; }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; max-width: 1000px; margin: 30px auto 0; padding-top: 15px; border-top: 1px solid rgba(148, 163, 184, .2); color: #7e92ab; font-size: 11px; }
.footer-bottom span span { color: var(--accent); }
.footer-spacer { display: none; }

@keyframes trending-card-nudge {
  0%, 100% { transform: translateZ(0); }
  45% { transform: translate3d(-8px, 0, 0); }
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .movie-list, .latest-grid, .trending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .header-inner { position: relative; min-height: 52px; gap: 10px; max-width: 100%; padding-top: 5px; padding-bottom: 5px; }
  .primary-nav { display: none; }
  .header-actions { position: absolute; top: 50%; right: 16px; margin-left: auto; transform: translateY(-50%); }
  .menu-toggle { display: inline-flex; }
  .mobile-nav { display: flex; flex-direction: column; gap: 3px; padding: 0 16px 13px; }
  .mobile-nav a { padding: 11px 12px; border-radius: 8px; color: #c3d0e0; font-size: 13px; font-weight: 700; }
  .mobile-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .search-panel { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-top: 14px; max-width: calc(100% - 28px); }
  .search-chips { grid-column: auto; margin-top: -4px; }
  .content-area { padding-top: 0; }
  .movie-hero { grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); gap: 20px; }
  .footer-main { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-column:last-child { grid-column: 2 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .theme-label { display: none; }
  .theme-toggle { width: 38px; padding: 0; }
  .search-panel { width: calc(100% - 20px); max-width: calc(100% - 20px); margin-right: 10px; margin-left: 10px; padding: 22px 17px; border-radius: 18px; }
  .search-panel .search-form { flex-direction: column; }
  .search-panel .search-submit { width: 100%; }
  .movie-list, .latest-grid, .trending-grid { grid-template-columns: 1fr; gap: 11px; }
  .trending-grid { display: flex; gap: 11px; padding: 2px 12px 10px 0; scroll-snap-type: none; scrollbar-width: none; touch-action: pan-x pan-y; }
  .trending-grid::-webkit-scrollbar { display: none; }
.trending-grid .movie-card { flex: 0 0 clamp(108px, 31vw, 126px); min-width: 108px; display: block; scroll-snap-align: none; }
.trending-grid .movie-card:first-child { animation: trending-card-nudge 1.15s ease .35s 1 both; }
  .trending-grid .movie-card-pc-only { display: none; }
  .trending-grid .movie-card-body { display: none; }
  .trending-grid .movie-card-media { aspect-ratio: 3 / 4; min-height: 0; height: auto; }
  .trending-grid .movie-card-poster, .trending-grid .movie-card-media .row-thumb { transition: opacity .18s ease; }
  .trending-grid .movie-card:hover .movie-card-poster { filter: none; transform: none; }
  .trending-grid .movie-row:hover { transform: translateZ(0); box-shadow: var(--shadow-sm); }
  .trending-grid .movie-card-hover { display: none; }
  .movie-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 144px; }
  .movie-card-media { aspect-ratio: auto; height: 100%; min-height: 144px; }
  .movie-card-body { padding: 11px 12px 9px; }
  .movie-card-title { min-height: 0; margin: 6px 0 6px; font-size: 14px; }
  .movie-card-meta { min-height: 19px; }
  .movie-card-actions { margin-top: auto; padding-top: 7px; }
  .movie-card-hover { display: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat, .foldername { min-height: 52px; padding: 10px 29px 10px 11px; font-size: 12px; }
  .movie-hero { grid-template-columns: 106px minmax(0, 1fr); gap: 15px; padding: 14px; border-radius: 17px; }
  .movie-hero-copy h1 { font-size: 20px; }
  .movie-hero-copy .lead { display: none; }
  .movie-hero-meta { gap: 5px; margin-top: 10px; }
  .movie-pill { min-height: 24px; padding: 0 7px; font-size: 10px; }
  .movie-info { grid-template-columns: 1fr; gap: 7px; }
  .download-panel { grid-template-columns: 1fr; gap: 13px; padding: 16px; }
  .download-panel-copy { text-align: center; }
  .download-panel .dlbtn { margin-top: 1px; }
  .fname { padding: 10px 12px; }
  .dlbtn a { width: 100%; min-width: 0; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 17px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-column:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; margin-top: 24px; }
  .search-empty-form { flex-direction: column; }
  .search-empty-form input[type="submit"] { width: 100%; }
}
@media (max-width: 350px) {
  .brand-logo { width: 130px; }
  .movie-card { grid-template-columns: 94px minmax(0, 1fr); }
  .movie-card-media { min-height: 130px; }
  .movie-card-body { padding-right: 9px; padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
