:root {
  --night-950: #070b16;
  --night-900: #0d1424;
  --night-850: #111b2e;
  --night-800: #142034;
  --night-700: #20304b;
  --night-600: #314461;
  --text-main: #f7f7fb;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --blue: #38bdf8;
  --card: rgba(17, 27, 46, 0.82);
  --border: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(56, 189, 248, 0.13), transparent 28rem),
    linear-gradient(180deg, var(--night-950), var(--night-900) 35%, #101827);
  color: var(--text-main);
  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 {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 20, 36, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

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

.top-search input,
.inline-search input,
.inline-search select {
  min-width: 240px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text-main);
  background: rgba(7, 11, 22, 0.58);
  outline: none;
}

.top-search input:focus,
.inline-search input:focus,
.inline-search select:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.top-search button,
.hero-button,
.section-more,
.filter-button,
.play-now {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.hero-button:hover,
.section-more:hover,
.filter-button:hover,
.play-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
}

.mobile-panel {
  display: none;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border);
  background: rgba(13, 20, 36, 0.96);
}

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

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--text-soft);
}

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

.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 22px 72px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #102a43, #243b53 58%, #29203d);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 22, 0.92), rgba(13, 20, 36, 0.76) 45%, rgba(13, 20, 36, 0.28)),
    linear-gradient(0deg, rgba(7, 11, 22, 0.96), rgba(7, 11, 22, 0.28) 42%, rgba(7, 11, 22, 0.46));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 92px 22px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: 48px;
}

.hero-copy {
  max-width: 710px;
  animation: fadeUp 0.85s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.62);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--text-soft);
  font-size: 18px;
}

.hero-actions,
.filter-row,
.tag-row,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-link {
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(12px);
}

.hero-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 16px;
  background: rgba(17, 27, 46, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.hero-card-meta {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(7, 11, 22, 0.2), rgba(7, 11, 22, 0.84));
}

.hero-card-meta strong {
  display: block;
  font-size: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber);
}

.section {
  margin: 56px 0 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--text-muted);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(24, 34, 56, 0.9);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 58%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.play-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.play-badge {
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
}

.year-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(7, 11, 22, 0.68);
  backdrop-filter: blur(10px);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card-body h3 a:hover {
  color: var(--amber);
}

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

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: #fbbf24;
  background: var(--amber-soft);
  font-size: 12px;
}

.card-meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}

.card-meta a:hover {
  color: var(--amber);
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(56, 189, 248, 0.06)),
    rgba(17, 27, 46, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.44);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--text-muted);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: rgba(17, 27, 46, 0.82);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.44);
}

.rank-no {
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 62px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-meta {
  color: var(--text-muted);
  font-size: 13px;
}

.inline-search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(17, 27, 46, 0.68);
}

.filter-button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
  border: 1px solid var(--border);
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

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

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
}

.detail-copy p {
  color: var(--text-soft);
  font-size: 17px;
}

.player-shell {
  margin: 34px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  background: #000;
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(180deg, rgba(7, 11, 22, 0.1), rgba(7, 11, 22, 0.5));
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.4);
}

.player-caption {
  padding: 18px 22px;
  color: var(--text-soft);
  background: rgba(17, 27, 46, 0.82);
}

.content-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  background: rgba(17, 27, 46, 0.7);
}

.content-card h2,
.content-card h3 {
  margin-top: 0;
}

.content-card p {
  color: var(--text-soft);
}

.search-empty {
  display: none;
  padding: 36px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 24px;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.72);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
}

.footer-inner p {
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

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

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

.copyright {
  border-top: 1px solid var(--border);
  padding: 18px 22px;
  color: var(--text-muted);
  text-align: center;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .hero-card {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero {
    min-height: 680px;
  }

  .hero-inner {
    min-height: 680px;
    padding-top: 76px;
    gap: 26px;
  }

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

  .section-head,
  .footer-inner {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .rank-item {
    grid-template-columns: 38px 54px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-wrap {
    padding: 0 16px;
  }

  .site-logo {
    font-size: 18px;
  }

  .page-main {
    padding: 30px 16px 58px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .detail-cover {
    max-width: 280px;
  }

  .inline-search input,
  .inline-search select {
    min-width: 100%;
  }
}
