:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(245, 158, 11, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-dark: #b45309;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.18), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(217, 119, 6, 0.14), transparent 25%),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.35);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(90deg, #fcd34d, #f59e0b, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--amber-light);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.98);
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
  padding: 12px 24px 20px;
}

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

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

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

.hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 42%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 72px 0 120px;
}

.hero-content {
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-content h1,
.hero-content h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-title-sub {
  margin-top: 12px !important;
  color: var(--amber-light);
  font-size: clamp(30px, 4vw, 48px) !important;
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
  margin: 22px 0 0;
}

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

.hero-pills {
  margin-top: 26px;
}

.hero-pills span,
.pill,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-actions-inline {
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.ghost-button,
.section-more,
.text-link,
.rank-action {
  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, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, var(--amber));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.secondary-button,
.ghost-button,
.section-more {
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

.secondary-button:hover,
.ghost-button:hover,
.section-more:hover {
  color: var(--amber-light);
  border-color: rgba(245, 158, 11, 0.48);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 158, 11, 0.26);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 60%);
  z-index: -1;
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 34px;
  opacity: 1;
  background: var(--amber);
}

.hero-thumbs {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.hero-thumb {
  width: 150px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  opacity: 0.66;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: rgba(245, 158, 11, 0.46);
}

.hero-thumb img {
  width: 42px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: 72px 0 0;
}

.section-panel {
  padding: 56px 28px;
  margin-top: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

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

.section-heading h2,
.rank-section h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.38);
}

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

.poster-link img,
.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88));
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber-light);
  font-size: 12px;
  font-weight: 900;
}

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

.card-tags {
  margin-bottom: 12px;
}

.pill {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber-light);
}

.movie-meta,
.movie-one-line {
  color: var(--muted);
  line-height: 1.65;
}

.movie-meta {
  margin: 8px 0 0;
  font-size: 13px;
}

.movie-one-line {
  margin: 10px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.text-link {
  min-height: auto;
  padding: 12px 0 0;
  color: var(--amber-light);
}

.movie-card-compact .movie-card-body {
  padding: 15px;
}

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

.movie-card-compact .movie-one-line {
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.category-tile,
.category-showcase {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.88));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile {
  padding: 22px;
}

.category-tile:hover,
.category-showcase:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.46);
}

.category-tile span,
.category-showcase strong {
  display: block;
  color: var(--amber-light);
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile p,
.category-showcase p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

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

.category-showcase {
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.category-showcase img,
.category-glass {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-showcase img {
  object-fit: cover;
  opacity: 0.55;
}

.category-glass {
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.96));
}

.category-showcase div {
  position: relative;
  z-index: 2;
}

.ranking-card,
.rank-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.ranking-card {
  padding: 24px;
  position: sticky;
  top: 92px;
}

.ranking-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ranking-card-head span {
  color: var(--amber-light);
  font-size: 22px;
  font-weight: 900;
}

.ranking-card-head a {
  color: var(--muted);
}

.ranking-list,
.rank-table {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-list li + li,
.rank-row + .rank-row {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.ranking-list strong,
.rank-no {
  color: var(--amber-light);
  font-size: 20px;
  font-weight: 900;
}

.ranking-list span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-shell {
  padding-bottom: 80px;
}

.page-hero {
  padding: 72px 0 10px;
}

.compact-hero {
  padding-top: 58px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 180px)) auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.search-box input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: none;
}

.filter-select {
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.74);
}

.filter-select option {
  color: #111827;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.7);
  text-align: center;
}

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

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

.rank-section {
  padding: 24px;
}

.rank-section h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 40px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

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

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 6px;
}

.rank-action {
  min-height: 34px;
  padding: 0 12px;
  color: #111827;
  background: var(--amber-light);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 28px 0 18px;
  color: var(--muted);
}

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

.player-section {
  margin-bottom: 36px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: var(--text);
  background: #020617;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.68;
}

.player-cover-shade {
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.86));
}

.play-bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, var(--amber));
  box-shadow: 0 0 42px rgba(245, 158, 11, 0.45);
  font-size: 34px;
  padding-left: 6px;
}

.detail-shell {
  padding-bottom: 80px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-content {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-content h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-intro,
.detail-content p {
  color: var(--soft);
  line-height: 1.9;
}

.detail-intro {
  margin: 18px 0 0;
  font-size: 18px;
}

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

.detail-content h2 {
  margin-top: 32px;
  margin-bottom: 10px;
  font-size: 26px;
}

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

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--soft);
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-inner,
  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .hero-thumbs {
    display: none;
  }

  .ranking-card {
    position: static;
  }

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

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

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero-carousel,
  .hero-inner {
    min-height: 76vh;
  }

  .hero-inner {
    padding: 48px 0 110px;
  }

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

  .hero-controls {
    bottom: 22px;
  }

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

  .section {
    padding-top: 54px;
  }

  .section-panel,
  .detail-content {
    padding: 20px;
  }

  .section-heading,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-action {
    display: none;
  }

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .play-bubble {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
