:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --border-hot: rgba(245, 158, 11, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --cyan: #22d3ee;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.14), transparent 30rem),
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, 0.10), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner,
.footer-inner,
.content-section,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  box-shadow: 0 0 34px rgba(245, 158, 11, 0.42);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--amber);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 9px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #e2e8f0;
}

.hero-carousel {
  position: relative;
  height: min(720px, 78vh);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.72s ease, visibility 0.72s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.30) 76%, rgba(2, 6, 23, 0.90) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.45) 40%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding-top: 40px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-content h1 {
  width: min(780px, 100%);
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta-row,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.70);
  color: #cbd5e1;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

.primary-button {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.30);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.50);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

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

.ghost-button:hover {
  border-color: var(--border-hot);
  color: #fbbf24;
}

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

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

.hero-dot.active {
  background: #f59e0b;
}

main {
  padding-bottom: 52px;
}

.content-section {
  padding: 54px 0 18px;
}

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

.section-heading h2,
.filter-bar h1,
.page-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.section-heading p,
.filter-bar p,
.page-hero p,
.search-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
  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(-6px);
  border-color: var(--border-hot);
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.78) 100%);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.90);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.year-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.movie-card-body {
  padding: 14px;
}

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

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  min-height: 24px;
  padding: 4px 7px;
  font-size: 11px;
}

.search-panel,
.filter-bar,
.page-hero,
.side-card,
.detail-content,
.player-box,
.category-card a,
.rank-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 28px;
}

.search-actions,
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

input,
select {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--border-hot);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.compact-hero,
.filter-bar {
  padding: 34px;
  margin-bottom: 24px;
}

.filter-bar {
  display: grid;
  gap: 20px;
}

.filter-count {
  color: #fbbf24;
  font-weight: 800;
}

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

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

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

.category-card a {
  position: relative;
  display: block;
  min-height: 260px;
  overflow: hidden;
}

.category-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.90));
}

.category-card div {
  position: absolute;
  inset: auto 18px 18px;
}

.category-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.category-card p {
  color: var(--muted);
}

.category-card strong {
  color: #fbbf24;
}

.category-movie-grid,
.search-grid {
  padding-bottom: 24px;
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
}

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

.rank-list,
.rank-card-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.54);
}

.rank-row:hover {
  border-color: var(--border-hot);
  background: rgba(30, 41, 59, 0.72);
}

.rank-number {
  color: #fbbf24;
  font-size: 20px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

.rank-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  width: 86px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-poster span {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f59e0b;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.rank-card-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.mini-button {
  min-height: 38px;
  padding: 0 16px;
  background: var(--amber-soft);
  color: #fbbf24;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72)),
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 20rem);
  cursor: pointer;
}

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

.player-start {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  font-size: 32px;
  box-shadow: 0 18px 52px rgba(245, 158, 11, 0.34);
  cursor: pointer;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(18px, 3vw, 30px);
}

.detail-content {
  margin-top: 24px;
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.lead-text {
  margin: 0 0 20px;
  color: #fde68a;
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta-row {
  margin-bottom: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.tag-chip {
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  font-size: 13px;
}

.article-block {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}

.article-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.article-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  text-align: justify;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.detail-cover {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.side-card {
  margin-top: 18px;
  padding: 22px;
}

.side-card dl {
  margin: 0;
}

.side-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.side-card div:last-child {
  border-bottom: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.side-card a {
  color: #fbbf24;
}

.related-section {
  width: 100%;
  padding-top: 42px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 42px;
  padding: 44px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.footer-links div {
  display: grid;
  gap: 10px;
}

.footer-links strong {
  color: white;
  margin-bottom: 4px;
}

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

.footer-links a:hover {
  color: #fbbf24;
}

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

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

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
  }

  .side-card {
    margin-top: 0;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.94);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 12px;
  }

  .nav-link::after {
    display: none;
  }

  .hero-carousel {
    height: 72vh;
    min-height: 520px;
  }

  .hero-content h1 {
    letter-spacing: -0.04em;
  }

  .hero-actions,
  .search-actions,
  .filter-controls {
    width: 100%;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  input,
  select {
    width: 100%;
  }

  .search-panel,
  .section-heading,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .rank-info {
    display: none;
  }

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

  .rank-card .mini-button {
    grid-column: 1 / -1;
  }

  .detail-content,
  .compact-hero,
  .filter-bar,
  .search-panel {
    padding: 20px;
  }

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

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

  .footer-inner,
  .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand-text strong {
    font-size: 14px;
  }

  .brand-text em {
    display: none;
  }

  .movie-card-body {
    padding: 11px;
  }

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

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