:root {
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5edf7;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --gold: #fbbf24;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(30, 64, 175, 0.18), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.36);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.logo-mark::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #ffffff;
  margin-left: 3px;
}

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

.logo-title {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  font-size: 20px;
}

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

.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
  font-size: 15px;
}

.primary-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: #ffffff;
}

.primary-nav a:hover::after,
.primary-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
  width: min(280px, 34vw);
}

.search-form input,
.filter-bar input {
  width: 100%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input {
  padding: 10px 42px 10px 16px;
}

.search-form input:focus,
.filter-bar input:focus {
  border-color: rgba(56, 189, 248, 0.86);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.search-form button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  width: 34px;
  border: 0;
  color: #e0f2fe;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
}

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

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
}

.mobile-panel .search-form {
  width: 100%;
  margin-top: 10px;
}

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

.hero-slider {
  position: relative;
  min-height: 580px;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 580px;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.04);
}

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

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 0 72px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.22);
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1,
.hero h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 640px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.hero-tags {
  margin: 20px 0 0;
}

.tag,
.meta-pill,
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.tag {
  padding: 6px 10px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.18);
  font-size: 13px;
}

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

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

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

.btn-primary {
  color: #020617;
  background: #ffffff;
}

.btn-primary:hover {
  color: #ffffff;
  background: var(--accent);
}

.btn-ghost {
  color: #e0f2fe;
  border-color: rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: rgba(125, 211, 252, 0.6);
  background: rgba(14, 165, 233, 0.18);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(14, 165, 233, 0.7);
  transform: translateY(-2px);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: #ffffff;
}

.main-content {
  padding: 48px 0 72px;
}

.section {
  margin-bottom: 58px;
}

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

.section-kicker {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.section h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.section-desc,
.page-title p,
.detail-lead {
  color: var(--muted);
  line-height: 1.8;
}

.section-desc {
  margin: 8px 0 0;
  max-width: 760px;
}

.more-link {
  color: #7dd3fc;
  font-weight: 700;
  white-space: nowrap;
}

.more-link:hover {
  color: #ffffff;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 24px 80px rgba(2, 132, 199, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

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

.card-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.78);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.badge.dark {
  background: rgba(2, 6, 23, 0.74);
  color: #e2e8f0;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #7dd3fc;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.meta-pill {
  max-width: 100%;
  padding: 5px 8px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  font-size: 12px;
}

.rank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateX(5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.rank-number {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #020617;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

.rank-thumb {
  width: 78px;
  height: 104px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-info h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
}

.rank-info p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

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

.category-tile {
  min-height: 144px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 9rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.45);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.28), transparent 9rem),
    linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(15, 23, 42, 0.92));
}

.category-tile h3 {
  margin: 0;
  color: #ffffff;
  font-size: 21px;
}

.category-tile p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.page-hero {
  padding: 72px 0 32px;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.24), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.74), transparent);
}

.page-title h1 {
  font-size: clamp(34px, 6vw, 56px);
}

.page-title p {
  max-width: 780px;
  margin: 18px 0 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
}

.filter-bar input {
  padding: 13px 16px;
}

.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.type-filters button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.74);
}

.type-filters button.active,
.type-filters button:hover {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(14, 165, 233, 0.32);
}

.detail-hero {
  position: relative;
  padding: 74px 0 44px;
  overflow: hidden;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.28;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.12);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.72) 48%, #020617 100%);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.breadcrumbs a {
  color: #7dd3fc;
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
}

.detail-lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.player-panel {
  margin-top: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #000000;
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.72));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.video-shell.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #020617;
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 24px 80px rgba(255, 255, 255, 0.24);
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  margin-top: 36px;
}

.text-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 56px rgba(2, 6, 23, 0.22);
}

.text-panel {
  padding: 26px;
}

.text-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
}

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

.text-panel p:last-child {
  margin-bottom: 0;
}

.side-panel {
  padding: 20px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.side-item h3 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  padding: 34px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.72);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.footer-links a:hover {
  color: #ffffff;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.6);
}

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

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

@media (max-width: 880px) {
  .primary-nav,
  .header-actions > .search-form {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  body.nav-open .mobile-panel {
    display: block;
  }

  .hero,
  .hero-slider,
  .hero-slide img {
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 66px;
  }

  .hero-control {
    display: none;
  }

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

  .detail-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
  }

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

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

  .logo-subtitle {
    display: none;
  }

  .hero,
  .hero-slider,
  .hero-slide img {
    min-height: 560px;
  }

  .hero-content {
    align-items: center;
    padding: 52px 0 48px;
  }

  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-small,
  .grid-medium,
  .grid-large,
  .category-grid,
  .detail-layout,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 240px;
  }

  .rank-card {
    align-items: flex-start;
  }

  .rank-thumb {
    width: 64px;
    height: 88px;
  }
}
