:root {
  --bg: #030712;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(17, 24, 39, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --brand: #10b981;
  --brand-light: #34d399;
  --brand-deep: #0f766e;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.22), transparent 30rem),
    radial-gradient(circle at 85% 15%, rgba(20, 184, 166, 0.18), transparent 32rem),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

main {
  min-height: 70vh;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo__mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.9rem;
  color: #052e2b;
  background: linear-gradient(135deg, var(--brand-light), #14b8a6);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

.site-logo__text {
  font-size: 1.12rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-link,
.mobile-nav a {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(16, 185, 129, 0.13);
}

.mobile-menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.5rem 0.75rem;
}

.mobile-nav {
  display: none;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--line);
}

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

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

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  padding: 7rem max(1.25rem, calc((100vw - 1280px) / 2 + 1.25rem)) 5rem;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.78) 43%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.1) 42%, rgba(3, 7, 18, 0.95)),
    var(--hero-poster),
    radial-gradient(circle at 75% 30%, rgba(16, 185, 129, 0.32), transparent 30rem),
    linear-gradient(135deg, #0f172a, #020617);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-slide__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  color: var(--brand-light);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-slide h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero-line {
  max-width: 680px;
  margin: 1.3rem 0 0;
  color: #e2e8f0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.8;
}

.hero-meta {
  margin: 1rem 0 0;
  color: var(--muted);
}

.hero-actions,
.search-panel__row,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.hero-actions {
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #06251f;
  background: linear-gradient(135deg, var(--brand-light), #14b8a6);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.button-ghost {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.58);
}

.hero-dots {
  position: absolute;
  right: max(1.25rem, calc((100vw - 1280px) / 2 + 1.25rem));
  bottom: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  width: 2.3rem;
  background: var(--brand-light);
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.4rem 1.25rem 0;
}

.quick-search {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-top: -3.3rem;
  position: relative;
  z-index: 5;
}

.search-panel,
.stats-grid,
.content-card,
.info-card,
.ranking-panel,
.category-overview-card,
.player-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  padding: 1.2rem;
}

.search-panel label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-weight: 700;
}

input,
select {
  min-height: 2.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.64);
  padding: 0.75rem 1rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(52, 211, 153, 0.82);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.search-panel input,
.filter-bar input {
  flex: 1 1 260px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  padding: 1rem;
}

.stats-grid div {
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.36);
  padding: 1rem 0.6rem;
  text-align: center;
}

.stats-grid strong {
  color: var(--brand-light);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.stats-grid span {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.section-heading a {
  color: var(--brand-light);
  font-weight: 800;
}

.section-heading--left {
  align-items: center;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.movie-card.is-hidden {
  display: none;
}

.movie-card__poster {
  position: relative;
  min-height: 240px;
  background-image:
    linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.9)),
    var(--poster),
    linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(15, 23, 42, 0.95));
  background-size: cover;
  background-position: center;
}

.movie-card--compact .movie-card__poster {
  min-height: 170px;
}

.movie-card__score,
.rank-badge {
  position: absolute;
  top: 0.65rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.82rem;
  backdrop-filter: blur(14px);
}

.movie-card__score {
  right: 0.65rem;
  color: #052e2b;
  background: rgba(52, 211, 153, 0.92);
  padding: 0.32rem 0.55rem;
}

.rank-badge {
  left: 0.65rem;
  color: var(--text);
  background: rgba(2, 6, 23, 0.68);
  padding: 0.32rem 0.58rem;
}

.movie-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 999px;
  color: #052e2b;
  background: rgba(52, 211, 153, 0.95);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-card__body {
  padding: 0.9rem;
}

.movie-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card__meta,
.movie-card__line {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.movie-card__line {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card__tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.75rem;
}

.movie-card__tags span,
.detail-tags span {
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.22rem 0.48rem;
  font-size: 0.76rem;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 1.2rem;
}

.ranking-panel {
  align-self: start;
  padding: 1rem;
  position: sticky;
  top: 5.2rem;
}

.ranking-list {
  display: grid;
  gap: 0.5rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.36);
  padding: 0.72rem;
}

.ranking-row:hover {
  background: rgba(16, 185, 129, 0.12);
}

.ranking-row__number {
  color: var(--brand-light);
  font-weight: 900;
}

.ranking-row__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.ranking-row__meta {
  grid-column: 2 / 4;
  color: var(--muted-2);
  font-size: 0.78rem;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.18), transparent 16rem),
    rgba(15, 23, 42, 0.78);
  padding: 1.25rem;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.52);
}

.category-tile__count,
.category-overview-card__head span {
  display: inline-flex;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  color: #052e2b;
  background: var(--brand-light);
  padding: 0.24rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.category-tile p,
.category-tile small,
.category-overview-card p,
.category-overview-card li,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card ul {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 6rem max(1.25rem, calc((100vw - 1280px) / 2 + 1.25rem)) 4rem;
  background:
    radial-gradient(circle at 78% 12%, rgba(16, 185, 129, 0.2), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.98));
}

.page-hero--small {
  min-height: 330px;
  display: flex;
  align-items: end;
}

.page-hero--category p,
.page-hero--small p,
.detail-hero p {
  max-width: 760px;
  color: #cbd5e1;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.filter-bar {
  margin-bottom: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  padding: 0.9rem;
}

.filter-status {
  margin: 0.75rem 0 1.2rem;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1rem;
  text-align: left;
}

.ranking-table th {
  color: var(--brand-light);
  font-size: 0.86rem;
}

.ranking-table tr:hover td {
  background: rgba(16, 185, 129, 0.08);
}

.detail-hero {
  min-height: 520px;
  display: flex;
  align-items: end;
  background-image:
    linear-gradient(90deg, rgba(3, 7, 18, 0.97), rgba(3, 7, 18, 0.62), rgba(3, 7, 18, 0.18)),
    linear-gradient(0deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.04)),
    var(--detail-poster),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
  background-size: cover;
  background-position: center;
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
}

.detail-main {
  display: grid;
  gap: 1.2rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.75rem;
  border: 0;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.22), transparent 16rem),
    rgba(2, 6, 23, 0.36);
}

.video-play-overlay span {
  display: grid;
  width: 5.2rem;
  height: 5.2rem;
  place-items: center;
  border-radius: 999px;
  color: #052e2b;
  background: var(--brand-light);
  font-size: 2rem;
  box-shadow: 0 22px 46px rgba(16, 185, 129, 0.28);
}

.video-shell.is-playing .video-play-overlay {
  display: none;
}

.video-shell.is-loading .video-play-overlay strong::after {
  content: "中";
}

.video-message {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

.content-card,
.info-card,
.player-panel {
  padding: 1.2rem;
}

.content-card h2,
.info-card h2 {
  margin: 0 0 0.8rem;
}

.content-card p {
  color: #cbd5e1;
  line-height: 1.95;
  white-space: pre-line;
}

.info-card + .info-card {
  margin-top: 1rem;
}

.info-card dl {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.7rem 1rem;
  margin: 0;
}

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

.info-card dd {
  margin: 0;
  color: #e2e8f0;
}

.related-list {
  display: grid;
  gap: 0.65rem;
}

.related-list a {
  display: grid;
  gap: 0.22rem;
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.36);
  padding: 0.7rem;
}

.related-list a:hover {
  color: var(--brand-light);
}

.related-list small {
  color: var(--muted-2);
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0.75rem;
}

.footer-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 0.48rem 0.78rem;
}

.footer-links a:hover {
  color: var(--text);
  border-color: rgba(52, 211, 153, 0.45);
}

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

  .feature-layout,
  .detail-layout,
  .quick-search {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-slide {
    min-height: 680px;
    padding-top: 6rem;
    align-items: end;
  }

  .hero-dots {
    left: 1.25rem;
    right: auto;
  }

  .section-wrap {
    padding-top: 3rem;
  }

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

  .movie-card__poster {
    min-height: 210px;
  }

  .category-grid,
  .category-overview-grid,
  .footer-inner,
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    min-height: 480px;
  }
}

@media (max-width: 440px) {
  .movie-grid,
  .movie-grid--compact {
    grid-template-columns: 1fr;
  }

  .movie-card__poster,
  .movie-card--compact .movie-card__poster {
    min-height: 260px;
  }

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