:root {
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --card: #ffffff;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --amber: #d97706;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  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: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 10px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 21px;
  font-weight: 800;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 24px 20px;
  background: #ffffff;
}

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  height: 720px;
  max-height: 82vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg {
  opacity: 0.62;
  transform: scale(1.02);
}

.hero-overlay,
.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px 0;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange);
  padding: 5px 13px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.hero-content h1,
.detail-hero-content h1,
.small-hero h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p,
.detail-hero-content p,
.small-hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
}

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

.primary-button,
.ghost-button,
.outline-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--orange);
  box-shadow: 0 14px 26px rgba(234, 88, 12, 0.35);
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover {
  transform: translateY(-2px);
}

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

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.outline-button {
  color: var(--orange);
  border: 1px solid rgba(234, 88, 12, 0.35);
  background: #ffffff;
}

.outline-button.full {
  width: 100%;
}

.hero-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.content-section {
  padding: 72px 0;
  background: #ffffff;
}

.section-soft {
  background: #f3f4f6;
}

.section-gradient {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
}

.poster-large {
  aspect-ratio: 3 / 4;
}

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

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

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

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

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

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

.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-line span {
  border-radius: 999px;
  color: var(--orange);
  background: #fff7ed;
  padding: 3px 8px;
  font-style: normal;
  font-weight: 800;
}

.movie-meta-line em {
  font-style: normal;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card p {
  display: -webkit-box;
  min-height: 43px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  border-radius: 999px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  height: 100%;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  background: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs,
.overview-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.overview-mosaic {
  grid-template-columns: repeat(6, 1fr);
}

.category-thumbs img,
.overview-mosaic img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p,
.category-overview-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
}

.category-tile span,
.category-overview-card span {
  color: var(--orange);
  font-weight: 800;
}

.ranking-list,
.ranking-page-list,
.compact-list {
  display: grid;
  gap: 14px;
}

.ranking-row,
.ranking-card,
.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover,
.ranking-card:hover,
.compact-card:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.rank-no {
  min-width: 42px;
  color: var(--orange);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img,
.ranking-card img,
.compact-card img {
  width: 70px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.rank-info,
.ranking-card span,
.compact-card span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.rank-info strong,
.ranking-card strong,
.compact-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small,
.ranking-card small,
.compact-card small,
.ranking-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.ranking-card small {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-row em {
  margin-left: auto;
  color: var(--orange);
  font-style: normal;
  font-weight: 800;
}

.more-line {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.small-hero {
  padding: 86px 0;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.45), transparent 38%), linear-gradient(135deg, #111827, #1f2937);
}

.small-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #6b7280;
  font-size: 14px;
}

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

.breadcrumb.light,
.breadcrumb.light a {
  color: rgba(255, 255, 255, 0.82);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 14px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.search-panel {
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  padding: 0 12px;
  color: #111827;
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.empty-hint {
  margin: 24px 0;
  border-radius: 16px;
  background: #fff7ed;
  padding: 18px;
  color: var(--orange-dark);
  font-weight: 800;
}

.detail-hero {
  min-height: 560px;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 72px 0;
}

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.22));
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
}

.player-button-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

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

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

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

.recommend-card {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.meta-card dl div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.meta-card dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-card dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.detail-tags .tag-chip {
  font-size: 13px;
}

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

.sticky-side {
  position: sticky;
  top: 96px;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 52px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
}

.footer-logo .brand-copy strong {
  color: #ffffff;
}

.footer-logo .brand-copy small,
.footer-brand p,
.site-footer a,
.site-footer li {
  color: #9ca3af;
}

.footer-brand p {
  max-width: 520px;
}

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

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

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

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

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

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

  .sticky-side {
    position: static;
  }
}

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

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

  .brand-copy strong {
    font-size: 19px;
  }

  .hero-carousel {
    height: 620px;
    min-height: 620px;
  }

  .hero-content,
  .detail-hero-content {
    padding: 70px 0;
  }

  .movie-grid-6,
  .movie-grid-5,
  .movie-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    height: 560px;
    min-height: 560px;
  }

  .hero-content h1,
  .detail-hero-content h1,
  .small-hero h1 {
    font-size: 34px;
  }

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

  .movie-grid-6,
  .movie-grid-5,
  .movie-grid-4,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .ranking-row,
  .ranking-card,
  .compact-card {
    align-items: flex-start;
  }

  .ranking-row em {
    display: none;
  }
}
