:root {
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --red-dark: #991b1b;
  --blue: #2563eb;
  --cyan: #0891b2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 12px 35px rgba(17, 24, 39, 0.12);
  --shadow-strong: 0 24px 55px rgba(17, 24, 39, 0.25);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(153, 27, 27, 0.24);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.logo-text {
  font-size: 1.55rem;
}

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

.nav-link {
  position: relative;
  font-weight: 650;
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffedd5;
  opacity: 1;
}

.nav-link.active::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 3px;
  content: "";
  background: #fed7aa;
  border-radius: 999px;
}

.header-search {
  position: relative;
  width: 250px;
  flex: 0 0 auto;
}

.global-search,
.local-filter-input,
.filter-select {
  width: 100%;
  color: var(--gray-800);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.global-search {
  padding: 10px 16px;
}

.global-search:focus,
.local-filter-input:focus,
.filter-select:focus {
  border-color: #fed7aa;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.22);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  width: min(420px, 90vw);
  max-height: 430px;
  overflow: auto;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
}

.search-result-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-item:hover {
  background: #fff7ed;
}

.search-result-item img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-200);
}

.search-result-title {
  font-weight: 800;
}

.search-result-meta {
  font-size: 0.84rem;
  color: var(--gray-500);
}

.menu-toggle {
  display: none;
  padding: 8px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 10px;
}

.mobile-nav {
  padding: 0 16px 16px;
}

.mobile-link {
  display: block;
  padding: 12px 16px;
  color: var(--white);
  border-radius: 12px;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search-wrap {
  position: relative;
  margin-top: 8px;
}

.mobile-results {
  position: static;
  width: 100%;
  max-height: 320px;
  margin-top: 8px;
}

.hero-slider {
  position: relative;
  height: min(640px, calc(100vh - 72px));
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, #7c2d12, #7f1d1d);
}

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

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

.hero-image,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: 76px;
  color: var(--white);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--red);
  border-radius: 999px;
}

.section-kicker {
  padding: 0;
  margin: 0;
  color: var(--orange);
  background: transparent;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 840px;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span,
.category-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.primary-button,
.ghost-button,
.text-button,
.filter-reset,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--orange);
  box-shadow: 0 15px 30px rgba(234, 88, 12, 0.28);
}

.primary-button:hover,
.filter-reset:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-section {
  padding: 56px 0;
}

.search-section {
  margin-top: -44px;
  position: relative;
  z-index: 10;
}

.search-card {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 480px);
  gap: 28px;
  align-items: center;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.search-card h2,
.section-heading h2,
.content-panel h2,
.category-overview-body h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.2;
}

.search-card p {
  margin: 10px 0 0;
  color: var(--gray-500);
}

.wide-search {
  position: relative;
}

.wide-global-search {
  padding: 16px 20px;
  border: 1px solid var(--gray-200);
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.04);
}

.wide-results {
  right: 0;
  left: 0;
  width: 100%;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-heading > div {
  flex: 1 1 auto;
}

.section-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  font-size: 1.35rem;
  background: #fff7ed;
  border-radius: 14px;
}

.section-more,
.text-button,
.filter-reset {
  color: var(--orange-dark);
  background: #ffedd5;
  border: 0;
}

.light-heading h2,
.light-heading .section-kicker,
.light-more {
  color: var(--white);
}

.light-heading .section-icon,
.light-more {
  background: rgba(255, 255, 255, 0.16);
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-200);
}

.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);
}

.year-badge,
.rating-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.66);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 12px;
  left: 12px;
}

.rating-badge {
  right: 12px;
  bottom: 12px;
  background: rgba(234, 88, 12, 0.9);
}

.rank-badge {
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.card-meta-line {
  display: flex;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: var(--gray-900);
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.horizontal-info h3 a:hover,
.category-overview-body h2 a:hover {
  color: var(--orange);
}

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

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

.card-tags span,
.tag {
  padding: 4px 9px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 700;
  background: #fff7ed;
  border-radius: 999px;
}

.category-band {
  padding: 56px 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

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

.category-tile,
.category-overview-card {
  overflow: hidden;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  display: block;
  transition: transform 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
}

.category-posters,
.category-overview-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 110px;
  overflow: hidden;
  background: var(--gray-200);
}

.category-posters img,
.category-overview-posters img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
}

.category-info,
.category-overview-body {
  padding: 18px;
}

.category-info h3,
.category-overview-body h2 {
  margin: 0 0 8px;
}

.category-info p,
.category-overview-body p {
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 0.92rem;
}

.category-info span,
.category-stats span {
  color: var(--orange-dark);
  font-weight: 800;
}

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

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

.horizontal-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.horizontal-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-200);
  border-radius: 13px;
}

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

.horizontal-info h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.horizontal-info p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--gray-500);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.list-rank {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 50%;
}

.compact-meta span {
  color: var(--gray-500);
  background: var(--gray-100);
  border-color: var(--gray-100);
}

.page-hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(135deg, #7c2d12, #991b1b);
}

.compact-page-hero {
  padding: 80px 0 72px;
}

.compact-page-hero p {
  margin-bottom: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 110px;
  gap: 14px;
  align-items: center;
  padding: 18px;
  margin-bottom: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
}

.local-filter-input,
.filter-select {
  padding: 12px 16px;
  border-color: var(--gray-200);
}

.result-count {
  margin: 0 0 20px;
  color: var(--gray-500);
  font-weight: 800;
}

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

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

.category-overview-posters {
  grid-template-columns: repeat(3, 1fr);
  min-height: 240px;
}

.category-overview-posters img {
  min-height: 240px;
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-stats span {
  color: var(--gray-700);
  background: var(--gray-100);
  border-color: var(--gray-100);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.04);
}

.detail-backdrop-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 55%, rgba(17, 24, 39, 0.38));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 34px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #fed7aa;
}

.detail-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
}

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

.detail-info h1 {
  font-size: clamp(2.25rem, 5vw, 4.4rem);
}

.tag-row {
  margin: 20px 0 26px;
}

.tag-row .tag {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.player-section {
  padding-bottom: 32px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #050505;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
}

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

.video-play-button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.42));
  border: 0;
}

.video-play-button span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding-left: 6px;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 50%;
  box-shadow: 0 16px 40px rgba(234, 88, 12, 0.35);
}

.video-shell.is-playing .video-play-button {
  display: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 24px 0 12px;
}

.content-panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
}

.content-panel p {
  margin: 14px 0 0;
  color: var(--gray-700);
}

.info-panel {
  grid-column: 1 / -1;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 18px;
  margin: 16px 0 0;
}

.info-panel dt {
  color: var(--gray-500);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: var(--gray-800);
}

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

.site-footer {
  margin-top: 24px;
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 8px;
  color: #d1d5db;
}

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

[hidden] {
  display: none !important;
}

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

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

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

  .header-search {
    width: min(42vw, 280px);
    margin-left: auto;
  }

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

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

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

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

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

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

  .logo-text {
    font-size: 1.25rem;
  }

  .header-search {
    display: none;
  }

  .hero-slider {
    min-height: 540px;
  }

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

  .hero-control {
    top: auto;
    bottom: 24px;
    width: 42px;
    height: 42px;
    transform: none;
  }

  .hero-prev {
    left: 16px;
  }

  .hero-next {
    right: 16px;
  }

  .search-card,
  .filter-panel,
  .detail-layout,
  .detail-content-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .horizontal-grid,
  .category-tile-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

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

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

@media (max-width: 520px) {
  .movie-grid,
  .category-tile-grid,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.35rem;
  }

  .page-section {
    padding: 38px 0;
  }

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