:root {
  --bg: #030712;
  --bg-soft: #0b1120;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-solid: #111827;
  --panel-light: #1f2937;
  --line: rgba(75, 85, 99, 0.62);
  --text: #f9fafb;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --accent: #10b981;
  --accent-strong: #059669;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --danger: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.13), transparent 30%), 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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: white;
  font-size: 14px;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-strong);
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 18px;
  background: rgba(3, 7, 18, 0.94);
}

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

.mobile-nav a {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(17, 24, 39, 0.8);
}

.page-main {
  padding-top: 64px;
}

.hero-section {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-carousel,
.hero-slide,
.hero-background,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-background {
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: transform 4s ease;
}

.hero-slide.is-active .hero-background {
  transform: scale(1.01);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.62) 42%, rgba(3, 7, 18, 0.1) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.25) 48%, rgba(3, 7, 18, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 92px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

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

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  background: var(--accent-strong);
  color: white;
  box-shadow: 0 12px 36px rgba(5, 150, 105, 0.32);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.78);
  color: var(--text);
}

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

.primary-button:hover {
  background: var(--accent);
}

.ghost-button:hover {
  border-color: rgba(16, 185, 129, 0.55);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: white;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

.search-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
  background: rgba(17, 24, 39, 0.5);
}

.search-strip h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.search-strip p {
  margin: 0 0 18px;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 14px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(3, 7, 18, 0.56);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  padding: 12px 13px;
  background: rgba(17, 24, 39, 0.9);
  color: var(--text);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.filter-count {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(17, 24, 39, 0.42);
}

.section-gradient {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.78), rgba(3, 7, 18, 0));
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
}

.section-heading a,
.section-total {
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden,
.ranking-table tr.is-hidden {
  display: none;
}

.movie-card-link {
  display: grid;
  gap: 11px;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(75, 85, 99, 0.55);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.25), transparent 40%),
    linear-gradient(135deg, #111827, #030712);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.86));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-year {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.68);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-link:hover .poster-shade,
.movie-card-link:hover .poster-play {
  opacity: 1;
}

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

.movie-card-body {
  display: grid;
  gap: 3px;
}

.movie-card-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: white;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card-link:hover strong {
  color: var(--accent);
}

.movie-card-body em,
.movie-card-body small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  width: 230px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.feature-main {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.feature-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.feature-main:hover img {
  transform: scale(1.05);
}

.feature-overlay,
.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.94));
}

.feature-content,
.category-tile-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 8px;
  padding: 28px;
}

.feature-content em,
.category-tile-content small {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.feature-content strong {
  font-size: 32px;
  line-height: 1.12;
}

.feature-content small {
  color: var(--muted-strong);
  font-size: 15px;
}

.mini-card-list {
  display: grid;
  gap: 14px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(75, 85, 99, 0.45);
  border-radius: 16px;
  padding: 10px;
  background: rgba(31, 41, 55, 0.52);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(31, 41, 55, 0.82);
  transform: translateY(-2px);
}

.mini-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-card strong,
.mini-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  color: white;
}

.mini-card small {
  color: var(--muted);
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-solid);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.category-tile:hover img {
  transform: scale(1.1);
}

.category-tile-content strong {
  font-size: 24px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.ranking-list li a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(75, 85, 99, 0.45);
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(17, 24, 39, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.ranking-list li a:hover {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(31, 41, 55, 0.9);
  transform: translateY(-2px);
}

.rank-number {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.ranking-list strong {
  display: block;
}

.ranking-list small {
  color: var(--muted);
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.compact-hero {
  padding: 86px 0 58px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(3, 7, 18, 0.98));
}

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

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

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(17, 24, 39, 0.68);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

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

.category-overview-head h2 {
  margin: 10px 0 0;
  font-size: 30px;
}

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--muted-strong);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.62);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid rgba(75, 85, 99, 0.42);
  padding: 14px 16px;
  text-align: left;
}

.ranking-table th {
  color: var(--muted-strong);
  font-size: 13px;
  text-transform: uppercase;
}

.ranking-table td {
  color: var(--muted-strong);
}

.ranking-table a {
  color: white;
  font-weight: 800;
}

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

.detail-hero {
  min-height: 560px;
  padding: 92px 0 60px;
  background: #020617;
}

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  background-position: center;
  background-size: cover;
  filter: blur(12px);
  opacity: 0.42;
  transform: scale(1.06);
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.7), rgba(3, 7, 18, 0.95)),
    linear-gradient(0deg, #030712, rgba(3, 7, 18, 0.1));
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #111827, #020617);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span,
.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(17, 24, 39, 0.65);
  color: var(--muted-strong);
  font-size: 13px;
}

.player-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.16), transparent 35%),
    #000;
  box-shadow: var(--shadow);
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  color: white;
  cursor: pointer;
}

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

.player-cover-button span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.45);
  font-size: 30px;
}

.player-cover-button strong {
  margin-top: 12px;
  font-size: 18px;
}

.source-panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: rgba(17, 24, 39, 0.72);
}

.source-panel h2,
.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.source-button {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 12px;
  background: rgba(31, 41, 55, 0.8);
  color: white;
  cursor: pointer;
  text-align: left;
}

.source-button.is-active,
.source-button:hover {
  border-color: rgba(16, 185, 129, 0.58);
  color: var(--accent);
}

.source-panel p {
  color: var(--muted);
  font-size: 13px;
}

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

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

.site-footer {
  border-top: 1px solid var(--line);
  background: #030712;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid rgba(75, 85, 99, 0.36);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

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

  .mobile-menu-button {
    display: inline-grid;
  }

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

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

  .feature-layout,
  .player-shell,
  .content-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-section {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 96px;
  }

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

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

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

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

  .horizontal-scroll .movie-card {
    width: 190px;
  }

  .category-grid,
  .mini-card-list-grid {
    grid-template-columns: 1fr;
  }

  .feature-main {
    min-height: 330px;
  }

  .detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-poster {
    width: 190px;
  }

  .player-shell {
    gap: 16px;
  }

  .footer-grid {
    padding: 34px 0;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .movie-grid-four {
    gap: 13px;
  }

  .poster-frame {
    border-radius: 13px;
  }

  .movie-card-body strong {
    font-size: 14px;
  }

  .hero-arrow {
    width: 36px;
    height: 36px;
  }
}
