:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #10b981;
  --accent-strong: #059669;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.site-header::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 72px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.24));
  pointer-events: none;
  z-index: -1;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.32);
  color: white;
}

.logo-text {
  font-size: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.nav-link {
  padding: 9px 16px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(16, 185, 129, 0.22);
}

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

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

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: 78vh;
  margin-top: -74px;
  overflow: hidden;
  background: #020617;
}

.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: 78vh;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 5000ms ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.93) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 36%);
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - var(--max)) / 2));
  top: 50%;
  width: min(660px, calc(100% - 48px));
  transform: translateY(-42%);
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  border: 1px solid rgba(16, 185, 129, 0.36);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  font-size: 13px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 20px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  color: #e2e8f0;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.48);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
}

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.28);
}

.btn.ghost {
  color: white;
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.text {
  color: #a7f3d0;
  padding-inline: 6px;
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.48);
  color: white;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.24s ease, transform 0.24s ease;
}

.hero-arrow:hover {
  background: rgba(16, 185, 129, 0.52);
  transform: translateY(-2px);
}

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

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

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

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

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

.hero-thumbs {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 74px;
  display: grid;
  gap: 10px;
  width: 270px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.64);
  color: #cbd5e1;
  backdrop-filter: blur(14px);
  transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  border-color: rgba(16, 185, 129, 0.56);
  background: rgba(16, 185, 129, 0.14);
  color: white;
  transform: translateX(-4px);
}

.hero-thumb img {
  width: 68px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-thumb span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 700;
}

.page-shell,
.content-section,
.category-strip,
.detail-shell,
.search-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.category-strip {
  padding: 72px 0 30px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
}

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

.category-card:hover img {
  transform: scale(1.06);
}

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

.category-glow {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.7), rgba(34, 211, 238, 0.6));
  filter: blur(2px);
}

.category-card strong {
  position: relative;
  display: block;
  margin-top: 70px;
  font-size: 26px;
  line-height: 1.1;
}

.category-card em {
  display: inline-block;
  margin: 10px 0;
  color: #a7f3d0;
  font-style: normal;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

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

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

.section-heading p,
.page-heading p {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.035em;
}

.section-more {
  color: #a7f3d0;
  font-weight: 700;
}

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

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

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.86);
  color: white;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.score-badge,
.rank-flag {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.score-badge {
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
}

.rank-flag {
  left: 12px;
  background: rgba(2, 6, 23, 0.68);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.34);
}

.movie-card-body {
  padding: 17px;
}

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

.movie-card h3 a:hover {
  color: #6ee7b7;
}

.card-tags span {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.86);
  color: #cbd5e1;
  font-size: 12px;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 12px 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
}

.split-panel {
  width: min(var(--max), calc(100% - 32px));
  margin: 30px auto 70px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
}

.rank-panel,
.notice-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.54);
  transition: background 0.24s ease, transform 0.24s ease;
}

.rank-list a:hover {
  background: rgba(16, 185, 129, 0.12);
  transform: translateX(4px);
}

.rank-list b {
  color: #a7f3d0;
}

.rank-list span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list em {
  color: var(--gold);
  font-style: normal;
  font-weight: 800;
}

.notice-panel h2,
.rank-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.notice-panel p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.75;
}

.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 30px auto 24px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.24), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar,
.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 28px;
}

.filter-bar input,
.search-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
  color: white;
}

.filter-bar input:focus,
.search-form input:focus {
  border-color: rgba(16, 185, 129, 0.58);
}

.search-form button {
  min-width: 120px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.library-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 80px;
}

.detail-shell {
  padding: 26px 0 72px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 370px;
  gap: 24px;
  align-items: stretch;
}

.player-panel,
.detail-aside,
.detail-text,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.video-wrap.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: white;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.32);
  transition: transform 0.24s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.player-info {
  padding: 22px;
}

.player-info h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.player-info p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.8;
}

.detail-aside {
  padding: 22px;
}

.poster-large {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.meta-table {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
}

.meta-row span:first-child {
  color: #94a3b8;
}

.detail-text,
.related-panel {
  margin-top: 24px;
  padding: 28px;
}

.detail-text h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-text p {
  color: #dbeafe;
  line-height: 1.9;
  font-size: 17px;
}

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

.search-shell {
  margin-bottom: 80px;
}

.search-results {
  margin-top: 28px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  color: #cbd5e1;
  text-align: center;
}

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

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

.footer-inner p {
  max-width: 560px;
  margin: 8px 0 0;
  color: #94a3b8;
}

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

.footer-links a:hover {
  color: #6ee7b7;
}

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

  .site-nav {
    position: absolute;
    top: 68px;
    right: 0;
    display: none;
    width: min(320px, calc(100vw - 32px));
    padding: 12px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-thumbs {
    display: none;
  }

  .hero-copy {
    transform: translateY(-35%);
  }

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

  .split-panel,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 24px);
  }

  .logo-text {
    font-size: 17px;
  }

  .hero {
    min-height: 86vh;
  }

  .hero-image {
    min-height: 86vh;
  }

  .hero-copy {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .category-grid,
  .movie-grid,
  .related-panel .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-bar,
  .search-form {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    display: block;
  }

  .poster-large {
    max-height: 520px;
  }

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