:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, .76);
  --line: rgba(148, 163, 184, .18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --gold: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, .45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, .14), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, .12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .94), rgba(15, 23, 42, .96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(2, 6, 23, .28);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(37, 99, 235, .34);
}

.brand-name {
  font-size: 22px;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 6px;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(37, 99, 235, .22);
  transform: translateY(-1px);
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav.is-open {
  display: grid;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #020617;
}

.hero-slider::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(0deg, var(--bg), transparent);
  pointer-events: none;
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .72fr);
  align-items: center;
  gap: 56px;
  padding: 110px max(32px, calc((100vw - 1180px) / 2)) 130px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 1.1s ease;
  pointer-events: none;
}

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

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.section-title h2,
.detail-page h1 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 850px;
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 950;
  text-shadow: 0 18px 60px rgba(0, 0, 0, .44);
}

.hero-copy h2 + p,
.hero-copy h1 + h2 + p {
  margin-top: 20px;
}

.hero-copy p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(16px, 1.8vw, 20px);
}

.hero-poster {
  position: relative;
  z-index: 4;
  justify-self: end;
  width: min(380px, 100%);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, .7);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
  transition: transform .25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .72);
  color: #fff;
  backdrop-filter: blur(12px);
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(147, 197, 253, .28);
  border-radius: 999px;
  background: rgba(37, 99, 235, .12);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 850;
  border: 1px solid transparent;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 38px rgba(37, 99, 235, .32);
}

.secondary-btn,
.ghost-btn {
  color: #e0f2fe;
  background: rgba(15, 23, 42, .62);
  border-color: rgba(148, 163, 184, .28);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.full {
  width: 100%;
}

.hero-toolbar {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 6;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .38);
  transition: width .25s ease, background .25s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #fff;
}

.hero-thumbs {
  display: flex;
  gap: 10px;
  max-width: 560px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.hero-thumb {
  flex: 0 0 105px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  padding: 5px;
  background: rgba(15, 23, 42, .7);
  color: #fff;
  text-align: left;
  opacity: .72;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, .72);
}

.hero-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.search-panel {
  position: relative;
  z-index: 10;
  margin: -44px auto 42px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(132px, 170px)) auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, .84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.search-panel input,
.search-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  padding: 0 12px;
  outline: 0;
  background: rgba(2, 6, 23, .52);
  color: #fff;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(96, 165, 250, .82);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .16);
}

.section-block {
  margin: 64px 0;
}

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

.section-title h2 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 930;
}

.section-title a {
  color: #93c5fd;
  font-weight: 800;
}

.left-title {
  display: block;
}

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

.category-tile,
.category-overview-card,
.story-card,
.detail-side,
.rank-card,
.movie-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, .88), rgba(2, 6, 23, .86));
  box-shadow: 0 18px 48px rgba(2, 6, 23, .26);
}

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  display: grid;
  align-content: space-between;
  transition: transform .2s ease, border-color .2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, .48);
}

.category-tile span,
.category-top span {
  color: #fff;
  font-size: 22px;
  font-weight: 920;
}

.category-tile strong,
.category-top p {
  color: var(--muted);
  font-weight: 500;
}

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, .68);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin: 0 0 7px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 780;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.card-text {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  transition: transform .2s ease, border-color .2s ease;
}

.rank-num {
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--gold), var(--accent-2));
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-card h3 {
  margin: 0;
  font-size: 17px;
}

.rank-card p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  padding: 34px 0 20px;
}

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

.breadcrumb a {
  color: #bfdbfe;
}

.breadcrumb span::before {
  content: "/";
  margin-right: 8px;
  color: #475569;
}

.page-hero {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 44px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .28), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(30, 41, 59, .72));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 940;
}

.page-hero p:last-child {
  max-width: 780px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.category-overview-card {
  border-radius: 24px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

.category-top {
  display: block;
  padding: 22px;
  background: rgba(37, 99, 235, .12);
}

.mini-links {
  display: grid;
  gap: 8px;
  padding: 18px 22px 22px;
}

.mini-links a {
  overflow: hidden;
  color: #cbd5e1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-section {
  padding: 34px 0 64px;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .2), transparent 34rem),
    linear-gradient(180deg, rgba(15, 23, 42, .78), rgba(2, 6, 23, .96));
}

.detail-page h1 {
  margin-bottom: 26px;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 950;
}

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

.movie-player {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #020617;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.58);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, .18), rgba(2, 6, 23, .7));
}

.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 60px rgba(37, 99, 235, .48);
}

.movie-player.is-playing .player-cover {
  display: none;
}

.detail-side {
  border-radius: 28px;
  padding: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  object-fit: cover;
}

.detail-side p {
  margin: 12px 0;
  color: #cbd5e1;
}

.detail-content {
  margin-top: -30px;
}

.story-card {
  border-radius: 28px;
  padding: clamp(22px, 4vw, 42px);
}

.story-card p {
  color: #cbd5e1;
  font-size: 17px;
}

.story-card h2 {
  margin: 28px 0 10px;
  color: #fff;
  font-size: 24px;
}

.detail-tags {
  margin-top: 24px;
}

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

.compact-card .card-text {
  -webkit-line-clamp: 2;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(2, 6, 23, .98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-grid p {
  max-width: 460px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.footer-links a {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .1);
  color: #cbd5e1;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

  .hero-slide {
    grid-template-columns: 1fr .54fr;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 92px;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
  }

  .hero-toolbar {
    display: grid;
  }

  .hero-thumbs {
    max-width: calc(100vw - 32px);
  }

  .movie-grid,
  .rank-list,
  .rank-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .player-layout,
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
  }
}

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

  .brand-name {
    font-size: 19px;
  }

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

  .hero-slide {
    padding: 92px 16px 150px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 36px;
  }

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

  .hero-poster {
    display: none;
  }

  .hero-toolbar {
    bottom: 18px;
  }

  .search-panel {
    margin-top: 18px;
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .rank-list,
  .rank-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 48px 82px 1fr;
  }

  .page-hero {
    padding: 26px;
    border-radius: 22px;
  }

  .movie-player,
  .movie-player video {
    min-height: 240px;
  }

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