:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.88);
  --bg-card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 75% 8%, rgba(20, 184, 166, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.24);
  color: #ffffff;
  font-weight: 900;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(330px, 30vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
}

.header-search button,
.search-page-form button,
.filter-panel button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button {
  padding: 12px 16px;
}

.header-search button:hover,
.search-page-form button:hover,
.filter-panel button:hover,
.button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
}

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

.mobile-panel-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 18px;
}

.mobile-panel-inner a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.75);
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 42%);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding: 88px 0;
}

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

.hero-kicker,
.section-kicker,
.category-hero-content p,
.sub-hero p {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-copy > p:not(.hero-kicker) {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 11px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.24);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -42px;
  position: relative;
  z-index: 6;
}

.stats-strip div,
.category-tile,
.movie-card,
.category-overview-card,
.ranking-row,
.text-panel,
.info-panel,
.filter-panel,
.search-page-form,
.search-tools {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stats-strip div {
  padding: 24px;
  border-radius: 22px;
}

.stats-strip strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stats-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.05em;
}

.section-action,
.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.3));
  z-index: 1;
}

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

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

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  color: var(--cyan);
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-top: 88px;
  font-size: 28px;
}

.category-tile p {
  color: var(--muted-strong);
  line-height: 1.7;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 28px 80px rgba(34, 211, 238, 0.13);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}

.is-compact .card-poster {
  aspect-ratio: 3 / 4;
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.05));
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.85);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.45);
}

.card-body h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.is-compact .card-body h2 {
  font-size: 16px;
}

.card-body h2 a:hover {
  color: var(--cyan);
}

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

.result-count {
  margin: 16px 0;
  color: var(--muted);
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.filter-search-field {
  flex: 1;
}

.filter-panel input,
.filter-panel select,
.search-page-form input,
.search-tools select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
}

.filter-panel button {
  min-width: 98px;
  align-self: stretch;
  border-radius: 12px;
}

.sub-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 28rem), var(--bg-soft);
}

.sub-hero .container {
  padding: 86px 0;
}

.sub-hero h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  letter-spacing: -0.07em;
}

.sub-hero span,
.category-hero span {
  display: block;
  max-width: 760px;
  margin-top: 14px;
  color: var(--muted-strong);
  line-height: 1.8;
}

.category-overview-grid {
  display: grid;
  gap: 18px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.category-preview-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 170px;
  overflow: hidden;
  border-radius: 18px;
}

.category-preview-images img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 30px;
}

.category-overview-card p {
  color: var(--muted-strong);
  line-height: 1.75;
}

.category-hero {
  min-height: 370px;
}

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

.category-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.58));
}

.category-hero-content {
  position: relative;
  padding: 72px 0;
}

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

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 96px 1fr 78px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.ranking-number {
  font-size: 26px;
  font-weight: 900;
  color: var(--cyan);
}

.ranking-poster {
  overflow: hidden;
  border-radius: 14px;
}

.ranking-poster img {
  width: 96px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.ranking-row > strong {
  text-align: right;
  color: var(--amber);
  font-size: 24px;
}

.search-page-form {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
}

.search-page-form input {
  flex: 1;
}

.search-page-form button {
  min-width: 120px;
  border-radius: 12px;
}

.search-tools {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
}

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  pointer-events: none;
}

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

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

.detail-meta-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.detail-meta-list span {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.58);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding-top: 34px;
}

.detail-main h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-one-line {
  margin: 0 0 16px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin-bottom: 20px;
}

.text-panel,
.info-panel {
  margin-top: 16px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.text-panel h2,
.info-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.95;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 0;
}

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

.info-panel dd {
  margin: 0;
  color: var(--muted-strong);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted-strong);
  line-height: 1.7;
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

.site-footer a:hover {
  color: var(--cyan);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-brand {
  margin-bottom: 16px;
}

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

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

  .mobile-menu-button {
    display: block;
  }

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

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

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

  .detail-card {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

  .detail-card img {
    height: 100%;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    padding: 70px 0 92px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .filter-panel,
  .search-page-form,
  .search-tools {
    flex-direction: column;
    align-items: stretch;
  }

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

  .ranking-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .ranking-row > strong {
    grid-column: 3;
    text-align: left;
  }

  .ranking-poster img {
    width: 72px;
  }

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

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

@media (max-width: 480px) {
  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }

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

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