:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #10b981;
  --accent-strong: #059669;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, 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;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.16), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.10), transparent 24rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #34d399);
  color: #001a12;
  font-size: 15px;
  box-shadow: 0 12px 34px rgba(16, 185, 129, 0.36);
}

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

.nav-link {
  color: var(--muted-strong);
  padding: 9px 14px;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: var(--accent-soft);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.nav-category-row {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.nav-category-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 9px 20px 11px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
}

.nav-category-inner a {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-category-inner a:hover {
  color: var(--accent);
}

.home-hero {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 28px 20px 42px;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 560px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 52%);
}

.hero-content {
  position: absolute;
  left: 54px;
  bottom: 64px;
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #86efac;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.inner-hero h1,
.detail-info h1 {
  margin: 16px 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p,
.inner-hero p,
.detail-one-line {
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #34d399);
  color: #04130e;
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #34d399, var(--accent));
}

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

.ghost-btn:hover {
  border-color: rgba(16, 185, 129, 0.45);
  color: #86efac;
}

.hero-dots {
  position: absolute;
  left: 54px;
  bottom: 28px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dots button {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.hero-sidebar {
  align-self: stretch;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.hero-sidebar h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid transparent;
  margin-bottom: 12px;
  transition: 0.22s ease;
}

.hero-mini-card:hover {
  transform: translateX(3px);
  border-color: rgba(16, 185, 129, 0.38);
  background: rgba(30, 41, 59, 0.88);
}

.hero-mini-card img {
  width: 86px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini-card span {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.45;
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.section-title > span {
  width: 5px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
}

.section-title h2 {
  margin: 0;
  flex: 1;
  color: #ffffff;
  font-size: 26px;
}

.section-title a {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box {
  min-width: min(100%, 380px);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
}

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

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pills button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
}

.filter-pills button:hover,
.filter-pills button.is-active {
  color: #04130e;
  border-color: transparent;
  background: var(--accent);
}

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.38);
  background: var(--bg-card-strong);
}

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

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

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #04130e;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: #86efac;
}

.card-meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #86efac;
  background: var(--accent-soft);
  font-size: 12px;
}

.movie-card-small .card-body p {
  display: none;
}

.movie-card-small .card-title {
  min-height: 42px;
  font-size: 15px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 0;
}

.movie-card-wide .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card-wide .card-title {
  min-height: auto;
}

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

.category-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: 0.22s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-thumbs img {
  height: 92px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.category-card strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 8px;
}

.category-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 30px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 46px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.34);
}

.ranking-num {
  color: var(--accent);
  font-weight: 900;
  font-size: 20px;
}

.ranking-row img {
  width: 72px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-main strong,
.ranking-main small {
  display: block;
}

.ranking-main strong {
  color: #ffffff;
  margin-bottom: 5px;
}

.ranking-main small {
  color: var(--muted);
  line-height: 1.45;
}

.ranking-row em {
  font-style: normal;
  color: #86efac;
  font-weight: 800;
}

.editor-stack {
  display: grid;
  gap: 14px;
}

.inner-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 20px 30px;
}

.inner-hero p {
  max-width: 760px;
}

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

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

.detail-hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(4px) saturate(1.1);
  transform: scale(1.04);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.36)),
    linear-gradient(0deg, var(--bg), transparent 58%);
}

.detail-wrap {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 20px 50px;
}

.detail-main {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

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

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

.detail-info {
  max-width: 780px;
}

.detail-tags {
  margin: 24px 0;
}

.player-section {
  padding-top: 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  background: #000000;
}

.player-poster {
  z-index: 2;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
}

.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.player-poster.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #04130e;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.36);
}

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

.content-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.85;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px 20px 24px;
  text-align: center;
  color: #64748b;
}

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

@media (max-width: 1100px) {
  .home-hero,
  .two-column-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hero-sidebar h2 {
    grid-column: 1 / -1;
  }

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

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 70px;
    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.is-open {
    display: flex;
  }

  .home-hero {
    padding-top: 18px;
  }

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

  .hero-content {
    left: 26px;
    right: 24px;
    bottom: 58px;
  }

  .hero-dots {
    left: 26px;
  }

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

  .movie-grid,
  .category-grid,
  .footer-grid,
  .detail-main {
    grid-template-columns: 1fr 1fr;
  }

  .detail-main {
    align-items: start;
  }

  .detail-info h1 {
    font-size: 36px;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 17px;
  }

  .home-hero {
    min-height: auto;
  }

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

  .hero-content h1,
  .inner-hero h1 {
    font-size: 34px;
  }

  .hero-content p,
  .inner-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .detail-main,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide {
    grid-template-columns: 112px 1fr;
  }

  .ranking-row {
    grid-template-columns: 34px 58px 1fr;
  }

  .ranking-row em {
    display: none;
  }

  .ranking-row img {
    width: 58px;
    height: 66px;
  }

  .section-wrap,
  .inner-hero,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .play-button {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
