* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-600: #ea580c;
  --orange-800: #9a3412;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.16);
  --card: #ffffff;
  --shadow: 0 22px 55px rgba(120, 53, 15, 0.13);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--amber-50) 0%, var(--orange-50) 48%, #fff 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 247, 237, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(146, 64, 14, 0.08);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--amber-800);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 23px;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--amber-900), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--amber-800);
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.22);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--amber-800);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 14px;
  background: var(--amber-50);
}

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

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #160b05;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(251, 191, 36, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(56, 24, 4, 0.94), rgba(120, 53, 15, 0.76), rgba(0, 0, 0, 0.5)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
  color: #fff7ed;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff7ed;
  background: rgba(217, 119, 6, 0.82);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(44px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 32px rgba(0, 0, 0, 0.36);
}

.hero p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #fde68a;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.72;
}

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

.hero-meta span,
.movie-meta span,
.detail-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 251, 235, 0.15);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span,
.detail-meta span {
  background: var(--amber-100);
  color: var(--amber-800);
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-more,
.link-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 18px 32px rgba(217, 119, 6, 0.32);
}

.primary-btn:hover,
.link-panel a:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(217, 119, 6, 0.35);
}

.primary-btn.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  color: #fffbeb;
  border: 1px solid rgba(254, 243, 199, 0.42);
  background: rgba(255, 251, 235, 0.1);
}

.ghost-btn:hover {
  background: rgba(255, 251, 235, 0.18);
}

.hero-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 10px;
  margin-top: -92px;
  padding-bottom: 32px;
  overflow-x: auto;
}

.hero-dot {
  flex: 0 0 auto;
  border: 1px solid rgba(254, 243, 199, 0.32);
  border-radius: 999px;
  padding: 11px 16px;
  color: #fff7ed;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-dot.is-active,
.hero-dot:hover {
  color: var(--amber-900);
  background: var(--amber-100);
}

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

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

.section-heading span {
  color: var(--amber-800);
  background: var(--amber-100);
}

.section-heading h2 {
  margin: 0;
  color: var(--amber-900);
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.04em;
}

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

.section-more,
.text-link {
  color: var(--amber-800);
  background: var(--amber-100);
  padding: 10px 16px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(146, 64, 14, 0.1);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 66px rgba(120, 53, 15, 0.19);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-50));
}

.movie-card.is-compact .poster-link {
  aspect-ratio: 3 / 4;
}

.poster-link img,
.category-card img,
.rank-cover img,
.aside-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-item:hover .rank-cover img {
  transform: scale(1.08);
}

.poster-gradient,
.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.72));
}

.poster-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.card-body h2 a:hover,
.rank-content h2 a:hover {
  color: var(--amber-700);
}

.card-body p,
.rank-content p,
.detail-card p,
.aside-card p {
  color: var(--muted);
  line-height: 1.74;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--amber-800);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-card a {
  position: relative;
  display: block;
  min-height: 230px;
  overflow: hidden;
  color: #fff;
  background: var(--amber-900);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-title {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 78px;
  z-index: 2;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  color: #fde68a;
  line-height: 1.5;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 132px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(146, 64, 14, 0.11);
  border-radius: 22px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(120, 53, 15, 0.08);
  transition: 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(120, 53, 15, 0.14);
}

.rank-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  font-weight: 900;
}

.rank-cover {
  display: block;
  height: 84px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--amber-100);
}

.rank-content h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-content p {
  margin: 8px 0 0;
}

.page-hero {
  padding: 82px 0;
  color: #fff7ed;
  background:
    radial-gradient(circle at 72% 20%, rgba(251, 191, 36, 0.36), transparent 26%),
    linear-gradient(135deg, var(--amber-900), var(--orange-800));
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 62px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #fde68a;
  font-size: 19px;
  line-height: 1.7;
}

.toolbar {
  position: sticky;
  top: 82px;
  z-index: 30;
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  border: 1px solid rgba(146, 64, 14, 0.13);
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(120, 53, 15, 0.09);
  backdrop-filter: blur(14px);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--amber-900);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(146, 64, 14, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  font: inherit;
  background: #fff;
}

.search-box input:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scroll-pills {
  max-height: 118px;
  overflow: auto;
}

.filter-pills button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--amber-800);
  background: var(--amber-100);
  cursor: pointer;
  font-weight: 800;
}

.filter-pills button.is-active,
.filter-pills button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

.link-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  border-radius: 26px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.link-panel a {
  padding: 14px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

.detail-hero {
  padding: 18px 0;
  background: linear-gradient(90deg, var(--amber-100), var(--orange-50));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--amber-800);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  padding: 34px 0 70px;
}

.player-card,
.detail-card,
.aside-card {
  border: 1px solid rgba(146, 64, 14, 0.1);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  padding: 10px;
  background: #120a06;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff7ed;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: 0.2s ease;
}

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

.play-circle {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  color: var(--amber-900);
  background: #fffbeb;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.detail-card h1 {
  margin: 0;
  color: var(--amber-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-card h2,
.aside-card h2 {
  margin: 28px 0 10px;
  color: var(--amber-900);
}

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

.detail-aside {
  display: grid;
  align-content: start;
  gap: 22px;
}

.aside-card {
  overflow: hidden;
  padding: 18px;
}

.aside-card > img {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: var(--amber-100);
}

.aside-card h2 {
  margin-top: 16px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-list .movie-card {
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.related-list .card-body h2 {
  font-size: 16px;
}

.related-list .card-body p,
.related-list .tag-row {
  display: none;
}

.site-footer {
  margin-top: 60px;
  color: #fde68a;
  background: linear-gradient(180deg, #78350f, #451a03);
}

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

.footer-brand {
  color: #fffbeb;
  font-size: 24px;
}

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

.site-footer p {
  max-width: 420px;
  line-height: 1.7;
}

.footer-links,
.footer-categories {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(253, 230, 138, 0.18);
  padding: 18px;
  text-align: center;
  color: #fef3c7;
}

@media (max-width: 1000px) {
  .movie-grid,
  .compact-grid,
  .listing-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-tabs {
    margin-top: -118px;
  }

  .section-heading,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .listing-grid,
  .category-grid,
  .rank-grid,
  .detail-aside {
    grid-template-columns: 1fr;
  }

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

  .rank-item .text-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .toolbar {
    position: static;
  }
}

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

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

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero-actions {
    display: grid;
  }

  .rank-item {
    grid-template-columns: 36px 82px 1fr;
    gap: 10px;
  }

  .card-body,
  .detail-card,
  .aside-card {
    padding: 16px;
  }
}
