:root {
  --primary-50: #fef8f2;
  --primary-100: #fdebd8;
  --primary-400: #f29d5b;
  --primary-500: #ee7f38;
  --primary-600: #e0642d;
  --primary-700: #ba4d27;
  --accent-500: #eab308;
  --secondary-50: #f5f5f4;
  --secondary-100: #e7e6e3;
  --secondary-500: #736d5f;
  --secondary-700: #4d4944;
  --secondary-800: #433f3c;
  --warm-50: #fdf8f6;
  --warm-100: #f2e8e5;
  --warm-200: #eaddd7;
  --warm-300: #e0cec7;
  --white: #ffffff;
  --shadow-md: 0 10px 22px rgba(67, 63, 60, 0.1);
  --shadow-xl: 0 22px 50px rgba(67, 63, 60, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--secondary-800);
  background: var(--warm-50);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 24px rgba(67, 63, 60, 0.08);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(238, 127, 56, 0.28);
}

.brand-name {
  color: var(--secondary-800);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
  color: var(--secondary-700);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--primary-600);
  background: var(--primary-50);
}

.search-box,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input,
.mobile-search input {
  width: 230px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  outline: none;
  background: var(--white);
}

.search-box input:focus,
.mobile-search input:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(238, 127, 56, 0.12);
}

.search-box button,
.mobile-search button,
.primary-button,
.secondary-button,
.play-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-box button,
.mobile-search button {
  height: 40px;
  padding: 0 16px;
  color: var(--white);
  background: var(--primary-500);
}

.search-box button:hover,
.mobile-search button:hover,
.primary-button:hover,
.play-button:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(440px, 88vw);
  max-height: 430px;
  overflow: auto;
  padding: 10px;
  display: none;
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: 18px;
  box-shadow: var(--shadow-xl);
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
}

.search-result:hover {
  background: var(--warm-50);
}

.search-result img {
  width: 64px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-100), var(--warm-200));
}

.search-result strong {
  display: block;
  color: var(--secondary-800);
  line-height: 1.35;
}

.search-result span {
  color: var(--secondary-500);
  font-size: 13px;
}

.search-empty {
  padding: 14px;
  color: var(--secondary-500);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--warm-100);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: var(--secondary-800);
}

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

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-800), var(--primary-700));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.34), transparent 34%), radial-gradient(circle at bottom right, rgba(238, 127, 56, 0.35), transparent 36%);
  pointer-events: none;
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 610px;
}

.hero-slide.is-active {
  display: block;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(23, 20, 18, 0.9) 0%, rgba(23, 20, 18, 0.66) 44%, rgba(23, 20, 18, 0.2) 100%), var(--hero-img);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 610px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.58fr);
  align-items: center;
  gap: 48px;
  padding: 64px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: var(--primary-50);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 660px;
  color: var(--warm-100);
  font-size: 18px;
}

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

.primary-button,
.secondary-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.primary-button,
.play-button {
  color: var(--white);
  background: var(--primary-500);
  box-shadow: 0 15px 30px rgba(238, 127, 56, 0.28);
}

.secondary-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

.hero-tags a,
.hero-tags span,
.tag-row span,
.detail-tags span,
.category-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags a,
.hero-tags span {
  color: var(--primary-50);
  background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(1.4deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.62));
}

.hero-poster-info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
}

.hero-poster-info strong {
  display: block;
  font-size: 22px;
}

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

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

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

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

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

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

.page-hero h1,
.detail-title h1 {
  margin: 0 0 12px;
  color: var(--secondary-800);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p,
.section-heading p,
.detail-title p {
  margin: 0;
  color: var(--secondary-500);
  font-size: 17px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.section-link {
  flex: 0 0 auto;
  color: var(--primary-600);
  font-weight: 900;
}

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

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

.movie-card {
  height: 100%;
  overflow: hidden;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card a {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--warm-200));
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card.large .poster-frame img {
  aspect-ratio: 16 / 9;
}

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

.type-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.type-pill {
  right: 12px;
  background: rgba(238, 127, 56, 0.94);
}

.rank-badge {
  left: 12px;
  min-width: 34px;
  background: rgba(67, 63, 60, 0.86);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  flex: 1;
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--secondary-500);
  font-size: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--secondary-500);
  font-size: 13px;
  font-weight: 700;
}

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

.tag-row span,
.detail-tags span,
.category-links a {
  color: var(--primary-700);
  background: var(--primary-50);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 26px;
}

.panel {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

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

.compact-card a {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.compact-card a:hover {
  background: var(--warm-50);
}

.compact-poster {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-100), var(--warm-200));
}

.compact-poster img {
  width: 112px;
  height: 72px;
  object-fit: cover;
}

.compact-rank {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(238, 127, 56, 0.94);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.compact-card h3 {
  margin: 0 0 4px;
  color: var(--secondary-800);
  font-size: 16px;
  line-height: 1.35;
}

.compact-card p {
  margin: 0 0 6px;
  color: var(--secondary-500);
  font-size: 13px;
}

.compact-card span {
  color: var(--secondary-500);
  font-size: 12px;
}

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-800), var(--primary-600));
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -44px;
  bottom: -52px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-tile p {
  margin: 0;
  color: var(--warm-100);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 0;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--white);
  color: var(--secondary-700);
  box-shadow: 0 8px 18px rgba(67, 63, 60, 0.08);
  font-weight: 800;
}

.pagination a:hover,
.pagination a.is-current {
  color: var(--white);
  background: var(--primary-500);
}

.pagination span {
  opacity: 0.55;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 0;
  color: var(--secondary-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-600);
  font-weight: 700;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-panel,
.detail-info,
.text-block,
.related-panel {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.player-frame {
  position: relative;
  background: #151210;
}

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

.player-actions {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.play-status {
  color: var(--secondary-500);
  font-size: 14px;
}

.detail-info {
  padding: 26px;
}

.detail-title h1 {
  font-size: clamp(34px, 4vw, 52px);
}

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

.detail-meta div {
  padding: 14px;
  background: var(--warm-50);
  border-radius: 16px;
}

.detail-meta span {
  display: block;
  color: var(--secondary-500);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--secondary-800);
}

.text-block,
.related-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 28px;
}

.text-block h2,
.related-panel h2,
.panel h2 {
  margin: 0 0 14px;
  color: var(--secondary-800);
  font-size: 26px;
}

.text-block p {
  margin: 0 0 14px;
  color: var(--secondary-700);
  font-size: 17px;
}

.next-prev {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.next-prev a {
  flex: 1;
  padding: 18px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  color: var(--primary-700);
  font-weight: 900;
}

.site-footer {
  margin-top: 60px;
  color: var(--warm-100);
  background: var(--secondary-800);
}

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

.footer-logo .brand-name {
  color: var(--white);
}

.footer-brand p,
.footer-links p,
.footer-links a {
  color: var(--warm-200);
}

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

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--warm-300);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

@media (max-width: 1020px) {
  .nav-links,
  .search-box {
    display: none;
  }

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

  .mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .mobile-search input {
    width: 100%;
  }

  .hero-content,
  .detail-hero,
  .split-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 420px;
    transform: none;
  }

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

@media (max-width: 640px) {
  .top-nav,
  .mobile-menu,
  .page-section,
  .page-hero,
  .detail-section,
  .breadcrumb,
  .detail-hero,
  .text-block,
  .related-panel,
  .next-prev,
  .footer-inner,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 42px 0 78px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

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

  .hero-actions,
  .next-prev {
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.featured,
  .category-band {
    grid-template-columns: 1fr;
  }

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

  .compact-card a {
    grid-template-columns: 96px 1fr;
  }

  .compact-poster img {
    width: 96px;
    height: 64px;
  }

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

  .player-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
