:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #fb923c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.92);
  border-color: var(--line);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111827;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav a,
.mobile-panel a {
  padding: 10px 14px;
  border-radius: 13px;
  color: var(--soft);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.header-search input,
.hero-search input,
.filter-bar input,
.search-controls input,
.filter-bar select,
.search-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 11px 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  outline: none;
}

.header-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.search-controls input:focus,
.filter-bar select:focus,
.search-controls select:focus {
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.header-search button,
.hero-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 15px;
  padding: 11px 17px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.22);
}

.ghost-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: none;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

.mobile-panel {
  display: none;
  padding: 0 18px 18px;
  background: rgba(2, 6, 23, 0.96);
  border-bottom: 1px solid var(--line);
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 48%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 140px 22px 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.7);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 76px;
  z-index: 7;
  width: min(720px, calc(100% - 44px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.68);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.category-strip,
.section-block,
.split-section,
.page-hero,
.player-section,
.ranking-page,
.search-panel,
.overview-list {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding-top: 44px;
}

.category-card,
.category-overview-card,
.content-card,
.ranking-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.category-card {
  padding: 18px;
  min-height: 126px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.55);
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 850;
}

.category-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.section-block {
  padding-top: 60px;
  padding-bottom: 20px;
}

.section-block.no-margin {
  padding: 0;
}

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

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 55%);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 15px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.movie-card strong {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 17px;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.2em;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.6;
  font-size: 14px;
}

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

.tag-row span {
  font-size: 12px;
  padding: 5px 8px;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-no {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

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

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

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

.rank-info em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding-top: 140px;
}

.small-hero > div,
.detail-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(26px, 5vw, 54px);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 32rem),
    rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.overview-list {
  display: grid;
  gap: 24px;
  padding-top: 34px;
  padding-bottom: 50px;
}

.category-overview-card {
  padding: 24px;
}

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

.category-overview-head h2 {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 500;
}

.filter-bar,
.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  max-width: 1280px;
  margin: 26px auto 0;
  padding-left: 22px;
  padding-right: 22px;
}

.search-panel {
  margin-top: 30px;
  margin-bottom: 58px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.search-controls {
  grid-template-columns: minmax(0, 1fr) 190px 170px;
  padding: 0 0 22px;
}

.ranking-page {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 26px;
  padding-top: 30px;
  padding-bottom: 60px;
}

.large-rank-list {
  align-self: start;
}

.detail-hero {
  position: relative;
  padding-top: 104px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  height: 560px;
  opacity: 0.46;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.06);
}

.detail-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: end;
}

.detail-poster img {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.large-tags {
  margin: 6px 0 24px;
}

.player-section {
  padding-top: 34px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.26), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.player-cover span {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 30px;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.32);
}

.player-cover strong {
  font-size: 20px;
}

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

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--accent);
}

.content-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.56);
}

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

  .split-section,
  .ranking-page {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    min-height: 78vh;
    padding-top: 120px;
    padding-bottom: 160px;
  }

  .hero-search {
    flex-direction: column;
    bottom: 62px;
  }

  .hero-arrow {
    display: none;
  }

  .category-strip,
  .poster-grid,
  .feature-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar,
  .search-controls {
    grid-template-columns: 1fr;
  }

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

  .detail-poster img {
    width: min(260px, 76vw);
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 68px;
    padding: 0 16px;
  }

  .brand span:last-child {
    max-width: 168px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .category-strip,
  .poster-grid,
  .feature-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card-compact .poster-wrap {
    aspect-ratio: 3 / 4;
  }

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

  .page-hero,
  .detail-hero {
    padding-top: 92px;
  }
}
