:root {
  --color-bg: #fff8ed;
  --color-surface: #ffffff;
  --color-surface-soft: #fff3df;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-line: rgba(146, 64, 14, 0.14);
  --color-primary: #d97706;
  --color-primary-dark: #92400e;
  --color-accent: #f97316;
  --shadow-soft: 0 16px 40px rgba(146, 64, 14, 0.12);
  --shadow-strong: 0 24px 60px rgba(146, 64, 14, 0.22);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 36%, #fff8ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--color-line);
  background: rgba(255, 248, 237, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--color-primary-dark);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #78350f;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f97316);
  transform: translateY(-1px);
}

.header-search {
  flex: 0 1 230px;
}

.header-search input {
  width: 100%;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--color-text);
  background: #ffffff;
  outline: none;
}

.header-search input:focus {
  border-color: rgba(217, 119, 6, 0.72);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #92400e;
}

.hero {
  padding: 24px 0 12px;
}

.hero-stage {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow-strong);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 24%, rgba(251, 191, 36, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.20) 100%),
    linear-gradient(180deg, transparent 56%, rgba(17, 24, 39, 0.84) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 720px;
  padding: 72px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #d97706;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fbbf24;
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 60px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 16px;
  color: #fde68a;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 900;
}

.hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-tags,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 999px;
  color: #92400e;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f97316);
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.32);
}

.button.ghost {
  color: #78350f;
  background: #ffffff;
}

.hero .button.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  right: 40px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fbbf24;
}

.page-hero,
.detail-hero {
  padding: 64px 0;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.30), transparent 28%),
    linear-gradient(135deg, #fff7ed 0%, #ffedd5 52%, #ffffff 100%);
  border-bottom: 1px solid var(--color-line);
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  color: #78350f;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0;
  color: #92400e;
  font-size: 18px;
  line-height: 1.85;
}

.section-block,
.search-panel,
.content-block {
  margin: 34px 0;
}

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

.section-heading h2,
.search-panel h2,
.content-block h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.small-heading h2 {
  font-size: 24px;
}

.text-link {
  color: #d97706;
  font-weight: 900;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 440px);
  gap: 20px;
  align-items: end;
  padding: 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--color-text);
  background: #ffffff;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(217, 119, 6, 0.82);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.filter-bar {
  grid-column: 1 / -1;
}

.filter-chip {
  border: 0;
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f97316);
}

.search-result-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--color-muted);
  font-weight: 700;
}

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

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

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

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

.movie-card > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(146, 64, 14, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card > a:hover {
  border-color: rgba(217, 119, 6, 0.34);
  box-shadow: var(--shadow-strong);
  transform: translateY(-6px);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.35), transparent 32%),
    linear-gradient(135deg, #78350f, #f59e0b);
}

.poster::after {
  content: "精选影视";
  position: absolute;
  inset: auto 12px 12px;
  display: none;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 900;
  text-align: center;
}

.poster.poster-fallback::after {
  display: block;
}

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

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

.rank-badge,
.rank-number {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

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

.category-card,
.category-large-card a {
  display: grid;
  gap: 18px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-large-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.category-card h3,
.category-large-card h2 {
  margin: 6px 0 8px;
  color: #78350f;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-large-card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.category-card span {
  color: #d97706;
  font-size: 13px;
  font-weight: 900;
}

.category-covers,
.category-large-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-covers img,
.category-large-images img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #ffedd5;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #92400e;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #d97706;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.meta-list div {
  padding: 14px;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.meta-list dt {
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
}

.meta-list dd {
  margin: 0;
  color: #78350f;
  font-weight: 900;
}

.detail-tags {
  margin-top: 18px;
}

.detail-main {
  padding-bottom: 38px;
}

.player-panel {
  margin: 34px 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow-strong);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 10px;
  place-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.76));
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #d97706, #f97316);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  text-align: center;
}

.content-block {
  padding: 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-block p {
  margin: 16px 0 0;
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.prev-next a {
  padding: 16px 18px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  color: #92400e;
  background: #ffffff;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.rank-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.rank-column {
  min-width: 0;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list-item > a {
  display: grid;
  grid-template-columns: 42px 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
}

.rank-number {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.rank-list-item img {
  width: 68px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  background: #ffedd5;
}

.rank-list-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
}

.rank-list-item p,
.rank-list-item span {
  display: block;
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.sitemap-layout {
  padding-bottom: 42px;
}

.sitemap-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.sitemap-list.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.sitemap-list a {
  color: #92400e;
  font-weight: 800;
}

.sitemap-list a:hover {
  color: #d97706;
}

.site-footer {
  margin-top: 54px;
  padding: 44px 0;
  color: #78350f;
  background: #ffedd5;
  border-top: 1px solid var(--color-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: #92400e;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a {
  color: #92400e;
  font-weight: 800;
}

.footer-links a:hover {
  color: #d97706;
}

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .all-movies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-content {
    padding: 52px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

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

  .nav-link {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
  }

  .header-search {
    flex-basis: 100%;
    order: 5;
  }

  .hero-stage {
    min-height: 660px;
    border-radius: 24px;
  }

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

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(17, 24, 39, 0.30) 0%, rgba(17, 24, 39, 0.86) 58%, rgba(17, 24, 39, 0.96) 100%);
  }

  .hero-content {
    align-self: end;
    padding: 34px 24px 76px;
  }

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

  .hero-dots {
    right: 24px;
    bottom: 24px;
  }

  .search-panel,
  .detail-layout,
  .prev-next,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .category-large-grid,
  .rank-layout,
  .sitemap-list.two-col,
  .sitemap-list.four-col {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    padding-top: 12px;
  }

  .hero-stage {
    width: min(100% - 20px, 1280px);
    min-height: 620px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .page-hero,
  .detail-hero {
    padding: 42px 0;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .all-movies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .card-body h3 {
    font-size: 14px;
  }

  .search-panel,
  .content-block {
    padding: 18px;
    border-radius: 18px;
  }

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

  .rank-list-item > a {
    grid-template-columns: 34px 58px 1fr;
  }
}
