:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: rgba(31, 41, 55, 0.92);
  --line: rgba(75, 85, 99, 0.45);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --chip: rgba(55, 65, 81, 0.72);
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 0%, rgba(71, 85, 105, 0.34), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(17, 24, 39, 0.92), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #030712 42%, #050816 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(31, 41, 55, 0.88);
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #d1d5db 100%);
  color: #111827;
  font-weight: 800;
  letter-spacing: -0.06em;
  box-shadow: 0 16px 32px rgba(255, 255, 255, 0.1);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 14px;
}

.nav a {
  padding: 9px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.78);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(75, 85, 99, 0.65);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.86);
  color: var(--white);
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle {
  flex-direction: column;
  gap: 4px;
}

body.nav-open .nav-toggle span {
  opacity: 0;
}

body.nav-open .nav-toggle::before {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: clamp(620px, 82vh, 860px);
  overflow: hidden;
  background: #030712;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.02);
}

.hero-slide.is-active .hero-image {
  animation: heroZoom 10s ease forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.72) 42%, rgba(3, 7, 18, 0.16) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 1) 0%, rgba(3, 7, 18, 0.22) 42%, rgba(3, 7, 18, 0.86) 100%);
}

.hero::after {
  background: radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.12), transparent 18rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: clamp(620px, 82vh, 860px);
  display: flex;
  align-items: flex-end;
  padding: 118px 0 86px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, 0.64);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 300;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: var(--white);
  background: rgba(31, 41, 55, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(55, 65, 81, 0.94);
}

.button.primary {
  background: var(--white);
  color: #111827;
  border-color: var(--white);
}

.button.primary:hover {
  background: #e5e7eb;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(107, 114, 128, 0.38);
  border-radius: 999px;
  background: var(--chip);
  color: var(--soft);
  backdrop-filter: blur(10px);
}

.chip {
  padding: 6px 11px;
  font-size: 13px;
}

.tag {
  padding: 5px 10px;
  font-size: 12px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(156, 163, 175, 0.78);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: 68px 0;
}

.section.tight {
  padding-top: 42px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  margin-bottom: 28px;
}

.search-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(75, 85, 99, 0.68);
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.76);
  color: var(--white);
  outline: none;
  padding: 0 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, 0.76);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.76), rgba(17, 24, 39, 0.84));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.92), transparent);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: var(--white);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta a:hover {
  color: var(--white);
}

.movie-title {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 500;
}

.movie-title a:hover {
  color: #e5e7eb;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.feature-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 18px;
  padding: 16px;
  min-height: 260px;
}

.feature-card .poster-link {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 18px;
}

.feature-card .movie-card-body {
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
}

.feature-card .movie-desc {
  -webkit-line-clamp: 4;
}

.feature-card .button {
  width: max-content;
  margin-top: auto;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 18px;
  color: var(--soft);
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 62px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 86px;
  padding: 12px 16px;
  border: 1px solid rgba(55, 65, 81, 0.72);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.74);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(31, 41, 55, 0.88);
}

.rank-no {
  color: var(--white);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.rank-row img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
}

.rank-info span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.rank-score {
  color: var(--soft);
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 42px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.68);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.10), transparent 20rem),
    linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(3, 7, 18, 0));
}

.page-hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

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

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

.player-panel {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16)),
    rgba(3, 7, 18, 0.34);
  color: var(--white);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 34px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
  transform: scale(1);
  transition: transform 0.25s ease;
}

.player-cover:hover .play-circle {
  transform: scale(1.06);
}

.detail-card {
  padding: 28px;
}

.detail-card h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 400;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--soft);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.side-panel {
  padding: 18px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(55, 65, 81, 0.58);
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.3);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.side-item:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(31, 41, 55, 0.74);
}

.side-item img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.side-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
  background: rgba(3, 7, 18, 0.68);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(31, 41, 55, 0.64);
  color: #6b7280;
  font-size: 13px;
}

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

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: 74px 0 auto;
    display: grid;
    gap: 0;
    padding: 18px 24px 24px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.72);
    background: rgba(3, 7, 18, 0.98);
    transform: translateY(-120%);
    transition: transform 0.28s ease;
  }

  body.nav-open .nav {
    transform: translateY(0);
  }

  .nav a {
    padding: 14px 0;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

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

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

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

  .feature-card .poster-link {
    aspect-ratio: 2 / 3;
  }

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-subtitle {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

  .hero p {
    font-size: 15px;
  }

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

  .rank-row {
    grid-template-columns: 42px 56px 1fr;
  }

  .rank-score {
    display: none;
  }

  .detail-card {
    padding: 22px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
