:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #34d399;
  --accent-deep: #059669;
  --accent-soft: rgba(52, 211, 153, 0.16);
  --gold: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent 70%);
}

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

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

input,
select,
button {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.site-logo {
  font-size: 20px;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #052e16;
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-nav a,
.mobile-nav a {
  color: var(--muted-strong);
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover {
  color: var(--accent);
  background: rgba(15, 23, 42, 0.82);
}

.top-search {
  width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.home-search-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input::placeholder,
.home-search-panel input::placeholder,
.filter-panel input::placeholder {
  color: #64748b;
}

.top-search button,
.home-search-panel button {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #042f2e;
  font-weight: 700;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
}

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

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

.hero-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, transparent 48%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(36px, 7vw, 92px);
  width: min(650px, calc(100% - 48px));
}

.hero-kicker,
.section-heading span,
.page-hero span,
.category-overview-head span,
.detail-copy .breadcrumb,
.left-heading span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  margin-top: 12px;
  font-size: clamp(40px, 7vw, 78px);
}

.hero-content h2 {
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 46px);
}

.hero-content p,
.page-hero p,
.detail-copy p {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--muted-strong);
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.detail-meta span,
.card-meta span {
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(6, 78, 59, 0.38);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
  color: #052e16;
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.22);
}

.btn.ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
}

.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(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted-strong);
  text-align: left;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}

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

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

.home-search-panel,
.content-section,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 22px;
  align-items: center;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(6, 78, 59, 0.28));
}

.home-search-panel span {
  color: var(--accent);
  font-weight: 800;
}

.home-search-panel h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 34px);
}

.home-search-panel form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
}

.home-search-panel input {
  padding: 0 10px;
}

.content-section {
  margin-top: 70px;
}

.first-section {
  margin-top: 36px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

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

.section-heading p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}

.left-heading {
  align-items: flex-start;
}

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

.category-card,
.category-overview-card,
.movie-card,
.rank-item,
.detail-content article,
.player-section,
.filter-panel {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.2));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.44);
  background: rgba(15, 23, 42, 0.96);
  transform: translateY(-5px);
}

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

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 55%);
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

.card-year {
  left: 12px;
  background: rgba(16, 185, 129, 0.86);
}

.card-type {
  right: 12px;
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e16;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.26);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body h2 a:hover {
  color: var(--accent);
}

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

.card-meta {
  margin-top: 14px;
}

.card-meta span {
  padding: 4px 9px;
  font-size: 12px;
}

.compact-card .card-body p {
  min-height: 0;
}

.rank-home {
  display: block;
}

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

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

.rank-item {
  border-radius: 18px;
  overflow: hidden;
}

.rank-link {
  display: grid;
  grid-template-columns: 48px 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #052e16;
  font-weight: 950;
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
}

.rank-link img {
  width: 86px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy small {
  color: var(--muted);
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.78)),
    var(--bg-soft);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(38px, 7vw, 78px);
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(38px, 6vw, 68px);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-top: 24px;
  padding: 14px;
  border-radius: 22px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.44);
}

.filter-panel select option {
  color: #0f172a;
}

.empty-state {
  display: none;
  padding: 48px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.category-overview-card {
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 4px 0 8px;
  font-size: 28px;
}

.category-overview-head p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(2px) saturate(1.1);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 70%);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: clamp(28px, 6vw, 74px);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

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

.detail-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #052e16;
  font-weight: 900;
  background: var(--accent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: #a7f3d0;
}

.detail-copy h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 7px 12px;
}

.player-section {
  margin-top: 34px;
  padding: 22px;
  border-radius: var(--radius-xl);
}

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

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.2));
}

.play-overlay[hidden] {
  display: none;
}

.play-circle {
  width: clamp(70px, 12vw, 106px);
  height: clamp(70px, 12vw, 106px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e16;
  font-size: clamp(28px, 6vw, 46px);
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
  box-shadow: 0 22px 50px rgba(16, 185, 129, 0.35);
}

.play-overlay strong {
  max-width: min(620px, 88%);
  overflow: hidden;
  font-size: clamp(18px, 4vw, 32px);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-shell.is-playing .video-player {
  cursor: default;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.detail-content article {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: var(--muted-strong);
}

.related-section {
  margin-bottom: 42px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

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

.site-footer p,
.site-footer a {
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer a {
  display: block;
  margin-top: 8px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1020px) {
  .site-nav,
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-stage {
    min-height: 600px;
  }

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

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero,
  .home-search-panel,
  .content-section,
  .page-main,
  .detail-main,
  .footer-grid,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

  .hero-stage {
    min-height: 560px;
    border-radius: 22px;
  }

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

  .hero-content p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    left: 78px;
    right: auto;
  }

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

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

  .category-grid,
  .movie-grid,
  .small-grid,
  .rank-list,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }

  .rank-link {
    grid-template-columns: 42px 78px 1fr;
  }

  .detail-layout {
    padding: 18px;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

  .player-section,
  .detail-content article,
  .category-overview-card {
    padding: 16px;
  }

  .category-overview-head {
    flex-direction: column;
  }
}
