:root {
  color-scheme: dark;
  --bg: #080a18;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #aab4c8;
  --soft: #d8e1f2;
  --brand: #ff3d7f;
  --brand-2: #7c3cff;
  --brand-3: #18d2ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 60, 255, 0.26), transparent 34rem),
    radial-gradient(circle at top right, rgba(255, 61, 127, 0.18), transparent 30rem),
    linear-gradient(180deg, #090b1f 0%, #0b1026 42%, #080a18 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(22px);
  background: rgba(8, 10, 24, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner,
.section-wrap,
.search-band,
.page-main,
.detail-layout,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 38px rgba(255, 61, 127, 0.36);
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  color: #fff;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 12px;
}

.hero-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: center;
  gap: 60px;
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  padding: 80px 0 110px;
}

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

.hero-bg {
  position: absolute;
  inset: 0 calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.18), transparent 18rem),
    linear-gradient(180deg, transparent 0%, rgba(8, 10, 24, 0.92) 100%);
}

.hero-content {
  max-width: 710px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #8ce7ff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-desc,
.page-hero p,
.detail-desc {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
  max-width: 760px;
}

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

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

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

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 40px rgba(255, 61, 127, 0.34);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: inherit;
}

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

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
}

.search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: -36px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

.search-band h2,
.section-title h2,
.rank-panel h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.035em;
}

.search-band p,
.movie-desc,
.category-pill span,
.site-footer p,
.detail-content p,
.detail-line {
  color: var(--muted);
  line-height: 1.7;
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

input,
select,
button {
  font: inherit;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  color: #fff;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(8, 10, 24, 0.72);
  outline: none;
}

.quick-search input {
  min-width: min(420px, 48vw);
}

.quick-search button {
  color: #fff;
  border: 0;
  border-radius: 16px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 800;
  cursor: pointer;
}

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

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

.section-title a {
  color: #8ce7ff;
  font-weight: 800;
}

.section-title.tight {
  margin-bottom: 16px;
}

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

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

.category-pill {
  min-height: 138px;
  padding: 22px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top right, rgba(255, 61, 127, 0.2), transparent 12rem);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-pill:hover {
  transform: translateY(-4px);
  border-color: rgba(140, 231, 255, 0.6);
}

.category-pill strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

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

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

.movie-card {
  min-width: 0;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.poster:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.score {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(8, 10, 24, 0.72);
  border: 1px solid var(--line);
  font-weight: 800;
}

.movie-info {
  padding: 12px 4px 0;
}

.movie-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.movie-meta {
  margin: 0 0 6px;
  color: #8ce7ff;
  font-size: 13px;
}

.movie-desc {
  margin: 0;
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  color: var(--soft);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-panel,
.table-shell,
.video-shell,
.detail-content,
.filter-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.12);
}

.rank-num {
  color: #ffb3ca;
  font-weight: 900;
}

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

.rank-year {
  color: var(--muted);
  text-align: right;
}

.page-main {
  padding-bottom: 80px;
}

.page-hero {
  margin-top: 34px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 61, 127, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 18px;
}

.crumb a {
  color: #8ce7ff;
}

.filter-bar {
  margin-top: 28px;
  padding: 18px;
  align-items: center;
}

.filter-bar input {
  flex: 1;
}

.table-shell {
  overflow: auto;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.rank-table th,
.rank-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.rank-table th {
  color: #8ce7ff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.table-rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 61, 127, 0.2);
  font-weight: 900;
}

.table-title {
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
}

.rank-table td span:not(.table-rank) {
  color: var(--muted);
  font-size: 13px;
}

.detail-main {
  padding-bottom: 80px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: 600px;
  padding: 70px 0;
}

.detail-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.detail-intro h1 {
  font-size: clamp(36px, 5vw, 72px);
}

.detail-line {
  color: #8ce7ff;
  font-weight: 700;
}

.large-tags span {
  font-size: 14px;
  padding: 7px 11px;
}

.player-section {
  padding-top: 70px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
  background: #000;
}

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

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle at center, rgba(8, 10, 24, 0.1), rgba(8, 10, 24, 0.72));
  cursor: pointer;
}

.video-play span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 48px rgba(255, 61, 127, 0.42);
}

.video-shell.playing .video-play {
  display: none;
}

.duration {
  color: var(--muted);
}

.narrow {
  max-width: 900px;
  padding: 36px;
  margin-top: 54px;
}

.detail-content h2 + p {
  margin-top: 12px;
}

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

.pager-links a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-links {
  display: flex;
  gap: 14px;
  color: var(--muted);
}

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

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

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 840px) {
  .main-nav {
    position: absolute;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8, 10, 24, 0.94);
  }

  .main-nav.open {
    display: flex;
  }

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

  .hero-slide,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    min-height: auto;
  }

  .hero-poster,
  .detail-poster {
    max-width: 280px;
  }

  .search-band,
  .footer-inner,
  .quick-search,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-search input {
    min-width: 0;
  }

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

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

  .page-hero {
    padding: 34px 24px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .footer-inner,
  .section-wrap,
  .search-band,
  .page-main,
  .detail-layout,
  .player-section {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .compact-grid {
    gap: 14px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 38px;
  }

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