:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --border-bright: rgba(34, 211, 238, 0.5);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --blue: #2563eb;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(8, 145, 178, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.13), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.13), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(8, 47, 73, 0.36), transparent 38%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(30, 41, 59, 0.78);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.26);
}

.brand-name {
  font-size: 1.22rem;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-2);
  font-size: 0.95rem;
}

.nav-link {
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.65);
}

main {
  padding-top: 64px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 36%, rgba(2, 6, 23, 0.14) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.36) 52%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 70px;
  max-width: 820px;
  animation: fadeUp 0.7s ease both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.95;
}

.hero-content h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4.6vw, 4.8rem);
  line-height: 1;
}

.hero-content p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: clamp(1.02rem, 2vw, 1.35rem);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  color: #67e8f9;
  background: var(--cyan-soft);
  font-size: 0.82rem;
  font-style: normal;
}

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

.primary-btn,
.ghost-btn,
.hero-search button,
.wide-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.hero-search button {
  min-height: 46px;
  padding: 0 24px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.24);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--border);
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover,
.wide-link:hover,
.text-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.2);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(14px);
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #475569;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search-wrap {
  position: relative;
  z-index: 8;
  width: min(860px, calc(100% - 32px));
  margin: -36px auto 18px;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
}

.hero-search input {
  padding: 0 16px;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.section-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section-band {
  background: rgba(15, 23, 42, 0.28);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.section-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading.left-only {
  justify-content: flex-start;
}

.section-heading span {
  color: var(--cyan);
  font-size: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.section-heading a {
  margin-left: auto;
  color: var(--cyan);
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-bright);
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.14);
}

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

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.22) 46%, transparent 100%);
}

.card-badge,
.rank-num {
  position: absolute;
  top: 12px;
  z-index: 2;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-badge {
  right: 12px;
  padding: 0 10px;
  color: white;
  background: rgba(34, 211, 238, 0.86);
  backdrop-filter: blur(10px);
}

.rank-num {
  left: 12px;
  padding: 0 9px;
  color: #020617;
  background: #67e8f9;
}

.poster-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.poster-caption strong,
.poster-caption em {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poster-caption strong {
  -webkit-line-clamp: 2;
  font-size: 1.03rem;
  line-height: 1.28;
}

.poster-caption em {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-style: normal;
  -webkit-line-clamp: 1;
}

.card-body {
  padding: 14px;
}

.card-meta {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-tags .tag-pill {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.74rem;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.42) 70%, rgba(2, 6, 23, 0.2) 100%);
}

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

.category-tile strong {
  bottom: 58px;
  font-size: 1.2rem;
}

.category-tile em {
  bottom: 18px;
  color: var(--muted-2);
  font-size: 0.82rem;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.rank-panel,
.content-card,
.filter-panel,
.category-overview-card,
.detail-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(18px);
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 84px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-row span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #020617;
  background: #67e8f9;
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.wide-link {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.small-hero {
  min-height: 300px;
  display: grid;
  align-items: end;
  padding: 74px 0 42px;
}

.small-hero > div {
  max-width: 780px;
}

.small-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.05;
}

.small-hero p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 1.08rem;
  line-height: 1.8;
}

.filter-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 0.5fr));
  gap: 12px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.filter-panel input,
.filter-panel select {
  padding: 0 12px;
}

.category-overview-grid {
  display: grid;
  gap: 18px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 18px;
}

.category-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

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

.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.5), transparent);
}

.category-overview-card h2 {
  margin: 6px 0 10px;
  font-size: 1.45rem;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted-2);
  line-height: 1.75;
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.preview-links a {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(2, 6, 23, 0.35);
  font-size: 0.83rem;
}

.text-link {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-bright);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.detail-hero {
  padding: 28px 0 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  white-space: nowrap;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 28px;
  align-items: stretch;
}

.detail-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: black;
  box-shadow: var(--shadow);
}

.detail-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.16) 0%, rgba(2, 6, 23, 0.48) 100%);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 45px rgba(34, 211, 238, 0.42);
  font-size: 2rem;
}

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

.detail-card {
  overflow: hidden;
}

.detail-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-card > div {
  padding: 22px;
}

.detail-card h1 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.detail-card p:not(.eyebrow) {
  color: var(--muted-2);
  line-height: 1.8;
}

.detail-content {
  display: grid;
  gap: 18px;
}

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 1.45rem;
}

.content-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 1.03rem;
  line-height: 2;
}

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

.pager-links a {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pager-links a:hover {
  border-color: var(--border-bright);
  color: var(--cyan);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr;
  gap: 28px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 12px;
  color: #67e8f9;
}

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

.footer-grid a {
  display: block;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: grid;
    gap: 10px;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: rgba(34, 211, 238, 0.08);
  }

  .hero {
    min-height: 540px;
    height: 74vh;
  }

  .hero-content {
    left: 20px;
    bottom: 76px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .nav-shell,
  .section-shell,
  .page-hero,
  .detail-hero,
  .filter-panel,
  .footer-grid,
  .footer-bottom {
    width: calc(100% - 24px);
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

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

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

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

  .section-shell {
    padding: 48px 0;
  }

  .detail-card > div,
  .content-card {
    padding: 18px;
  }
}
