:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --rose-600: #e11d48;
  --blue-600: #2563eb;
  --white: #ffffff;
  --shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 28px 70px rgba(2, 6, 23, 0.34);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), #ffffff 38%, var(--slate-50));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--emerald-400), #a7f3d0);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.nav-link {
  position: relative;
  color: #e2e8f0;
  transition: color 0.2s ease;
}

.nav-link::after {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  content: "";
  border-radius: 99px;
  background: var(--emerald-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald-400);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--slate-800);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: 14px 24px;
  color: #e2e8f0;
  font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--emerald-400);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-category-strip {
  display: flex;
  gap: 10px;
  padding: 12px 24px 18px;
  overflow-x: auto;
}

.mobile-category-strip a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.13);
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  color: #ffffff;
  background: var(--slate-950);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  min-height: 78vh;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.7s ease;
}

.hero-panel:hover img {
  transform: scale(1.12);
}

.hero-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.75));
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.78));
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 78vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 0 44px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.03;
  letter-spacing: -0.05em;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.hero-lead {
  max-width: 820px;
  margin: 22px auto 30px;
  color: #e2e8f0;
  font-size: clamp(17px, 2.4vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: var(--emerald-600);
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.32);
}

.btn-primary:hover {
  background: var(--emerald-700);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-feature-row {
  display: grid;
  width: min(980px, 100%);
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 42px;
}

.hero-feature {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: var(--shadow-strong);
  text-align: left;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-feature:hover {
  transform: translateY(-4px);
  background: rgba(15, 23, 42, 0.58);
}

.hero-feature strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-feature p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(135deg, #f1f5f9, #ffffff);
}

.section.dark {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34%), linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.dark .section-heading h2 {
  color: #ffffff;
}

.section-heading p {
  margin: 0;
  color: var(--slate-600);
}

.dark .section-heading p {
  color: #cbd5e1;
}

.section-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: var(--emerald-600);
  font-size: 22px;
}

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

.movie-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 54px rgba(15, 23, 42, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-800);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.1);
}

.card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.68));
  opacity: 0.85;
}

.card-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.82);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-year,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: var(--emerald-600);
}

.card-year {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: var(--rose-600);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 17px;
  line-height: 1.3;
}

.card-body h3 a:hover {
  color: var(--emerald-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--slate-500);
  font-size: 12px;
}

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

.movie-card.compact .card-body p {
  min-height: 38px;
  font-size: 13px;
}

.category-showcase {
  display: grid;
  gap: 42px;
}

.category-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.category-title-line h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--slate-800);
  font-size: 24px;
}

.category-title-line h3::before {
  display: inline-block;
  width: 5px;
  height: 30px;
  content: "";
  border-radius: 99px;
  background: var(--emerald-600);
}

.category-title-line a {
  color: var(--emerald-600);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  color: var(--slate-800);
  background: #f8fafc;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.select-input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  color: var(--slate-700);
  background: #ffffff;
  font: inherit;
}

.page-hero {
  padding: 56px 0;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.28), transparent 28%), linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.page-hero h1 {
  max-width: 880px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-700));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #d1fae5;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 34px;
  align-items: start;
}

.player-card,
.detail-side,
.content-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-ring {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: var(--emerald-600);
  box-shadow: 0 24px 50px rgba(5, 150, 105, 0.4);
  font-size: 32px;
}

.play-layer strong {
  font-size: 18px;
}

.player-info {
  padding: 22px;
}

.player-info h1 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.info-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: #d1fae5;
  font-size: 13px;
  font-weight: 700;
}

.detail-side {
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 10px;
}

.meta-row span:first-child {
  color: var(--slate-500);
}

.meta-row span:last-child {
  color: var(--slate-800);
  font-weight: 800;
  text-align: right;
}

.content-card {
  margin-top: 28px;
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 26px;
}

.content-card p {
  margin: 0 0 16px;
  color: var(--slate-700);
  font-size: 16px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 110px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: var(--rose-600);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

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

.rank-copy h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-meta {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

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

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 22px;
  color: var(--slate-600);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 54px 0 36px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer p {
  margin: 0;
  color: #aab4c2;
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 13px;
}

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-backdrop {
    grid-template-columns: 1fr;
  }

  .hero-panel:not(:first-child) {
    display: none;
  }

  .hero-panel img,
  .hero-content {
    min-height: 76vh;
  }

  .hero-feature-row {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .section {
    padding: 48px 0;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 82px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 3 / 4;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.six,
  .search-results,
  .category-cards,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
  }
}
