:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --cyan-soft: rgba(34, 211, 238, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius-lg: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.18), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #02111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
  font-size: 14px;
}

.brand-text {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

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

.nav-link {
  padding: 10px 14px;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.top-search input {
  width: 180px;
  padding: 8px 10px;
}

.top-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: #02111a;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

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

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav-link {
  padding: 12px 14px;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.6);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 26px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 48px;
  padding: clamp(28px, 6vw, 70px);
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 20%, rgba(34, 211, 238, 0.2), transparent 24rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 38%);
}

.hero-content,
.hero-cover {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-summary,
.page-hero p,
.detail-line {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.16);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #02111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.25);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
}

.hero-cover {
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

.hero-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 6vw, 70px);
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(203, 213, 225, 0.45);
}

.hero-dot.is-active {
  width: 36px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.05em;
}

.section-heading p:not(.section-kicker) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #02111a;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 12px;
}

.card-body {
  padding: 14px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta a,
.detail-meta a {
  color: var(--cyan);
}

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

.movie-card p {
  min-height: 64px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rank-panel-head p {
  margin: 0;
  font-weight: 900;
  font-size: 20px;
}

.rank-panel-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

.mini-rank-list a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.64);
}

.mini-rank-list span {
  color: var(--cyan);
  font-weight: 900;
}

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

.mini-rank-list em {
  color: var(--muted);
  font-style: normal;
}

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

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

.category-tile img {
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.92;
  transform: scale(1.07);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08));
}

.category-name,
.category-desc {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-name {
  bottom: 48px;
  font-size: 24px;
  font-weight: 900;
}

.category-desc {
  bottom: 20px;
  color: var(--muted);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.compact-hero {
  background:
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.2), transparent 28rem),
    rgba(15, 23, 42, 0.86);
}

.filter-panel {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.58);
}

.filter-panel select option {
  color: #0f172a;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #02111a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  min-height: 520px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg), transparent 55%);
}

.detail-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 50px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
}

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

.detail-info .btn {
  margin-top: 26px;
}

.player-section {
  margin-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  min-height: 300px;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-layer button {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: #02111a;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.34);
}

.play-layer button span {
  margin-left: 5px;
  font-size: 30px;
}

.play-layer strong {
  font-size: 24px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
}

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

.copy-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
}

.copy-grid h2 {
  margin: 0 0 12px;
}

.copy-grid p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.45);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.is-filter-hidden {
  display: none !important;
}

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

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

  .rank-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-cover {
    justify-self: start;
    width: min(240px, 70vw);
  }

  .hero-dots {
    bottom: 22px;
  }

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

  .filter-row,
  .footer-shell,
  .detail-shell,
  .detail-copy .copy-grid {
    grid-template-columns: 1fr;
  }

  .detail-shell {
    gap: 24px;
  }

  .detail-poster {
    width: min(240px, 70vw);
  }

  .rank-item {
    grid-template-columns: 52px 72px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-section,
  .hero,
  .page-hero,
  .detail-shell,
  .footer-shell,
  .footer-bottom,
  .mobile-menu {
    width: min(100% - 22px, 1240px);
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    min-height: 720px;
    border-radius: 22px;
  }

  .hero-slide {
    padding: 26px 20px 64px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-summary,
  .page-hero p,
  .detail-line {
    font-size: 15px;
  }

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

  .section-heading {
    display: grid;
    align-items: start;
  }

  .card-body p {
    min-height: auto;
  }

  .rank-item {
    grid-template-columns: 44px 1fr;
  }

  .rank-poster {
    display: none;
  }

  .rank-info h3 {
    font-size: 18px;
  }
}
