* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: #111827;
  --card: #141a26;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --brand: #f43f5e;
  --brand-2: #f97316;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 5%, rgba(244, 63, 94, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(249, 115, 22, 0.16), transparent 34rem),
    linear-gradient(180deg, #0b1020 0%, var(--bg) 44%, #05070d 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 80%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-nav {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 38px rgba(244, 63, 94, 0.34);
  font-size: 16px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links > a {
  color: var(--soft);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links > a:hover,
.nav-links > a.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

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

.nav-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 220px;
  padding: 10px 14px;
}

.nav-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
  background: rgba(255, 255, 255, 0.12);
}

.nav-search button,
.big-search button,
.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.big-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.3);
}

.ghost-btn,
.section-link {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-slider {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  isolation: isolate;
}

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

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

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

.hero-bg {
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
  transform: scale(1.08);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 11, 18, 0.96) 0%, rgba(8, 11, 18, 0.74) 45%, rgba(8, 11, 18, 0.32) 100%),
    linear-gradient(0deg, var(--bg), rgba(8, 11, 18, 0.15) 45%, rgba(8, 11, 18, 0.85));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: 56px;
  padding: 56px 0 80px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #ffd7df;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy p {
  margin: 24px 0 0;
  max-width: 680px;
  color: var(--soft);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.9;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-list span,
.detail-meta-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-4px);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 540px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-weight: 900;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.quick-search-panel,
.content-section,
.page-hero,
.filter-bar,
.detail-hero,
.player-section,
.detail-content,
.pager-links {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-panel {
  margin-top: -42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel span {
  color: #ffd7df;
  font-weight: 900;
}

.quick-search-panel h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.05em;
}

.big-search input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
}

.content-section {
  padding: 76px 0 0;
}

.no-top-padding {
  padding-top: 26px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(20, 26, 38, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 63, 94, 0.44);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

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

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

.movie-badge,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.74);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: auto;
  right: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: 0;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-weight: 900;
}

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

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

.movie-card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: #ffd7df;
}

.movie-card-body p {
  min-height: 66px;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.movie-meta {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-compact .poster-link {
  aspect-ratio: 16 / 10;
}

.movie-card-compact .movie-card-body p {
  min-height: 44px;
}

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

.category-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(20, 26, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.46);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 148px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.category-covers img,
.category-covers span {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

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

.category-card-body h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card-body span {
  color: #ffd7df;
  font-weight: 900;
}

.page-main,
.detail-main {
  padding-bottom: 80px;
}

.page-hero,
.detail-hero {
  padding: 68px 0 32px;
}

.compact-hero {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb em {
  color: #ffffff;
  font-style: normal;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--line);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  padding: 0 16px;
}

.filter-input {
  flex: 1 1 280px;
}

.filter-count {
  margin-left: auto;
  color: #ffd7df;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: 44px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.lead-text {
  max-width: 820px;
  margin: 20px 0 0;
  color: var(--soft);
  font-size: 20px;
  line-height: 1.85;
}

.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.player-section {
  padding: 20px 0 36px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  font-size: 28px;
  font-weight: 900;
}

.player-overlay strong {
  font-size: clamp(22px, 4vw, 42px);
}

.player-overlay em {
  color: #ffd7df;
  font-style: normal;
  font-weight: 900;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.text-panel {
  padding: 28px;
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid var(--line);
}

.text-panel h2 {
  margin-bottom: 16px;
  font-size: 30px;
}

.text-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.95;
  font-size: 17px;
  white-space: pre-line;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.info-grid span {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--soft);
}

.pager-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 28px;
}

.pager-links a {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pager-links a:hover {
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.5);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.76);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner strong {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  margin: 8px 0 0;
}

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

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

.is-filter-hidden {
  display: none !important;
}

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

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

@media (max-width: 900px) {
  .site-nav {
    height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
    min-height: calc(100vh - 64px);
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 64px);
    padding-top: 42px;
    gap: 28px;
  }

  .hero-poster {
    min-height: 360px;
    transform: none;
  }

  .hero-poster img {
    min-height: 360px;
  }

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

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

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

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

@media (max-width: 720px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .content-section {
    padding-top: 52px;
  }

  .section-heading,
  .footer-inner,
  .pager-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-search-panel,
  .text-panel,
  .filter-bar {
    padding: 18px;
  }

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

  .filter-count {
    width: 100%;
    margin-left: 0;
  }

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .movie-card-body p {
    min-height: 58px;
    font-size: 13px;
  }

  .player-start {
    width: 64px;
    height: 64px;
  }

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