:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #ef4444;
  --green: #16a34a;
  --purple: #7c3aed;
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #374151;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

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

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

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

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 18px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #f97316 45%, #ef4444);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.54), rgba(249, 115, 22, 0.62)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 45%);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 580px;
  padding-top: 54px;
}

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

.hero-kicker {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  width: min(680px, 100%);
  margin: 0 0 24px;
  color: #ffedd5;
  font-size: clamp(18px, 2.3vw, 25px);
}

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

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

.card-tags span,
.detail-tags span {
  background: #fff7ed;
  color: #c2410c;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.32);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--orange-dark);
}

.hero-controls {
  position: absolute;
  right: max(22px, calc((100vw - 1180px) / 2));
  bottom: 120px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-controls button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px !important;
  height: 9px !important;
  border-radius: 999px !important;
  padding: 0 !important;
}

.hero-dot.is-active {
  width: 28px !important;
  background: #fff;
}

.hero-rail {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  transform: translateX(-50%);
}

.hero-rail a {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(18px);
}

.hero-rail img {
  width: 64px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-rail span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-top {
  padding-top: 48px;
}

.soft-section {
  padding: 62px 0;
  background: linear-gradient(135deg, #fff7ed, #fff 42%, #f0f9ff);
}

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

.section-heading h2,
.page-title-block h1,
.detail-content h2,
.watch-copy h2,
.side-card h2 {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  position: relative;
  padding-left: 18px;
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading h2::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(var(--orange), var(--red));
  content: "";
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111827;
}

.movie-card-compact .card-cover {
  aspect-ratio: 1 / 1;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.card-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 55%);
  content: "";
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: #fff;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 12px 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

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

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

.category-tile {
  min-height: 150px;
  padding: 24px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.category-tile span {
  display: block;
  color: #6b7280;
  font-size: 14px;
}

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

.rank-panel,
.side-card,
.watch-panel,
.detail-content article,
.filter-panel,
.ranking-list {
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
}

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

.rank-title {
  display: block;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

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

.page-title-block {
  width: min(780px, 100%);
  margin-bottom: 32px;
}

.page-title-block h1 {
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.05;
}

.page-title-block p {
  color: var(--muted);
  font-size: 18px;
}

.breadcrumb {
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
}

.page-title-block .breadcrumb {
  color: var(--orange-dark);
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

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

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-search,
.filter-selects {
  display: flex;
  gap: 12px;
}

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

.filter-search button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  font-weight: 900;
}

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

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.08);
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72), rgba(249, 115, 22, 0.42));
}

.detail-hero-content {
  position: relative;
  padding: 54px 0;
}

.detail-intro {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

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

.detail-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-line {
  width: min(760px, 100%);
  color: #ffedd5;
  font-size: 20px;
}

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

.detail-meta span,
.detail-meta strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 900;
}

.watch-panel {
  overflow: hidden;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.34), transparent 50%);
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-layer span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  font-size: 34px;
  text-indent: 5px;
}

.watch-copy {
  padding: 24px;
}

.watch-copy p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.detail-content article,
.side-card {
  padding: 28px;
}

.detail-content article p {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.side-card dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px 14px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  font-weight: 900;
}

.ranking-featured {
  margin-bottom: 30px;
}

.ranking-list {
  overflow: hidden;
}

.ranking-item {
  display: grid;
  grid-template-columns: 56px 86px minmax(0, 1fr) 220px 72px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-item span {
  color: var(--orange-dark);
  font-size: 24px;
  font-weight: 900;
}

.ranking-item img {
  width: 86px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item em {
  color: var(--muted);
  font-style: normal;
}

.ranking-item b {
  color: var(--orange-dark);
}

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

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

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #9ca3af;
  text-align: center;
}

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

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

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

  .rank-panel {
    position: static;
  }

  .hero-rail {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .menu-button {
    display: block;
  }

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

  .hero {
    min-height: 720px;
  }

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

  .hero-controls {
    right: 20px;
    bottom: 148px;
  }

  .hero-rail {
    grid-template-columns: 1fr;
    bottom: 20px;
  }

  .hero-rail a:nth-child(n + 3) {
    display: none;
  }

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

  .category-card-large,
  .detail-intro {
    grid-template-columns: 1fr;
  }

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

  .filter-search,
  .filter-selects,
  .footer-grid {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 40px 70px minmax(0, 1fr) 54px;
  }

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

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

  .brand {
    font-size: 20px;
  }

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

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

  .card-cover,
  .movie-card-compact .card-cover {
    aspect-ratio: 16 / 10;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-intro h1 {
    font-size: 40px;
  }

  .play-layer span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
