:root {
  --night-950: #071a2d;
  --night-900: #102a43;
  --night-850: #183957;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --shadow-night: 0 10px 30px -5px rgba(16, 42, 67, 0.5);
  --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-100);
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
    linear-gradient(180deg, var(--night-950), var(--night-900) 42%, #0b1f34);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(36, 59, 83, 0.95);
  border-bottom: 1px solid rgba(72, 101, 129, 0.72);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 2rem));
  height: 4rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 0.78rem;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.4);
}

.brand-text {
  color: var(--gray-100);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--gray-300);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-400);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(72, 101, 129, 0.8);
  color: var(--gray-100);
  background: rgba(51, 78, 104, 0.92);
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 16rem;
  padding: 0.62rem 0.85rem;
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 0.75rem;
  color: #111827;
  background: var(--amber-500);
  padding: 0.62rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  background: rgba(36, 59, 83, 0.98);
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--gray-200);
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.8rem 0 1rem;
  border-top: 1px solid rgba(72, 101, 129, 0.7);
}

.mobile-link {
  display: block;
  padding: 0.55rem 0;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.mobile-search input {
  width: 100%;
  padding: 0.7rem 0.85rem;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--night-900);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active .hero-bg {
  transform: scale(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(16, 42, 67, 0.94), rgba(36, 59, 83, 0.78)),
    linear-gradient(to right, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.68));
}

.hero-content {
  position: absolute;
  left: max(1rem, calc((100% - 1180px) / 2));
  top: 50%;
  width: min(680px, calc(100% - 2rem));
  transform: translateY(-50%);
  animation: fadeIn 0.75s ease both;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--amber-400);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.4rem, 5.2vw, 4.9rem);
  line-height: 1.03;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.hero-content h2 {
  margin: 0 0 0.9rem;
  color: var(--amber-400);
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.hero-content p {
  margin: 0 0 1.4rem;
  max-width: 48rem;
  color: var(--gray-200);
  font-size: 1.1rem;
  line-height: 1.8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(36, 59, 83, 0.68);
  color: var(--gray-200);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.tag-row.large span {
  padding: 0.45rem 0.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.85rem;
  padding: 0.75rem 1.15rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.btn-secondary {
  color: var(--gray-100);
  background: rgba(36, 59, 83, 0.74);
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.btn-ghost {
  color: var(--gray-200);
  border: 1px solid rgba(229, 231, 235, 0.24);
  background: rgba(7, 26, 45, 0.26);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(229, 231, 235, 0.65);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2.4rem;
  background: var(--amber-500);
}

.quick-search-block {
  position: relative;
  z-index: 2;
  margin-top: -2.2rem;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: var(--radius-2xl);
  background: rgba(36, 59, 83, 0.88);
  box-shadow: var(--shadow-night);
  backdrop-filter: blur(16px);
}

.big-search input {
  width: 100%;
  padding: 0.9rem 1rem;
}

.big-search button {
  padding-inline: 1.4rem;
}

.page-flow {
  padding: 4rem 0;
}

.section-block,
.home-category,
.category-overview-card,
.content-card {
  margin-bottom: 4rem;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.section-heading h2,
.category-overview-head h2,
.content-card h2 {
  margin: 0;
  color: var(--gray-100);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.section-heading p,
.category-overview-head p,
.content-card p {
  color: var(--gray-300);
  line-height: 1.9;
}

.text-link {
  color: var(--amber-400);
  font-weight: 800;
}

.text-link:hover {
  color: var(--amber-500);
}

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

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.9rem;
  background: var(--night-800);
  box-shadow: var(--shadow-night);
}

.feature-card .poster-link {
  aspect-ratio: 1 / 1.12;
  border-radius: var(--radius-xl);
}

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

.poster-link:hover img {
  transform: scale(1.06);
  filter: brightness(1.03);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), transparent 58%);
  transition: opacity 0.25s ease;
}

.poster-link:hover .poster-gradient {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-link:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-type {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  border-radius: 999px;
  color: white;
  background: rgba(16, 42, 67, 0.74);
  padding: 0.28rem 0.56rem;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.card-body {
  padding-top: 0.75rem;
}

.card-body h3 {
  margin: 0;
  color: var(--gray-200);
  font-size: 0.98rem;
  line-height: 1.45;
}

.feature-card .card-body h3 {
  font-size: 1.28rem;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.category-overview-head h2 a:hover {
  color: var(--amber-400);
}

.card-meta,
.card-desc {
  margin: 0.35rem 0 0;
  color: var(--gray-500);
  font-size: 0.8rem;
  line-height: 1.55;
}

.card-desc {
  color: var(--gray-400);
}

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

.category-tile,
.category-overview-card,
.content-card,
.filter-panel,
.rank-page-list {
  border: 1px solid rgba(72, 101, 129, 0.7);
  border-radius: var(--radius-xl);
  background: rgba(36, 59, 83, 0.74);
  box-shadow: var(--shadow-night);
}

.category-tile {
  min-height: 9rem;
  padding: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
  border-color: rgba(245, 158, 11, 0.52);
  transform: translateY(-2px);
  background: rgba(36, 59, 83, 0.92);
}

.category-tile span {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--amber-400);
  font-size: 1.2rem;
  font-weight: 800;
}

.category-tile p {
  margin: 0;
  color: var(--gray-300);
  line-height: 1.7;
}

.ranking-panel {
  padding: 1.4rem;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(41, 32, 61, 0.96), rgba(64, 54, 92, 0.76), rgba(90, 77, 126, 0.34));
  box-shadow: var(--shadow-deep);
}

.rank-list,
.rank-page-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.rank-page-list {
  padding: 1rem;
}

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 4.8rem 1fr;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: rgba(16, 42, 67, 0.48);
}

.rank-num {
  min-width: 2rem;
  color: var(--amber-400);
  font-weight: 900;
  font-size: 1.1rem;
}

.rank-poster {
  display: block;
  width: 4.8rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.6rem;
  background: var(--night-900);
}

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

.rank-info {
  min-width: 0;
}

.rank-info h3 {
  margin: 0 0 0.25rem;
  color: var(--gray-100);
  font-size: 1rem;
}

.rank-info p,
.rank-info span {
  display: block;
  margin: 0.25rem 0 0;
  color: var(--gray-400);
  font-size: 0.78rem;
}

.rank-info span {
  color: var(--amber-400);
}

.sub-hero,
.detail-hero {
  padding: 4.5rem 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(135deg, #29203d, #40365c, #5a4d7e);
}

.sub-hero h1,
.detail-info h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
}

.sub-hero p {
  max-width: 54rem;
  margin: 0;
  color: var(--gray-200);
  line-height: 1.85;
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
  color: var(--gray-300);
  font-size: 0.9rem;
}

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

.category-overview-card,
.content-card {
  padding: 1.25rem;
}

.category-overview-head {
  align-items: center;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 11rem 11rem;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  padding: 1rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 0.8rem 0.9rem;
}

.empty-state {
  display: none;
  padding: 3rem 1rem;
  color: var(--gray-300);
  text-align: center;
}

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

.detail-hero {
  padding-bottom: 3.2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-deep);
}

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

.detail-line {
  max-width: 50rem;
  color: var(--gray-200);
  font-size: 1.05rem;
  line-height: 1.85;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.4rem 0;
}

.meta-list div {
  border: 1px solid rgba(229, 231, 235, 0.12);
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
  background: rgba(16, 42, 67, 0.42);
}

.meta-list dt {
  margin-bottom: 0.25rem;
  color: var(--gray-400);
  font-size: 0.78rem;
}

.meta-list dd {
  margin: 0;
  color: var(--gray-100);
  font-weight: 700;
}

.detail-info .btn-primary {
  margin-top: 1.2rem;
}

.player-section {
  margin-bottom: 4rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius-2xl);
  background: #000;
  box-shadow: var(--shadow-deep);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 0.2rem;
  color: white;
  background: rgba(245, 158, 11, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  font-size: 1.55rem;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-status {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: var(--gray-200);
  background: rgba(16, 42, 67, 0.72);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  pointer-events: none;
}

.player-status:empty {
  display: none;
}

.content-card h2 {
  margin-bottom: 0.9rem;
}

.content-card p {
  margin: 0;
  font-size: 1.02rem;
}

.footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.site-footer {
  border-top: 1px solid rgba(72, 101, 129, 0.72);
  background: rgba(36, 59, 83, 0.82);
}

.footer-brand p {
  max-width: 33rem;
  color: var(--gray-400);
  line-height: 1.8;
}

.footer-col h2 {
  margin: 0 0 0.9rem;
  color: var(--gray-100);
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

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

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

.footer-bottom {
  padding: 1.2rem 1rem;
  color: var(--gray-500);
  text-align: center;
  border-top: 1px solid rgba(72, 101, 129, 0.46);
  font-size: 0.85rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.js-card.is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .site-header-inner {
    gap: 0.8rem;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-content {
    top: 48%;
  }

  .hero-actions,
  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid,
  .rank-list,
  .rank-page-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-poster {
    width: min(290px, 100%);
  }

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

@media (max-width: 560px) {
  .container,
  .site-header-inner,
  .mobile-menu,
  .footer-inner {
    width: min(100% - 1rem, 1180px);
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero-slider {
    min-height: 590px;
  }

  .hero-content p {
    font-size: 1rem;
  }

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

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

  .rank-card {
    grid-template-columns: auto 4.2rem 1fr;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .play-overlay span {
    width: 4rem;
    height: 4rem;
  }
}
