:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --orange: #f97316;
  --red: #dc2626;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.35);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.14);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
}

.header-search input,
.wide-search input,
.movie-search-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.header-search input {
  padding: 10px 14px;
}

.header-search button,
.wide-search button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  cursor: pointer;
  white-space: nowrap;
}

.header-search button {
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 99px;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  padding: 12px 16px 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--muted-strong);
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.66) 42%, rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 36%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding-top: 30px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 0;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  font-size: clamp(2.7rem, 6vw, 5.5rem);
}

.hero-content h2 {
  font-size: clamp(2rem, 4.4vw, 4.3rem);
}

.hero-content p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 1.1rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.5);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 12px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.28);
}

.ghost-button {
  padding: 11px 21px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.5);
}

.ghost-button.small {
  padding: 9px 16px;
  font-size: 0.92rem;
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(2, 6, 23, 0.46);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.section-block {
  padding: 64px 0 0;
}

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

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

.section-heading h2,
.page-hero h1,
.content-panel h2,
.player-section h2,
.detail-side-panel h2,
.ranking-panel h2,
.feature-panel h2 {
  margin: 10px 0 0;
  color: #fff;
  line-height: 1.16;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.text-link {
  color: #fed7aa;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 460px);
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2 {
  margin: 12px 0 8px;
}

.search-panel p,
.feature-panel p,
.page-hero p,
.category-overview-head p,
.movie-card-body p,
.content-panel p,
.site-footer p {
  color: var(--muted);
}

.wide-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
}

.wide-search input {
  padding: 15px 18px;
}

.wide-search button {
  padding: 0 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #020617);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 48%);
}

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.type-badge {
  left: 10px;
  top: 10px;
  background: rgba(249, 115, 22, 0.92);
}

.year-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #111827;
}

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

.movie-card-meta {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card h3 {
  margin: 8px 0;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fdba74;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.08);
  font-size: 0.78rem;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.34;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-card p {
  max-width: 280px;
  color: #cbd5e1;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.ranking-list,
.ranking-table,
.feature-panel,
.ranking-panel,
.content-panel,
.detail-side-panel,
.player-section,
.list-tools {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.ranking-list,
.ranking-table {
  overflow: hidden;
}

.ranking-item,
.ranking-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.ranking-item {
  grid-template-columns: 42px 1fr auto;
  padding: 14px 18px;
}

.ranking-row {
  grid-template-columns: 44px 1fr 1.2fr;
  padding: 16px 18px;
}

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

.ranking-item:hover,
.ranking-row:hover {
  background: rgba(249, 115, 22, 0.08);
}

.ranking-number,
.ranking-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f97316);
  font-weight: 900;
}

.ranking-title,
.ranking-row strong {
  color: #fff;
  font-weight: 800;
}

.ranking-info,
.ranking-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.feature-panel,
.ranking-panel,
.content-panel,
.detail-side-panel,
.player-section,
.list-tools {
  padding: 26px;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  padding: 58px 0 34px;
}

.page-hero p {
  max-width: 760px;
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.category-directory {
  display: grid;
  gap: 28px;
}

.category-overview-block {
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
}

.list-tools {
  display: grid;
  gap: 18px;
}

.movie-search-input {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 18px;
  background: rgba(2, 6, 23, 0.64);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.5);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.54);
  background: rgba(249, 115, 22, 0.16);
}

.empty-result {
  margin-top: 24px;
  color: var(--muted);
}

.detail-hero {
  padding: 38px 0 30px;
}

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

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 16px 0;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.1;
}

.detail-one-line {
  max-width: 820px;
  color: #dbeafe;
  font-size: 1.12rem;
}

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

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

.player-section {
  scroll-margin-top: 96px;
}

.player-section h2 {
  margin: 0 0 18px;
}

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

.movie-video,
.player-overlay,
.player-overlay img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.58;
  filter: blur(1px);
}

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

.play-circle,
.floating-play {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.38);
}

.floating-play {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
}

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

.content-panel p {
  margin: 12px 0 28px;
  font-size: 1.04rem;
}

.detail-side-panel dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.detail-side-panel dt {
  color: var(--muted);
}

.detail-side-panel dd {
  margin: 0;
  color: #fff;
}

.detail-side-panel a {
  color: #fdba74;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 34px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: center;
}

.footer-links a {
  color: var(--muted-strong);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .header-search {
    display: none;
  }
}

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

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

  .hero-slider {
    height: 74vh;
    min-height: 560px;
  }

  .hero-content {
    padding-right: 28px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .footer-grid,
  .detail-hero-grid,
  .category-overview-head {
    grid-template-columns: 1fr;
  }

  .search-panel {
    margin-top: 24px;
  }

  .movie-grid,
  .movie-grid.small-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .ranking-item,
  .ranking-row {
    grid-template-columns: 38px 1fr;
  }

  .ranking-info,
  .ranking-row em {
    grid-column: 2;
    text-align: left;
  }

  .detail-cover {
    max-width: 260px;
  }
}

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

  .site-logo span:last-child {
    max-width: 13em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero-content h1 {
    font-size: 2.45rem;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .movie-grid,
  .movie-grid.small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .wide-search {
    flex-direction: column;
    border-radius: 22px;
  }

  .wide-search button {
    width: 100%;
    padding: 12px;
  }

  .play-circle,
  .floating-play {
    width: 68px;
    height: 68px;
  }
}
