:root {
  --primary: #e0561b;
  --primary-dark: #ba4118;
  --primary-soft: #fef6ee;
  --accent: #16a34a;
  --accent-soft: #f0fdf4;
  --secondary-50: #f7f7f5;
  --secondary-100: #e8e6df;
  --secondary-200: #d1cec0;
  --secondary-300: #b4af9b;
  --secondary-500: #827866;
  --secondary-700: #5b554a;
  --secondary-900: #413d35;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 18px 45px rgba(65, 61, 53, 0.12);
  --soft-shadow: 0 8px 24px rgba(65, 61, 53, 0.08);
  --radius: 18px;
  --container: 1180px;
}

* {
  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(--secondary-900);
  background: linear-gradient(180deg, var(--secondary-50), var(--white));
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary-900);
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary);
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(224, 86, 27, 0.32);
}

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

.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary-700);
  transition: color 0.2s ease;
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--secondary-200);
  border-radius: 12px;
  color: var(--secondary-900);
  background: var(--white);
  cursor: pointer;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  color: var(--white);
}

.hero-content h1 {
  max-width: 720px;
  margin: 14px 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -1px;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.65;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-meta span,
.hero-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(224, 86, 27, 0.3);
}

.primary-btn:hover,
.filter-bar button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-main {
  min-height: 60vh;
}

.content-section {
  padding: 46px 0;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.quick-card,
.side-box,
.detail-card,
.story-section,
.player-section {
  border: 1px solid var(--secondary-100);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.quick-card {
  padding: 26px;
}

.quick-card h2,
.side-box h2,
.story-section h2,
.player-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.quick-card p,
.story-section p,
.page-hero p,
.section-head p {
  margin: 0;
  color: var(--secondary-500);
  line-height: 1.8;
}

.chip-links,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-links a,
.tag-row span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--secondary-700);
  background: var(--secondary-50);
  font-size: 13px;
  font-weight: 700;
}

.chip-links a:hover {
  color: var(--white);
  background: var(--primary);
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  margin-bottom: 28px;
}

.filter-bar input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--secondary-200);
  border-radius: 14px;
  outline: 0;
  background: var(--white);
}

.filter-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(224, 86, 27, 0.12);
}

.filter-bar button {
  color: var(--white);
  background: var(--primary);
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
}

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

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.card-link,
.movie-card > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--secondary-100);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover,
.movie-card > a:hover {
  border-color: rgba(224, 86, 27, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--secondary-100);
}

.poster-wrap img,
.ranking-card img,
.category-thumbs img,
.detail-poster img,
.play-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-link:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-wrap img {
  transition: transform 0.35s ease;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.region-badge,
.year-badge {
  position: absolute;
  top: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.region-badge {
  left: 12px;
  color: var(--white);
  background: var(--primary);
}

.year-badge {
  right: 12px;
  color: var(--secondary-900);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 42px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--secondary-900);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-link:hover .card-body strong {
  color: var(--primary);
}

.card-meta,
.card-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--secondary-500);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-bottom: 8px;
  -webkit-line-clamp: 1;
}

.card-desc {
  margin-bottom: 12px;
  -webkit-line-clamp: 2;
}

.hot-panel {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(90deg, var(--primary-soft), var(--accent-soft));
}

.dark-panel {
  padding: 34px;
  border-radius: 28px;
  color: var(--white);
  background: var(--secondary-900);
}

.dark-panel .section-head p,
.dark-panel .card-desc,
.dark-panel .card-meta {
  color: rgba(255, 255, 255, 0.68);
}

.preview-stack {
  display: grid;
  gap: 34px;
}

.category-preview {
  padding-top: 6px;
}

.rank-panel {
  padding-top: 20px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-year {
  color: var(--secondary-500);
  font-size: 13px;
}

.page-hero {
  padding: 74px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-dark));
}

.compact-hero,
.category-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.page-hero h1 {
  max-width: 780px;
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.category-tile a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--secondary-100);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile a:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 170px;
  background: var(--secondary-100);
}

.category-tile h2,
.category-tile p {
  margin-left: 20px;
  margin-right: 20px;
}

.category-tile h2 {
  margin-top: 20px;
  margin-bottom: 8px;
}

.category-tile p {
  margin-bottom: 22px;
  color: var(--secondary-500);
  line-height: 1.7;
}

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

.side-box {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card > a {
  position: relative;
  display: grid;
  grid-template-columns: 90px 156px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-left: 14px;
  border-radius: 18px;
  color: var(--white);
  background: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.ranking-card img {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
}

.ranking-info {
  display: grid;
  gap: 8px;
}

.ranking-info strong {
  font-size: 20px;
}

.ranking-info span {
  color: var(--secondary-500);
}

.ranking-info em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--secondary-700);
  font-style: normal;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-wrap {
  padding-top: 34px;
  padding-bottom: 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--secondary-500);
  font-size: 14px;
}

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

.detail-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  background: var(--secondary-100);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.lead-text {
  color: var(--secondary-700);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--secondary-900);
  background: var(--secondary-50);
  font-weight: 800;
}

.tag-row.large span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.player-section {
  margin-top: 28px;
  padding: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-box video,
.play-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  z-index: 1;
  background: var(--black);
}

.play-layer {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--white);
  background: var(--black);
  cursor: pointer;
}

.play-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.play-layer.hidden {
  display: none;
}

.play-circle {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  font-size: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.story-section {
  margin-top: 28px;
  padding: 28px;
}

.story-section p {
  margin-top: 14px;
  color: var(--secondary-700);
}

.related-section {
  padding-bottom: 0;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.footer-grid p {
  max-width: 440px;
  margin: 0;
  line-height: 1.8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 13px;
}

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

@media (max-width: 1080px) {
  .four-cols,
  .five-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .side-box {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    padding: 18px;
    border: 1px solid var(--secondary-100);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: grid;
    gap: 16px;
  }

  .nav-link.active::after {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    bottom: 70px;
  }

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

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .detail-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .three-cols,
  .four-cols,
  .five-cols,
  .category-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-card > a {
    grid-template-columns: 58px 110px minmax(0, 1fr);
  }

  .ranking-number {
    width: 42px;
    height: 42px;
    margin-left: 0;
    border-radius: 14px;
    font-size: 18px;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

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

  .content-section {
    padding: 34px 0;
  }

  .hot-panel,
  .dark-panel {
    padding: 22px;
    border-radius: 22px;
  }

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

  .three-cols,
  .four-cols,
  .five-cols,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .ranking-card > a {
    grid-template-columns: 46px 92px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-info strong {
    font-size: 16px;
  }

  .ranking-info em {
    display: none;
  }

  .detail-card,
  .story-section,
  .player-section {
    padding: 18px;
  }

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