:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(16, 185, 129, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #10b981;
  --accent-bright: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --blue-soft: rgba(14, 165, 233, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1240px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.22), transparent 26rem),
    radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.16), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

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

.header-inner {
  width: min(var(--max), 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: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.22);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: var(--accent-bright);
  background: rgba(15, 23, 42, 0.78);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(16, 185, 129, 0.24), transparent 26rem),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.4) 42%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.5fr);
  align-items: center;
  gap: 56px;
  padding: 72px 0 88px;
}

.hero-copy {
  max-width: 780px;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-bright);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 22px 0 0;
  color: var(--accent-bright);
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.1;
}

.hero-summary,
.sub-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.card-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(6, 78, 59, 0.42);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.section-link,
.pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.ghost-button,
.section-link,
.pager-link {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
}

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

.ghost-button:hover,
.section-link:hover,
.pager-link:hover {
  border-color: var(--line-strong);
  background: rgba(16, 185, 129, 0.12);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(16, 185, 129, 0.9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.56);
  cursor: pointer;
}

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

.content-section,
.category-overview-block {
  width: min(var(--max), calc(100% - 32px));
  margin: 76px auto 0;
}

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

.section-head h2,
.category-overview-copy h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
}

.section-head p,
.category-overview-copy p,
.detail-article p,
.detail-side dd,
.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
}

.search-box input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.58);
}

.search-box input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #06261d;
  border-color: transparent;
  background: var(--accent-bright);
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 54px rgba(16, 185, 129, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.movie-card:hover img {
  transform: scale(1.05);
}

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

.play-dot,
.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
}

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

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

.card-year {
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ecfeff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #052e24;
  font-weight: 900;
  background: var(--accent-bright);
}

.card-body {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.movie-card.mini .card-body {
  min-height: 142px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 800;
}

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

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

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

.card-tags span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.84));
}

.category-tile > a {
  position: relative;
  z-index: 2;
  display: block;
  min-height: 150px;
  padding: 22px;
}

.category-glow {
  position: absolute;
  right: -34px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.28);
  filter: blur(18px);
}

.category-tile h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.tile-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 22px 22px;
}

.tile-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.sub-hero {
  position: relative;
  overflow: hidden;
  min-height: 370px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 26%, rgba(16, 185, 129, 0.24), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  background-size: cover;
  background-position: center;
}

.sub-hero > div {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.category-overview-block {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.55);
}

.category-overview-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  border-bottom: 1px solid var(--line);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-meta {
  margin-top: 20px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.34));
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 18px 48px rgba(16, 185, 129, 0.28);
}

.player-cover strong {
  font-size: clamp(22px, 4vw, 36px);
}

.player-cover em {
  color: var(--muted-strong);
  font-style: normal;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  margin-top: 30px;
}

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

.detail-article {
  padding: 30px;
}

.detail-article h2 + p {
  margin-top: 12px;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-side {
  padding: 24px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 20px 0 0;
}

.detail-side dt {
  color: var(--muted-strong);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
}

.detail-side a {
  color: var(--accent-bright);
}

.pager-section {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pager-link {
  max-width: calc(50% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 36px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

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

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

.footer-copy {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

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

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

  .menu-button {
    display: block;
  }

  .mobile-nav.open {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-content,
  .detail-layout,
  .category-overview-block,
  .detail-text-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 28px;
    padding: 54px 0 76px;
  }

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

  .section-head,
  .pager-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .pager-link {
    max-width: 100%;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .category-overview-block,
  .sub-hero > div,
  .detail-layout,
  .footer-inner,
  .footer-copy,
  .mobile-nav {
    width: min(100% - 22px, var(--max));
  }

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

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

  .movie-grid,
  .movie-grid.compact-grid,
  .movie-grid.mini-grid,
  .category-grid {
    gap: 12px;
  }

  .card-body {
    min-height: 156px;
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .section-link,
  .pager-link {
    width: 100%;
  }
}
