:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34rem),
    var(--bg);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.header-shell,
.footer-shell,
.content-section,
.search-panel,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
  transition: transform 0.25s ease;
}

.brand-icon.small {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-2deg);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.brand-text,
.footer-brand span:last-child {
  font-size: 1.24rem;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: var(--soft);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  padding: 14px 20px 22px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-link {
  display: block;
  padding: 12px 4px;
  color: var(--soft);
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.mobile-cats a,
.category-chips a,
.filter-chips button,
.tag-row span,
.detail-meta span,
.rank-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.74);
  color: var(--soft);
  padding: 7px 12px;
  font-size: 0.82rem;
}

.hero-carousel {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 54px;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.64) 45%, rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 48px;
  padding: 64px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 18px 0 14px;
  font-size: clamp(1.7rem, 3.3vw, 3.2rem);
  line-height: 1.08;
}

.hero-copy p,
.page-hero p,
.detail-line {
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-tags,
.detail-tags {
  margin: 20px 0 28px;
}

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

.hero-actions,
.section-heading,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.text-btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.primary-btn,
.search-form button {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover,
.search-form button:hover,
.ghost-btn:hover,
.text-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
}

.text-btn {
  min-height: 38px;
  padding: 0 16px;
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.24);
  background: rgba(34, 211, 238, 0.08);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.03);
}

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

.hero-poster span,
.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(34, 211, 238, 0.92);
  color: white;
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.24);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

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

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

.search-panel,
.page-hero,
.content-section,
.player-section,
.article-section {
  margin-bottom: 56px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.56));
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.article-section h2,
.player-section h2 {
  margin: 0;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form.wide {
  margin-top: 22px;
  width: min(720px, 100%);
}

.search-form input {
  min-width: 0;
  flex: 1;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.54);
  color: white;
  outline: none;
  padding: 0 18px;
}

.search-form input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.category-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.section-heading {
  justify-content: space-between;
  margin-bottom: 24px;
}

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

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

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

.poster-link,
.horizontal-card a:first-child,
.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  aspect-ratio: 2 / 3;
}

.poster-link img,
.horizontal-card img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.horizontal-card:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.poster-link::after,
.horizontal-card a:first-child::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 56%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-link::after,
.horizontal-card:hover a:first-child::after {
  opacity: 1;
}

.poster-region {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--soft);
  padding: 5px 9px;
  font-size: 0.72rem;
  backdrop-filter: blur(8px);
}

.poster-play {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-play,
.horizontal-card:hover .poster-play {
  opacity: 1;
}

.movie-meta {
  padding-top: 12px;
}

.movie-meta h3,
.horizontal-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta h3 a,
.horizontal-card h3 a,
.rank-copy h2 a {
  transition: color 0.2s ease;
}

.movie-card:hover h3 a,
.horizontal-card:hover h3 a,
.rank-item:hover h2 a {
  color: var(--cyan);
}

.movie-line {
  color: var(--muted);
  min-height: 3.2em;
  margin: 0 0 10px;
  line-height: 1.6;
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 10px;
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: thin;
}

.horizontal-card {
  width: 190px;
  flex: 0 0 auto;
}

.horizontal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.muted-section {
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-main,
.detail-main {
  padding-top: 28px;
}

.page-hero {
  position: relative;
  padding: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.page-hero.narrow {
  max-width: 960px;
}

.page-hero p {
  max-width: 760px;
}

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

.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  overflow: hidden;
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.35);
}

.category-card > a {
  display: block;
  padding: 28px;
}

.category-count {
  color: var(--cyan);
  font-size: 2.4rem;
  font-weight: 900;
}

.category-card h2 {
  margin: 12px 0 10px;
}

.category-card p,
.category-samples a {
  color: var(--muted);
  line-height: 1.75;
}

.category-samples {
  display: grid;
  gap: 10px;
  padding: 0 28px 26px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.filter-chips button {
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: white;
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.16);
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.rank-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
}

.rank-poster {
  border-radius: 12px;
}

.rank-copy h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.rank-desc {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #0f172a;
  min-height: 520px;
  box-shadow: var(--shadow);
  margin-bottom: 42px;
}

.detail-bg {
  filter: blur(10px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.72;
}

.detail-inner {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  padding: 54px;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

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

.detail-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-line {
  max-width: 780px;
  margin: 20px 0;
}

.player-section,
.article-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.68);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.stream-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.34));
}

.player-cover.hidden {
  display: none;
}

.player-cover span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
  font-size: 2rem;
}

.player-cover strong {
  font-size: 1.1rem;
}

.article-section h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

.article-section h2:not(:first-child) {
  margin-top: 30px;
}

.article-section p {
  margin: 0;
  color: var(--soft);
  line-height: 2;
  font-size: 1.02rem;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
}

.footer-shell {
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 34px;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

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

.empty-state {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: var(--panel-soft);
  text-align: center;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 220px;
    padding: 44px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-stage,
  .hero-content {
    min-height: 680px;
  }

  .hero-content,
  .detail-inner,
  .search-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    width: min(240px, 70vw);
  }

  .hero-content {
    align-items: end;
    padding: 34px 24px 72px;
  }

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

  .rank-item {
    grid-template-columns: 44px 76px minmax(0, 1fr);
  }

  .rank-item .text-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .detail-inner {
    padding: 34px 24px;
  }
}

@media (max-width: 560px) {
  .header-shell,
  .footer-shell,
  .content-section,
  .search-panel,
  .page-main,
  .detail-main,
  .hero-carousel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-stage,
  .hero-content {
    min-height: 620px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.35rem;
    line-height: 1.04;
  }

  .hero-copy h2 {
    font-size: 1.62rem;
  }

  .hero-poster {
    display: none;
  }

  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form button,
  .search-form input {
    width: 100%;
  }

  .movie-grid,
  .compact-grid {
    gap: 16px;
  }

  .movie-line,
  .tag-row:not(.hero-tags):not(.detail-tags) {
    display: none;
  }

  .page-hero,
  .player-section,
  .article-section {
    padding: 24px;
  }

  .detail-cover {
    min-height: auto;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-number {
    text-align: left;
  }

  .rank-poster {
    width: 110px;
  }
}
