:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0f172a;
  --accent-soft: #334155;
  --gold: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #0f172a, #334155 54%, #64748b);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  width: 44px;
  height: 44px;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  height: 76vh;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 32%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 46%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 88px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-eyebrow,
.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-eyebrow span,
.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-eyebrow span,
.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  max-width: 860px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.ghost-button,
.plain-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.28);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 14px;
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.plain-button {
  min-height: 38px;
  padding: 0 14px;
  color: #0f172a;
  background: #f1f5f9;
  font-size: 14px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: #fff;
}

.section-block,
.quick-search {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.3fr;
  gap: 22px;
  align-items: center;
}

.quick-search h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.quick-search p {
  margin: 0;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 180px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
}

.white-block {
  max-width: none;
  background: #fff;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

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

.section-heading span,
.page-hero span,
.detail-kicker,
.category-overview-body span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.section-heading h2,
.page-hero h1,
.content-card h2,
.detail-panel h1,
.category-overview-body h2 {
  margin: 0;
  letter-spacing: -0.055em;
}

.section-heading h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.section-heading a {
  color: #0f172a;
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.poster-link img,
.rank-cover img,
.category-card img,
.category-thumbs img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
  color: #475569;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
}

.tag-row span,
.detail-tags span {
  color: #334155;
  background: #f1f5f9;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card.horizontal .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background: #020617;
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

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

.category-card span,
.category-card strong {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-card span {
  bottom: 64px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.category-card strong {
  bottom: 22px;
  font-size: 14px;
  line-height: 1.35;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 82px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.rank-number {
  color: #cbd5e1;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #e2e8f0;
}

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

.rank-item p {
  margin: 0 0 8px;
  color: #475569;
  font-size: 14px;
}

.page-hero {
  min-height: 360px;
  padding: 96px 24px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 74% 20%, rgba(248, 250, 252, 0.2), transparent 24%),
    linear-gradient(135deg, #020617, #1e293b 58%, #334155);
}

.slim-hero {
  min-height: 320px;
}

.page-hero div {
  width: min(820px, 100%);
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1;
}

.page-hero p {
  margin: 18px auto 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.category-thumbs {
  height: 170px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #e2e8f0;
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  font-size: 30px;
}

.category-overview-body p {
  margin: 10px 0 20px;
  color: #475569;
}

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

.breadcrumb a {
  font-weight: 800;
  color: #334155;
}

.breadcrumb em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 28px;
}

.player-card,
.detail-panel,
.content-card {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-wrap video {
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18)),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.16), transparent 26%);
  text-align: center;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.play-mask strong {
  max-width: min(760px, calc(100% - 40px));
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: -0.05em;
}

.play-mask small {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 800;
}

.detail-panel {
  padding: 28px;
  align-self: stretch;
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #475569;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
  padding-top: 0;
}

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
  text-align: justify;
}

.info-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.info-card span {
  color: var(--muted);
}

.info-card strong {
  text-align: right;
}

.empty-state {
  display: none;
  margin: 40px 0 0;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 22px;
}

.footer-brand p {
  margin: 0;
  color: #94a3b8;
}

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

.footer-links h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

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

.footer-grid a {
  color: #94a3b8;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 24px;
  color: #64748b;
  text-align: center;
}

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

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

  .detail-panel {
    order: -1;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
    padding-top: 10px;
  }

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

  .hero-slider {
    min-height: 620px;
    height: 82vh;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search,
  .footer-inner,
  .footer-links {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 46px 72px 1fr;
  }

  .rank-item .plain-button {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .section-block,
  .quick-search {
    padding: 48px 16px;
  }

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

  .movie-card.horizontal {
    grid-template-columns: 112px 1fr;
  }

  .category-overview-card {
    border-radius: 18px;
  }

  .detail-layout,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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