:root {
  --bg: #0a0a0a;
  --panel: #121212;
  --panel-soft: #1a1a1a;
  --panel-light: #242424;
  --line: #2d2d2d;
  --text: #ffffff;
  --muted: #a3a3a3;
  --weak: #737373;
  --accent: #dc2626;
  --accent-deep: #991b1b;
  --accent-soft: rgba(220, 38, 38, 0.16);
  --shadow: 0 18px 45px rgba(220, 38, 38, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

body::-webkit-scrollbar,
.movie-rail::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track,
.movie-rail::-webkit-scrollbar-track {
  background: #1a1a1a;
}

body::-webkit-scrollbar-thumb,
.movie-rail::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.brand-name {
  font-size: 21px;
  white-space: nowrap;
}

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

.nav-link {
  color: #d4d4d4;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px;
}

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

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

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  color: #e5e5e5;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  height: 700px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient.vertical {
  background: linear-gradient(to top, var(--bg) 0%, rgba(10, 10, 10, 0.72) 42%, rgba(10, 10, 10, 0.1) 100%);
}

.hero-gradient.horizontal {
  background: linear-gradient(to right, var(--bg) 0%, rgba(10, 10, 10, 0.65) 38%, rgba(10, 10, 10, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 74px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #d4d4d4;
  font-size: 19px;
}

.hero-meta,
.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
  color: #d4d4d4;
}

.hero-meta span,
.detail-meta-row span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

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

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

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

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  background: var(--accent-deep);
}

.btn.ghost {
  background: rgba(18, 18, 18, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn.ghost:hover {
  border-color: rgba(220, 38, 38, 0.6);
}

.btn.slim {
  min-height: 44px;
  padding: 0 18px;
}

.btn.full {
  width: 100%;
}

.hero-search,
.filter-bar {
  display: flex;
  gap: 12px;
  width: min(100%, 640px);
  margin-top: 28px;
}

.hero-search input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.82);
  color: #fff;
  padding: 0 16px;
  outline: 0;
  backdrop-filter: blur(16px);
}

.hero-search input:focus,
.filter-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.hero-search button {
  min-width: 86px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-chips a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #e5e5e5;
  background: rgba(18, 18, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.category-chips a:hover {
  color: #fff;
  background: var(--accent);
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
}

.section-heading h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 28px;
  margin-right: 12px;
  vertical-align: -4px;
  border-radius: 999px;
  background: var(--accent);
}

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

.section-more,
.panel-link {
  color: var(--accent);
  font-weight: 800;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
}

.rail-item {
  flex: 0 0 286px;
  scroll-snap-align: start;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(220, 38, 38, 0.45);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--panel-soft);
}

.movie-card.wide {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.movie-card.wide .poster-wrap {
  aspect-ratio: 16 / 11;
  height: 100%;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
  filter: brightness(0.75);
}

.play-hover,
.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow);
}

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

.score-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 9px;
  background: rgba(10, 10, 10, 0.84);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 8px;
  backdrop-filter: blur(12px);
}

.score-badge {
  top: 10px;
  right: 10px;
  color: #fbbf24;
}

.type-badge {
  right: 10px;
  bottom: 10px;
  color: #d4d4d4;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: var(--accent);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

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

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

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

.tag-row span {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--panel-soft);
  color: #bdbdbd;
  font-size: 12px;
}

.section-band {
  margin-top: 72px;
  padding-bottom: 72px;
  background: rgba(18, 18, 18, 0.5);
}

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

.category-tile,
.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-card {
  min-height: 260px;
}

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

.category-tile:hover img,
.category-card:hover img {
  transform: scale(1.06);
}

.category-mask,
.category-card-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.25));
}

.category-tile strong,
.category-tile em,
.category-card > div {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.category-tile strong {
  display: block;
  font-size: 22px;
}

.category-tile em {
  display: block;
  margin-top: 34px;
  color: #d4d4d4;
  font-style: normal;
  font-size: 13px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-card p {
  margin: 0;
  color: #d4d4d4;
}

.two-col-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

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

.rank-panel,
.poster-panel,
.info-card {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-panel {
  padding: 20px;
}

.panel-title {
  font-size: 22px;
  font-weight: 850;
  margin-bottom: 16px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: var(--panel-soft);
}

.rank-num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent);
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  font-size: 14px;
  line-height: 1.35;
}

.rank-info em {
  margin-top: 3px;
  color: var(--weak);
  font-style: normal;
  font-size: 12px;
}

.section-gradient {
  margin-top: 72px;
  padding-bottom: 84px;
  background: linear-gradient(to bottom, var(--bg), var(--panel));
}

.page-main,
.detail-main {
  min-height: 80vh;
}

.page-hero {
  padding: 74px 0 0;
}

.page-hero.small h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  margin: 16px 0 0;
}

.filter-bar {
  width: min(100%, 820px);
}

.detail-main {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--weak);
  font-size: 14px;
  margin-bottom: 24px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

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

.movie-player {
  background: #000;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.62);
}

.player-shade {
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25), rgba(0, 0, 0, 0.6));
}

.player-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  font-size: 24px;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  padding-top: 28px;
}

.detail-content h1 {
  font-size: clamp(32px, 4.5vw, 56px);
}

.info-card {
  padding: 24px;
  margin-top: 22px;
}

.info-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.info-card p {
  margin: 0;
  color: #d4d4d4;
}

.intro-card {
  border-left: 4px solid var(--accent);
}

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

.details-table span {
  color: var(--muted);
}

.details-table strong {
  display: inline;
  font-weight: 700;
}

.full-tags span {
  font-size: 13px;
  padding: 6px 10px;
}

.detail-sidebar {
  display: grid;
  gap: 20px;
}

.poster-panel {
  padding: 16px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
}

.sticky-panel {
  position: sticky;
  top: 86px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  background: #090909;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 46px 0;
}

.footer-brand p {
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 560px;
}

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

.site-footer a:not(.brand) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: var(--weak);
  font-size: 13px;
}

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

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 130px 0 58px;
  }

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

  .two-col-section,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    grid-row: auto;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 22px, 1240px);
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero.small h1,
  .detail-content h1 {
    font-size: 34px;
  }

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

  .hero-actions,
  .hero-search,
  .filter-bar {
    flex-direction: column;
  }

  .hero-search button,
  .filter-bar .btn {
    width: 100%;
    min-height: 46px;
  }

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

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

  .movie-card.wide {
    grid-template-columns: 120px 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p,
  .card-meta {
    font-size: 12px;
  }

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

  .details-table {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.wide {
    grid-template-columns: 1fr;
  }
}
