:root {
  --bg: #f8f5ef;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #eadfd0;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #ea580c;
  --shadow: 0 18px 45px rgba(33, 25, 14, 0.12);
  --radius: 18px;
  --container: 1240px;
}

* {
  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: linear-gradient(180deg, #fffaf2 0%, var(--bg) 34%, #ffffff 100%);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(24, 20, 16, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  width: min(var(--container), calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.34);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.24);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-page-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.header-search button,
.mobile-search button,
.filter-panel button,
.search-page-form button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: var(--amber);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-panel button:hover,
.search-page-form button:hover,
.btn:hover {
  transform: translateY(-1px);
  background: var(--amber-dark);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.26);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn.wide {
  display: block;
  margin-top: 18px;
  text-align: center;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.18)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - var(--container)) / 2));
  bottom: 86px;
  width: min(760px, calc(100% - 64px));
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.42);
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.meta-row,
.tag-row,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 36px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.highlight-section {
  width: min(var(--container), calc(100% - 32px));
  margin: 24px auto;
  padding: 38px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  box-shadow: var(--shadow);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--amber-dark);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.movie-card:hover img {
  transform: scale(1.08);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.duration {
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.movie-card-body {
  padding: 14px;
}

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

.movie-card-body h3 a:hover {
  color: var(--amber-dark);
}

.movie-card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row {
  justify-content: space-between;
  color: #4b5563;
  font-size: 13px;
}

.meta-row.muted {
  margin-top: 6px;
  color: #8a7d6b;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  min-height: 150px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 21px;
}

.category-tile span,
.category-overview-card p {
  color: var(--muted);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 32px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ranking-panel h2 {
  margin: 0 0 18px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 34px 56px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: #fffaf2;
}

.compact-card:hover {
  background: #ffedd5;
}

.compact-card strong {
  color: var(--amber-dark);
  text-align: center;
}

.compact-card img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
}

.compact-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.compact-card em {
  color: var(--orange);
  font-style: normal;
  font-weight: 900;
}

.page-main {
  padding: 32px 0 70px;
}

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

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

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  margin-right: 9px;
  color: #c4b5a3;
}

.page-hero.small {
  margin-bottom: 26px;
  padding: 34px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.45), transparent 36%), linear-gradient(135deg, #1f2937, #111827);
  box-shadow: var(--shadow);
}

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

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

.filter-panel,
.search-page-form {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  color: var(--text);
  background: #fffaf2;
  border: 1px solid var(--line);
}

.search-page-form {
  grid-template-columns: 1fr auto;
}

.search-results {
  min-height: 300px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
  padding: 32px;
  border-radius: 30px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.42), transparent 35%), linear-gradient(135deg, #1f2937, #111827);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 840px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.detail-meta {
  margin-bottom: 18px;
}

.tag-row span {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.36);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  aspect-ratio: 16 / 9;
}

.movie-video,
.video-cover,
.video-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  background: #000;
}

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.video-cover img {
  object-fit: cover;
  opacity: 0.78;
}

.video-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
}

.play-icon {
  position: absolute;
  z-index: 3;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 52px rgba(245, 158, 11, 0.38);
  font-size: 38px;
  text-indent: 5px;
}

.player-wrap.is-playing .video-cover {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 26px;
}

.text-panel {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}

.text-panel h2 {
  margin: 0 0 12px;
}

.text-panel p {
  margin: 0;
  color: #4b5563;
}

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

.site-footer {
  padding: 44px 0;
  color: rgba(255, 255, 255, 0.74);
  background: #111827;
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.footer-brand {
  justify-self: start;
}

.footer-inner p {
  max-width: 820px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #fff;
}

@media (max-width: 1180px) {
  .compact-grid,
  .standard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

  .mobile-nav .nav-link {
    display: block;
  }

  .mobile-search {
    align-items: stretch;
  }

  .hero-carousel {
    height: 68vh;
    min-height: 480px;
  }

  .hero-content {
    left: 20px;
    bottom: 72px;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

  .compact-grid,
  .featured-grid,
  .standard-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 560px) {
  .header-inner {
    gap: 12px;
  }

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

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

  .hero-meta span,
  .detail-meta span,
  .tag-row span {
    padding: 6px 10px;
    font-size: 13px;
  }

  .content-section,
  .page-main {
    padding-top: 30px;
  }

  .highlight-section,
  .page-hero.small,
  .detail-hero {
    padding: 22px;
    border-radius: 22px;
  }

  .compact-grid,
  .featured-grid,
  .standard-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .search-page-form {
    grid-template-columns: 1fr;
  }

  .play-icon {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
