:root {
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --yellow: #facc15;
  --purple: #7e22ce;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #fff7ed 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 10px 30px rgba(194, 65, 12, .28);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .02em;
}

.site-logo {
  color: #fff;
  white-space: nowrap;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
}

.logo-text {
  font-size: 22px;
}

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

.nav-link {
  color: rgba(255, 255, 255, .9);
  font-weight: 700;
  transition: color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffedd5;
  transform: translateY(-1px);
}

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

.nav-search input {
  width: 230px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
}

.nav-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease;
}

.nav-search button:hover,
.large-search button:hover {
  transform: translateY(-1px);
  background: #000;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .66) 42%, rgba(0, 0, 0, .18) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, calc(100% - 32px));
  margin-left: max(24px, calc((100vw - 1180px) / 2));
  color: #fff;
}

.hero-kicker,
.sub-hero-content span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(234, 88, 12, .32);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.06;
  letter-spacing: -.04em;
  text-shadow: 0 15px 50px rgba(0, 0, 0, .45);
}

.hero-copy h2 + h2 {
  margin-top: 8px;
  font-size: clamp(28px, 3.6vw, 48px);
}

.hero-copy p {
  max-width: 620px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  margin: 0 0 20px;
}

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

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffedd5;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

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

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

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 38px;
  line-height: 1;
  background: rgba(255, 255, 255, .24);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: background .2s ease, transform .2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, .38);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  transition: width .2s ease, background .2s ease;
}

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

.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 5;
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-hero h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.search-hero p,
.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.large-search {
  display: flex;
  gap: 12px;
}

.large-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px;
  outline: none;
  background: #fff;
}

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

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

.section-heading a {
  color: var(--orange-dark);
  font-weight: 900;
}

.section-heading.compact {
  margin-bottom: 16px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, .16);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .64));
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.82);
  transition: opacity .25s ease, transform .25s ease;
}

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

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.movie-body {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 30px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #4b5563;
  font-size: 13px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f3f4f6;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
}

.movie-card-list .movie-poster {
  height: 100%;
  aspect-ratio: auto;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

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

.home-ranking,
.article-card,
.player-side,
.filter-bar,
.category-card,
.search-page-form {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .08);
}

.home-ranking {
  padding: 22px;
  align-self: start;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f9fafb;
  transition: background .2s ease, transform .2s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  font-weight: 900;
}

.rank-item img {
  width: 66px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #111827;
}

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

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  font-weight: 900;
}

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.highlight-section {
  border-radius: 28px;
  padding: 34px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

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

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

.category-card {
  display: block;
  padding: 24px;
  overflow: hidden;
  position: relative;
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-card:before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -54px;
  top: -54px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(234, 88, 12, .16), rgba(220, 38, 38, .08));
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .12);
}

.category-card span {
  color: var(--orange-dark);
  font-weight: 900;
  font-size: 13px;
}

.category-card h3 {
  margin: 10px 0 8px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.footer-logo {
  color: #fff;
  font-size: 24px;
}

.footer-inner p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-copy {
  font-size: 14px;
}

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

.sub-hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.sub-hero-content {
  position: relative;
  z-index: 1;
  padding: 86px 0;
}

.sub-hero-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
}

.sub-hero-content p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}

.filter-bar {
  padding: 16px;
  margin-bottom: 24px;
}

.filter-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
}

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

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

.detail-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 76px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .36);
  background: #111827;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.05;
}

.detail-line {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 19px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

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

.player-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
  transition: opacity .25s ease, visibility .25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-play {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 20px 45px rgba(234, 88, 12, .35);
  font-size: 30px;
}

.player-title {
  max-width: 80%;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

.player-side {
  padding: 24px;
}

.player-side h2,
.article-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.player-side p,
.article-card p {
  margin: 0;
  color: var(--muted);
}

.side-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.side-links a {
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff7ed;
  color: var(--orange-dark);
  font-weight: 900;
}

.article-card {
  padding: 28px;
}

.article-card h2:not(:first-child) {
  margin-top: 24px;
}

.search-page-form {
  padding: 18px;
  margin-bottom: 26px;
}

.is-hidden-card {
  display: none;
}

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

  .split-section,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .home-ranking {
    order: -1;
  }
}

@media (max-width: 820px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-menu {
    display: none;
    width: 100%;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-menu.is-open + .nav-search {
    display: flex;
  }

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

  .nav-toggle {
    display: block;
  }

  .hero {
    height: 580px;
  }

  .hero-copy {
    margin-left: 20px;
    margin-right: 20px;
  }

  .hero-arrow {
    display: none;
  }

  .search-hero,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .search-hero {
    margin-top: 18px;
  }

  .large-search {
    flex-direction: column;
  }

  .movie-grid-four,
  .movie-grid-three,
  .category-grid,
  .category-grid.large,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster {
    width: min(260px, 100%);
  }
}

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

  .logo-text {
    font-size: 18px;
  }

  .hero {
    height: 540px;
  }

  .hero-copy p,
  .sub-hero-content p,
  .detail-line {
    font-size: 16px;
  }

  .movie-grid-four,
  .movie-grid-three,
  .category-grid,
  .category-grid.large,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-list {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .highlight-section {
    padding: 22px;
  }

  .rank-item {
    grid-template-columns: 30px 56px minmax(0, 1fr);
  }

  .rank-item img {
    width: 56px;
    height: 44px;
  }
}
