:root {
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #f97316;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #7c3aed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #030712;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.86), rgba(3, 7, 18, 0.18));
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--amber);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.site-header.is-scrolled .header-search,
.site-header.is-open .header-search {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.header-search input {
  width: 180px;
  border: 0;
  outline: 0;
  padding: 8px 10px;
  color: inherit;
  background: transparent;
}

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

.site-header.is-scrolled .header-search input::placeholder,
.site-header.is-open .header-search input::placeholder {
  color: var(--gray-500);
}

.header-search button,
.large-search button,
.page-search-form button {
  border: 0;
  color: var(--white);
  background: var(--amber);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.large-search button:hover,
.page-search-form button:hover,
.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--gray-800);
  box-shadow: var(--shadow-soft);
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: #fff7ed;
}

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

.hero-slider {
  position: relative;
  height: 700px;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--black);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.98), rgba(3, 7, 18, 0.52) 52%, rgba(3, 7, 18, 0.28));
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: 86px;
}

.hero-copy {
  max-width: 760px;
}

.hero-tags,
.detail-badges,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-badges span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span:nth-child(1),
.detail-badges span:nth-child(1) {
  color: var(--white);
  background: var(--amber);
}

.hero-tags span:nth-child(2),
.detail-badges span:nth-child(2) {
  color: var(--white);
  background: rgba(37, 99, 235, 0.88);
}

.hero-tags span:nth-child(3),
.detail-badges span:nth-child(3) {
  color: var(--white);
  background: rgba(22, 163, 74, 0.88);
}

.hero-tags span:nth-child(4),
.detail-badges span:nth-child(4) {
  color: var(--white);
  background: rgba(124, 58, 237, 0.88);
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 20px);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--amber);
  box-shadow: 0 16px 35px rgba(217, 119, 6, 0.34);
}

.secondary-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.24);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

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

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

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

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

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

.quick-search {
  margin-top: -44px;
  position: relative;
  z-index: 3;
}

.quick-search-inner,
.detail-panel,
.related-panel,
.category-overview-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.quick-search h2,
.section-title h2,
.page-hero h1,
.detail-panel h1,
.related-panel h2 {
  margin: 0;
  color: var(--gray-800);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.quick-search h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.quick-search p,
.section-title p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.large-search,
.page-search-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.large-search input,
.page-search-form input,
.filter-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
  color: var(--gray-800);
}

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

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

.section-title h2 {
  font-size: clamp(28px, 3.4vw, 42px);
}

.section-title a {
  color: var(--amber);
  font-weight: 900;
}

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

.category-card,
.category-overview-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--gray-200);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card {
  min-height: 152px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--white), #fff7ed);
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  color: var(--gray-800);
  font-size: 22px;
  font-weight: 900;
}

.category-card span,
.category-overview-card p {
  display: block;
  margin-top: 10px;
  color: var(--gray-500);
  font-size: 14px;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.42);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
}

.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.year-pill {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.movie-card h3 {
  margin: 0 0 7px;
  color: var(--gray-800);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span:nth-child(2) {
  color: #1d4ed8;
  background: #dbeafe;
}

.rank-section {
  padding-bottom: 0;
}

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

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

.rank-row {
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-row a {
  display: grid;
  grid-template-columns: 52px 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

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

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  color: var(--gray-800);
  font-size: 16px;
}

.rank-info em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.rank-extra {
  color: var(--gray-500);
  font-size: 13px;
  white-space: nowrap;
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.32), transparent 30%),
    linear-gradient(135deg, #111827, #030712 72%);
}

.compact-hero,
.category-hero {
  padding: 82px 0 72px;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(36px, 5vw, 58px);
}

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

.page-search-form {
  max-width: 640px;
  margin-top: 26px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.page-search-form input {
  color: var(--white);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.detail-shell .breadcrumb {
  color: var(--gray-500);
}

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

.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-bar label {
  color: var(--gray-800);
  font-weight: 900;
  white-space: nowrap;
}

.filter-bar input {
  border-radius: 999px;
  background: var(--gray-100);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 20px;
  align-items: center;
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.detail-main {
  background: var(--gray-50);
}

.detail-shell {
  padding-top: 34px;
  padding-bottom: 70px;
}

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

.detail-content {
  min-width: 0;
}

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

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #000;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.18), rgba(0, 0, 0, 0.54));
}

.player-play {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--white);
  background: var(--amber);
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(217, 119, 6, 0.38);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover:hover .player-play {
  background: var(--amber-dark);
  transform: scale(1.06);
}

.player-shell.is-playing .player-cover {
  display: none;
}

.detail-panel {
  border-radius: 0 0 24px 24px;
  padding: 28px;
}

.detail-panel h1 {
  margin-top: 18px;
  font-size: clamp(30px, 4vw, 46px);
}

.one-line {
  margin: 18px 0 26px;
  padding: 18px;
  border-left: 4px solid var(--amber);
  border-radius: 14px;
  color: #78350f;
  background: #fffbeb;
  font-weight: 800;
}

.detail-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.detail-section h2 {
  margin: 0 0 12px;
  color: var(--gray-800);
  font-size: 22px;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: var(--gray-100);
}

.info-list dt {
  color: var(--gray-500);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  color: var(--gray-800);
  font-weight: 900;
}

.tag-list span {
  color: var(--gray-700);
  background: var(--gray-100);
}

.related-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.related-panel h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

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

.compact-card .movie-card-link {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.compact-card .poster-wrap {
  aspect-ratio: 16 / 11;
}

.compact-card .movie-card-body {
  min-width: 0;
}

.compact-card p {
  min-height: 0;
}

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

.site-footer {
  margin-top: 76px;
  padding: 58px 0 28px;
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  color: #9ca3af;
}

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

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

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

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

  .related-panel {
    position: static;
  }
}

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

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

  .hero-slider {
    height: 620px;
  }

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

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

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

  .rank-row a {
    grid-template-columns: 44px 68px minmax(0, 1fr);
  }

  .rank-extra {
    display: none;
  }
}

@media (max-width: 640px) {
  .container,
  .content-section {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand,
  .footer-brand {
    font-size: 19px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

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

  .hero-content {
    padding-bottom: 72px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-control {
    display: none;
  }

  .large-search,
  .page-search-form,
  .filter-bar {
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
  }

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

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

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

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .compact-hero,
  .category-hero {
    padding: 66px 0 52px;
  }

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

  .detail-panel {
    padding: 20px;
  }

  .info-list,
  .compact-card .movie-card-link {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
