:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-600: #ea580c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 22px 55px rgba(17, 24, 39, 0.20);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.is-empty {
  opacity: 0;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.18);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--amber-600);
  background: var(--white);
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

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

.nav-link {
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

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

.mobile-link {
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.92);
}

.hero {
  position: relative;
  height: 600px;
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(0, 0, 0, 0.78) 62%, rgba(0, 0, 0, 0.95));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 116px;
  color: var(--white);
}

.hero-tag {
  width: fit-content;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--amber-600);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.12;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero p {
  display: -webkit-box;
  max-width: 720px;
  margin: 0 0 28px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-actions,
.center-action,
.page-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.primary-btn:hover,
.hero-search button:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.outline-btn {
  color: var(--amber-700);
  border: 1px solid rgba(217, 119, 6, 0.35);
  background: var(--white);
}

.outline-btn:hover {
  color: var(--white);
  background: var(--amber-600);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  border-radius: 999px;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

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

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

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

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

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

.hero-search {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  z-index: 5;
  display: flex;
  width: min(420px, calc(100% - 48px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.hero-search input,
.filter-panel input {
  width: 100%;
  min-height: 44px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 12px;
  outline: 0;
}

.hero-search input {
  padding: 0 14px;
}

.hero-search button {
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 0 18px;
  color: var(--white);
  background: var(--amber-600);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.section-block {
  padding: 64px 0;
}

.section-light {
  background: var(--white);
}

.section-warm {
  background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
}

.section-title span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber-600), rgba(217, 119, 6, 0));
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.popular-card,
.category-tile,
.content-card,
.side-card,
.player-card,
.rank-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-800), var(--amber-700));
}

.card-media img,
.popular-media img,
.rank-cover img,
.poster-card img {
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.movie-card:hover .card-media img,
.popular-card:hover .popular-media img,
.rank-item:hover .rank-cover img {
  transform: scale(1.08);
}

.card-media::after,
.popular-media::after,
.rank-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-media::after,
.popular-card:hover .popular-media::after,
.rank-item:hover .rank-cover::after {
  opacity: 1;
}

.card-play,
.popular-media span,
.rank-cover span {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--amber-600);
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
}

.card-play {
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-badge,
.card-time {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  color: var(--white);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.card-badge {
  top: 12px;
  left: 12px;
  background: var(--amber-600);
}

.card-time {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.66);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  color: var(--gray-900);
  font-weight: 800;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--amber-600);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--gray-500);
  font-size: 12px;
}

.card-meta a {
  color: var(--amber-700);
  font-weight: 700;
}

.mini-tags {
  margin-top: 10px;
  color: var(--gray-400);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.popular-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.popular-media {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-800), var(--amber-700));
}

.popular-media span,
.rank-cover span {
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
}

.popular-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.popular-body > span {
  width: fit-content;
  padding: 3px 8px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.popular-body a {
  margin-top: 8px;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
}

.popular-body small {
  margin-top: 12px;
  color: var(--gray-500);
}

.center-action {
  justify-content: center;
  margin-top: 32px;
}

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

.category-tile {
  display: block;
  min-height: 170px;
  padding: 24px;
  border: 1px solid rgba(217, 119, 6, 0.12);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: var(--gray-900);
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  box-shadow: inset 0 -1px rgba(255, 255, 255, 0.12);
}

.page-hero .container {
  padding: 42px 0;
}

.back-link,
.breadcrumbs a {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
}

.page-hero p {
  max-width: 780px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.page-hero-links {
  margin-top: 18px;
}

.page-hero-links a {
  padding: 8px 12px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 13px;
}

.filter-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.filter-panel input {
  padding: 0 16px;
  border-color: var(--gray-200);
}

.sticky-filter {
  position: sticky;
  top: 84px;
  z-index: 20;
}

.empty-note {
  display: none;
  margin: 28px 0 0;
  padding: 18px;
  color: var(--gray-600);
  text-align: center;
  background: var(--white);
  border-radius: 14px;
}

.empty-note.show {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 150px 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.rank-number {
  display: grid;
  place-items: center;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 14px;
  font-size: 24px;
  font-weight: 900;
}

.rank-cover {
  position: relative;
  min-height: 100px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-800), var(--amber-700));
  border-radius: 14px;
}

.rank-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rank-info a {
  color: var(--gray-900);
  font-size: 20px;
  font-weight: 900;
}

.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.detail-hero {
  position: relative;
  min-height: 430px;
  color: var(--white);
  overflow: hidden;
  background: var(--gray-900);
}

.detail-hero > img {
  position: absolute;
  inset: 0;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.9));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 54px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
}

.detail-hero h1 {
  max-width: 860px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.detail-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.detail-tags span,
.tag-cloud a {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags span {
  color: var(--white);
  background: rgba(217, 119, 6, 0.9);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  padding: 48px 0 0;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
}

.player-card {
  padding: 0;
  background: var(--black);
}

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-box video {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--black);
}

.player-shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.74));
  border: 0;
  cursor: pointer;
}

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

.player-button {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  background: var(--amber-600);
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.4);
}

.player-shade strong {
  max-width: min(80%, 680px);
  text-align: center;
  font-size: 22px;
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
}

.poster-card {
  padding: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-800), var(--amber-700));
}

.movie-meta-list {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin: 0;
}

.movie-meta-list dt {
  color: var(--gray-500);
}

.movie-meta-list dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 700;
}

.movie-meta-list a,
.tag-cloud a {
  color: var(--amber-700);
}

.tag-cloud a {
  background: var(--amber-100);
}

.site-footer {
  margin-top: 64px;
  color: var(--gray-300, #d1d5db);
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  margin-bottom: 14px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

.footer-grid p,
.footer-grid ul {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

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

.footer-grid a:hover {
  color: var(--amber-500);
}

.footer-bottom {
  padding: 20px 0;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

  .poster-card {
    max-height: 420px;
  }
}

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

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

  .hero {
    height: 570px;
  }

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

  .hero-search {
    right: 24px;
    bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .cards-3,
  .cards-4,
  .popular-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .popular-card {
    grid-template-columns: 150px 1fr;
  }

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

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

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 620px;
  }

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

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

  .hero-search {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .section-block {
    padding: 44px 0;
  }

  .cards-3,
  .cards-4,
  .popular-grid,
  .category-grid,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

  .popular-media,
  .rank-cover {
    min-height: 210px;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .sticky-filter {
    top: 76px;
  }
}
