:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(245, 158, 11, 0.18);
  --line-strong: rgba(245, 158, 11, 0.38);
  --text: #fff7ed;
  --muted: rgba(254, 243, 199, 0.72);
  --faint: rgba(254, 243, 199, 0.52);
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --purple: #581c87;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  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;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(88, 28, 135, 0.34), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(88, 28, 135, 0.88), rgba(15, 23, 42, 0.95));
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.45);
}

.logo-name {
  font-size: 1.28rem;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: rgba(254, 243, 199, 0.86);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber-soft);
}

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

.nav-category {
  font-size: 0.92rem;
  color: rgba(254, 243, 199, 0.68);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-bar input {
  width: 260px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
  border-color: rgba(251, 191, 36, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.nav-search button,
.mobile-search button {
  padding: 10px 16px;
  border-radius: 999px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fde68a;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.hero-slides {
  position: relative;
  min-height: 72vh;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.06);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.32)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 42%);
}

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

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--amber-soft);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.98;
  max-width: 880px;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  line-height: 1.85;
}

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

.hero-meta {
  margin: 28px 0 0;
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: rgba(254, 243, 199, 0.82);
  background: rgba(15, 23, 42, 0.48);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.86rem;
}

.hero-actions,
.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  padding: 13px 26px;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.35);
}

.ghost-button,
.section-more {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 22px;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 16px 46px rgba(245, 158, 11, 0.22);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 30px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hero-dot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 116px;
  color: rgba(254, 243, 199, 0.68);
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 16px;
  padding: 8px 12px;
  backdrop-filter: blur(14px);
}

.hero-dot.is-active {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.78);
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.25);
}

.hero-dot img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.content-section,
.page-hero,
.detail-hero,
.breadcrumb,
.player-section,
.detail-content {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.content-section {
  padding: 56px 0;
}

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

.section-heading h2,
.ranking-panel h2,
.player-section h2,
.story-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 760px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.16);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(88, 28, 135, 0.42), rgba(2, 6, 23, 0.12));
}

.category-tile-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-tile strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.category-tile em {
  display: block;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
  font-size: 0.92rem;
}

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

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

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.52));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.18);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.95);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 52%);
}

.poster-tag,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.poster-tag {
  right: 12px;
  bottom: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  padding: 6px 10px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 30px;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.38);
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  color: #fff7ed;
  font-size: 1.14rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta-line {
  gap: 6px;
  margin-bottom: 12px;
}

.movie-meta-line span {
  padding: 4px 8px;
  font-size: 0.78rem;
}

.movie-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-tags span {
  color: rgba(254, 243, 199, 0.75);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
}

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

.ranking-panel {
  position: sticky;
  top: 92px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

.ranking-row:hover {
  border-color: rgba(251, 191, 36, 0.45);
}

.ranking-number {
  color: var(--amber-soft);
  font-weight: 900;
}

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

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

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

.ranking-info em {
  color: var(--faint);
  font-size: 0.8rem;
  font-style: normal;
}

.ranking-heat {
  color: rgba(254, 243, 199, 0.68);
  font-size: 0.82rem;
}

.page-main {
  padding-bottom: 40px;
}

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

.small-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

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

.filter-bar {
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
}

.filter-bar input {
  width: min(560px, 100%);
}

.large-filter input {
  width: min(760px, 100%);
  padding: 15px 20px;
}

.empty-state {
  display: none;
  color: var(--muted);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  padding: 28px;
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 12px;
  color: var(--faint);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #fde68a;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px 0 54px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.88);
}

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

.detail-copy h1 {
  font-size: clamp(2.3rem, 5.8vw, 5.4rem);
}

.detail-one-line {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1.06rem;
}

.detail-meta {
  margin: 22px 0;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  padding: 0 0 48px;
}

.player-section h2 {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff7ed;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.1));
  cursor: pointer;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 2rem;
  box-shadow: 0 18px 60px rgba(245, 158, 11, 0.42);
}

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

.story-card {
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  padding: 26px;
}

.story-card p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

.related-section {
  padding-top: 28px;
}

.site-footer {
  border-top: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(254, 243, 199, 0.64);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 820px) {
  .hero,
  .hero-slides,
  .hero-content {
    min-height: 78vh;
  }

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

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .ranking-grid,
  .wide-category-grid,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .mobile-nav,
  .content-section,
  .page-hero,
  .detail-hero,
  .breadcrumb,
  .player-section,
  .detail-content,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-content,
  .hero-dots {
    width: min(100% - 24px, 1280px);
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .ranking-grid,
  .wide-category-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-row {
    grid-template-columns: 32px 52px minmax(0, 1fr);
  }

  .ranking-heat {
    display: none;
  }
}
