:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #101010;
  --panel-soft: #171717;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --dim: #737373;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 34rem),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 30rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(1280px, calc(100% - 28px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #111;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 1.08rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

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

.nav-link,
.mobile-nav-link {
  color: #d4d4d4;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.94rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.header-search {
  width: 260px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 9px 4px 9px 14px;
}

.header-search button {
  border: 0;
  color: #111;
  cursor: pointer;
  background: var(--accent);
  padding: 9px 14px;
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
}

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

.hero-carousel {
  position: relative;
  min-height: 72vh;
  margin-top: 68px;
  overflow: hidden;
  background: #080808;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.7s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.2)),
    linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 48px;
  padding: 70px 0;
}

.hero-copy {
  max-width: 720px;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #111;
  background: rgba(245, 158, 11, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #d4d4d4;
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.tile-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #111;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.18);
}

.ghost-button,
.tile-link,
.section-more {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-poster-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(10, 10, 10, 0.54);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.hero-poster-card span {
  color: #d4d4d4;
  line-height: 1.6;
  font-size: 0.95rem;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

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

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2,
.filter-panel h2,
.content-card h2,
.rank-side h2,
.rank-aside h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.68);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
}

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

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}

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

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

.card-badge,
.card-year {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-badge {
  left: 12px;
  color: #111;
  background: rgba(245, 158, 11, 0.92);
}

.card-year {
  right: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.62);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--accent);
}

.card-meta {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 0.84rem;
}

.card-desc {
  min-height: 3.3em;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.tag-row span {
  min-height: 22px;
  padding: 4px 8px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 700;
}

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

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

.category-tile {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile > div {
  position: relative;
  z-index: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 72%);
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.category-tile p {
  color: #d4d4d4;
  line-height: 1.7;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 18px;
}

.mini-links a {
  color: var(--accent);
  font-size: 0.86rem;
}

.rank-layout,
.rank-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111;
  background: linear-gradient(135deg, var(--accent), #facc15);
  font-weight: 950;
}

.rank-item a {
  display: grid;
  gap: 5px;
}

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

.rank-item span:last-child {
  color: var(--muted);
  font-size: 0.86rem;
}

.rank-side,
.rank-aside,
.content-card,
.filter-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow);
}

.rank-side,
.rank-aside {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 92px;
}

.rank-side p {
  color: var(--muted);
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 26px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 130px 90px;
  gap: 10px;
}

.filter-controls input,
.filter-controls select,
.filter-controls button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  padding: 0 12px;
  outline: 0;
}

.filter-controls button {
  cursor: pointer;
  color: #111;
  border: 0;
  background: var(--accent);
  font-weight: 900;
}

.subpage {
  padding-top: 68px;
}

.page-hero {
  padding: 92px 0 58px;
  background:
    radial-gradient(circle at 16% 10%, rgba(245, 158, 11, 0.2), transparent 34rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero h1 {
  margin-bottom: 12px;
}

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

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

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

.detail-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #080808;
}

.detail-inner {
  position: relative;
  z-index: 2;
  padding: 64px 0 52px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 880px;
}

.detail-tags a {
  color: #111;
}

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

.info-list div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.28);
}

.info-list dt {
  color: var(--dim);
  font-size: 0.8rem;
}

.info-list dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 800;
}

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

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

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

.movie-video {
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  background: #000;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1));
}

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

.player-cover strong,
.play-circle {
  position: absolute;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
}

.play-circle {
  top: 42%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: linear-gradient(135deg, var(--accent), #facc15);
  font-size: 2rem;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.player-cover strong {
  top: calc(42% + 94px);
  font-size: 1.08rem;
}

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

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

.content-card {
  padding: 28px;
}

.content-card p {
  color: #d4d4d4;
  line-height: 1.95;
  font-size: 1rem;
}

.prev-next {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.prev-next a {
  display: grid;
  gap: 7px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.prev-next span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.prev-next strong {
  line-height: 1.45;
}

.related-grid .movie-card.compact .card-desc,
.side-card-grid .movie-card.compact .card-desc {
  display: none;
}

.side-card-grid {
  grid-template-columns: 1fr;
  gap: 14px;
  max-height: 80vh;
  overflow: auto;
  padding-right: 4px;
}

.site-footer {
  margin-top: 80px;
  padding: 52px 0 22px;
  background: #090909;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

.footer-links a {
  color: #d4d4d4;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.9rem;
}

.is-filtered-out {
  display: none !important;
}

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

  .menu-button {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

  .hero-inner,
  .detail-layout,
  .rank-layout,
  .rank-page-grid,
  .filter-panel,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster-card {
    display: none;
  }

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

  .category-grid.large {
    grid-template-columns: 1fr 1fr;
  }

  .rank-side,
  .rank-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-shell {
    height: 62px;
    gap: 10px;
  }

  .brand-text small,
  .header-search {
    display: none;
  }

  .hero-carousel,
  .hero-inner {
    min-height: 68vh;
  }

  .hero-carousel,
  .subpage,
  .detail-page {
    margin-top: 0;
    padding-top: 62px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2.1rem, 12vw, 3.5rem);
  }

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .hero-actions,
  .detail-actions,
  .prev-next {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-desc {
    display: none;
  }

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

  .info-list {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    gap: 24px;
  }

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

  .player-box {
    border-radius: 18px;
  }

  .content-card {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .featured-grid,
  .movie-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .info-list {
    grid-template-columns: 1fr;
  }
}
