:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --dark: #111827;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --amber: #d97706;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.narrow-container {
  width: min(920px, calc(100% - 32px));
}

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

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.32);
}

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

.brand-text strong {
  font-size: 20px;
  color: var(--text);
}

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

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

.nav-link,
.mobile-nav-link {
  color: #374151;
  font-weight: 600;
  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-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  height: 2px;
  background: #111827;
  border-radius: 10px;
}

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

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

.hero {
  position: relative;
  height: 72vh;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.03);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

.hero-shade {
  background:
    radial-gradient(circle at 72% 20%, rgba(234, 88, 12, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.66) 44%, rgba(17, 24, 39, 0.22)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.96), transparent 42%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 86px;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 22px);
  color: #e5e7eb;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

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

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-ghost.light {
  color: #fff;
}

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

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

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

.section {
  padding: 76px 0;
}

.section-white {
  background: #fff;
}

.section-soft {
  background: var(--soft);
}

.section-gradient {
  background:
    radial-gradient(circle at 82% 10%, rgba(234, 88, 12, 0.15), transparent 28%),
    linear-gradient(180deg, #fff7ed, #ffffff);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.panel-title h2,
.player-heading h2,
.text-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-heading p,
.page-hero p,
.category-body p,
.footer-about p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(234, 88, 12, 0.28);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.card-body {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-meta,
.card-desc,
.rank-info small,
.rank-desc,
.mini-link small {
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 12px;
}

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

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

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-visual {
  position: relative;
  display: block;
  height: 180px;
  overflow: hidden;
  background: #111827;
}

.category-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.5s ease;
}

.category-visual span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.category-body {
  padding: 18px;
}

.category-body h3 {
  margin: 0;
  font-size: 21px;
}

.category-samples {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.category-samples a {
  color: #374151;
  font-size: 14px;
}

.category-samples a:hover {
  color: var(--orange);
}

.rank-panel {
  position: sticky;
  top: 100px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 88, 12, 0.28);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.rank-row.compact-row {
  grid-template-columns: 42px 64px minmax(0, 1fr);
  padding: 8px;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.rank-row img {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

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

.rank-row:hover strong {
  color: var(--orange);
}

.full-rank {
  gap: 16px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  margin: 24px 0 28px;
}

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

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

.page-hero {
  padding: 84px 0;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(234, 88, 12, 0.35), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 58%, #431407);
}

.compact-hero {
  padding: 62px 0 48px;
}

.page-hero-inner {
  max-width: 850px;
}

.page-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.page-hero p {
  color: #e5e7eb;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: blur(1px);
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 50%, rgba(17, 24, 39, 0.34)),
    linear-gradient(0deg, rgba(17, 24, 39, 1), transparent 45%);
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 650px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.detail-one-line {
  max-width: 780px;
  color: #e5e7eb;
  font-size: 19px;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.player-heading {
  margin-bottom: 22px;
}

.player-heading .eyebrow {
  margin-bottom: 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

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

.play-circle {
  position: absolute;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: var(--orange);
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.38);
}

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

.text-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.text-panel p {
  margin: 14px 0 0;
  color: #374151;
  font-size: 17px;
}

.mini-link {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mini-link img {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-link span {
  display: grid;
  min-width: 0;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 54px 0 36px;
}

.footer-brand {
  color: #fff;
  font-weight: 900;
  font-size: 20px;
}

.footer-about p {
  max-width: 520px;
  color: #9ca3af;
}

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

.footer-links {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: #d1d5db;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@keyframes heroZoom {
  from {
    transform: scale(1.03);
  }

  to {
    transform: scale(1.09);
  }
}

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

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

  .rank-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: flex;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    align-items: center;
    padding: 88px 0 70px;
  }

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

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .detail-poster {
    max-width: 240px;
  }

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

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

  .brand-text small {
    display: none;
  }

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

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

  .btn {
    width: 100%;
  }

  .movie-grid,
  .latest-grid,
  .category-movie-grid,
  .search-grid,
  .category-grid,
  .category-grid.compact {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-row img {
    width: 72px;
    height: 72px;
  }

  .detail-info h1 {
    font-size: 34px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
