:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 28rem), var(--bg);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 75% 8%, rgba(59, 130, 246, 0.12), transparent 24rem);
  z-index: -1;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

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

.logo-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent);
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.22);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  color: var(--muted-strong);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

.header-search,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease;
}

.header-search,
.primary-btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 34px rgba(245, 158, 11, 0.26);
}

.header-search {
  padding: 10px 18px;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
}

.header-search:hover,
.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(245, 158, 11, 0.12);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 720px;
  height: 88vh;
  overflow: hidden;
  background: #000;
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

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

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

.hero-gradient {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(2, 6, 23, 0.22) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding-top: 68px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.card-tags,
.detail-meta,
.detail-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.card-tags span,
.detail-meta span,
.detail-tags span,
.chip-row a {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted-strong);
  padding: 7px 12px;
  font-size: 13px;
}

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 32px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
  background: var(--accent);
}

.section {
  padding: 80px 0;
}

.section-dark {
  background: linear-gradient(180deg, #020617, #0f172a);
}

.section-deep {
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.section-heading h2,
.ranking-block h2,
.related-side h2,
.detail-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

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

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

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

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

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

.movie-card {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(30, 41, 59, 0.82);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-card-wide .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover img,
.category-tile:hover img,
.category-panel:hover img,
.compact-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.03) 52%);
}

.play-dot,
.player-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.04);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-info {
  padding: 16px;
}

.card-info h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile,
.category-panel {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.category-tile span,
.category-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.18));
}

.category-tile div,
.category-panel div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.category-tile h3,
.category-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p,
.category-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-preview span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
  font-size: 12px;
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.25s ease, background 0.25s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.86);
}

.compact-card img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.45s ease;
}

.compact-card h4 {
  margin: 0 0 6px;
  line-height: 1.35;
}

.compact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.compact-rank {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent);
  font-weight: 900;
}

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

.page-hero {
  padding: 88px 0 64px;
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.18), transparent 28rem), linear-gradient(180deg, #0f172a, #020617);
  border-bottom: 1px solid var(--line);
}

.small-hero h1 {
  font-size: clamp(42px, 6vw, 64px);
}

.search-panel {
  margin-top: 28px;
  max-width: 760px;
}

.search-panel input {
  width: 100%;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  outline: 0;
  padding: 0 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.search-panel input:focus {
  border-color: rgba(245, 158, 11, 0.62);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.chip-row {
  margin-top: 18px;
}

.chip-row a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.22);
}

.ranking-page-grid {
  display: grid;
  gap: 34px;
}

.ranking-block {
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.ranking-block h2 {
  margin-bottom: 20px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 26px 0 18px;
}

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

.player-section {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
  color: #fff;
}

.player-section.is-playing .player-cover {
  display: none;
}

.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.player-play-icon {
  opacity: 1;
  width: 82px;
  height: 82px;
  font-size: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  padding: 28px 0 80px;
}

.detail-card,
.related-side {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  padding: 28px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.05em;
}

.detail-card p {
  color: var(--muted-strong);
  line-height: 1.95;
  font-size: 16px;
}

.detail-card .lead-text {
  font-size: 19px;
  color: #fff;
  padding: 18px 0;
}

.detail-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-tags {
  margin-top: 26px;
}

.related-side {
  height: fit-content;
  position: sticky;
  top: 92px;
}

.related-side h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

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

.site-footer {
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid var(--line);
}

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

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

.site-footer h3 {
  margin: 0 0 16px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

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

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

[hidden] {
  display: none !important;
}

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

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

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

  .related-side {
    position: static;
  }

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

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    padding-top: 96px;
    justify-content: flex-end;
    padding-bottom: 110px;
  }

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 56px 0;
  }

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

  .movie-grid,
  .large-grid,
  .wide-grid,
  .category-grid,
  .category-panel-grid,
  .ranking-list,
  .ranking-list-page {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 88px 1fr;
  }

  .compact-rank {
    position: absolute;
    right: 10px;
    top: 10px;
  }

  .detail-card,
  .related-side,
  .ranking-block {
    padding: 20px;
  }

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

@media (max-width: 460px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-grid {
    width: min(100% - 22px, 1180px);
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .poster-wrap {
    aspect-ratio: 16 / 10;
  }
}
