:root {
  --bg: #0b1120;
  --bg-soft: #111827;
  --panel: #1f2937;
  --panel-light: #263244;
  --text: #f9fafb;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --line: #374151;
  --accent: #facc15;
  --accent-strong: #f59e0b;
  --shadow: 0 28px 60px rgba(0, 0, 0, .34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgba(250, 204, 21, .12), transparent 30%), linear-gradient(135deg, #111827 0%, #0b1120 48%, #111827 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(17, 24, 39, .94);
  border-bottom: 1px solid rgba(55, 65, 81, .85);
  backdrop-filter: blur(16px);
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
  box-shadow: 0 14px 30px rgba(250, 204, 21, .2);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 700;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #1f2937;
  color: var(--accent);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  background: #111827;
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .12);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.hero-dot,
.play-overlay,
.filter-clear {
  border: 0;
  cursor: pointer;
}

.nav-search button,
.mobile-search button,
.primary-btn,
.filter-clear {
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #111827;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.filter-clear:hover {
  background: #fde047;
  transform: translateY(-1px);
}

.secondary-btn {
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(31, 41, 55, .84);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.secondary-btn:hover {
  background: #263244;
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111827;
  color: var(--text);
  font-size: 22px;
}

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

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

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

.mobile-links a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #1f2937;
  color: var(--muted-strong);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
}

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #0b1120;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .6s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0b1120 0%, rgba(11, 17, 32, .9) 36%, rgba(11, 17, 32, .2) 78%), linear-gradient(0deg, #0b1120 0%, transparent 34%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.hero h1 span,
.page-hero h1 span,
.section-title span {
  color: var(--accent);
}

.hero p {
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: clamp(17px, 2.4vw, 22px);
  max-width: 620px;
}

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

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.row-meta span,
.filter-chip,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(31, 41, 55, .88);
  color: var(--muted-strong);
  padding: 6px 10px;
  font-size: 13px;
}

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

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

.hero-dot.active {
  background: var(--accent);
}

.page-hero {
  background: linear-gradient(100deg, #1f2937 0%, #111827 48%, #0b1120 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero .page-shell {
  padding: 82px 0 70px;
}

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

.section {
  padding: 66px 0;
}

.section.tight {
  padding: 42px 0;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -.03em;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.category-grid,
.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250, 204, 21, .28), rgba(17, 24, 39, .88));
  z-index: 1;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

.category-card h3 {
  margin: 0;
  font-size: 25px;
}

.category-card p {
  color: #e5e7eb;
  margin: 8px 0 0;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(31, 41, 55, .92);
  border: 1px solid rgba(55, 65, 81, .72);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .24);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, .75);
  box-shadow: 0 26px 56px rgba(0, 0, 0, .34);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .58), transparent 42%);
}

.poster-chip,
.rank-badge,
.list-rank {
  position: absolute;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.poster-chip {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  background: var(--accent);
  color: #111827;
}

.rank-badge,
.list-rank {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
}

.card-body {
  padding: 16px;
}

.card-body h3,
.row-body h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.card-body h3 a,
.row-body h3 a {
  transition: color .2s ease;
}

.card-body h3 a:hover,
.row-body h3 a:hover {
  color: var(--accent);
}

.card-body p,
.row-body p {
  margin: 0 0 12px;
  color: var(--muted);
}

.card-meta,
.detail-meta,
.row-meta,
.tag-row,
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.tag-row span {
  padding: 4px 8px;
  background: #111827;
}

.feature-band {
  background: linear-gradient(90deg, rgba(31, 41, 55, .88), rgba(17, 24, 39, .98));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.media-list {
  display: grid;
  gap: 16px;
}

.media-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, .76);
  border-radius: var(--radius);
  background: rgba(31, 41, 55, .62);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.media-row:hover {
  background: rgba(31, 41, 55, .92);
  border-color: rgba(250, 204, 21, .66);
  transform: translateY(-2px);
}

.row-poster {
  position: relative;
  display: block;
  min-height: 160px;
  overflow: hidden;
}

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

.row-body {
  padding: 24px;
}

.row-meta span {
  border-radius: 10px;
  padding: 5px 8px;
}

.filter-card {
  margin-top: -34px;
  position: relative;
  z-index: 3;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, .92);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(130px, .55fr)) auto;
  gap: 12px;
}

.filter-chip-row {
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid var(--line);
  background: #0b1120;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, .9fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(31, 41, 55, .86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .16));
  color: #111827;
}

.play-overlay.is-hidden {
  display: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(250, 204, 21, .26);
  transform: translateZ(0);
  transition: transform .2s ease;
}

.play-overlay:hover .play-icon {
  transform: scale(1.07);
}

.detail-card {
  padding: 28px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-title p {
  color: var(--muted-strong);
  font-size: 18px;
  margin: 16px 0 18px;
}

.detail-cover {
  border-radius: var(--radius);
  overflow: hidden;
  background: #111827;
}

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

.content-block {
  margin-top: 28px;
}

.content-block h2 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: #d1d5db;
  font-size: 17px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 10px;
  background: #111827;
  transition: transform .2s ease, background .2s ease;
}

.side-link:hover {
  transform: translateX(3px);
  background: #1f2937;
}

.side-link img {
  width: 72px;
  height: 94px;
  object-fit: cover;
  border-radius: 10px;
}

.side-link strong {
  display: block;
  margin-bottom: 6px;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

.search-empty {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(31, 41, 55, .74);
  color: var(--muted-strong);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(11, 17, 32, .92);
}

.footer-shell {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 38px 0 22px;
}

.footer-shell p,
.copyright {
  color: var(--muted);
  margin: 10px 0 0;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

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

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

@media (max-width: 720px) {
  .hero {
    height: 600px;
  }

  .hero-actions,
  .section-title,
  .footer-shell {
    align-items: stretch;
    flex-direction: column;
  }

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

  .media-row {
    grid-template-columns: 1fr;
  }

  .row-poster {
    height: 210px;
  }

  .detail-card {
    padding: 20px;
  }

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