:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;
  --white: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, #134e4a 0%, #0f172a 100%);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.24);
}

.nav-wrap {
  width: min(1220px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-400), #f97316);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.35);
}

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

.brand-text strong {
  font-size: 1.16rem;
  letter-spacing: 0.08em;
}

.brand-text em {
  margin-top: 4px;
  color: #99f6e4;
  font-size: 0.75rem;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-weight: 650;
  white-space: nowrap;
}

.desktop-nav a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: #5eead4;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.top-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.top-search input {
  width: 180px;
  padding: 10px 12px;
}

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

.top-search button,
.search-page-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: #062e2d;
  background: #5eead4;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.search-page-form button:hover {
  transform: translateY(-1px);
  background: #2dd4bf;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-panel {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.92);
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: blur(7px) saturate(1.1);
  opacity: 0.86;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(20, 184, 166, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1220px) / 2));
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  font-weight: 850;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.32rem);
}

.hero-meta,
.detail-meta,
.movie-meta-line,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.hero-meta strong,
.detail-meta span,
.detail-meta strong {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 24px;
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 18px 38px rgba(13, 148, 136, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  background: var(--teal-700);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.compact-actions {
  justify-content: center;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--amber-400);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.36);
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.section {
  width: min(1220px, calc(100% - 32px));
  margin: 70px auto 0;
}

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

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.1;
}

.section-head a,
.text-link {
  color: var(--teal-700);
  font-weight: 850;
}

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

.category-tile {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  border-radius: 26px;
  padding: 24px;
  color: var(--white);
  background: var(--slate-900);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.35s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.9));
}

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

.category-tile span {
  display: block;
  margin-top: 80px;
  font-size: 1.5rem;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 28px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.45);
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.poster-link img,
.rank-poster img,
.detail-poster img,
.category-cover img,
.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.score-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 900;
}

.score-pill {
  right: 12px;
  background: var(--teal-600);
}

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

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

.movie-meta-line {
  color: var(--muted);
  font-size: 0.78rem;
}

.movie-meta-line span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h3 {
  margin: 11px 0 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.category-card-large h2 a:hover {
  color: var(--teal-700);
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 0.78rem;
  font-weight: 760;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border-radius: 26px;
  padding: 24px;
  background: linear-gradient(180deg, #0f172a, #020617);
  color: var(--white);
  box-shadow: var(--shadow);
}

.ranking-panel h2 {
  margin: 0 0 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

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

.ranking-page-list .rank-row {
  grid-template-columns: auto 116px minmax(0, 1fr);
  background: var(--white);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: var(--amber-400);
  font-weight: 950;
}

.rank-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-panel .rank-info p,
.ranking-panel .rank-meta {
  color: rgba(255, 255, 255, 0.68);
}

.rank-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.rank-meta strong {
  color: var(--amber-500);
}

.page-hero {
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 70px 24px;
  color: var(--white);
  text-align: center;
  background:
    radial-gradient(circle at 15% 25%, rgba(20, 184, 166, 0.34), transparent 32%),
    linear-gradient(135deg, #0f172a, #134e4a 58%, #020617);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: 1.08;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.08rem;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.category-cover {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.category-card-large h2 {
  margin: 4px 0 8px;
}

.category-card-large p {
  color: var(--muted);
}

.category-card-large ul {
  margin: 12px 0;
  padding-left: 18px;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 13px 14px;
  color: var(--text);
  border-color: var(--line);
  background: #f8fafc;
}

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

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

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.1);
  transform: scale(1.1);
  opacity: 0.55;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72));
}

.detail-inner {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.75);
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #134e4a);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.07;
}

.detail-one-line {
  width: min(760px, 100%);
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.18rem;
}

.detail-tags {
  margin-top: 18px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: rgba(2, 6, 23, 0.38);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0f172a;
  background: var(--amber-400);
  font-size: 2.1rem;
  box-shadow: 0 18px 52px rgba(251, 191, 36, 0.42);
}

.player-start strong {
  font-size: 1.15rem;
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
}

.content-card p {
  margin: 0 0 14px;
  color: #334155;
}

.search-page-form {
  display: flex;
  width: min(650px, 100%);
  gap: 10px;
  margin: 28px auto 0;
}

.search-page-form input {
  flex: 1;
  padding: 14px 16px;
}

.site-footer {
  margin-top: 86px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  margin: 0 auto;
  padding: 48px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a:hover {
  color: #5eead4;
}

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-align: center;
}

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

.image-hidden {
  opacity: 0;
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .ranking-panel {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 62px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-content {
    top: auto;
    bottom: 74px;
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    margin-top: 46px;
  }

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

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

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

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

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

  .detail-poster {
    width: min(260px, 70vw);
  }

  .rank-row,
  .ranking-page-list .rank-row {
    grid-template-columns: auto 78px minmax(0, 1fr);
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid-home,
  .category-movie-grid,
  .category-grid,
  .category-list-large {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .search-page-form {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .search-page-form button {
    width: 100%;
  }

  .rank-row,
  .ranking-page-list .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-poster {
    width: 120px;
  }
}
