* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f3f4f6 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #4b5563);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.25);
  font-size: 15px;
}

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

.brand-text strong {
  font-size: 20px;
  font-weight: 700;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.header-search {
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: rgba(249, 250, 251, 0.88);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 16px;
}

.header-search button {
  border: 0;
  color: #ffffff;
  background: #111827;
  padding: 10px 18px;
  cursor: pointer;
}

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

.main-nav a {
  color: #4b5563;
  font-size: 15px;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #111827;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 3px;
}

.hero-slider {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(31, 41, 55, 0.76) 42%, rgba(17, 24, 39, 0.24) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #374151;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  max-width: 760px;
  margin: 22px 0 8px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.meta-row span {
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

.button.primary {
  color: #111827;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.18);
}

.button.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.content-section,
.page-hero,
.breadcrumb,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 68px 0 0;
}

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

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

.section-heading h2,
.category-panel h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 10px 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.section-heading p,
.category-panel p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-link {
  flex-shrink: 0;
  color: #374151;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card[hidden] {
  display: none;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(17, 24, 39, 0.68) 100%);
  opacity: 0.86;
}

.card-type,
.rank-badge {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.card-type {
  left: 12px;
  top: 12px;
  color: #111827;
  background: rgba(255, 255, 255, 0.86);
  padding: 5px 10px;
}

.rank-badge {
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.82);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #4b5563;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.tag-row.wide span {
  font-size: 13px;
  padding: 6px 12px;
}

.split-section {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 34px;
  align-items: stretch;
}

.rank-list,
.category-panel,
.search-panel,
.list-tools,
.detail-content article {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.rank-list {
  padding: 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #f3f4f6;
}

.mini-card img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.mini-rank,
.mini-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  color: #ffffff;
  background: #111827;
}

.mini-dot {
  width: 10px;
  height: 10px;
  margin: 0 auto;
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  margin-bottom: 4px;
  font-size: 16px;
}

.mini-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.category-panel {
  padding: 28px;
  background: linear-gradient(135deg, #ffffff, #f3f4f6);
}

.category-links,
.category-grid {
  display: grid;
  gap: 12px;
}

.category-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.category-links a {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-links a:hover,
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.page-hero {
  padding: 56px 0 4px;
}

.page-hero.slim > div {
  padding: 42px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(75, 85, 99, 0.86));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.page-hero.slim .eyebrow {
  color: #111827;
}

.page-hero.slim p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #ffffff;
  border-radius: var(--radius);
  background: #111827;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card img,
.category-card::after {
  position: absolute;
  inset: 0;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.category-card::after {
  content: "";
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.10), rgba(17, 24, 39, 0.86));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 800;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.list-page {
  padding-bottom: 64px;
}

.list-tools,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
}

.list-tools label {
  flex: 1;
  min-width: 220px;
}

.list-tools span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.list-tools input,
.list-tools select,
.search-panel input {
  width: 100%;
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  outline: 0;
  background: #ffffff;
  padding: 0 14px;
}

.search-panel input {
  flex: 1;
  min-width: 220px;
}

.search-panel button {
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: #111827;
  padding: 0 24px;
  cursor: pointer;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  padding: 42px 0 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.detail-info .lead {
  max-width: 820px;
  color: #4b5563;
  font-size: 19px;
  line-height: 1.85;
}

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

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

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

.movie-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #ffffff;
  font-size: 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.player-cover strong {
  font-size: 22px;
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: none;
  transform: translateX(-50%);
  color: #ffffff;
  background: rgba(17, 24, 39, 0.82);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
}

.player-message.is-visible {
  display: block;
}

.detail-content article {
  padding: 28px;
}

.detail-content h2 {
  margin-top: 0;
  font-size: 26px;
}

.detail-content p {
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  margin-top: 78px;
  padding: 36px 0;
  color: #4b5563;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-inner p {
  max-width: 640px;
  margin: 8px 0 0;
  line-height: 1.75;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-inner a:hover {
  color: #111827;
}

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

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

  .detail-poster {
    width: min(320px, 100%);
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .header-search {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }

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

  .main-nav a {
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }

  .hero-slider {
    height: 640px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.95));
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 86px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .content-section {
    padding-top: 48px;
  }

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

  .movie-grid,
  .movie-grid.large,
  .category-grid,
  .category-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .page-hero.slim > div {
    padding: 28px;
  }

  .detail-hero {
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 18px;
  }

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

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

  .movie-card {
    border-radius: 18px;
  }

  .card-cover {
    aspect-ratio: 16 / 10;
  }

  .mini-card {
    grid-template-columns: 34px 56px 1fr;
  }

  .mini-card img {
    width: 56px;
    height: 74px;
  }

  .detail-poster {
    width: 100%;
  }
}
