:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.86);
  --card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-dark: #047857;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  color: #00150f;
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(10px) saturate(1.05);
  opacity: 0.5;
  transform: scale(1.08);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.38) 100%),
    radial-gradient(circle at 72% 42%, rgba(16, 185, 129, 0.26), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 56px;
  padding: 88px 0 64px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.eyebrow,
.section-kicker {
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.11);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

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

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(16, 185, 129, 0.34);
}

.btn.ghost {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.58);
}

.btn.ghost:hover {
  border-color: rgba(16, 185, 129, 0.56);
  color: #fff;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.section {
  padding: 58px 0;
}

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

.section-head h2,
.category-overview-head h2,
.detail-article h2,
.detail-side h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--accent-2);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  outline: 0;
  background: rgba(2, 6, 23, 0.72);
}

.search-box input:focus {
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: rgba(16, 185, 129, 0.5);
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.14);
}

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

.category-tile {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.06)),
    rgba(15, 23, 42, 0.78);
  transition: 0.24s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

.category-tile span {
  color: #e2e8f0;
  font-weight: 800;
  font-size: 20px;
}

.category-tile strong {
  color: var(--accent-2);
  font-size: 46px;
  line-height: 1;
}

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

.category-tile div {
  display: grid;
  gap: 5px;
  color: #cbd5e1;
  font-size: 13px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  transition: 0.24s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.85);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #00150f;
  background: rgba(16, 185, 129, 0.94);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.24s ease;
}

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

.poster-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.card-kicker a {
  color: var(--accent-2);
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover,
.info-list a:hover {
  color: var(--accent-2);
}

.movie-card p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-card.compact .poster-link img {
  aspect-ratio: 4 / 3;
}

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

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.8);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  min-height: 94px;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: #00150f;
  background: var(--accent-2);
  font-weight: 900;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.rank-meta strong {
  color: var(--accent-2);
}

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: clamp(34px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.24), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.88));
  box-shadow: var(--shadow);
}

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

.category-overview-card {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.66);
}

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

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

.detail-main {
  padding-bottom: 72px;
}

.detail-hero {
  position: relative;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.detail-hero-inner {
  min-height: 620px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #00150f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  font-size: 28px;
}

.player-shell.is-playing .play-button {
  opacity: 0;
  pointer-events: none;
}

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

.detail-article,
.detail-side {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.66);
}

.detail-article p {
  color: #dbeafe;
  font-size: 17px;
}

.large-tags {
  margin-top: 12px;
}

.info-list {
  margin: 18px 0 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

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

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

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

.footer-brand {
  color: #fff;
  font-weight: 900;
}

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

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

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

@media (max-width: 1020px) {
  .hero-content,
  .detail-hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    gap: 28px;
    padding-top: 56px;
  }

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

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

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-actions,
  .footer-links {
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}
