*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --accent-2: #ea580c;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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(234, 88, 12, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(234, 88, 12, 0.92));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

.header-search {
  margin-left: auto;
  width: min(360px, 34vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
}

.header-search input {
  flex: 1;
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
}

.header-search input::placeholder {
  color: #64748b;
}

.header-search button,
.search-box button {
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.9);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #f8fafc;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 560px;
  margin: 28px auto 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 48px;
  align-items: center;
  padding: 68px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.76;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.28), transparent 24rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 60%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 12px;
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 999px;
  background: rgba(154, 52, 18, 0.35);
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.tag-row span,
.meta-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.26);
}

.btn-secondary {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
  transition: 0.3s ease;
}

.hero-poster:hover {
  transform: translateY(-4px) rotate(0deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.95));
}

.hero-dots {
  position: absolute;
  left: 68px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.26);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #f59e0b;
}

.section {
  margin: 36px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card,
.category-tile,
.panel-card,
.rank-panel,
.detail-panel,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.9));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
}

.movie-card {
  overflow: hidden;
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.12);
}

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

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.9));
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.poster-year {
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

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

.movie-meta,
.movie-line,
.detail-muted {
  color: var(--muted);
}

.movie-meta {
  margin: 0;
  font-size: 13px;
}

.movie-line {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}

.tag-row {
  margin-top: auto;
}

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

.category-tile {
  padding: 18px;
  min-height: 210px;
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fed7aa;
  font-weight: 900;
}

.category-tile h3 {
  margin: 0;
  color: #e2e8f0;
  font-size: 16px;
  line-height: 1.75;
}

.tile-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.tile-links a {
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-links a:hover {
  color: #f59e0b;
}

.search-panel {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  color: #fff;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
  padding: 14px 16px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  color: #fef3c7;
  cursor: pointer;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.08);
}

.filter-chip:hover {
  background: rgba(245, 158, 11, 0.2);
}

.hot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.rank-panel,
.panel-card {
  padding: 20px;
}

.hot-list {
  display: grid;
  gap: 10px;
}

.hot-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
  transition: 0.2s ease;
}

.hot-link:hover {
  background: rgba(245, 158, 11, 0.12);
}

.hot-link span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: rgba(245, 158, 11, 0.88);
}

.hot-link strong,
.hot-link em {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-link em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  margin: 28px 0 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.17), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 54px;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fcd34d;
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(2, 6, 23, 0.6);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-copy {
  align-self: center;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
}

.detail-copy p {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.player-card {
  margin: 24px 0;
  padding: 18px;
}

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

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

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.38), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
}

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

.play-mask span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.35);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
  margin-bottom: 42px;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.player-card h2,
.rank-panel h2,
.panel-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rank-page-list {
  display: grid;
  gap: 16px;
  counter-reset: rank-list;
}

.rank-row {
  display: grid;
  grid-template-columns: 74px 120px minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.44);
}

.rank-number {
  color: #f59e0b;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-action {
  justify-self: end;
}

.not-found {
  display: none;
  padding: 28px;
  text-align: center;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.75);
}

.not-found.is-visible {
  display: block;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #fff;
}

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

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

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 48px;
  }
}

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

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

  .mobile-nav.is-open {
    display: grid;
    gap: 6px;
  }

  .hero,
  .hero-track {
    min-height: 680px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: end;
    padding: 34px;
  }

  .hero-poster {
    width: min(240px, 60vw);
    transform: none;
  }

  .hero-dots {
    left: 34px;
  }

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

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

  .detail-poster {
    max-width: 340px;
  }

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

  .rank-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

@media (max-width: 620px) {
  main,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1240px);
  }

  .hero,
  .hero-track {
    min-height: 720px;
    border-radius: 24px;
  }

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

  .hero-slide,
  .page-hero,
  .detail-hero {
    padding: 24px;
  }

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

  .section-header {
    display: block;
  }

  .search-box {
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .rank-number {
    font-size: 22px;
  }

  .rank-info h2 {
    font-size: 18px;
  }
}
