* {
  box-sizing: border-box;
}

:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #dc2626;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --card: #ffffff;
  --shadow: 0 10px 25px rgba(17, 24, 39, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f9fafb;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--orange-dark), var(--red));
  box-shadow: 0 8px 24px rgba(127, 29, 29, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

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

.nav-link {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fed7aa;
  opacity: 1;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 250px;
}

.header-search input,
.mobile-search input,
.page-search input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 46px 10px 18px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.94);
}

.header-search button,
.mobile-search button,
.page-search button {
  border: 0;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
}

.header-search button {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

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

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-nav-link.is-active {
  background: rgba(255, 255, 255, 0.22);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search button,
.page-search button {
  border-radius: 999px;
  padding: 0 18px;
}

.hero-section {
  position: relative;
  background: #000;
}

.hero-stage {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: 80px;
  max-width: 760px;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  border-radius: 999px;
  font-weight: 700;
  background: var(--orange);
  margin-bottom: 16px;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.card-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.primary-btn {
  color: #fff;
  background: var(--orange);
}

.primary-btn:hover,
.page-search button:hover,
.header-search button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  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: 32px;
  background: var(--orange);
}

.hero-site-copy {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: max(32px, calc((100% - 1180px) / 2));
  top: 82px;
  color: #fff;
  pointer-events: none;
}

.hero-site-copy h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.hero-site-copy p {
  max-width: 620px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

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

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

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

.section-heading h2,
.ranking-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  color: #1f2937;
}

.section-more,
.ranking-head a {
  color: var(--orange-dark);
  font-weight: 700;
}

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

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

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  height: 245px;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card-large .poster-wrap {
  height: 360px;
}

.movie-card-compact .poster-wrap {
  height: 180px;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.movie-card:hover .poster-wrap::after {
  background: rgba(0, 0, 0, 0.38);
}

.year-badge,
.card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.year-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.card-badge {
  left: 12px;
  background: var(--orange);
}

.hover-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-large .card-body h3 {
  font-size: 22px;
}

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

.card-meta span {
  color: #c2410c;
  background: #ffedd5;
}

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

.category-feature {
  border-radius: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.12);
}

.category-feature-head h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-feature-head h3:hover {
  color: var(--orange-dark);
}

.category-feature-head p {
  margin: 0 0 18px;
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.side-column {
  position: sticky;
  top: 88px;
}

.ranking-card,
.detail-info-card,
.player-card,
.side-poster-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ranking-card {
  padding: 20px;
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

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

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

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

.rank-num {
  width: 32px;
  color: var(--orange-dark);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

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

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

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

.page-main {
  padding: 28px 0 0;
}

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

.breadcrumb a {
  color: var(--orange-dark);
}

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  margin-right: 8px;
  color: #d1d5db;
}

.page-hero {
  border-radius: 24px;
  padding: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-dark), var(--red));
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.18);
}

.small-hero {
  margin-bottom: 34px;
}

.category-hero {
  margin-bottom: 20px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.page-search {
  display: flex;
  max-width: 620px;
  gap: 10px;
  margin-top: 24px;
}

.page-search input {
  padding-right: 18px;
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pill-link {
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: #374151;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
}

.pill-link.is-current,
.pill-link:hover {
  color: #fff;
  background: var(--orange);
}

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

.category-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 155px;
  background: #111827;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 20px;
}

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.category-card-body span {
  color: var(--orange-dark);
  font-weight: 800;
}

.ranking-layout {
  display: grid;
  gap: 30px;
}

.ranking-wide {
  padding: 24px;
}

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

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
}

.player-wrap {
  position: relative;
  background: #000;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.28));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: var(--orange);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.3);
  font-size: 34px;
}

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

.detail-info-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
}

.detail-info-card h2 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 22px;
}

.detail-info-card p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

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

.detail-meta-row span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #c2410c;
  background: #ffedd5;
  font-weight: 700;
}

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

.detail-tags span {
  color: #374151;
  background: #f3f4f6;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.side-poster-card {
  overflow: hidden;
}

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

.side-poster-card h2,
.side-poster-card p {
  margin-left: 18px;
  margin-right: 18px;
}

.side-poster-card h2 {
  margin-top: 18px;
  margin-bottom: 8px;
}

.side-poster-card p {
  margin-top: 0;
  color: var(--muted);
}

.block-btn {
  display: flex;
  margin: 18px;
}

.related-section {
  padding-top: 36px;
}

.site-footer {
  margin-top: 60px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-inner p {
  margin: 8px 0 0;
  color: #9ca3af;
}

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

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid #374151;
  color: #9ca3af;
  text-align: center;
}

[hidden],
.is-filtered-out {
  display: none !important;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-stage {
    height: 560px;
  }

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

  .featured-grid,
  .category-card-grid,
  .category-feature-grid,
  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-column,
  .detail-side {
    position: static;
  }

  .rank-list-wide {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero-stage {
    height: 520px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 70px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

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

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

  .movie-grid,
  .featured-grid,
  .latest-grid,
  .mini-grid,
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .poster-wrap,
  .movie-card-large .poster-wrap,
  .movie-card-compact .poster-wrap {
    height: 210px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 13px;
  }

  .page-hero {
    padding: 28px;
  }

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

  .page-search button {
    min-height: 42px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .latest-grid,
  .mini-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card-large .poster-wrap,
  .movie-card-compact .poster-wrap {
    height: 320px;
  }

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