:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --cyan: #0891b2;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: 0 12px 36px rgba(5, 150, 105, 0.26);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--emerald);
  background: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

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

.brand-text em {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
}

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

.nav-link {
  position: relative;
  padding: 8px 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease;
}

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

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
}

.top-search,
.mobile-search,
.search-panel,
.category-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search {
  width: 280px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.top-search input,
.mobile-search input,
.search-panel input,
.category-tools input,
.category-tools select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--slate-800);
  background: var(--white);
  border-radius: 999px;
}

.top-search input {
  flex: 1;
  color: var(--white);
  background: transparent;
  padding: 5px 10px;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.top-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: var(--emerald);
  background: var(--white);
  padding: 7px 14px;
  font-weight: 800;
  cursor: pointer;
}

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

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

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 120, 87, 0.94);
}

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

.mobile-panel-inner {
  padding: 18px 0 22px;
}

.mobile-search {
  margin-bottom: 16px;
}

.mobile-search input {
  flex: 1;
  padding: 12px 16px;
}

.mobile-nav-links,
.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav-links a,
.mobile-category-links a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
}

.hero {
  position: relative;
  height: 610px;
  min-height: 72vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

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

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

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

.hero-slide img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(16, 185, 129, 0.25), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.14));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding-top: 28px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(5, 150, 105, 0.92);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 22px 0 16px;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2.4vw, 22px);
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span,
.card-meta a,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.btn-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 78px 0;
  background: var(--white);
}

.section-light {
  background: linear-gradient(180deg, var(--white), var(--slate-50));
}

.section-dark {
  color: var(--white);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.16;
}

.section-dark .section-heading h2,
.section-dark .section-heading p {
  color: var(--white);
}

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

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--emerald);
  font-weight: 900;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald));
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: var(--emerald);
  background: var(--white);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--slate-800);
  font-size: 18px;
  line-height: 1.42;
  font-weight: 900;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--emerald);
}

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

.tag-row span {
  color: var(--emerald-dark);
  background: rgba(16, 185, 129, 0.12);
}

.card-meta {
  justify-content: space-between;
  margin-top: 14px;
  color: var(--slate-500);
}

.card-meta a {
  color: var(--emerald-dark);
  background: rgba(16, 185, 129, 0.10);
}

.card-meta span {
  background: var(--slate-100);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 128px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  color: var(--slate-800);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.section-dark .rank-item {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--rose));
  font-weight: 900;
}

.rank-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--slate-200);
}

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

.rank-title {
  display: inline-block;
  color: inherit;
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 6px 0 10px;
  color: var(--slate-500);
}

.section-dark .rank-info p,
.section-dark .rank-meta span {
  color: rgba(255, 255, 255, 0.72);
}

.rank-meta strong {
  margin-left: auto;
  color: var(--amber);
  font-size: 18px;
}

.category-section {
  background: linear-gradient(180deg, var(--slate-900), #111827);
  color: var(--white);
}

.category-section .section-heading h2,
.category-section .section-heading p {
  color: var(--white);
}

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

.category-tile,
.category-card {
  display: grid;
  align-content: start;
  min-height: 152px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.22s ease, background 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.14);
}

.category-tile strong,
.category-card strong {
  margin-bottom: 10px;
  font-size: 22px;
}

.category-tile span,
.category-card p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.page-hero {
  padding: 86px 0 72px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.24), transparent 28%),
    linear-gradient(135deg, var(--slate-900), var(--emerald-dark));
}

.simple-hero,
.search-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), transparent 24%),
    linear-gradient(135deg, var(--slate-900), var(--teal));
}

.category-hero {
  background:
    radial-gradient(circle at 84% 18%, rgba(20, 184, 166, 0.32), transparent 28%),
    linear-gradient(135deg, var(--slate-900), var(--emerald-dark));
}

.rank-hero {
  background:
    radial-gradient(circle at 78% 14%, rgba(245, 158, 11, 0.26), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.category-tools,
.search-panel {
  margin-top: 28px;
  max-width: 780px;
}

.category-tools input,
.search-panel input,
.category-tools select {
  min-height: 48px;
  padding: 0 18px;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.12);
}

.category-tools input,
.search-panel input {
  flex: 1;
}

.category-tools select {
  cursor: pointer;
}

.search-panel button {
  min-height: 48px;
  padding: 0 24px;
  color: var(--white);
  background: var(--emerald);
}

.overview-grid .category-card {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-dark));
}

.category-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 18px;
  color: var(--emerald-dark);
  background: var(--white);
  font-weight: 900;
}

.movie-hero-detail {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.52));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 54px 0 66px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  color: rgba(255, 255, 255, 0.82);
}

.detail-meta {
  margin: 22px 0;
}

.detail-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.detail-meta strong {
  color: var(--amber);
  font-size: 22px;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-main {
  display: grid;
  gap: 28px;
}

.player-card,
.content-panel,
.related-panel {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-grid;
  place-items: center;
  gap: 8px;
  min-width: 132px;
  min-height: 132px;
  padding: 18px;
  border: 0;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.player-play:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.player-play span {
  font-size: 34px;
  line-height: 1;
}

.player-play strong {
  font-size: 15px;
}

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

.content-panel,
.related-panel {
  padding: 30px;
}

.content-panel h2 {
  margin: 0 0 12px;
  color: var(--slate-800);
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 22px;
  color: var(--slate-600);
  font-size: 17px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
}

.footer-grid p {
  max-width: 420px;
  margin: 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
    min-height: 0;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 42px;
  }

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

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

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

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

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

  .header-inner {
    min-height: 68px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

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

  .brand-text em {
    display: none;
  }

  .hero {
    height: 520px;
  }

  .hero-copy {
    padding-top: 10px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .category-tools,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .search-panel button {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .movie-grid,
  .movie-grid-four,
  .movie-grid-three,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-cover {
    grid-column: 1 / -1;
  }

  .mobile-nav-links,
  .mobile-category-links {
    grid-template-columns: 1fr;
  }

  .player-play {
    min-width: 104px;
    min-height: 104px;
  }

  .content-panel,
  .related-panel {
    padding: 22px;
  }
}
