:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.15);
  --orange: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 74%);
  z-index: -1;
}

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

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

button,
input {
  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-bar {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted-strong);
  font-weight: 650;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 72vh;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 72vh;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.08) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.86));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 64px;
  max-width: min(var(--max), calc(100% - 32px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(6, 78, 59, 0.35);
  box-shadow: inset 0 0 18px rgba(52, 211, 153, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

.hero-tags,
.detail-tags,
.tag-row,
.meta-row,
.detail-meta,
.page-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(52, 211, 153, 0.18);
  padding: 7px 11px;
  font-size: 13px;
}

.hero-actions,
.page-actions {
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 0 24px;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.3);
}

.ghost-button {
  padding: 0 22px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.54);
}

.text-button {
  min-height: 0;
  color: var(--accent);
}

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

.ghost-button:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--accent);
}

main,
.subpage-main,
.detail-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.block-section {
  padding: 58px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  flex: none;
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.54));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.46);
  box-shadow: var(--shadow);
}

.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.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, #fcd34d, #34d399);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  font-size: 13px;
}

.movie-info {
  padding: 16px;
}

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

.movie-info h3 a {
  transition: color 0.2s ease;
}

.movie-info h3 a:hover {
  color: var(--accent);
}

.movie-info p {
  margin: 0 0 14px;
  min-height: 56px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  gap: 6px;
  margin-bottom: 12px;
}

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
  color: var(--muted-strong);
  border-color: rgba(148, 163, 184, 0.18);
}

.meta-row {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  background: #0f172a;
}

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

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

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

.category-tile span {
  font-size: 24px;
  font-weight: 850;
}

.category-tile small {
  margin-top: 8px;
  color: var(--muted-strong);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
}

.ranking-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.ranking-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row:hover {
  background: rgba(52, 211, 153, 0.08);
}

.ranking-row strong {
  color: var(--accent);
}

.ranking-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.ranking-row small {
  color: var(--muted);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 211, 153, 0.4);
}

.compact-card img {
  grid-row: 1 / 3;
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.compact-card small {
  color: var(--muted);
}

.search-panel {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 24px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 0 18px;
}

.search-panel input:focus {
  border-color: rgba(52, 211, 153, 0.52);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.search-panel button {
  width: 92px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(38px, 7vw, 86px);
  background:
    radial-gradient(circle at 12% 12%, rgba(52, 211, 153, 0.22), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

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

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(36px, 6vw, 72px);
}

.category-list {
  display: grid;
  gap: 20px;
}

.category-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel);
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
}

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

.category-card h2 {
  margin: 0;
  font-size: 28px;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.category-samples a {
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(20px, 4vw, 42px);
  background:
    radial-gradient(circle at 8% 18%, rgba(52, 211, 153, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.lead {
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.85;
}

.detail-tags {
  margin: 22px 0;
}

.detail-meta {
  gap: 12px;
  color: var(--muted);
  margin-bottom: 28px;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
}

.player-section {
  padding: 44px 0 24px;
}

.player-section h2,
.detail-text h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 4vw, 38px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-symbol {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 18px 46px rgba(16, 185, 129, 0.32);
  font-size: 34px;
}

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

.detail-text {
  color: var(--muted-strong);
  line-height: 1.9;
}

.detail-text p {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--panel);
}

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

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-content: flex-start;
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: var(--accent);
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-stage,
  .hero-image {
    min-height: 76vh;
  }

  .hero-content {
    padding-top: 34px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .footer-inner,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .search-panel {
    flex-direction: column;
  }

  .search-panel button {
    width: 100%;
    height: 48px;
  }

  .ranking-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .ranking-row small {
    grid-column: 2;
  }

  .page-hero,
  .detail-hero {
    border-radius: 24px;
  }
}
