:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c33;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --subtle: #64748b;
  --white: #ffffff;
  --emerald: #34d399;
  --emerald-deep: #059669;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --danger: #fb7185;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.15), transparent 32rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #172033 44%, #0f172a 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--emerald);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  color: var(--text);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.62) 52%, #0f172a 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.52) 46%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 72px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.hero-tags,
.tag-row,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.26);
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  max-width: 980px;
  color: var(--white);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
}

.hero-lead {
  margin: 0 0 24px;
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.28);
}

.ghost-button,
.more-link {
  color: #dbeafe;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.48);
}

.primary-button:hover,
.ghost-button:hover,
.more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: var(--emerald);
}

.page-main {
  padding: 34px 0 80px;
}

.page-section {
  padding: 72px 0 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading p,
.page-hero > p:first-child,
.home-search-card p {
  margin: 0 0 8px;
  color: var(--emerald);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.home-search-card h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading.with-link a,
.home-category-block .section-heading a {
  color: var(--emerald);
  font-weight: 800;
}

.home-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -42px;
  padding: 28px;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

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

.catalog-grid {
  padding-top: 26px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.54);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.07);
  filter: saturate(1.15);
}

.poster-year,
.poster-type {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.poster-year {
  left: 12px;
  color: #052e2b;
  background: rgba(52, 211, 153, 0.92);
}

.poster-type {
  right: 12px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.7);
}

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

.movie-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.movie-card h3,
.compact-card h3,
.ranking-row h3 {
  margin: 0;
  color: var(--white);
  line-height: 1.35;
}

.movie-card h3 {
  font-size: 19px;
}

.movie-card h3 a:hover,
.compact-card h3 a:hover,
.ranking-row h3 a:hover {
  color: var(--emerald);
}

.movie-line {
  display: -webkit-box;
  min-height: 52px;
  margin: 10px 0 16px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  min-height: 25px;
  padding: 3px 9px;
  color: #a7f3d0;
  font-size: 12px;
  background: rgba(16, 185, 129, 0.1);
}

.split-section {
  display: block;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.5);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  border-color: rgba(52, 211, 153, 0.4);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 900;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  width: 92px;
  height: 58px;
  border-radius: 13px;
  background: #020617;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-content p {
  display: -webkit-box;
  margin: 6px 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.rank-meta span {
  color: var(--subtle);
  font-size: 12px;
}

.more-link {
  margin-top: 22px;
}

.home-categories {
  padding-bottom: 80px;
}

.home-category-block {
  margin-top: 72px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.7));
}

.page-hero {
  margin-bottom: 30px;
  padding: 38px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.16), transparent 20rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.small-hero p:last-child {
  max-width: 860px;
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

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

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

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

.category-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.56);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.4);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 1 / 0.72;
  object-fit: cover;
  border-radius: 12px;
  background: #020617;
}

.category-card h2 {
  margin: 0 0 10px;
  color: var(--white);
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  color: var(--emerald);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.52);
}

.filter-search input,
.filter-selects select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  outline: none;
}

.filter-search input {
  padding: 0 16px;
}

.filter-search input:focus,
.filter-selects select:focus {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-selects select {
  min-width: 142px;
  padding: 0 12px;
}

.filter-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

[data-filter-item].is-hidden {
  display: none;
}

.detail-main {
  padding-top: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: end;
  min-height: 430px;
  padding: 38px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.detail-copy > p:first-child {
  margin: 0 0 14px;
  color: var(--emerald);
  font-weight: 800;
}

.detail-copy h1 {
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-copy > p:nth-of-type(2) {
  max-width: 820px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  background: #020617;
}

.player-section {
  margin: 34px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.64));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 22px 60px rgba(34, 211, 238, 0.28);
  font-size: 32px;
  padding-left: 5px;
}

.player-overlay strong {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  letter-spacing: 0.05em;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.detail-article {
  display: grid;
  gap: 22px;
}

.content-card,
.related-panel {
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.54);
}

.content-card h2,
.related-panel h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.content-card p + p {
  margin-top: 12px;
}

.lead-text {
  color: #a7f3d0 !important;
  font-weight: 700;
}

.info-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-card div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
}

.info-card dt {
  color: var(--subtle);
  font-size: 13px;
}

.info-card dd {
  margin: 6px 0 0;
  color: var(--white);
  font-weight: 800;
}

.related-panel {
  position: sticky;
  top: 100px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.38);
}

.compact-cover {
  overflow: hidden;
  border-radius: 12px;
  background: #020617;
}

.compact-cover img {
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.compact-card h3 {
  font-size: 15px;
}

.compact-card p {
  margin: 7px 0 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.compact-card span {
  color: var(--emerald);
  font-size: 12px;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.95));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 15px;
  color: var(--white);
  font-size: 17px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 10px 0;
  color: var(--muted);
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .related-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    padding-bottom: 74px;
  }

  .hero-control {
    display: none;
  }

  .home-search-card,
  .section-heading.with-link,
  .filter-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search-card {
    align-items: start;
  }

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

  .filter-selects {
    flex-wrap: wrap;
  }

  .filter-selects select {
    flex: 1 1 150px;
  }

  .detail-cover {
    max-width: 280px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1240px);
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero {
    min-height: 610px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .movie-grid,
  .compact-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 44px 74px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
  }

  .rank-thumb {
    width: 74px;
    height: 52px;
  }

  .page-hero,
  .detail-hero,
  .home-category-block,
  .content-card,
  .related-panel {
    padding: 22px;
  }

  .info-card dl {
    grid-template-columns: 1fr;
  }
}
