:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #1e293b;
  --panel-soft: #273449;
  --line: #334155;
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #92400e;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.35);
}

* {
  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, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.11), transparent 32rem),
    radial-gradient(circle at 90% 15%, rgba(59, 130, 246, 0.09), transparent 28rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.35));
  z-index: -1;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

main {
  min-height: 70vh;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.88);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.nav-link {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(280px, 24vw);
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select,
.search-box input,
.search-box select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus,
.search-box input:focus,
.search-box select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
  background: rgba(15, 23, 42, 1);
}

.header-search button {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text-soft);
}

.mobile-menu {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-menu nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-menu .nav-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
}

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

.mobile-search input {
  padding: 10px 12px;
}

.mobile-search button,
.filter-controls button,
.search-box button {
  border: 0;
  border-radius: 12px;
  background: var(--amber);
  color: #111827;
  font-weight: 800;
  cursor: pointer;
}

.mobile-search button {
  padding: 0 16px;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.82) 24%, rgba(15, 23, 42, 0.45) 58%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.08) 58%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

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

.hero-chip,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-chip {
  padding: 7px 14px;
  margin-bottom: 18px;
  background: var(--amber);
  color: #111827;
  font-size: 0.9rem;
}

.hero-copy h1 {
  margin: 0 0 18px;
  max-width: 860px;
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-shadow: 0 18px 46px rgba(2, 6, 23, 0.62);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.75;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--amber);
  color: #111827;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover {
  background: var(--amber-light);
  box-shadow: 0 22px 46px rgba(245, 158, 11, 0.34);
}

.btn-ghost {
  border: 1px solid rgba(203, 213, 225, 0.24);
  background: rgba(15, 23, 42, 0.48);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.82);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section,
.page-section,
.detail-section {
  padding: 56px 0;
}

.content-section + .content-section,
.page-section + .content-section {
  padding-top: 8px;
}

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

.section-heading h1,
.section-heading h2,
.filter-panel h1,
.detail-title h1,
.search-hero h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
}

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

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-heading p,
.filter-panel p,
.search-hero p,
.category-card p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  color: var(--amber);
  font-weight: 800;
}

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

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

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 24px;
}

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

.movie-card,
.movie-list-card,
.category-card,
.rank-row,
.info-panel,
.player-panel,
.related-panel {
  border: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.56);
  background: rgba(39, 52, 73, 0.94);
  box-shadow: 0 28px 70px rgba(245, 158, 11, 0.14);
}

.poster-wrap,
.poster-large,
.list-poster {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.poster-wrap {
  aspect-ratio: 2 / 3;
}

.poster-wrap img,
.poster-large img,
.list-poster img,
.detail-cover img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.year-badge,
.play-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.78);
  color: white;
}

.play-badge {
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--amber);
  color: #111827;
}

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

.movie-card-body h3,
.list-info h3,
.poster-caption h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.35;
  color: var(--text);
}

.movie-card-body p,
.list-info p,
.poster-caption p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.card-tags,
.meta-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.card-tags span,
.meta-row span,
.detail-tags span,
.chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.chip-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-light);
}

.poster-large {
  height: 100%;
  min-height: 430px;
  border-radius: 18px;
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.05) 72%);
}

.poster-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.poster-caption h3 {
  margin-top: 12px;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.movie-list-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  overflow: hidden;
  min-height: 132px;
  border-radius: 16px;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-list-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(39, 52, 73, 0.94);
}

.list-poster span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.78);
  color: white;
  font-size: 0.78rem;
}

.list-info {
  padding: 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 68px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(39, 52, 73, 0.92);
}

.rank-num {
  color: var(--amber);
  font-size: 1.35rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.rank-row img {
  width: 68px;
  height: 90px;
  border-radius: 10px;
}

.rank-main {
  display: grid;
  gap: 6px;
}

.rank-main strong {
  font-size: 1.02rem;
}

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

.rank-score {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.11);
  color: var(--amber-light);
  font-weight: 800;
}

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

.category-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 60%);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.56);
}

.category-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.category-stat {
  color: var(--amber-light);
  font-size: 2.2rem;
  font-weight: 900;
}

.filter-panel,
.search-hero {
  margin: 48px auto 26px;
  padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.78);
  box-shadow: var(--shadow);
}

.filter-controls,
.search-box {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.9fr auto;
  gap: 12px;
  margin-top: 22px;
}

.filter-controls input,
.filter-controls select,
.search-box input,
.search-box select {
  padding: 12px 14px;
}

.filter-controls button,
.search-box button {
  min-width: 92px;
  padding: 0 18px;
}

.filter-status {
  color: var(--amber-light) !important;
}

.empty-state {
  display: none;
  padding: 40px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.empty-state.is-visible {
  display: block;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 0;
}

.page-link,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.78);
  color: var(--text-soft);
  font-weight: 700;
}

.page-link:hover,
.page-link.is-current {
  border-color: var(--amber);
  color: var(--amber-light);
}

.page-link.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

.detail-hero {
  padding: 46px 0 28px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0));
}

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

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-title h1 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.82);
  color: var(--text-soft);
  border: 1px solid rgba(51, 65, 85, 0.72);
}

.player-section {
  padding: 26px 0 56px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: #020617;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.55);
  cursor: pointer;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: var(--amber);
  color: #111827;
  font-size: 2.4rem;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.info-panel,
.related-panel,
.player-panel {
  padding: 24px;
  border-radius: 22px;
}

.info-panel + .info-panel {
  margin-top: 20px;
}

.info-panel h2,
.related-panel h2,
.player-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.info-panel p,
.player-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.9;
}

.related-list {
  display: grid;
  gap: 14px;
}

.search-results {
  padding-bottom: 56px;
}

.sitemap-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 0;
  list-style: none;
}

.sitemap-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.68);
  color: var(--text-soft);
}

.sitemap-list a:hover {
  color: var(--amber-light);
  background: rgba(39, 52, 73, 0.92);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(2, 6, 23, 0.68);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0 28px;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.site-footer p,
.site-footer a,
.footer-bottom p {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--amber);
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.52);
}

.footer-bottom p {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

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

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

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

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

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

  .brand-copy small {
    display: none;
  }

  .hero-slider {
    height: 500px;
  }

  .hero-content {
    padding-bottom: 58px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .page-section,
  .detail-section {
    padding: 38px 0;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .footer-grid,
  .sitemap-list {
    grid-template-columns: 1fr;
  }

  .movie-list-card,
  .rank-row {
    grid-template-columns: 96px 1fr;
  }

  .rank-num,
  .rank-score {
    display: none;
  }

  .rank-row img {
    width: 96px;
    height: 128px;
  }

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

  .detail-cover {
    width: min(260px, 78vw);
  }

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

  .filter-controls button,
  .search-box button {
    min-height: 44px;
  }
}
