:root {
  --primary: #e0561b;
  --primary-soft: #feeede;
  --secondary: #413d35;
  --secondary-soft: #f7f7f5;
  --secondary-line: #e8e6df;
  --text: #27241f;
  --muted: #746f63;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(35, 31, 26, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--secondary-soft), #ffffff 38%, #ffffff);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--secondary-line);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(224, 86, 27, 0.26);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.text-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--secondary);
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 14px;
  gap: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

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

.hero {
  position: relative;
  height: 500px;
  background: var(--secondary);
  overflow: hidden;
}

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: min(1180px, calc(100% - 44px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-content h1,
.page-hero h1,
.detail-main h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.hero-content p,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.section-kicker {
  color: var(--primary);
  background: var(--primary-soft);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary);
  font-weight: 800;
  box-shadow: 0 18px 28px rgba(224, 86, 27, 0.3);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px 0;
}

.wide-section:last-child {
  padding-bottom: 54px;
}

.section-head,
.category-block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head.compact {
  align-items: center;
}

.section h2,
.category-block h2,
.rank-card h2,
.article-panel h2 {
  margin: 8px 0 0;
  color: var(--secondary);
}

.text-link {
  color: var(--primary);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--secondary-line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(35, 31, 26, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 255px;
  overflow: hidden;
  background: var(--secondary);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
}

.poster-mask {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: inline-flex;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--white);
  background: rgba(224, 86, 27, 0.92);
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
  transform: translateY(0);
}

.movie-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 9px;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1.35;
}

.movie-meta,
.movie-line {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 40px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.tag-row.large span {
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
}

.panel,
.category-block,
.article-panel {
  border: 1px solid var(--secondary-line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(35, 31, 26, 0.06);
}

.panel {
  padding: 26px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li + li {
  border-top: 1px solid var(--secondary-line);
}

.rank-list a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
}

.rank-num {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.rank-title {
  color: var(--secondary);
  font-weight: 800;
}

.rank-extra {
  color: var(--muted);
  font-size: 13px;
}

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

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

.category-tile {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--secondary);
}

.category-tile img {
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile span {
  position: absolute;
  left: 16px;
  bottom: 15px;
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

.category-tile:hover img {
  opacity: 0.85;
  transform: scale(1.05);
}

.page-hero {
  min-height: 280px;
  display: flex;
  align-items: end;
  padding: 70px max(22px, calc((100vw - 1236px) / 2)) 48px;
  color: var(--white);
  background: linear-gradient(120deg, var(--secondary), #1f1c18);
}

.small-hero p,
.category-hero p {
  max-width: 760px;
}

.category-hero {
  background-position: center;
  background-size: cover;
}

.category-overview {
  padding-top: 42px;
}

.stacked-categories {
  display: grid;
  gap: 24px;
}

.category-block {
  padding: 26px;
}

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

.mini-card {
  display: grid;
  gap: 9px;
  color: var(--secondary);
  font-weight: 800;
}

.mini-card img {
  height: 155px;
  border-radius: 14px;
  object-fit: cover;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--secondary-line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(35, 31, 26, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--secondary-line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--secondary);
  background: var(--secondary-soft);
  font: inherit;
}

.library-grid .movie-card.is-hidden {
  display: none;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--secondary-line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(35, 31, 26, 0.06);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  height: 170px;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  border-radius: 10px;
  color: var(--white);
  background: var(--primary);
  font-weight: 900;
}

.rank-card p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: var(--secondary);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.04);
  opacity: 0.4;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 18, 16, 0.92), rgba(20, 18, 16, 0.56));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  min-height: 540px;
  margin: 0 auto;
  padding: 58px 22px;
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: end;
  gap: 34px;
  color: var(--white);
}

.detail-poster img {
  height: 410px;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-main .tag-row {
  margin-bottom: 26px;
}

.detail-content {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #0f0f0f;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(224, 86, 27, 0.95);
  font-size: 34px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.play-button.is-hidden {
  display: none;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.article-panel {
  padding: 28px;
}

.article-panel p {
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.74);
  background: var(--secondary);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-logo {
  color: var(--white);
  font-size: 20px;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

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

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

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

  .split-section,
  .detail-columns {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .hero {
    height: 560px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .category-block-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .poster-link {
    height: 210px;
  }

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

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

  .rank-cover img {
    height: 136px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-poster {
    max-width: 240px;
  }

  .detail-poster img {
    height: 330px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .poster-link {
    height: 320px;
  }

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

  .rank-cover img {
    height: 220px;
  }
}
