:root {
  color-scheme: light;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --orange-900: #7c2d12;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --text-main: #1f2937;
  --text-soft: #6b7280;
  --line: rgba(234, 88, 12, 0.16);
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.16);
  --shadow-soft: 0 10px 28px rgba(124, 45, 18, 0.1);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--amber-50), var(--orange-50) 55%, var(--amber-100));
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--orange-600), var(--amber-600), var(--orange-700));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(124, 45, 18, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #fde68a;
  font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: rotate(12deg) scale(1.05);
}

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

.logo-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-subtitle {
  margin-top: 3px;
  color: #ffedd5;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 650;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(330px, 32vw);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #ffffff;
  padding: 9px 12px;
}

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

.search-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--orange-600);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-button:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 18px rgba(124, 45, 18, 0.18);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
}

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

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

.mobile-panel .nav-link,
.mobile-panel .header-search {
  width: 100%;
  margin-top: 8px;
}

.main-content {
  flex: 1;
}

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

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--orange-900), #92400e);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 48%, rgba(0, 0, 0, 0.1));
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 70px 0 56px;
  color: #ffffff;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  color: #fff7ed;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero-summary {
  max-width: 700px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ed;
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

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

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.38);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(8px);
}

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

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 64px));
}

.hero-next {
  right: max(18px, calc((100vw - 1180px) / 2 - 64px));
}

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

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

.hero-dot.active {
  background: #ffffff;
}

.section {
  padding: 54px 0 0;
}

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

.section-title {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--text-soft);
  line-height: 1.8;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--orange-600);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange-100), var(--amber-100));
}

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

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
  opacity: 1;
}

.badge-year,
.badge-rank {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 10px;
  background: var(--orange-500);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.badge-rank {
  background: linear-gradient(135deg, #dc2626, var(--orange-500));
}

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

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 850;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--orange-600);
}

.card-summary {
  min-height: 46px;
  margin: 8px 0 12px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 12px;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  max-width: 50%;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--orange-100);
  color: var(--orange-700);
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-card {
  display: block;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
  display: block;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 900;
}

.category-card span {
  display: block;
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.7;
}

.category-card em {
  display: inline-flex;
  margin-top: 14px;
  color: var(--orange-600);
  font-style: normal;
  font-weight: 800;
}

.page-hero {
  padding: 58px 0 34px;
}

.page-hero-card {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 52px);
  background: linear-gradient(135deg, #ffffff, #fff7ed 60%, #ffedd5);
  box-shadow: var(--shadow-soft);
}

.page-hero h1 {
  margin: 0;
  max-width: 920px;
  color: var(--text-main);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 8px;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffff;
  color: var(--orange-700);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  background: var(--orange-600);
  color: #ffffff;
}

.inline-search {
  display: flex;
  width: min(620px, 100%);
  margin-top: 24px;
  border-radius: 999px;
  background: #ffffff;
  padding: 6px;
  box-shadow: var(--shadow-soft);
}

.inline-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 12px 16px;
  background: transparent;
}

.inline-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--orange-600);
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 94px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.rank-thumb {
  width: 94px;
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--orange-100);
}

.rank-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.rank-desc {
  margin: 7px 0 10px;
  color: var(--text-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.58));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
  font-size: 36px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.player-info {
  padding: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange-600);
  font-weight: 750;
}

.detail-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--orange-100);
  color: var(--orange-700);
  font-size: 13px;
  font-weight: 800;
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-card p {
  color: #374151;
  line-height: 1.9;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.tags span {
  padding: 6px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
}

.side-card {
  padding: 18px;
}

.side-card + .side-card {
  margin-top: 22px;
}

.poster-large {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--orange-100), var(--amber-100));
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 8px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: var(--orange-50);
}

.related-item img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--orange-100);
}

.related-title {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 12px;
}

.related-summary {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(90deg, var(--orange-900), var(--amber-700));
  color: #ffedd5;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #fde68a;
  font-weight: 750;
}

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

.search-results {
  min-height: 320px;
}

.empty-state {
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 46px 24px;
  color: var(--text-soft);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

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

  .main-nav {
    display: none;
  }

  .mobile-menu-button {
    display: grid;
    place-items: center;
  }

  .mobile-panel .header-search {
    display: flex;
  }

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

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

  .side-card {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
  }

  .logo-title {
    font-size: 20px;
  }

  .logo-subtitle {
    font-size: 11px;
  }

  .hero {
    height: 520px;
  }

  .hero-copy {
    padding: 48px 0 50px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding-top: 40px;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .category-panel,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .card-poster,
  .movie-grid.compact .card-poster {
    height: 220px;
  }

  .rank-item {
    grid-template-columns: 42px 80px 1fr;
  }

  .rank-thumb {
    width: 80px;
    height: 108px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-panel,
  .hero-copy-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .movie-grid.compact,
  .category-panel,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .card-poster,
  .movie-grid.compact .card-poster {
    height: 330px;
  }

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

  .detail-card,
  .player-info {
    padding: 20px;
  }
}
