/* Aurora Cinema — 自研主题 */

:root {
  --fm-bg: #080c14;
  --fm-bg-2: #0d1220;
  --fm-surface: #141c2e;
  --fm-surface-2: #1c2640;
  --fm-border: rgba(148, 163, 184, 0.12);
  --fm-border-strong: rgba(148, 163, 184, 0.22);
  --fm-text: #eef2f8;
  --fm-muted: #94a3b8;
  --fm-faint: #64748b;
  --fm-accent: #22d3ee;
  --fm-accent-dim: rgba(34, 211, 238, 0.14);
  --fm-warm: #f59e0b;
  --fm-warm-dim: rgba(245, 158, 11, 0.15);
  --fm-radius: 14px;
  --fm-radius-sm: 10px;
  --fm-container: 1200px;
  --fm-header-h: 64px;
  --fm-font: "Noto Sans SC", ui-sans-serif, system-ui, "Microsoft YaHei", sans-serif;
  --fm-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.fm-body {
  margin: 0;
  font-family: var(--fm-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fm-text);
  background: var(--fm-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 158, 11, 0.05), transparent);
  overflow-x: hidden;
}

body.fm-body.menu-open { overflow: hidden; }

#root { min-height: 100vh; display: flex; flex-direction: column; }

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }

.fm-container {
  width: min(100% - 32px, var(--fm-container));
  margin-inline: auto;
}

.fm-main { flex: 1; }

/* Header */
.fm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid var(--fm-border);
  padding-top: env(safe-area-inset-top, 0);
}

.fm-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--fm-accent) 35%, var(--fm-warm) 65%, transparent 95%);
  opacity: 0.5;
  pointer-events: none;
}

.fm-header__shell {
  position: relative;
  height: var(--fm-header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.fm-header__brand {
  flex-shrink: 0;
}

.fm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.fm-brand__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--fm-accent), #0891b2);
  display: grid;
  place-items: center;
  color: #042f2e;
  font-size: 0.82rem;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.22);
}

.fm-brand__accent { color: var(--fm-accent); }

.fm-header__nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.fm-header__nav::-webkit-scrollbar { display: none; }

.fm-header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.fm-search {
  width: min(240px, 28vw);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 0 0 12px;
  height: 38px;
  border-radius: var(--fm-radius-sm);
  background: rgba(20, 28, 46, 0.72);
  border: 1px solid var(--fm-border);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.fm-search:focus-within {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 3px var(--fm-accent-dim);
  background: rgba(20, 28, 46, 0.95);
}

.fm-search--drawer {
  width: 100%;
  margin-top: 4px;
  gap: 8px;
  padding-left: 12px;
  color: var(--fm-faint);
}

.fm-search--drawer:focus-within { color: var(--fm-accent); }

.fm-search--drawer > svg:first-child {
  flex-shrink: 0;
  opacity: 0.55;
}

.fm-search--drawer:focus-within > svg:first-child { opacity: 1; }

.fm-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--fm-text);
  outline: none;
  font-size: 0.86rem;
}

.fm-search input::placeholder { color: var(--fm-faint); }

.fm-search__btn {
  width: 38px;
  height: 38px;
  margin: -1px -1px -1px 0;
  padding: 0;
  border: none;
  border-radius: 0 var(--fm-radius-sm) var(--fm-radius-sm) 0;
  background: rgba(34, 211, 238, 0.12);
  color: var(--fm-accent);
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}

.fm-search__btn:hover {
  background: rgba(34, 211, 238, 0.22);
  color: #67e8f9;
}

.fm-search__btn--text {
  width: auto;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.85rem;
}

.fm-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: rgba(20, 28, 46, 0.72);
  color: var(--fm-text);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.fm-menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.fm-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fm-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.fm-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.fm-nav__link {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fm-muted);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.fm-nav__icon {
  display: flex;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.fm-nav__link:hover {
  color: var(--fm-text);
  background: rgba(20, 28, 46, 0.55);
}

.fm-nav__link:hover .fm-nav__icon { opacity: 0.95; }

.fm-nav__link.is-active {
  color: var(--fm-text);
  font-weight: 600;
  background: transparent;
}

.fm-nav__link.is-active .fm-nav__icon {
  opacity: 1;
  color: var(--fm-accent);
}

.fm-nav__link.is-active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--fm-accent), #67e8f9);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
}

.fm-drawer {
  display: none;
  position: fixed;
  inset: calc(var(--fm-header-h) + env(safe-area-inset-top, 0)) 0 0;
  z-index: 99;
  padding: 18px 16px calc(28px + env(safe-area-inset-bottom, 0));
  background: rgba(8, 12, 20, 0.98);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  flex-direction: column;
  gap: 4px;
}

body.menu-open .fm-drawer { display: flex; }

.fm-drawer__label {
  margin: 14px 0 6px;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fm-faint);
}

.fm-drawer__label:first-child { margin-top: 0; }

.fm-drawer .fm-nav__link {
  padding: 13px 14px;
  font-size: 0.96rem;
  border-radius: var(--fm-radius-sm);
  border: 1px solid transparent;
}

.fm-drawer .fm-nav__link::after { display: none; }

.fm-drawer .fm-nav__link.is-active {
  color: var(--fm-text);
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.22);
  box-shadow: inset 3px 0 0 var(--fm-accent);
}

/* Layout */
.fm-page { padding: 28px 0 48px; }

.fm-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
}

.fm-sidebar {
  position: sticky;
  top: calc(var(--fm-header-h) + 20px);
  padding: 18px;
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
}

.fm-sidebar h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fm-faint);
}

.fm-side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fm-side-nav button,
.fm-side-nav a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: var(--fm-radius-sm);
  background: transparent;
  color: var(--fm-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.fm-side-nav button:hover,
.fm-side-nav a:hover { background: var(--fm-surface-2); color: var(--fm-text); }

.fm-side-nav button.is-active,
.fm-side-nav a.is-active {
  background: var(--fm-accent-dim);
  color: var(--fm-accent);
  font-weight: 600;
}

/* Hero */
.fm-hero {
  margin-bottom: 28px;
  padding: 28px 32px;
  border-radius: var(--fm-radius);
  background: linear-gradient(120deg, var(--fm-surface) 0%, var(--fm-surface-2) 55%, rgba(34, 211, 238, 0.08) 100%);
  border: 1px solid var(--fm-border);
  position: relative;
  overflow: hidden;
}

.fm-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 70%);
  pointer-events: none;
}

.fm-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  position: relative;
}

.fm-hero p {
  margin: 0 0 16px;
  color: var(--fm-muted);
  max-width: 520px;
  position: relative;
}

.fm-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

.fm-hero__tag {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--fm-warm-dim);
  color: var(--fm-warm);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Section */
.fm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.fm-section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.fm-section-head span {
  font-size: 0.85rem;
  color: var(--fm-faint);
}

/* Chips (mobile) */
.fm-chips {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.fm-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--fm-border);
  background: var(--fm-surface);
  color: var(--fm-muted);
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s;
}

.fm-chip:hover { border-color: var(--fm-border-strong); color: var(--fm-text); }
.fm-chip.is-active { background: var(--fm-accent); border-color: transparent; color: #042f2e; font-weight: 600; }

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

.fm-card {
  border: none;
  padding: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  display: block;
  width: 100%;
}

.fm-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--fm-radius-sm);
  overflow: hidden;
  background: var(--fm-surface-2);
  margin-bottom: 10px;
}

.fm-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.fm-card:hover .fm-card__poster img { transform: scale(1.04); }

.fm-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(8, 12, 20, 0.75);
  color: var(--fm-accent);
  backdrop-filter: blur(4px);
}

.fm-card__dur {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
}

.fm-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 20, 0.5);
  opacity: 0;
  transition: opacity 0.25s;
}

.fm-card:hover .fm-card__play { opacity: 1; }

@media (hover: none) {
  .fm-card__play,
  .fm-card-wide__play {
    opacity: 1;
  }

  .fm-card__play {
    background: rgba(8, 12, 20, 0.25);
  }
}

.fm-card__play span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fm-accent);
  color: #042f2e;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.fm-card__title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fm-card:hover .fm-card__title { color: var(--fm-accent); }

.fm-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--fm-faint);
}

.fm-card__score { color: var(--fm-warm); font-weight: 600; }

.fm-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--fm-muted);
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  border: 1px dashed var(--fm-border);
}

/* Pagination */
.fm-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.fm-pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--fm-radius-sm);
  border: 1px solid var(--fm-border);
  background: var(--fm-surface);
  color: var(--fm-muted);
  cursor: pointer;
  font-size: 0.88rem;
}

.fm-pagination button:hover:not(:disabled) { border-color: var(--fm-border-strong); color: var(--fm-text); }
.fm-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.fm-pagination button.is-active { background: var(--fm-accent); border-color: transparent; color: #042f2e; font-weight: 600; }
.fm-pagination .fm-gap { color: var(--fm-faint); padding: 0 4px; }

/* SEO block */
.fm-seo-block {
  margin-top: 40px;
  padding: 28px;
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
}

.fm-seo-block h2 { margin: 0 0 20px; font-size: 1.2rem; }
.fm-seo-block__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.fm-seo-block h3 { margin: 0 0 10px; font-size: 0.95rem; color: var(--fm-text); }
.fm-seo-block ul { margin: 0; padding-left: 1.2em; color: var(--fm-muted); font-size: 0.88rem; }
.fm-seo-block li { margin-bottom: 6px; }

/* Watch page */
.fm-watch {
  padding: 24px 0 48px;
}

.fm-player-wrap {
  border-radius: var(--fm-radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--fm-border);
  box-shadow: var(--fm-shadow);
  margin-bottom: 28px;
}

.fm-player-wrap video {
  width: 100%;
  max-height: 72vh;
  display: block;
  background: #000;
}

.fm-watch__grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.fm-detail {
  padding: 24px;
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
}

.fm-detail h1 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 800;
}

.fm-detail__lead {
  margin: 0 0 16px;
  color: var(--fm-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.fm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.fm-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--fm-surface-2);
  color: var(--fm-muted);
  border: 1px solid var(--fm-border);
}

.fm-pill--accent { background: var(--fm-accent-dim); color: var(--fm-accent); border-color: rgba(34, 211, 238, 0.3); }

.fm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--fm-faint);
  margin-bottom: 16px;
}

.fm-detail__body {
  margin: 0;
  color: var(--fm-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.fm-aside__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--fm-muted);
}

.fm-aside__list li { margin-bottom: 8px; }
.fm-aside__list li:last-child { margin-bottom: 0; }

.fm-watch__related { margin-top: 36px; }

.fm-breadcrumb a:hover { color: var(--fm-accent); }

.fm-aside {
  padding: 20px;
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  position: sticky;
  top: calc(var(--fm-header-h) + 20px);
}

.fm-aside h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
}

/* Footer */
.fm-footer {
  margin-top: auto;
  border-top: 1px solid var(--fm-border);
  background: var(--fm-bg-2);
  padding: 32px 0 calc(24px + env(safe-area-inset-bottom, 0));
}

.fm-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--fm-border);
}

.fm-footer__brand p {
  margin: 8px 0 0;
  max-width: 320px;
  font-size: 0.85rem;
  color: var(--fm-muted);
}

.fm-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.fm-footer__nav a {
  font-size: 0.85rem;
  color: var(--fm-muted);
  transition: color 0.2s;
}

.fm-footer__nav a:hover { color: var(--fm-accent); }

.fm-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}

.fm-footer__copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--fm-faint);
  text-align: center;
}

/* ABABSEO — 飞行动画标识 */
@keyframes ababseo-fly {
  0%, 100% { transform: translate(0, -50%) rotate(-8deg); }
  35% { transform: translate(-6px, calc(-50% - 5px)) rotate(-4deg); }
  70% { transform: translate(4px, calc(-50% + 3px)) rotate(-12deg); }
}

@keyframes ababseo-trail {
  0%, 100% { opacity: 0.35; transform: translateY(-50%) rotate(-10deg) scaleX(0.85); }
  50% { opacity: 1; transform: translateY(-50%) rotate(-10deg) scaleX(1); }
}

@keyframes ababseo-spark {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  45%, 55% { opacity: 1; transform: scale(1.15); }
}

@keyframes ababseo-shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.ababseo-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  user-select: none;
  pointer-events: none;
}

.ababseo-mark__scene {
  position: relative;
  width: 72px;
  height: 28px;
  flex-shrink: 0;
}

.ababseo-mark__plane {
  position: absolute;
  right: 0;
  top: 50%;
  z-index: 2;
  display: flex;
  color: var(--fm-accent);
  margin-top: -11px;
  animation: ababseo-fly 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.55)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.ababseo-mark__trail {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  transform: translateY(-50%) rotate(-10deg);
  animation: ababseo-trail 2.6s ease-in-out infinite;
}

.ababseo-mark__trail i {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.25), var(--fm-accent), #fff);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

.ababseo-mark__trail i:nth-child(1) { width: 28px; opacity: 0.95; }
.ababseo-mark__trail i:nth-child(2) { width: 20px; opacity: 0.75; }
.ababseo-mark__trail i:nth-child(3) { width: 14px; opacity: 0.55; }
.ababseo-mark__trail i:nth-child(4) { width: 9px; opacity: 0.38; }
.ababseo-mark__trail i:nth-child(5) { width: 5px; opacity: 0.22; }

.ababseo-mark__spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--fm-warm);
  box-shadow: 0 0 6px var(--fm-warm);
  animation: ababseo-spark 2.6s ease-in-out infinite;
}

.ababseo-mark__spark--1 { left: 10px; top: 3px; animation-delay: 0.35s; }
.ababseo-mark__spark--2 { left: 22px; bottom: 2px; animation-delay: 1.2s; }

.ababseo-mark__word {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  line-height: 1;
  background: linear-gradient(100deg, var(--fm-faint) 0%, var(--fm-accent) 25%, #fff 50%, var(--fm-warm) 75%, var(--fm-faint) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: ababseo-shimmer 4.5s ease-in-out infinite;
}

/* 404 */
.fm-notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}

.fm-notfound__code {
  font-size: clamp(3rem, 12vw, 4rem);
  font-weight: 800;
  color: var(--fm-accent);
  margin: 0 0 8px;
}

.fm-notfound__title {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
}

.fm-notfound__desc {
  color: var(--fm-muted);
  margin: 0 0 20px;
}

.fm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: var(--fm-accent);
  color: #042f2e;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

.fm-btn:hover { filter: brightness(1.08); }

.fm-btn--primary {
  margin-top: 0;
}

.fm-btn--ghost {
  background: transparent;
  color: var(--fm-text);
  border: 1px solid var(--fm-border-strong);
  margin-top: 0;
}

.fm-btn--ghost:hover {
  border-color: var(--fm-accent);
  color: var(--fm-accent);
  filter: none;
}

.fm-section-head__more {
  font-size: 0.85rem;
  color: var(--fm-accent);
  white-space: nowrap;
}

.fm-section-head__more:hover { text-decoration: underline; }

/* ===== Homepage ===== */
.fm-home { padding-bottom: 0; }
.fm-home .fm-page { padding-top: 0; }

.fm-home-hero {
  position: relative;
  min-height: clamp(340px, 52vh, 520px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 0;
}

.fm-home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.fm-home-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: blur(2px);
}

.fm-home-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 20, 0.95) 0%, rgba(8, 12, 20, 0.55) 48%, rgba(8, 12, 20, 0.2) 100%),
    linear-gradient(0deg, var(--fm-bg) 0%, transparent 45%);
}

.fm-home-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: end;
  padding: 48px 0 56px;
}

.fm-home-hero__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--fm-accent-dim);
  color: var(--fm-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.fm-home-hero__content h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 640px;
}

.fm-home-hero__content p {
  margin: 0 0 16px;
  color: var(--fm-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fm-home-hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.fm-home-hero__pills span {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--fm-border);
  color: var(--fm-muted);
}

.fm-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fm-home-hero__poster {
  display: none;
  border-radius: var(--fm-radius);
  overflow: hidden;
  box-shadow: var(--fm-shadow);
  border: 1px solid var(--fm-border-strong);
  aspect-ratio: 2 / 3;
}

.fm-home-hero__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-home-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.fm-home-hero__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

.fm-home-hero__dots button.is-active {
  width: 24px;
  background: var(--fm-accent);
}

.fm-home-stats {
  border-bottom: 1px solid var(--fm-border);
  background: var(--fm-bg-2);
}

.fm-home-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--fm-border);
}

.fm-home-stats__item {
  padding: 20px 16px;
  text-align: center;
  background: var(--fm-bg-2);
}

.fm-home-stats__item strong {
  display: block;
  font-size: 1.35rem;
  color: var(--fm-accent);
  margin-bottom: 4px;
}

.fm-home-stats__item span {
  font-size: 0.8rem;
  color: var(--fm-faint);
}

.fm-home-cats {
  padding: 36px 0 8px;
}

.fm-home-cats__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.fm-home-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.fm-home-cat:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.fm-home-cat__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--fm-accent-dim);
  color: var(--fm-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.fm-home-cat strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.fm-home-cat span {
  font-size: 0.78rem;
  color: var(--fm-faint);
}

.fm-rail {
  padding: 28px 0 8px;
}

.fm-rail__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--fm-surface-2) transparent;
}

.fm-rail__track::-webkit-scrollbar { height: 6px; }
.fm-rail__track::-webkit-scrollbar-thumb { background: var(--fm-surface-2); border-radius: 999px; }

.fm-card-wide {
  flex: 0 0 300px;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: var(--fm-radius);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.fm-card-wide:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
}

.fm-card-wide--rank { padding-left: 36px; }

.fm-card-wide__rank {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fm-accent);
  opacity: 0.7;
  line-height: 1;
}

.fm-card-wide__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--fm-radius-sm);
  overflow: hidden;
  background: var(--fm-surface-2);
}

.fm-card-wide__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-card-wide__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 20, 0.45);
  opacity: 0;
  color: var(--fm-accent);
  font-size: 1.2rem;
  transition: opacity 0.2s;
}

.fm-card-wide:hover .fm-card-wide__play { opacity: 1; }

.fm-card-wide__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px 4px 4px 0;
}

.fm-card-wide__cat {
  font-size: 0.72rem;
  color: var(--fm-accent);
  margin-bottom: 6px;
}

.fm-card-wide__body h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fm-card-wide__body p {
  margin: 0 0 auto;
  font-size: 0.75rem;
  color: var(--fm-faint);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fm-card-wide__meta {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--fm-faint);
  margin-top: 8px;
}

.fm-card-wide__score { color: var(--fm-warm); font-weight: 600; }

.fm-home-cta {
  padding: 40px 0 48px;
}

.fm-home-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--fm-radius);
  background: linear-gradient(120deg, var(--fm-surface), rgba(34, 211, 238, 0.1));
  border: 1px solid var(--fm-border);
}

.fm-home-cta h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.fm-home-cta p {
  margin: 0;
  color: var(--fm-muted);
  font-size: 0.9rem;
}

.fm-browse {
  padding: 32px 0 48px;
}

.fm-browse__head {
  margin-bottom: 20px;
}

.fm-browse__head h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.fm-browse .fm-chips {
  display: flex;
  margin-bottom: 20px;
}

.fm-home .fm-seo-block {
  margin-top: 8px;
  margin-bottom: 48px;
}

/* Responsive */
@media (min-width: 900px) {
  .fm-home-hero__poster { display: block; }
}

@media (max-width: 900px) {
  .fm-layout { grid-template-columns: 1fr; }
  .fm-sidebar { display: none; }
  .fm-chips { display: flex; }
  .fm-watch__grid { grid-template-columns: 1fr; }
  .fm-aside { position: static; }
  .fm-seo-block__grid { grid-template-columns: 1fr; }
  .fm-home-cats__grid { grid-template-columns: repeat(2, 1fr); }
  .fm-home-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .fm-home-cta__inner { flex-direction: column; text-align: center; }
  .fm-section-head { flex-wrap: wrap; }
  .fm-hero { padding: 22px 20px; }
  .fm-seo-block { padding: 20px 16px; }
  .fm-footer__inner { flex-direction: column; align-items: center; text-align: center; }
  .fm-footer__brand p { max-width: none; }
  .fm-footer__nav { justify-content: center; }
}

@media (max-width: 960px) {
  .fm-header__shell .fm-search { display: none; }
  .fm-header__nav { display: none; }
  .fm-menu-btn { display: flex; }
}

@media (max-width: 768px) {
  .fm-container { width: min(100% - 24px, var(--fm-container)); }
  .fm-page { padding: 20px 0 36px; }
  .fm-watch { padding: 16px 0 36px; }
  .fm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .fm-pagination button { min-width: 34px; height: 34px; font-size: 0.82rem; }
  .fm-home-hero__inner { grid-template-columns: 1fr; padding: 36px 0 48px; }
  .fm-card-wide { flex: 0 0 min(260px, 78vw); }
  .fm-home-cats__grid { grid-template-columns: 1fr 1fr; }
  .fm-detail,
  .fm-aside { padding: 18px 16px; }
  .fm-player-wrap video { max-height: min(72vh, 56vw); }
  .fm-browse__head h1 { font-size: 1.25rem; }
  .fm-home-cta__inner { padding: 22px 18px; }
}

@media (max-width: 480px) {
  .fm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fm-card__title { font-size: 0.82rem; }
  .fm-card__meta { font-size: 0.7rem; gap: 6px; }
  .fm-hero h1 { font-size: 1.35rem; }
  .fm-chips { gap: 6px; }
  .fm-chip { padding: 7px 12px; font-size: 0.8rem; }
  .fm-home-cats__grid { grid-template-columns: 1fr; }
  .fm-home-stats__grid { grid-template-columns: 1fr 1fr; }
}
