:root {
  --bg: #0b0f19;
  --bg-soft: #111827;
  --bg-card: #ffffff;
  --text: #182033;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.14);
  --line-dark: rgba(17, 24, 39, 0.1);
  --primary: #d97706;
  --primary-dark: #b45309;
  --accent: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f6f7fb;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: rgba(9, 13, 22, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  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;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.35);
}

.brand-name {
  white-space: nowrap;
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.18);
}

.header-search {
  display: flex;
  align-items: center;
  width: 250px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.header-search input,
.mobile-search input,
.home-search-band input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.header-search input {
  padding: 10px 4px 10px 16px;
  color: #ffffff;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.header-search button,
.mobile-search button,
.home-search-band button,
.primary-button,
.ghost-button,
.section-link,
.text-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
}

.header-search button {
  padding: 10px 14px;
  color: #ffffff;
  background: var(--primary);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

.mobile-link {
  display: block;
  margin-bottom: 4px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mobile-search input {
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-search button {
  padding: 12px 18px;
  color: #ffffff;
  background: var(--primary);
}

main {
  min-height: 64vh;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
  background: #0b0f19;
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
  z-index: -2;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}

.hero-backdrop img {
  height: 100%;
  opacity: 0.32;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.03);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(245, 158, 11, 0.38), transparent 34%),
    linear-gradient(90deg, rgba(9, 13, 22, 0.96) 0%, rgba(9, 13, 22, 0.78) 48%, rgba(9, 13, 22, 0.86) 100%);
}

.hero-content {
  padding-top: 72px;
  max-width: 760px;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-kicker span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.primary-button,
.ghost-button,
.section-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 42px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-poster img {
  height: 500px;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent);
}

.home-search-band,
.filter-panel,
.content-section,
.category-grid-section,
.detail-shell,
.detail-content {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.home-search-band span,
.section-heading span,
.page-hero span,
.filter-title span {
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 13px;
}

.home-search-band h2,
.section-heading h2,
.page-hero h1,
.filter-title strong {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.home-search-band form {
  display: flex;
  min-height: 58px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--line-dark);
}

.home-search-band input {
  padding: 0 20px;
  color: var(--text);
}

.home-search-band button {
  padding: 0 24px;
  color: #ffffff;
  background: var(--primary);
}

.category-strip {
  width: min(var(--container), calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-strip a {
  min-height: 112px;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-strip a:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.15);
}

.category-strip strong,
.category-strip span {
  display: block;
}

.category-strip strong {
  font-size: 18px;
}

.category-strip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.content-section,
.category-grid-section,
.detail-content {
  padding: 70px 0 0;
}

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

.section-link,
.text-button {
  color: var(--primary-dark);
  background: #fff7ed;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-link img,
.rank-cover img,
.detail-info-card img,
.category-cover-stack img {
  height: 100%;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-link img,
.rank-card:hover .rank-cover img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

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

.movie-card h2,
.rank-card h2,
.category-card h2 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card h2 a:hover,
.rank-card h2 a:hover,
.category-card h2 a:hover,
.rank-list a:hover {
  color: var(--primary-dark);
}

.movie-card p,
.rank-card p,
.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span {
  color: var(--primary-dark);
  background: #fff7ed;
  border-color: #fed7aa;
}

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

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.rank-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 900;
}

.rank-list a {
  font-weight: 800;
}

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

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 22% 24%, rgba(245, 158, 11, 0.34), transparent 34%),
    linear-gradient(135deg, #0b0f19, #1f2937);
}

.page-hero > div {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 100px 0 76px;
}

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

.compact-hero > div {
  padding-bottom: 70px;
}

.hero-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-link-row a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.filter-panel {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 34px;
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.filter-title strong {
  display: block;
  font-size: 28px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.8fr);
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--text);
  background: #f9fafb;
  outline: 0;
}

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

.category-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 170px;
  overflow: hidden;
  background: #111827;
}

.category-card-body {
  padding: 22px;
}

.category-sample {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.category-sample a {
  color: var(--primary-dark);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  min-height: 168px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.9);
  font-weight: 900;
  font-size: 12px;
}

.rank-card-body {
  align-self: center;
}

.detail-shell {
  padding-top: 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 30px;
  background: #05070d;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  cursor: pointer;
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  object-fit: contain;
  background: #05070d;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.large-play-button {
  min-width: 160px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.28);
  font-weight: 900;
  cursor: pointer;
}

.detail-info-card {
  overflow: hidden;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-info-card img {
  height: 420px;
}

.detail-info-card > div {
  padding: 22px;
}

.detail-info-card h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

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

.detail-info-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-info-card dl div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.detail-info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-info-card dd {
  margin: 0;
  font-weight: 800;
}

.detail-content article {
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-content p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.movie-card-small .poster-link {
  aspect-ratio: 3 / 4;
}

.site-footer {
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.74);
  background: #090d16;
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-brand-block p {
  max-width: 420px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #f59e0b;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.searchable-card.is-hidden {
  display: none;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

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

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

  .detail-info-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .detail-info-card img {
    height: 100%;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-content {
    padding-top: 80px;
  }

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

  .hero-poster img {
    height: 350px;
  }

  .home-search-band,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .home-search-band form {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .home-search-band input,
  .home-search-band button {
    min-height: 52px;
  }

  .category-strip,
  .movie-grid,
  .dense-grid,
  .category-grid,
  .rank-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

  .rank-list li {
    grid-template-columns: 44px 1fr;
  }

  .rank-list em {
    grid-column: 2;
  }

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

  .player-shell,
  .movie-video {
    min-height: 260px;
  }

  .detail-info-card {
    display: block;
  }

  .detail-info-card img {
    height: 460px;
  }

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