:root {
  color-scheme: light;
  --bg: #fff7ed;
  --paper: #ffffff;
  --paper-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fde68a;
  --gold: #d97706;
  --gold-deep: #92400e;
  --orange: #ea580c;
  --dark: #451a03;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.14);
  --shadow-soft: 0 10px 30px rgba(146, 64, 14, 0.10);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fff 100%);
  color: var(--text);
  min-width: 320px;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.42);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 68px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.32);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand strong {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--gold-deep), var(--orange));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  margin-top: 4px;
  color: var(--gold);
  font-size: 12px;
}

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link {
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

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

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-search input {
  width: 230px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(217, 119, 6, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.28);
}

.secondary-btn {
  color: #92400e;
  background: rgba(255, 251, 235, 0.86);
  box-shadow: none;
}

.menu-button {
  display: none;
  border: 0;
  background: #fff7ed;
  color: var(--gold-deep);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
}

.mobile-panel {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
  border-top: 1px solid rgba(251, 191, 36, 0.36);
}

.mobile-search {
  margin-top: 16px;
}

.mobile-search input {
  width: 100%;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 14px;
  background: #fffbeb;
  color: #78350f;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 18%, rgba(251, 191, 36, 0.28), transparent 28%), linear-gradient(90deg, rgba(24, 16, 10, 0.88), rgba(69, 26, 3, 0.52) 45%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 620px;
  padding: 86px 22px 84px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(252, 211, 77, 0.6);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fde68a;
  background: rgba(69, 26, 3, 0.42);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.hero p {
  margin: 0;
  max-width: 700px;
  color: #ffedd5;
  font-size: clamp(17px, 2.5vw, 25px);
  line-height: 1.7;
}

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

.hero-thumbs {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  width: min(1196px, calc(100% - 44px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.hero-thumb {
  border: 1px solid rgba(252, 211, 77, 0.4);
  background: rgba(69, 26, 3, 0.48);
  color: #ffffff;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  background: rgba(217, 119, 6, 0.86);
  transform: translateY(-2px);
}

.hero-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  flex: none;
}

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

.main-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 22px;
}

.main-section.soft {
  max-width: none;
  background: rgba(255, 255, 255, 0.72);
}

.main-section.soft > .section-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

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

.section-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

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

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-weight: 900;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.movie-grid.large .card-cover,
.search-list .card-cover {
  aspect-ratio: 16 / 9;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.play-dot {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  transform: scale(0.92);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

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

.card-body h3 a:hover {
  color: var(--gold);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span,
.breadcrumb a,
.breadcrumb span {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
  border: 1px solid #fde68a;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile strong {
  display: block;
  color: #111827;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.page-hero {
  background: radial-gradient(circle at 72% 20%, rgba(251, 191, 36, 0.36), transparent 28%), linear-gradient(135deg, #451a03 0%, #92400e 56%, #ea580c 100%);
  color: #ffffff;
}

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 74px 22px;
}

.page-hero h1 {
  margin: 0 0 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 220px;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(252, 211, 77, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.player-card,
.detail-card,
.side-card {
  background: #ffffff;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.player-box {
  position: relative;
  background: #111827;
  aspect-ratio: 16 / 9;
}

.player-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  z-index: 1;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.1));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.player-caption {
  padding: 22px 24px;
  background: #ffffff;
}

.player-caption h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.18;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.detail-title h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-text {
  color: #374151;
  line-height: 1.92;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.info-table div {
  border: 1px solid #fde68a;
  border-radius: 16px;
  background: #fffbeb;
  padding: 14px;
}

.info-table span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.info-table strong {
  color: #111827;
}

.review-box {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #fde68a;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  line-height: 1.85;
}

.side-card {
  padding: 20px;
  position: sticky;
  top: 92px;
}

.poster-large {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

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

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #fde68a;
  border-radius: 18px;
  background: #fffbeb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  transform: translateX(3px);
  background: #fff7ed;
}

.mini-card img {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.mini-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.mini-info small {
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-rank {
  width: max-content;
  color: #ffffff;
  background: var(--gold);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

.empty-state {
  display: none;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-search {
    margin-left: auto;
  }

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

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

  .side-card {
    position: static;
  }
}

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

  .brand-text small {
    display: none;
  }

  .top-search {
    display: none;
  }

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

  .hero-content {
    padding: 58px 18px 150px;
  }

  .hero-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: 18px;
  }

  .hero-thumb:nth-child(n+5) {
    display: none;
  }

  .movie-grid,
  .movie-grid.large,
  .search-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .main-section,
  .page-hero-inner,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 540px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .mobile-nav {
    grid-template-columns: 1fr;
  }

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

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

  .primary-btn,
  .secondary-btn {
    text-align: center;
  }

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

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

  .movie-grid,
  .movie-grid.large,
  .search-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .info-table {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 20px;
  }
}
