:root {
  --frost-950: #082f49;
  --frost-900: #0c4a6e;
  --frost-700: #0369a1;
  --frost-600: #0284c7;
  --frost-500: #0ea5e9;
  --ice-600: #0891b2;
  --ice-400: #22d3ee;
  --ice-200: #a5f3fc;
  --silver-950: #020617;
  --silver-900: #0f172a;
  --silver-800: #1e293b;
  --silver-700: #334155;
  --silver-600: #475569;
  --silver-500: #64748b;
  --silver-200: #e2e8f0;
  --silver-100: #f1f5f9;
  --silver-50: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 12px 35px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--silver-900);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #eef6fb 38%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(12, 74, 110, 0.96), rgba(7, 89, 133, 0.96), rgba(22, 78, 99, 0.96));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(8, 47, 73, 0.25);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1260px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ice-400), var(--frost-600));
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.28);
}

.brand-name {
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--ice-200), #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--ice-200);
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.library-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.library-search input {
  min-width: 210px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--silver-900);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.header-search button,
.mobile-search button,
.library-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.26);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.35rem;
}

.mobile-nav {
  display: none;
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 10px;
  flex-wrap: wrap;
}

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

.mobile-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  background: var(--silver-950);
}

.hero-stage {
  position: relative;
  height: min(72vh, 680px);
  min-height: 520px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.72s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.05);
  opacity: 0.45;
}

.hero-backdrop,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-backdrop {
  z-index: 1;
}

.hero-shade {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(8, 47, 73, 0.65) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.08) 48%);
}

.hero-content {
  position: relative;
  z-index: 4;
  width: min(1260px, calc(100% - 36px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
  max-width: 1260px;
}

.hero-kicker,
.page-hero > p,
.section-heading p {
  margin: 0 0 12px;
  color: var(--ice-200);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: clamp(1.05rem, 2.2vw, 1.34rem);
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.hero-actions {
  margin-top: 32px;
}

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

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.34);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.text-button {
  color: var(--ice-200);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  z-index: 8;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.content-section,
.category-band {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.category-band {
  width: 100%;
  padding: 72px max(16px, calc((100% - 1260px) / 2));
  color: var(--white);
  background: linear-gradient(135deg, var(--silver-900), var(--frost-950));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--frost-600);
  font-weight: 800;
}

.section-heading.light a,
.section-heading.light p {
  color: var(--ice-200);
}

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

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--frost-900), var(--ice-600));
}

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(8, 47, 73, 0.72);
  backdrop-filter: blur(8px);
}

.type-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--frost-600);
}

.movie-card p {
  margin: 0;
  min-height: 3.2em;
  color: var(--silver-600);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-top: 12px;
  color: var(--silver-500);
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: #cbd5e1;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--frost-700);
  background: var(--silver-100);
}

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

.category-card,
.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 190px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image:
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.16)),
    var(--category-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.28);
}

.category-card span,
.category-cover strong {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 900;
}

.category-card strong {
  margin-top: 8px;
  color: var(--ice-200);
  font-size: 0.92rem;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) 1.18fr;
  gap: 34px;
}

.rank-panel,
.latest-panel,
.player-card,
.detail-article,
.category-overview-card,
.ranking-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.rank-panel,
.latest-panel {
  padding: 28px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 66px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: var(--silver-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #e0f2fe;
  transform: translateX(3px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
  font-weight: 900;
}

.rank-row img {
  width: 66px;
  height: 46px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  font-weight: 800;
}

.rank-info {
  color: var(--silver-500);
  font-size: 0.85rem;
}

.page-hero {
  position: relative;
  isolation: isolate;
  padding: 96px max(16px, calc((100% - 1260px) / 2));
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(15, 23, 42, 0.82)),
    var(--hero-image, linear-gradient(135deg, var(--frost-900), var(--silver-900)));
  background-size: cover;
  background-position: center;
}

.page-hero.slim {
  min-height: 340px;
}

.page-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.page-intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 1.08rem;
  line-height: 1.8;
}

.library-search {
  margin-top: 28px;
  width: min(720px, 100%);
}

.library-search input {
  flex: 1;
  min-width: 0;
  height: 48px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-row button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--silver-800);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.filter-row button.is-active {
  color: var(--white);
  background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 20px;
}

.category-overview-card h2 {
  margin: 0 0 12px;
}

.category-overview-card p {
  color: var(--silver-600);
  line-height: 1.7;
}

.category-cover {
  min-height: 170px;
  padding: 18px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples span {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--frost-700);
  background: var(--silver-100);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 16px;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
}

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

.ranking-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.ranking-body h2 {
  margin: 4px 0 10px;
}

.ranking-body p {
  color: var(--silver-600);
  line-height: 1.7;
}

.detail-hero {
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(12, 74, 110, 0.78), rgba(2, 6, 23, 0.58)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.9rem;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 1.12rem;
  line-height: 1.9;
}

.movie-meta.large {
  margin-top: 24px;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.95rem;
}

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

.detail-copy .primary-button {
  margin-top: 28px;
}

.detail-section {
  display: grid;
  gap: 32px;
}

.player-card {
  overflow: hidden;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.24), rgba(2, 6, 23, 0.36)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
  box-shadow: 0 18px 46px rgba(2, 132, 199, 0.42);
  font-size: 2rem;
  padding-left: 5px;
}

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

.player-title {
  padding: 22px 26px 26px;
}

.player-title h2 {
  margin: 0 0 8px;
}

.player-title p {
  margin: 0;
  color: var(--silver-600);
  line-height: 1.7;
}

.detail-article {
  padding: 30px;
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
}

.detail-article h2:not(:first-child) {
  margin-top: 26px;
}

.detail-article p {
  margin: 0;
  color: var(--silver-700);
  font-size: 1.02rem;
  line-height: 1.95;
}

.related-section {
  margin-top: 8px;
}

.site-footer {
  margin-top: 40px;
  color: var(--silver-200);
  background: linear-gradient(180deg, var(--silver-900), var(--frost-950));
}

.footer-inner {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-main p {
  max-width: 560px;
  margin: 16px 0 0;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 1rem;
}

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

.footer-bottom {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: rgba(226, 232, 240, 0.7);
  border-top: 1px solid rgba(226, 232, 240, 0.1);
}

.is-filter-hidden {
  display: none !important;
}

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .category-overview-grid,
  .rank-layout {
    grid-template-columns: 1fr;
  }
}

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

  .hero-stage {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

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

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

  .detail-grid {
    align-items: start;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .detail-hero-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1260px);
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-stage {
    height: auto;
    min-height: 650px;
  }

  .hero-content {
    width: min(100% - 28px, 1260px);
    padding: 76px 0 92px;
  }

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

  .primary-button,
  .ghost-button,
  .text-button,
  .library-search button {
    width: 100%;
  }

  .page-hero {
    padding: 72px 14px;
  }

  .movie-grid,
  .featured-grid,
  .library-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 32px 58px 1fr;
  }

  .rank-info {
    display: none;
  }

  .player-start span {
    width: 68px;
    height: 68px;
  }
}
