:root {
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-soft: #f8fafc;
  --text-main: #1f2937;
  --text-muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --amber: #f59e0b;
  --amber-deep: #d97706;
  --white: #ffffff;
  --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-md: 0 15px 30px rgba(15, 23, 42, 0.14);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text-main);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  color: var(--white);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(16px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #111827;
  font-size: 15px;
  box-shadow: 0 10px 18px rgba(245, 158, 11, 0.25);
}

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

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex: 1;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  transition: color 0.25s ease;
}

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

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

.nav-search input,
.page-search input,
.filter-bar select {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-search input {
  width: 210px;
  background: rgba(51, 65, 85, 0.82);
  color: var(--white);
  padding: 10px 14px;
}

.nav-search input::placeholder {
  color: rgba(226, 232, 240, 0.62);
}

.nav-search button,
.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button {
  color: var(--white);
  background: var(--amber);
  padding: 10px 18px;
}

.nav-search button:hover,
.btn:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--bg-darker);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 72vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 690px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-kicker span {
  color: #fbbf24;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #111827;
  box-shadow: 0 16px 24px rgba(245, 158, 11, 0.24);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.hero-tags span,
.tag-row span,
.detail-genre-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.hero-tags {
  margin-top: 24px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--white);
  font-size: 34px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.category-band {
  background: linear-gradient(90deg, var(--bg-dark), #1e293b);
  color: var(--white);
}

.category-band-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 18px 0;
}

.category-band-inner span {
  color: var(--amber);
  font-weight: 800;
  white-space: nowrap;
}

.category-band-inner a {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

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

.accent-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #0f172a 0%, #f8fafc 100%);
}

.muted-section {
  background: transparent;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

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

.accent-section .section-heading h2,
.accent-section .section-heading p {
  color: var(--white);
}

.section-more {
  color: var(--amber-deep);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

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

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

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

.movie-card h3,
.rank-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover {
  color: var(--amber-deep);
}

.movie-card p,
.rank-body p {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
}

.movie-meta {
  color: #64748b;
  font-size: 13px;
}

.movie-meta a {
  padding: 4px 8px;
  border-radius: 8px;
  background: #fffbeb;
  color: #b45309;
  font-weight: 700;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  background: #f1f5f9;
  color: #475569;
}

.rank-list {
  display: grid;
  gap: 16px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 168px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #111827;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-dark);
}

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

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 12% 18%, rgba(245, 158, 11, 0.32), transparent 28%), linear-gradient(135deg, #020617, #1e293b 62%, #78350f);
  min-height: 320px;
  display: flex;
  align-items: center;
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.8;
}

.eyebrow {
  margin: 0;
  color: #fbbf24;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

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

.category-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.category-card a {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 210px;
}

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

.category-card div {
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 12px;
}

.category-card p {
  color: var(--text-muted);
  line-height: 1.75;
}

.category-card span {
  color: var(--amber-deep);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 38px;
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 0;
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.detail-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.36);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: rgba(226, 232, 240, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.92);
}

.player-section {
  padding-bottom: 24px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

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

.big-play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #111827;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.32);
}

.detail-content article {
  padding: 36px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-content p {
  color: #475569;
  line-height: 1.95;
  font-size: 17px;
}

.detail-genre-row {
  margin-top: 24px;
}

.detail-genre-row span {
  background: #fffbeb;
  color: #b45309;
}

.page-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  max-width: 680px;
}

.page-search input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar select {
  padding: 12px 18px;
  background: var(--white);
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  border-radius: 22px;
  background: var(--white);
  color: var(--text-muted);
  text-align: center;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1024px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .related-grid,
  .search-result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid,
  .home-rank-list,
  .full-rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-basis: 100%;
    align-items: stretch;
    flex-direction: column;
    padding: 14px 0 6px;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-links {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero-content {
    height: 70vh;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .related-grid,
  .search-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-item {
    grid-template-columns: auto 120px 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

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

  .btn,
  .page-search input,
  .filter-bar select {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .related-grid,
  .search-result-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-number {
    position: absolute;
    margin: 10px;
  }

  .category-card a {
    grid-template-columns: 1fr;
  }
}
