:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-deep: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --green: #22c55e;
  --orange: #fb923c;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 34%),
    radial-gradient(circle at 80% 8%, rgba(37, 99, 235, 0.12), transparent 30%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.24);
  font-size: 14px;
}

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

.nav-links a,
.nav-trigger {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-trigger:hover {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.9);
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 176px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  padding: 10px 12px;
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  color: #cbd5e1;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  padding: 9px 12px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 0 18px;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  color: #cbd5e1;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  z-index: -3;
}

.hero-image {
  position: relative;
  height: 100%;
  overflow: hidden;
}

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

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 36%, rgba(2, 6, 23, 0.38) 78%, rgba(2, 6, 23, 0.72) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 170px;
  z-index: -1;
  background: linear-gradient(0deg, #020617 0%, transparent 100%);
}

.hero-content {
  display: flex;
  align-items: center;
  min-height: 600px;
  padding: 76px 0 64px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: white;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 72px);
}

.hero-lead {
  margin: 22px 0 0;
  max-width: 650px;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.72);
  color: white;
  border-color: var(--line);
  backdrop-filter: blur(12px);
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  max-width: 760px;
}

.hero-mini {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-mini:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.86);
}

.hero-mini strong {
  display: block;
  color: white;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-mini span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.main-content {
  padding: 52px 0 20px;
}

.section {
  margin-bottom: 64px;
}

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

.section-kicker {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section h2,
.section-title {
  margin: 0;
  color: white;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 760px;
}

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

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

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

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.14));
}

.movie-grid.compact .poster {
  aspect-ratio: 3 / 4;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  margin-bottom: 9px;
}

.card-title {
  margin: 0;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-grid.compact .card-title {
  font-size: 16px;
}

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

.card-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-grid.compact .card-summary {
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
  font-size: 12px;
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 42px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
}

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

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

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

.category-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(37, 99, 235, 0.08));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card h3 {
  margin: 0;
  color: white;
  font-size: 20px;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  padding: 76px 0 36px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0));
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 148px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(34, 211, 238, 0.09);
}

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

.rank-copy h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 20px;
}

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

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

.detail-title {
  padding: 56px 0 28px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: #cbd5e1;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.player-panel,
.detail-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.player-panel {
  padding: 12px;
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: black;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  cursor: pointer;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
}

.play-layer.hidden {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 54px rgba(34, 211, 238, 0.26);
  font-size: 28px;
}

.detail-panel {
  padding: 28px;
  margin-bottom: 24px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 24px;
}

.detail-panel p {
  color: #cbd5e1;
  line-height: 1.95;
  margin: 0 0 18px;
}

.side-panel {
  padding: 20px;
  position: sticky;
  top: 96px;
}

.side-cover {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(37, 99, 235, 0.13));
  margin-bottom: 18px;
}

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

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

.related-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.38);
}

.related-item:hover h3 {
  color: var(--cyan);
}

.related-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(34, 211, 238, 0.08);
}

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

.related-item h3 {
  margin: 0;
  color: white;
  font-size: 15px;
  line-height: 1.35;
}

.related-item span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  margin-top: 5px;
}

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

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

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
  margin: 14px 0 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: white;
  font-size: 16px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--soft);
  padding: 18px 0 26px;
  font-size: 14px;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

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

  .brand {
    font-size: 20px;
  }

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

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

  .hero-image:nth-child(n + 2) {
    display: none;
  }

  .hero-lead {
    font-size: 17px;
  }

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

  .section-head {
    display: block;
  }

  .section-head .btn {
    margin-top: 16px;
  }

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

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

  .card-body {
    padding: 14px;
  }

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

  .rank-item .btn {
    display: none;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

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

  .rank-thumb {
    width: 100%;
  }
}
