:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c32;
  --card: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-soft: #60a5fa;
  --cyan: #67e8f9;
  --green: #22c55e;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
}

.header-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.logo-mark {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
  font-size: 0.8rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link,
.mobile-nav-link {
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link {
  padding: 0.55rem 0.95rem;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.22);
}

.menu-button {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.27rem;
}

.menu-button span {
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  padding: 0.7rem 1rem 1rem;
}

.mobile-nav.open {
  display: grid;
  gap: 0.45rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
}

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

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

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

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

.hero-overlay-top,
.hero-overlay-side,
.detail-backdrop {
  position: absolute;
  inset: 0;
}

.hero-overlay-top {
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.72) 36%, transparent 82%);
}

.hero-overlay-side {
  background: linear-gradient(to right, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.55) 44%, transparent 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 48rem);
  padding-top: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 1rem 0 1rem;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 48rem;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-meta,
.detail-meta,
.mini-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  color: #e2e8f0;
}

.hero-meta {
  margin: 1.4rem 0;
}

.hero-meta span,
.detail-meta span,
.mini-meta span {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-actions,
.detail-info .primary-button {
  margin-top: 1.4rem;
}

.primary-button,
.ghost-button,
.inline-search button,
.category-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1.35rem;
  border-radius: 0.75rem;
  font-weight: 700;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-button,
.inline-search button,
.category-search button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.ghost-button {
  margin-left: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
}

.primary-button:hover,
.ghost-button:hover,
.inline-search button:hover,
.category-search button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.8rem;
  height: 2.8rem;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
}

.hero-dot.active {
  width: 2rem;
  background: #fff;
}

.content-section {
  padding: 4.25rem 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.section-heading h2,
.story-card h2,
.player-heading h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 2.5vw, 2.05rem);
  line-height: 1.25;
}

.section-heading p,
.story-card p,
.player-heading p,
.site-footer p,
.landscape-body p,
.rank-item p,
.movie-line,
.movie-meta {
  color: var(--muted);
}

.section-link {
  color: var(--blue-soft);
  font-weight: 700;
}

.search-band,
.filter-panel {
  border: 1px solid rgba(51, 65, 85, 0.92);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.95));
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

.search-band h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.inline-search,
.category-search {
  display: flex;
  gap: 0.65rem;
}

.inline-search input,
.category-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 0.75rem;
  background: rgba(2, 6, 23, 0.66);
  color: #fff;
  padding: 0 1rem;
  outline: none;
}

.inline-search input:focus,
.category-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

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

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

.category-tile {
  position: relative;
  min-height: 12rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.88);
  border-radius: 1rem;
  background: var(--panel);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  z-index: -2;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.25));
  z-index: -1;
}

.category-tile span {
  font-weight: 800;
  font-size: 1.2rem;
}

.category-tile p {
  margin: 0.5rem 0 0;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.85);
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-badge,
.poster-type {
  position: absolute;
  top: 0.65rem;
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.poster-badge {
  left: 0.65rem;
}

.poster-type {
  right: 0.65rem;
  background: rgba(37, 99, 235, 0.82);
}

.movie-card-body {
  padding: 1rem;
}

.movie-title,
.landscape-title,
.rank-title {
  display: block;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
}

.movie-title:hover,
.landscape-title:hover,
.rank-title:hover {
  color: var(--blue-soft);
}

.movie-meta,
.movie-line {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.75rem;
}

.tag-row span {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  font-size: 0.78rem;
}

.split-section {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.36), rgba(2, 6, 23, 0));
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 2rem;
}

.rank-list,
.landscape-list {
  display: grid;
  gap: 0.9rem;
}

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

.rank-item,
.landscape-card {
  display: grid;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.84);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.82);
  padding: 0.75rem;
}

.rank-item {
  grid-template-columns: 3rem 4.6rem 1fr;
}

.rank-num {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-weight: 900;
}

.rank-poster,
.landscape-image {
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0f172a;
}

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

.rank-poster img,
.landscape-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-item p,
.landscape-body p {
  margin: 0.35rem 0 0.55rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.92rem;
}

.landscape-card {
  grid-template-columns: 8rem 1fr;
}

.landscape-image {
  aspect-ratio: 16 / 10;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.28), transparent 28rem), linear-gradient(135deg, #020617, #0f172a 56%, #020617);
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.slim-hero {
  padding-top: 5.4rem;
}

.category-hero .category-search {
  max-width: 42rem;
  margin-top: 1.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
}

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

.movie-card.compact .movie-line {
  -webkit-line-clamp: 1;
}

.detail-main {
  min-height: 100vh;
}

.detail-hero {
  position: relative;
  min-height: 34rem;
  padding: 5rem 0 3rem;
  overflow: hidden;
  background: #020617;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--cover);
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
}

.detail-backdrop {
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.7) 100%);
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
  background: var(--panel);
}

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

.detail-info h1 {
  max-width: 58rem;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.detail-meta {
  margin: 1.2rem 0 0.4rem;
}

.detail-tags {
  margin-bottom: 0.4rem;
}

.player-heading {
  margin-bottom: 1.2rem;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08));
  transition: opacity 0.24s ease;
}

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

.play-round {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  color: #fff;
  font-size: 2.1rem;
  padding-left: 0.2rem;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.38);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.story-card {
  border: 1px solid rgba(51, 65, 85, 0.88);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.86);
  padding: 1.5rem;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.story-card p {
  margin: 0.8rem 0 0;
  font-size: 1.02rem;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(2, 6, 23, 0.92);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.25rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  color: var(--muted-strong);
}

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

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  color: var(--muted);
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

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

  .rank-list.wide,
  .split-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-copy {
    padding: 7rem 0 5rem;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.03em;
  }

  .hero-arrow {
    display: none;
  }

  .search-band,
  .filter-panel,
  .detail-hero-inner,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding-top: 3rem;
  }

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 1rem, 1280px);
  }

  .hero {
    min-height: 580px;
  }

  .hero-copy {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .hero-actions,
  .inline-search,
  .category-search {
    display: grid;
    gap: 0.7rem;
  }

  .ghost-button {
    margin-left: 0;
  }

  .content-section {
    padding: 3rem 0;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 0.75rem;
  }

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

  .rank-item {
    grid-template-columns: 2.6rem 4.2rem 1fr;
  }

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

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