:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(6, 182, 212, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

img,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.36);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.26);
}

.logo-text {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 28vw);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.nav-search input,
.wide-search input,
.filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.nav-search input::placeholder,
.wide-search input::placeholder,
.filter-search input::placeholder {
  color: #64748b;
}

.nav-search button,
.wide-search button {
  flex: 0 0 auto;
  border: 0;
  color: #031525;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.22);
}

.nav-search button {
  padding: 8px 14px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.mobile-menu {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-nav-link,
.mobile-category-row a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
}

.mobile-nav-link.active,
.mobile-nav-link:hover,
.mobile-category-row a:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.mobile-category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

main {
  width: 100%;
}

.page-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.hero {
  position: relative;
  width: min(1440px, calc(100% - 32px));
  min-height: 680px;
  margin: 26px auto 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 40px));
  padding: 104px 0 0 64px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-content h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.7rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.section-heading p,
.home-search-block p,
.category-overview-card p,
.detail-one-line {
  color: var(--muted-strong);
}

.hero-content p {
  max-width: 560px;
  font-size: 1.1rem;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 22px 0 28px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #bff7ff;
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.82rem;
}

.hero-actions,
.detail-copy .primary-button {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.text-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #031525;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.24);
}

.ghost-button,
.section-more,
.text-link {
  border: 1px solid var(--line-strong);
  color: #dffaff;
  background: rgba(15, 23, 42, 0.68);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.2);
}

.hero-poster {
  position: absolute;
  right: 70px;
  bottom: 96px;
  z-index: 2;
  width: min(320px, 26vw);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #031525;
  font-size: 0.82rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero-control-panel {
  position: absolute;
  left: 64px;
  right: 64px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-dots {
  display: inline-flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.42);
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(78px, 1fr));
  gap: 10px;
  width: min(560px, 52vw);
}

.hero-rail-card {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-rail-card img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero-rail-card span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.hero-rail-card:hover img {
  transform: scale(1.08);
  opacity: 1;
}

.home-search-block,
.filter-toolbar,
.plain-content-card {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 48px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.home-search-block {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: center;
  gap: 28px;
}

.home-search-block h2,
.page-hero h1,
.section-heading h2,
.rank-head h2,
.detail-copy h1 {
  margin: 10px 0 10px;
  line-height: 1.1;
}

.home-search-block h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.64);
}

.wide-search input {
  padding: 0 10px;
}

.wide-search button {
  padding: 12px 18px;
}

.content-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.section-heading p {
  max-width: 620px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.all-movie-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.3);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(15, 23, 42, 0.96);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.88));
}

.card-year,
.play-mini {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.card-year {
  top: 12px;
  left: 12px;
  min-height: 30px;
  padding: 4px 10px;
  color: #031525;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.play-mini {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta,
.detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-meta a {
  color: var(--cyan);
}

.movie-card h3 {
  min-height: 2.8em;
  margin: 8px 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.category-overview-card h2 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h3 {
  font-size: 1rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0f172a;
}

.category-tile img,
.category-large-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-cover,
.category-large-cover span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.88)),
    linear-gradient(45deg, rgba(34, 211, 238, 0.22), transparent);
}

.category-tile strong,
.category-tile em,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  font-size: 1.35rem;
}

.category-tile em {
  margin: 4px 0;
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted-strong);
}

.category-tile:hover img,
.category-large-cover:hover img {
  transform: scale(1.08);
}

.rank-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rank-head span {
  color: var(--orange);
  font-weight: 900;
}

.rank-head h2 {
  flex: 1;
  font-size: 1.45rem;
}

.rank-head a,
.ranking-category {
  color: var(--cyan);
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
}

.rank-item:hover {
  border-color: rgba(34, 211, 238, 0.28);
}

.rank-num {
  color: var(--cyan);
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.2), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.92));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: -0.05em;
}

.compact-hero p,
.category-hero p {
  max-width: 720px;
  font-size: 1.06rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.filter-toolbar {
  display: grid;
  gap: 18px;
}

.slim-toolbar {
  width: 100%;
}

.filter-search {
  display: grid;
  gap: 8px;
}

.filter-search label {
  color: var(--muted-strong);
  font-weight: 800;
}

.filter-search input {
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.52);
}

.filter-search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.42);
}

.filter-chip.active,
.filter-chip:hover {
  color: #031525;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.results-count {
  margin: 0;
  color: var(--muted);
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
}

.category-large-cover {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.category-overview-card h2 {
  margin: 10px 0;
  font-size: 1.75rem;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.34);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

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

.ranking-number {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #031525;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.ranking-info h2 {
  margin: 8px 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.ranking-info p {
  color: var(--muted-strong);
}

.detail-main {
  max-width: var(--max);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-copy h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 0 0 22px;
  font-size: 1.1rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-meta-grid span {
  margin-top: 2px;
  color: #fff;
  font-weight: 800;
}

.large-tags {
  margin-bottom: 22px;
}

.player-section {
  margin-bottom: 38px;
}

.compact-heading {
  margin-bottom: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 28rem),
    rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(4px);
}

.player-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #031525;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
}

.player-overlay strong {
  font-size: 1.35rem;
}

.player-overlay em {
  color: var(--muted-strong);
  font-style: normal;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-bottom: 58px;
}

.detail-article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
}

.detail-article h2 {
  margin: 10px 0 14px;
  font-size: 1.8rem;
}

.detail-article p {
  margin: 0;
  color: var(--muted-strong);
  white-space: pre-wrap;
}

.accent-article {
  border-color: rgba(34, 211, 238, 0.26);
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.14), rgba(15, 23, 42, 0.78));
}

.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.plain-content-card {
  display: grid;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 1.05rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 0.7fr));
  gap: 28px;
}

.footer-logo {
  margin-bottom: 12px;
}

.site-footer p,
.site-footer li,
.footer-bottom {
  color: var(--muted);
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1120px) {
  .desktop-nav {
    display: none;
  }

  .nav-search {
    margin-left: auto;
    width: min(420px, 44vw);
  }

  .mobile-toggle {
    display: block;
  }

  .movie-grid,
  .all-movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-layout,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-shell {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero {
    min-height: 760px;
    border-radius: 24px;
  }

  .hero-content {
    width: calc(100% - 36px);
    padding: 46px 0 0 28px;
  }

  .hero-poster {
    left: 28px;
    right: auto;
    bottom: 138px;
    width: 210px;
  }

  .hero-control-panel {
    left: 24px;
    right: 24px;
    align-items: start;
    flex-direction: column;
  }

  .hero-rail {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-search-block {
    grid-template-columns: 1fr;
  }

  .wide-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .wide-search input {
    min-height: 48px;
  }

  .section-heading,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }

  .category-overview-grid,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 620px) {
  .page-main,
  .content-section,
  .home-search-block,
  .filter-toolbar,
  .plain-content-card,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

  .hero {
    width: min(100% - 22px, 1440px);
  }

  .movie-grid,
  .all-movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 0.96rem;
  }

  .movie-card p,
  .tag-row {
    font-size: 0.82rem;
  }

  .page-hero,
  .detail-hero,
  .detail-article {
    padding: 20px;
    border-radius: 22px;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
  }

  .footer-grid {
    gap: 18px;
  }
}
