:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-light: #fffbeb;
  --black: #111827;
  --shadow: 0 14px 35px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 10px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.35);
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

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

.top-search input,
.mobile-search input,
.hero-search input,
.card-filter {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  outline: none;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 220px;
  padding: 9px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.card-filter:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: var(--amber);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-btn:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  color: var(--text);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 24px 20px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-search input {
  width: 100%;
  padding: 11px 14px;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #111827;
}

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

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

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

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

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #fff;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 19px;
}

.hero-tags,
.tag-row,
.genre-row,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span,
.tag-row span,
.genre-row span {
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(217, 119, 6, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  font-weight: 800;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  font-size: 32px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.quick-panel {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.quick-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
}

.hero-search {
  margin: 0 auto 18px;
  max-width: 760px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

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

.quick-cats a,
.category-card,
.overview-card,
.detail-card,
.side-poster,
.side-rank,
.filter-panel,
.rank-panel,
.category-panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.quick-cats a {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #f3e8d3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.quick-cats strong {
  color: var(--amber-dark);
}

.quick-cats span {
  color: var(--muted);
  font-size: 13px;
}

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.warm-section {
  max-width: none;
  padding-left: max(24px, calc((100% - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1280px) / 2 + 24px));
  background: linear-gradient(180deg, #fffbeb, #fff);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.section-head.tight {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.section-head a {
  margin-left: auto;
  color: var(--amber);
  font-weight: 800;
}

.section-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fef3c7;
  color: var(--amber-dark);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.75));
  opacity: 0.9;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(217, 119, 6, 0.96);
  font-size: 13px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
}

.card-body {
  padding: 14px;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
}

.card-body h2 {
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 850;
}

.large-card .card-body h2 {
  font-size: 24px;
}

.card-body h2 a:hover {
  color: var(--amber);
}

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

.tag-row span,
.genre-row span {
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.rank-panel,
.category-panel,
.filter-panel {
  padding: 24px;
}

.rank-panel.wide {
  grid-column: span 1;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: #f9fafb;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: var(--amber);
  font-weight: 900;
}

.rank-row img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

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

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

.compact .rank-row {
  grid-template-columns: 30px 46px minmax(0, 1fr);
}

.compact .rank-meta {
  display: none;
}

.category-mini-grid,
.overview-grid {
  display: grid;
  gap: 16px;
}

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

.category-card,
.overview-card {
  display: block;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card span,
.overview-card h2 {
  color: var(--amber-dark);
  font-size: 20px;
  font-weight: 900;
}

.category-card p,
.overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.26), transparent 34%), linear-gradient(135deg, #111827, #292524);
  color: #fff;
}

.small-hero {
  padding: 64px 24px;
  text-align: center;
}

.small-hero h1 {
  margin: 0 auto 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
}

.small-hero p {
  max-width: 820px;
  margin: 0 auto;
  color: #e5e7eb;
  font-size: 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #6b7280;
  font-size: 14px;
}

.small-hero .breadcrumbs {
  justify-content: center;
  color: #fef3c7;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--amber);
  font-weight: 800;
}

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

.filter-panel {
  margin-bottom: 24px;
}

.card-filter {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-pill {
  border-radius: 999px;
  padding: 8px 14px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
}

.cat-pill:hover,
.cat-pill.active {
  background: var(--amber);
  color: #fff;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.8fr);
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
  cursor: pointer;
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.95);
  font-size: 34px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.play-overlay strong {
  max-width: 80%;
  text-align: center;
  font-size: 24px;
}

.detail-card,
.side-poster,
.side-rank {
  margin-top: 24px;
  padding: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 12px;
  color: #374151;
  font-size: 16px;
}

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

.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 700;
}

.lead-text {
  font-size: 18px;
  color: #111827;
  font-weight: 700;
}

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

.genre-row {
  margin-top: 22px;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.side-poster h2 {
  margin: 16px 0 4px;
  font-size: 24px;
}

.side-poster p {
  margin: 0;
  color: var(--muted);
}

.related-section {
  padding-top: 34px;
}

.page-search {
  margin-top: 26px;
}

.site-footer {
  margin-top: 40px;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #f59e0b;
}

.footer-brand p {
  max-width: 620px;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-links h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  color: #9ca3af;
  text-align: center;
}

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

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

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

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

  .header-inner {
    padding: 0 16px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    width: calc(100% - 32px);
  }

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

  .quick-cats,
  .large-grid,
  .split-section,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 30px 52px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 560px) {
  .section-block,
  .warm-section {
    padding: 38px 14px;
  }

  .small-hero {
    padding: 46px 16px;
  }

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

  .overview-grid,
  .quick-cats,
  .category-mini-grid {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    font-size: 15px;
  }

  .card-body p,
  .tag-row,
  .card-meta {
    font-size: 12px;
  }

  .detail-layout {
    padding: 22px 14px 0;
  }

  .detail-card,
  .side-poster,
  .side-rank,
  .rank-panel,
  .category-panel,
  .filter-panel {
    padding: 18px;
    border-radius: 16px;
  }

  .play-circle {
    width: 64px;
    height: 64px;
    font-size: 27px;
  }

  .play-overlay strong {
    font-size: 18px;
  }
}
