:root {
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-soft: #f9fafb;
  --color-line: #e5e7eb;
  --color-orange: #ea580c;
  --color-orange-2: #f97316;
  --color-red: #dc2626;
  --color-dark: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f9fafb;
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.site-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-orange-2), var(--color-red));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
}

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

.nav-link {
  font-size: 14px;
  font-weight: 650;
  color: #374151;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-orange);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--color-orange);
}

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

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--color-orange);
  background: #fff7ed;
}

.hero-section {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937 48%, #111827);
}

.hero-bg {
  position: absolute;
  inset: -20px;
  background-position: center;
  background-size: cover;
  filter: blur(8px);
  opacity: 0.32;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.26), transparent 32%),
    linear-gradient(to top, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.36) 54%, rgba(17, 24, 39, 0.90));
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
}

.hero-copy {
  width: min(760px, 100%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1 {
  margin: 22px 0 20px;
  color: #fff;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  max-width: 780px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.primary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--color-orange-2), var(--color-red));
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.outline-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.outline-button {
  border: 1px solid #fed7aa;
  color: var(--color-orange);
  background: #fff7ed;
}

.hero-meta {
  color: #d1d5db;
  font-size: 15px;
  font-weight: 650;
}

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

.page-shell {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  padding: 74px 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626 52%, #991b1b);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.28), transparent 26%),
    radial-gradient(circle at 82% 40%, rgba(17, 24, 39, 0.20), transparent 28%);
}

.page-hero > div {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.small-hero,
.category-hero,
.ranking-hero,
.search-hero {
  padding: 58px 0;
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 56px);
}

.home-search-section {
  position: relative;
  z-index: 2;
  margin-top: -40px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.search-input,
.filter-select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: #111827;
}

.search-input {
  padding: 0 18px;
}

.filter-select {
  padding: 0 14px;
}

.search-input:focus,
.filter-select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-result {
  min-height: 20px;
  margin: 10px 2px 0;
  color: #6b7280;
  font-size: 14px;
}

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

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

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff7ed;
  color: var(--color-orange);
  font-size: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.1;
  font-weight: 850;
  color: #111827;
}

.section-heading p {
  margin: 6px 0 0;
  color: #6b7280;
}

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

.large-grid {
  align-items: stretch;
}

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

.movie-card,
.feature-card,
.overview-category-card,
.category-tile,
.detail-info-card,
.related-card,
.ranking-panel,
.player-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.movie-card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card-poster img,
.feature-poster img,
.related-item img,
.ranking-list img,
.overview-category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card-poster img,
.feature-poster img {
  transition: transform 500ms ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.70);
  font-size: 12px;
  font-weight: 750;
}

.year-badge {
  left: 12px;
}

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

.play-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 220ms ease;
}

.movie-card:hover .play-mask {
  opacity: 1;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--color-orange);
  background: rgba(255, 255, 255, 0.92);
  font-size: 24px;
  text-indent: 3px;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-card-meta,
.feature-meta,
.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.movie-card-meta span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--color-orange);
  background: #fff7ed;
  font-size: 12px;
  font-weight: 750;
}

.movie-card-meta em,
.feature-meta span,
.ranking-text em,
.related-item em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 12px 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.feature-card {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.feature-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}

.feature-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 58%);
}

.feature-poster-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
}

.feature-poster-overlay span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.feature-poster-overlay h3 {
  margin: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 850;
}

.feature-poster em {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-style: normal;
}

.feature-body {
  padding: 18px;
}

.feature-body p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.68;
}

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

.category-tile {
  display: block;
  min-height: 164px;
  padding: 22px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

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

.category-tile span {
  color: var(--color-orange);
  font-weight: 850;
}

.category-tile strong {
  display: block;
  margin: 12px 0 8px;
  color: #111827;
  font-size: 36px;
  line-height: 1;
}

.category-tile p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.overview-category-card {
  position: relative;
  min-height: 260px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.overview-category-card img {
  position: absolute;
  inset: 0;
  filter: brightness(0.58);
}

.overview-category-card div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.96), transparent 70%);
}

.overview-category-card span {
  color: #fed7aa;
  font-weight: 800;
}

.overview-category-card h2 {
  margin: 10px 0;
  font-size: 27px;
  font-weight: 850;
}

.overview-category-card p {
  margin: 0;
  color: #e5e7eb;
  line-height: 1.6;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.ranking-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ranking-panel-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.ranking-panel-header a {
  color: var(--color-orange);
  font-size: 14px;
  font-weight: 750;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 34px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--color-orange-2), var(--color-red));
  font-weight: 850;
}

.ranking-list img {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: #e5e7eb;
}

.ranking-text {
  min-width: 0;
}

.ranking-text strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-text em {
  display: block;
  margin-top: 3px;
}

.detail-toolbar {
  background: #fff;
  border-bottom: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
}

.detail-toolbar .page-container {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  color: #6b7280;
}

.back-link {
  color: #4b5563;
  font-weight: 700;
}

.back-link:hover {
  color: var(--color-orange);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 70px;
}

.player-card {
  position: relative;
  border-radius: 18px;
  background: #000;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 150px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--color-orange-2), var(--color-red));
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
  font-weight: 850;
  transition: opacity 180ms ease, transform 180ms ease;
}

.player-card.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

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

.detail-title-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.detail-category {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--color-orange);
  background: #fff7ed;
  font-size: 14px;
  font-weight: 800;
}

.detail-title-row h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-meta-list {
  padding: 18px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  color: #4b5563;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 4px;
}

.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 650;
}

.text-section {
  margin-top: 28px;
}

.text-section h2,
.related-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 22px;
  font-weight: 850;
}

.text-section p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

.related-sidebar {
  min-width: 0;
}

.related-card {
  position: sticky;
  top: 92px;
  padding: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #e5e7eb;
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-item:hover strong {
  color: var(--color-orange);
}

.related-item em {
  display: block;
  margin-top: 5px;
}

.site-footer {
  margin-top: 24px;
  padding: 46px 0 24px;
  color: #d1d5db;
  background: #111827;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(180px, 0.7fr));
  gap: 34px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-logo {
  color: #fff;
}

.footer-brand p,
.site-footer li,
.footer-bottom {
  color: #9ca3af;
}

.footer-brand p {
  max-width: 500px;
  margin: 18px 0 0;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(75, 85, 99, 0.7);
  font-size: 14px;
}

[data-search-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .related-card {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-section,
  .hero-inner {
    min-height: 520px;
  }

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

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

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

  .detail-title-row {
    display: block;
  }

  .detail-title-row .outline-button {
    margin-top: 18px;
  }
}

@media (max-width: 560px) {
  .site-header-inner,
  .page-container,
  .page-hero > div,
  .hero-inner,
  .site-footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 34px;
  }

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

  .movie-grid,
  .feature-grid,
  .category-grid,
  .overview-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .related-item {
    grid-template-columns: 110px minmax(0, 1fr);
  }

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