:root {
  --bg: #ffffff;
  --panel: #fffaf0;
  --paper: #fffdf7;
  --text: #1e293b;
  --muted: #64748b;
  --soft: #f5f5f4;
  --line: #e7e5e4;
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #fef3c7;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.86);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.04);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  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.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 14px 30px rgba(180, 83, 9, 0.22);
}

.brand-text {
  font-size: 20px;
  color: var(--text);
}

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

.nav-link,
.mobile-link {
  border-radius: 14px;
  color: #475569;
  font-weight: 700;
  transition: 0.24s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #334155;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.mobile-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(245, 158, 11, 0.34), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 70px;
  color: #fff;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(253, 230, 138, 0.3);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 40px rgba(180, 83, 9, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(180, 83, 9, 0.35);
}

.secondary-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.text-button {
  min-height: 38px;
  color: var(--brand-dark);
  background: #fff7ed;
}

.text-button:hover {
  color: #fff;
  background: var(--brand);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 32px;
  transition: 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dots button {
  width: 30px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: 0.22s ease;
}

.hero-dots button.is-active {
  width: 54px;
  background: #fff;
}

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

.page-section {
  padding: 58px 0;
}

.page-hero {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  padding: 68px 0 46px;
}

.page-kicker {
  color: var(--brand-dark);
  background: #fffbeb;
  border-color: #fed7aa;
}

.page-hero h1 {
  max-width: 860px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--brand-dark);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(231, 229, 228, 0.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
}

.movie-card[hidden],
.rank-row[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover,
.rank-info h3 a:hover,
.detail-copy a:hover {
  color: var(--brand-dark);
}

.card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-list span {
  color: var(--brand-dark);
  background: #fffbeb;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.35));
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.72;
}

.category-card > div {
  position: relative;
  z-index: 2;
  max-width: 74%;
  padding: 28px;
  color: #fff;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-card p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.72;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples span {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: var(--soft);
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  padding: 16px;
  margin-bottom: 28px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.search-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #475569;
}

.search-field input,
.filter-selects select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  font: inherit;
  outline: 0;
}

.search-field input:focus,
.filter-selects select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.filter-selects {
  display: flex;
  align-items: end;
  gap: 10px;
}

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

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

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.28));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 22px 48px rgba(245, 158, 11, 0.32);
  font-size: 34px;
  padding-left: 5px;
}

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

.detail-copy {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.detail-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-copy p {
  color: #475569;
  font-size: 16px;
  line-height: 1.88;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.side-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-cover,
.side-card {
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.side-list {
  display: grid;
  gap: 10px;
}

.side-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-list a:hover {
  color: var(--brand-dark);
  background: #fffbeb;
}

.side-list span {
  color: var(--muted);
  font-size: 13px;
}

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

.site-footer {
  margin-top: 70px;
  padding: 54px 0 28px;
  background: #f5f5f4;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 40px;
}

.footer-brand p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

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

.footer-grid a {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  color: #475569;
  font-weight: 700;
}

.footer-grid a:hover {
  color: var(--brand-dark);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px solid #ddd6d0;
  text-align: center;
}

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

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

  .hero-carousel {
    min-height: 590px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .side-panel {
    position: static;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-selects {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .nav-shell {
    width: min(100% - 24px, 1180px);
    height: 64px;
  }

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

  .hero-content {
    width: min(100% - 28px, 1180px);
  }

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

  .hero-actions,
  .page-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .page-section {
    padding: 42px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body p {
    min-height: auto;
  }

  .category-card > div {
    max-width: 100%;
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: auto 76px minmax(0, 1fr);
  }

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

  .player-start span {
    width: 68px;
    height: 68px;
  }

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

@media (max-width: 440px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
