:root {
  --color-bg: #f8fafc;
  --color-ink: #0f172a;
  --color-muted: #64748b;
  --color-soft: #e2e8f0;
  --color-card: #ffffff;
  --color-dark: #0f172a;
  --color-dark-2: #1e293b;
  --color-accent: #f97316;
  --color-accent-2: #fb923c;
  --shadow-soft: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--color-dark-2), var(--color-dark));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-2), var(--color-accent));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.35);
}

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

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 20px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-cover,
.detail-hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.25)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 96px 360px 96px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.32);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 18px 0 10px;
  color: #fff7ed;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-more,
.filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--color-accent-2), var(--color-accent));
  color: #fff;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.filter-reset:hover {
  transform: translateY(-2px);
}

.hero-side-panel {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100vw - 1180px) / 2));
  top: 96px;
  width: 320px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.panel-title {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-weight: 800;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 28px;
  background: var(--color-accent);
}

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

.section-slate {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 58px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, #fff, #f1f5f9);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.section-more,
.filter-reset {
  border: 1px solid var(--color-soft);
  background: #fff;
  color: var(--color-ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--color-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.search-box,
.select-box {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

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

.search-box input:focus,
.select-box select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

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

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

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

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent 60%);
}

.play-pill,
.rank-row-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--color-accent);
}

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

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

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

.category-card,
.category-overview-card,
.detail-text-card,
.detail-aside {
  border: 1px solid var(--color-soft);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.category-card {
  padding: 22px;
  min-height: 150px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.category-card span,
.category-overview-card h2 {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--color-accent);
  font-weight: 800;
}

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

.mini-posters img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
}

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

.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 70px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--color-soft);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-row:hover {
  border-color: #fdba74;
}

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

.list-number {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
}

.rank-row-main {
  min-width: 0;
}

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

.rank-row-main small {
  color: var(--color-muted);
}

.rank-row .rank-row-play {
  position: static;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero {
  padding: 86px max(16px, calc((100vw - 1180px) / 2));
}

.small-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.category-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
}

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

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

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

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

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

.detail-meta {
  margin: 18px 0;
}

.large-tags span {
  margin-bottom: 6px;
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -88px auto 0;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.30), rgba(15, 23, 42, 0.74));
  cursor: pointer;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-2), var(--color-accent));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.40);
  font-size: 30px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

.detail-main {
  display: grid;
  gap: 20px;
}

.detail-text-card,
.detail-aside {
  padding: 24px;
}

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

.detail-text-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.info-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.info-grid span {
  color: var(--color-muted);
}

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

.side-list .rank-row {
  grid-template-columns: 64px 1fr auto;
  min-height: 78px;
}

.side-list .rank-row img {
  width: 64px;
  height: 58px;
}

.side-list .list-number {
  display: none;
}

.js-movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links strong,
.footer-logo strong {
  color: #fff;
}

.footer-links a:hover {
  color: var(--color-accent-2);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

  .hero-content {
    padding-right: 0;
  }

  .hero-side-panel {
    position: relative;
    inset: auto;
    width: min(1180px, calc(100% - 32px));
    margin: -120px auto 42px;
  }

  .hero-carousel {
    min-height: auto;
    padding-bottom: 1px;
  }

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

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

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

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

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

  .hero-content {
    min-height: 580px;
    padding: 70px 0 130px;
  }

  .hero-side-panel {
    display: none;
  }

  .hero-dots {
    bottom: 18px;
  }

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

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

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .category-grid,
  .category-overview-grid,
  .rank-board {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

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

  .detail-hero-inner {
    padding: 48px 0 120px;
  }

  .player-section {
    margin-top: -70px;
  }

  .rank-row,
  .side-list .rank-row {
    grid-template-columns: 64px 1fr;
  }

  .rank-row .list-number,
  .rank-row .rank-row-play {
    display: none;
  }

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