:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #ea580c;
  --red: #dc2626;
  --blue: #06b6d4;
  --purple: #a855f7;
  --radius: 1rem;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #020617 45%, #000 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap,
.footer-inner,
.section-inner,
.page-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.logo-text {
  font-size: 1.08rem;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-2);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(245, 158, 11, 0.15);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  color: white;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 220px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.player-start,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.top-search button,
.mobile-search button {
  padding: 10px 15px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 700;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.primary-button:hover,
.secondary-button:hover,
.player-start:hover,
.top-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.34);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.mobile-search {
  margin-top: 10px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-viewport {
  position: relative;
  height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  margin-left: max(16px, calc((100vw - 1280px) / 2 + 16px));
  padding-top: 42px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 820px;
}

.hero p {
  max-width: 720px;
  color: var(--muted-2);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted-2);
}

.hero-meta {
  margin: 20px 0 26px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 0.9rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.76);
  transform: translateY(-2px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.main-section,
.feature-band,
.page-hero,
.detail-main {
  padding: 58px 0;
}

.feature-band {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.2));
  border-block: 1px solid var(--line);
}

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

.section-title-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.22);
}

.section-title-block h2,
.page-head h1,
.page-title,
.detail-title {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-title-block h2,
.page-title {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.section-title-block p,
.page-head p,
.page-intro,
.category-info p,
.footer-inner p {
  margin: 4px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--amber-light);
  font-weight: 700;
}

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

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

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

.movie-card,
.horizontal-card,
.category-tile,
.info-panel,
.detail-card,
.rank-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.movie-card {
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-tile:hover,
.horizontal-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
  opacity: 0.92;
}

.play-icon,
.horizontal-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.94);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-icon,
.horizontal-card:hover .horizontal-poster span {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-chip,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.68);
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.movie-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-title a:hover,
.horizontal-body h3 a:hover,
.breadcrumb a:hover {
  color: var(--amber-light);
}

.movie-desc {
  min-height: 3.1em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  gap: 7px;
}

.card-meta span {
  padding: 4px 8px;
  font-size: 0.78rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: var(--muted-2);
  background: rgba(51, 65, 85, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.76rem;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.horizontal-poster {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.horizontal-body {
  min-width: 0;
  position: relative;
}

.horizontal-body h3 {
  margin: 0 0 7px;
  font-size: 1.08rem;
}

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

.rank-number {
  float: right;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
}

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

.category-tile {
  display: block;
  padding: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
  height: 148px;
  margin-bottom: 14px;
}

.category-covers img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.category-covers img:first-child {
  grid-row: span 2;
}

.category-info h2 {
  margin: 0;
  font-size: 1.2rem;
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 26rem);
}

.page-head {
  align-items: center;
  margin-bottom: 0;
}

.page-title {
  margin-top: 14px;
}

.page-intro {
  max-width: 760px;
  font-size: 1.03rem;
}

.filter-panel {
  display: flex;
  gap: 12px;
  margin: 26px 0 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.56);
}

.filter-panel input {
  flex: 1;
  min-width: 180px;
}

.filter-panel select {
  min-width: 180px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb span::before {
  content: "/";
  margin-right: 8px;
  color: rgba(148, 163, 184, 0.45);
}

.detail-main {
  padding-top: 34px;
}

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

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

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

.detail-title {
  margin: 14px 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.detail-lead {
  max-width: 860px;
  margin: 20px 0;
  color: var(--muted-2);
  font-size: 1.12rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.detail-tags span {
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: var(--amber-light);
  padding: 6px 11px;
  font-size: 0.9rem;
}

.player-section {
  margin: 34px 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(0, 0, 0, 0.56)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-frame.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  font-size: 2.2rem;
}

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

.detail-card,
.info-panel,
.rank-panel {
  padding: 24px;
}

.detail-card + .detail-card {
  margin-top: 22px;
}

.detail-card h2,
.info-panel h2,
.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.detail-card p,
.info-panel p {
  margin: 0;
  color: var(--muted-2);
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  color: var(--muted-2);
}

.info-list dt {
  color: var(--muted);
}

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

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

.prev-next a {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
}

.prev-next a:hover {
  border-color: rgba(245, 158, 11, 0.36);
}

.prev-next small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
}

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

.hidden-card {
  display: none !important;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-logo {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

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

.footer-links a {
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
}

.footer-links a:hover {
  color: white;
  border-color: rgba(245, 158, 11, 0.44);
}

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

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

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

  .top-search input {
    width: 170px;
  }
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .hero-viewport {
    height: 560px;
  }

  .hero-copy {
    margin: 0 auto;
  }

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

  .horizontal-list,
  .detail-grid,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .footer-inner,
  .section-inner,
  .page-wrap {
    width: min(100% - 24px, 1280px);
  }

  .hero-viewport {
    height: 520px;
  }

  .hero-copy {
    padding-top: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .page-head,
  .filter-panel {
    display: grid;
    align-items: stretch;
  }

  .movie-grid,
  .movie-grid.category-grid,
  .movie-grid.six-grid,
  .related-grid,
  .category-tile-grid,
  .prev-next {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .horizontal-card {
    grid-template-columns: 100px minmax(0, 1fr);
  }

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

  .movie-desc,
  .card-meta span:nth-child(2) {
    display: none;
  }

  .detail-card,
  .info-panel,
  .rank-panel {
    padding: 18px;
  }

  .player-start {
    width: 72px;
    height: 72px;
    font-size: 1.7rem;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .movie-grid.category-grid,
  .movie-grid.six-grid,
  .related-grid,
  .category-tile-grid {
    grid-template-columns: 1fr;
  }
}
