:root {
  --primary-50: #fef9ee;
  --primary-100: #fdf2d7;
  --primary-300: #f7ca7a;
  --primary-500: #f08d1f;
  --primary-600: #e17015;
  --primary-700: #bb5413;
  --primary-800: #954217;
  --secondary-100: #f5f3ec;
  --secondary-700: #897256;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft-shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
  --strong-shadow: 0 28px 70px rgba(17, 24, 39, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 28%, #fef9ee 100%);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--primary-800), var(--primary-700), var(--primary-600));
  box-shadow: 0 12px 35px rgba(149, 66, 23, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary-800);
  background: linear-gradient(135deg, #fff, var(--primary-100));
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-text small {
  margin-top: 4px;
  color: var(--primary-100);
  font-size: 12px;
}

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

.nav-link {
  color: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-800);
  background: var(--primary-100);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 8px 8px 14px;
}

.header-search input::placeholder {
  color: #fae1ae;
}

.header-search button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  color: var(--primary-800);
  background: var(--primary-100);
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.menu-button {
  display: none;
  color: #fff;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  color: #fff;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 52px;
  padding: 78px max(32px, calc((100vw - 1180px) / 2)) 80px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 1.1s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow,
.hero-kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 900;
  color: var(--primary-300);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-shadow: 0 20px 55px rgba(0, 0, 0, 0.36);
}

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

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

.hero-tags {
  margin: 24px 0 0;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.hero-actions,
.detail-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 14px 32px rgba(225, 112, 21, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(225, 112, 21, 0.45);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn-ghost.light {
  color: var(--primary-800);
  border-color: rgba(149, 66, 23, 0.22);
  background: var(--primary-100);
}

.btn-link {
  color: var(--primary-100);
}

.hero-poster {
  position: relative;
  z-index: 2;
  width: min(360px, 30vw);
  justify-self: end;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--strong-shadow);
  border: 1px solid rgba(255, 255, 255, 0.28);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-500));
}

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

img.is-missing {
  opacity: 0;
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.search-band,
.content-section,
.page-hero,
.breadcrumbs,
.detail-hero,
.player-section,
.detail-text {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-band {
  margin-top: -56px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
}

.search-band h2,
.content-section h2,
.page-hero h1,
.detail-intro h1,
.detail-text h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.search-band h2 {
  font-size: 28px;
}

.search-band p,
.page-hero p,
.category-card-large p,
.category-tile small,
.site-footer p {
  color: var(--muted);
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
}

.wide-search input,
.inline-filter input,
.big-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
}

.content-section {
  padding: 66px 0 0;
}

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

.section-title-row h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.section-more {
  color: var(--primary-700);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.86);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.15);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-500));
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.poster-year,
.poster-score {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.poster-year {
  left: 10px;
}

.poster-score {
  right: 10px;
  background: rgba(225, 112, 21, 0.88);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--primary-700);
  background: var(--primary-50);
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-card-large a {
  display: flex;
  flex-direction: column;
  min-height: 138px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, var(--primary-50));
  border: 1px solid rgba(247, 202, 122, 0.42);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  transition: 0.2s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-4px);
  box-shadow: var(--soft-shadow);
}

.category-tile span,
.category-card-large h2 {
  font-size: 20px;
  font-weight: 900;
}

.category-tile small,
.category-card-large p {
  margin-top: 10px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: start;
}

.split-section .content-section {
  width: auto;
  padding: 0;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border-radius: 26px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.compact-title h2 {
  font-size: 30px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: var(--primary-50);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-100);
  transform: translateX(3px);
}

.rank-num {
  color: var(--primary-700);
  font-weight: 900;
  font-size: 18px;
}

.rank-thumb {
  display: block;
  width: 54px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-500));
}

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

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

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

.rank-info small {
  color: var(--muted);
}

.rank-score {
  color: #fff;
  background: var(--primary-600);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
}

.page-main {
  padding-bottom: 80px;
}

.page-hero {
  margin-top: 34px;
  padding: 58px;
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(135deg, rgba(149, 66, 23, 0.98), rgba(225, 112, 21, 0.9)), radial-gradient(circle at top right, rgba(253, 242, 215, 0.4), transparent 34%);
  box-shadow: var(--soft-shadow);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.06;
}

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

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

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #fff;
  background: var(--primary-600);
  font-weight: 900;
}

.inline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

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

.big-filter {
  max-width: 620px;
  margin-top: 24px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

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

.breadcrumbs a {
  color: var(--primary-700);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 28px;
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff, var(--primary-50));
  box-shadow: var(--soft-shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-500));
  box-shadow: var(--strong-shadow);
}

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

.detail-intro h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.detail-meta {
  margin-top: 18px;
}

.detail-meta span,
.detail-tags span {
  color: var(--primary-700);
  background: var(--primary-100);
}

.detail-one-line {
  margin: 24px 0 0;
  color: #374151;
  font-size: 18px;
}

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

.player-section {
  padding-top: 56px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 16 / 9;
  background: #030712;
  box-shadow: var(--strong-shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030712;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(225, 112, 21, 0.2), rgba(3, 7, 18, 0.36));
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 20px 50px rgba(225, 112, 21, 0.45);
  font-size: 34px;
  padding-left: 4px;
}

.detail-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 48px;
}

.detail-text article {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.detail-text p {
  margin: 14px 0 0;
  color: #374151;
}

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

.site-footer {
  margin-top: 86px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #27160c 62%, var(--primary-800));
}

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

.footer-inner strong {
  font-size: 24px;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.footer-links a,
.footer-cats a {
  color: var(--primary-100);
  font-weight: 800;
}

.copyright {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.72);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .split-section,
  .search-band {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

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

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

  .hero {
    height: auto;
    min-height: 590px;
  }

  .hero-slide {
    padding: 78px 24px 86px;
  }

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

  .hero-desc {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

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

  .category-grid,
  .category-large-grid,
  .full-rank,
  .detail-text,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .page-hero,
  .search-band {
    padding: 24px;
    border-radius: 26px;
  }

  .detail-poster {
    width: min(260px, 100%);
    margin: 0 auto;
  }

  .inline-filter {
    width: 100%;
    min-width: 0;
  }

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

@media (max-width: 520px) {
  .nav-shell,
  .mobile-panel,
  .search-band,
  .content-section,
  .page-hero,
  .breadcrumbs,
  .detail-hero,
  .player-section,
  .detail-text,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-slide {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-actions,
  .detail-actions,
  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wide-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .movie-grid,
  .related-grid,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 34px 48px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }
}
