* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.22), transparent 32rem), var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-solid {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-bg,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 2%, rgba(2, 6, 23, 0.78) 36%, rgba(2, 6, 23, 0.2) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.1));
}

.hero-inner {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 88px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1,
.hero h2 {
  font-size: clamp(40px, 7vw, 78px);
}

.hero p,
.page-hero p,
.detail-copy p {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.meta-line,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags,
.detail-meta {
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  font-size: 13px;
}

.tag-row span {
  padding: 5px 9px;
  color: #a5f3fc;
  font-size: 12px;
  background: rgba(8, 145, 178, 0.12);
}

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

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

.primary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 20px;
}

.primary-button {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #7dd3fc);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.ghost-button {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.62);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

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

.intro-panel {
  margin-top: -46px;
  position: relative;
  z-index: 4;
}

.intro-card,
.text-panel,
.player-card,
.overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
}

.intro-card {
  padding: clamp(24px, 4vw, 44px);
}

.intro-card h2,
.section-heading h2,
.text-panel h2,
.player-info h2,
.footer-links h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.intro-card p,
.section-heading p,
.text-panel p,
.player-info p,
.footer-brand p,
.overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.section-heading p {
  margin: 10px 0 0;
}

.section-link,
.text-link {
  color: var(--cyan);
  white-space: nowrap;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.84);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 24px 46px rgba(8, 145, 178, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.compact-card .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.rank-item:hover img {
  transform: scale(1.08);
  filter: saturate(1.12);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08));
}

.poster-type,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-type {
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  border-radius: 9px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-content {
  padding: 16px;
}

.card-content h2,
.rank-item h3,
.overview-card h2 {
  margin: 0;
  color: white;
  font-size: 17px;
  line-height: 1.35;
}

.card-content h2 a:hover,
.rank-item h3 a:hover,
.overview-card h2 a:hover {
  color: var(--cyan);
}

.card-content p,
.rank-item p {
  display: -webkit-box;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0f172a;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.2));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 21px;
  font-weight: 900;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 10px 0 0;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 36px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #001018;
  background: var(--cyan);
  font-weight: 900;
}

.page-hero {
  position: relative;
  padding: 150px 0 64px;
  background: radial-gradient(circle at 25% 0%, rgba(34, 211, 238, 0.22), transparent 30rem), linear-gradient(180deg, #020617, #0f172a);
}

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

.page-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, 180px);
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
}

.catalog-controls label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.catalog-controls input,
.catalog-controls select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: #e2e8f0;
  background: #020617;
  outline: none;
  padding: 0 12px;
}

.catalog-controls input:focus,
.catalog-controls select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

.overview-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.overview-covers img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  filter: blur(1px) saturate(1.05);
  opacity: 0.54;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 4%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.42)), linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.16));
}

.detail-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  padding-top: 132px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 66px);
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.detail-tags {
  margin: 18px 0 24px;
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.18), rgba(2, 6, 23, 0.54));
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-size: 32px;
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.34);
}

.player-start strong {
  font-size: 18px;
}

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

.player-info {
  padding: 22px 24px 26px;
}

.text-panel {
  padding: clamp(22px, 4vw, 38px);
}

.text-panel h2 + p {
  margin-top: 12px;
}

.text-panel p + h2,
.text-panel .tag-row + h2 {
  margin-top: 30px;
}

.expanded-tags {
  margin-top: 14px;
}

.neighbor-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.neighbor-links a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

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

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.52), #020617);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer-brand p {
  margin: 18px 0 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

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

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

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

[data-movie-card].is-hidden {
  display: none;
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

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

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

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

@media (max-width: 760px) {
  .nav-shell {
    height: 66px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 620px;
    height: 86vh;
  }

  .hero-inner {
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding: 34px 0;
  }

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

  .movie-grid,
  .wide-grid,
  .compact-grid,
  .catalog-grid,
  .category-grid,
  .overview-grid,
  .rank-list,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .overview-card,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .overview-covers {
    max-width: 260px;
  }

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

  .detail-shell {
    padding-top: 104px;
    align-items: start;
  }

  .detail-poster {
    width: min(260px, 100%);
  }

  .rank-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
