:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff7ed;
  --accent-soft: #fdf8f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f9fafb;
  --card: #ffffff;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 30px -18px rgba(17, 24, 39, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 20px -12px var(--primary-dark);
}

.brand:hover .brand-mark {
  background: var(--primary-dark);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #374151;
  font-weight: 600;
}

.main-nav a:hover,
.mobile-nav a:hover,
.view-more:hover {
  color: var(--primary-dark);
}

.header-search {
  position: relative;
  margin-left: auto;
  width: min(320px, 28vw);
}

.header-search input,
.panel-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  min-height: 42px;
  padding: 0 14px;
}

.header-search input:focus,
.panel-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 110;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-hover);
}

.search-results.is-open {
  display: block;
}

.search-results a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results strong {
  display: block;
  font-size: 14px;
}

.search-results small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  color: #374151;
  font-weight: 700;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: clamp(480px, 62vw, 620px);
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 24px 60px -30px rgba(17, 24, 39, 0.72);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-slide.is-active img {
  animation: heroZoom 9s ease both;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.90), rgba(17, 24, 39, 0.58) 42%, rgba(17, 24, 39, 0.18)), linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 42vw, 560px);
  bottom: clamp(72px, 12vw, 120px);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  left: clamp(22px, 6vw, 70px);
  right: clamp(22px, 6vw, 70px);
  bottom: 26px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  box-shadow: var(--shadow-card);
}

.search-panel h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.03em;
}

.panel-search {
  position: relative;
  width: min(460px, 100%);
}

.panel-search input {
  min-height: 54px;
  padding: 0 18px;
  font-size: 16px;
}

.section {
  margin-top: 44px;
}

.section.soft,
.fresh-box {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.side-card h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.18;
}

.section-head h2 {
  font-size: clamp(24px, 4vw, 32px);
  letter-spacing: -0.03em;
}

.view-more {
  color: var(--primary-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-grid.large {
  margin-top: 24px;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #111827;
}

.movie-card.compact .card-poster {
  height: 118px;
}

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

.movie-card:hover .card-poster img,
.category-tile:hover img,
.category-overview:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.04));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: block;
  padding: 16px;
}

.card-title,
.card-line,
.card-meta {
  display: block;
}

.card-title {
  min-height: 48px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  transition: color 0.2s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .card-title {
  color: var(--primary-dark);
}

.card-line {
  min-height: 42px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.compact-head {
  margin-bottom: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.rank-item img {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.rank-copy strong,
.rank-copy em,
.rank-copy small {
  display: block;
}

.rank-copy strong {
  overflow: hidden;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy small {
  margin-top: 4px;
  color: #9ca3af;
}

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

.mini-grid .movie-card .card-poster {
  height: 170px;
}

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

.category-tile,
.category-overview {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 22px;
  background: #111827;
  box-shadow: var(--shadow-card);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.14));
}

.category-tile-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-tile-copy strong,
.category-tile-copy em,
.overview-copy strong,
.overview-copy em {
  display: block;
}

.category-tile-copy strong,
.overview-copy strong {
  font-size: 20px;
  font-weight: 900;
}

.category-tile-copy em,
.overview-copy em {
  margin-top: 6px;
  color: #e5e7eb;
  font-style: normal;
  font-size: 14px;
}

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

.page-hero {
  overflow: hidden;
  padding: clamp(34px, 6vw, 64px);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  box-shadow: var(--shadow-card);
}

.page-hero.slim {
  margin-bottom: 28px;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.category-overview {
  min-height: 250px;
  padding: 16px;
  background: #ffffff;
}

.overview-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.overview-posters img {
  width: 100%;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.overview-copy {
  display: block;
  margin-top: 14px;
}

.overview-copy em {
  color: var(--muted);
}

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

.detail-primary,
.detail-side {
  min-width: 0;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.85);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.24));
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 18px 34px -18px var(--primary-dark);
}

.player-overlay strong {
  max-width: 780px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.15;
}

.player-overlay em {
  max-width: 760px;
  color: #e5e7eb;
  font-style: normal;
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.detail-card:first-of-type {
  margin-top: 22px;
}

.detail-card h1 {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.05em;
}

.detail-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: #374151;
}

.detail-card .lead {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
  color: var(--muted);
  font-size: 18px;
}

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

.detail-meta span,
.tag-row span {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.detail-side {
  position: sticky;
  top: 90px;
}

.poster-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 0;
}

.poster-card img {
  width: 110px;
  height: 150px;
  border-radius: 16px;
  object-fit: cover;
}

.poster-card strong,
.poster-card span {
  display: block;
}

.poster-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.poster-card span {
  margin-top: 8px;
  color: var(--primary-dark);
  font-weight: 800;
}

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

.side-related .movie-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
}

.side-related .card-body {
  padding: 12px;
}

.side-related .card-title {
  min-height: auto;
  font-size: 14px;
}

.side-related .card-line {
  min-height: auto;
  -webkit-line-clamp: 1;
}

.rank-page-list {
  margin-top: 22px;
}

.rank-page-list .rank-item {
  grid-template-columns: 54px 132px minmax(0, 1fr);
}

.rank-page-list .rank-item img {
  width: 132px;
  height: 82px;
}

.is-filtered-out {
  display: none !important;
}

.site-footer {
  margin-top: 64px;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
}

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

.footer-links a:hover {
  color: #fdba74;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid #1f2937;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

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

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

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

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

  .detail-side {
    position: static;
  }

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

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

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

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

  .hero-slider {
    height: 560px;
    border-radius: 22px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.22));
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 86px;
  }

  .hero-tags span {
    font-size: 12px;
  }

  .search-panel {
    display: block;
  }

  .panel-search {
    margin-top: 16px;
  }

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

  .section.soft,
  .fresh-box,
  .detail-card,
  .side-card,
  .page-hero {
    padding: 20px;
  }

  .card-poster {
    height: 220px;
  }

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

  .side-related .movie-card,
  .poster-card {
    grid-template-columns: 1fr;
  }

  .poster-card img {
    width: 100%;
    height: 240px;
  }

  .rank-item,
  .rank-page-list .rank-item {
    grid-template-columns: 38px 86px minmax(0, 1fr);
  }

  .rank-item img,
  .rank-page-list .rank-item img {
    width: 86px;
    height: 58px;
  }

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

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

  .hero-actions {
    display: grid;
  }

  .card-poster {
    height: 260px;
  }
}
