:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #172033;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-50: #fff7ed;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-xl: 0 28px 60px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: var(--gray-50);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

img {
  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;
  color: #fff;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 22px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), #fb7185);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex: 1;
}

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.35);
  outline: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 10px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 188px;
}

.nav-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.nav-search button,
.big-search button,
.scroll-controls button,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #fff;
  background: var(--amber-500);
  padding: 10px 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.big-search button:hover,
.scroll-controls button:hover,
.filter-panel button:hover {
  background: var(--amber-600);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.quick-category-links {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.quick-category-links a:hover {
  color: var(--amber-400);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

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

.hero-meta span {
  color: var(--amber-300);
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 640px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.hero-actions,
.section-heading,
.section-heading.with-controls,
.scroll-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--amber-500);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.32);
}

.btn-primary:hover {
  background: var(--amber-600);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  padding: 5px 10px;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.tag-row span {
  color: #92400e;
  background: var(--amber-50);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.hero-arrow.prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-arrow.next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-strip {
  padding: 28px 0;
  background: var(--slate-900);
}

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

.intro-grid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  padding: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.intro-grid a:hover {
  background: rgba(245, 158, 11, 0.16);
  transform: translateY(-2px);
}

.intro-grid span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

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

.section-light {
  background: #fff;
}

.section-gray {
  background: linear-gradient(180deg, var(--gray-50), #fff);
}

.dark-top {
  background: linear-gradient(180deg, var(--slate-900), var(--gray-50));
}

.warm-section {
  background: linear-gradient(90deg, var(--amber-50), var(--orange-50));
}

.slate-section {
  color: #fff;
  background: var(--slate-800);
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading.light h2,
.section-heading.light a {
  color: #fff;
}

.section-heading a {
  color: var(--amber-600);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.movie-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-card a {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
}

.play-dot,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-dot {
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.36);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, var(--amber-500));
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.large .card-body h2 {
  font-size: 24px;
}

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

.meta-row {
  color: var(--gray-500);
  font-size: 13px;
  gap: 10px;
  margin-bottom: 12px;
}

.scroll-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-item {
  flex: 0 0 300px;
}

.scroll-controls button {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 28px;
}

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

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

.category-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 120px;
  overflow: hidden;
  background: var(--slate-800);
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card div:last-child {
  padding: 18px;
}

.category-card h2 {
  margin: 0 0 8px;
  color: var(--gray-800);
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 34px;
  align-items: start;
}

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

.compact-link,
.ranking-item a {
  display: grid;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-link {
  grid-template-columns: 42px 1fr auto;
}

.compact-link:hover,
.ranking-item a:hover {
  background: rgba(245, 158, 11, 0.18);
  transform: translateX(4px);
}

.compact-link span,
.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--amber-500);
  font-weight: 900;
}

.compact-link em {
  color: rgba(255, 255, 255, 0.62);
  font-style: normal;
}

.rank-poster {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  padding: 18px;
}

.rank-poster img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.rank-poster h2 {
  margin: 16px 0 8px;
}

.rank-poster p {
  color: rgba(255, 255, 255, 0.76);
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero.compact {
  padding: 76px 0;
}

.page-hero p {
  margin: 0 0 8px;
  color: var(--amber-300);
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero span {
  display: block;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
  padding: 18px;
}

.filter-panel input,
.filter-panel select,
.big-search input {
  color: var(--gray-800);
  background: #fff;
}

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

.ranking-item a {
  grid-template-columns: 54px 150px 1fr;
  color: var(--gray-800);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.ranking-item img {
  width: 150px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0 0 10px;
  color: var(--gray-600);
}

.big-search {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 26px;
}

.big-search input {
  flex: 1;
  padding: 14px 18px;
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: var(--slate-950);
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.42));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 56px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.7);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.poster-card {
  border-radius: 26px;
  overflow: hidden;
  background: var(--slate-800);
  box-shadow: var(--shadow-xl);
}

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

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.1;
}

.detail-copy .lead {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.42);
  font-size: 34px;
}

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

.detail-panel,
.side-panel {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  padding: 26px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: var(--gray-800);
}

.detail-panel p {
  margin: 0 0 24px;
  color: var(--gray-700);
  font-size: 18px;
}

.side-panel {
  position: sticky;
  top: 118px;
}

.side-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-panel dt {
  color: var(--gray-500);
  font-size: 13px;
}

.side-panel dd {
  margin: -8px 0 0;
  color: var(--gray-800);
  font-weight: 700;
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding: 54px 0 38px;
}

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

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

.site-footer a:hover {
  color: var(--amber-400);
}

.footer-brand p,
.site-footer p {
  margin: 14px 0 0;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
}

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

.empty-state {
  grid-column: 1 / -1;
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 34px;
  text-align: center;
}

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-search,
  .quick-category-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--slate-900);
    padding: 12px 24px 20px;
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 0;
  }

  .hero {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-grid,
  .filter-panel,
  .detail-grid,
  .ranking-item a {
    grid-template-columns: 1fr;
  }

  .poster-card {
    max-width: 280px;
  }

  .ranking-item img {
    width: 100%;
  }
}

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

  .hero {
    min-height: 590px;
  }

  .hero h1,
  .hero h2,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero p,
  .detail-copy .lead {
    font-size: 16px;
  }

  .hero-actions,
  .big-search,
  .section-heading,
  .section-heading.with-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .category-movie-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .movie-card.large {
    grid-column: auto;
    grid-row: auto;
  }

  .scroll-item {
    flex-basis: 82vw;
  }

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

  .page-hero.compact {
    padding: 56px 0;
  }
}
