*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --surface: #ffffff;
  --surface-strong: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f3e5c6;
  --brand: #b45309;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.13);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 48%, #fffbeb 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(180, 83, 9, 0.12);
}

.site-header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.24);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: rgba(180, 83, 9, 0.08);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(180, 83, 9, 0.12);
}

.header-search input,
.quick-search input,
.filter-input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 180px;
  color: var(--text);
}

.header-search button,
.quick-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(120, 53, 15, 0.12);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--brand);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.4s ease;
  pointer-events: none;
}

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

.hero-slide > img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

.hero-meta,
.detail-meta-grid,
.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta-grid span {
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.9);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 16px 30px rgba(180, 83, 9, 0.32);
}

.primary-button:hover,
.header-search button:hover,
.quick-search button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

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

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

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

.quick-search-section {
  width: min(980px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 4;
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(180, 83, 9, 0.12);
}

.quick-search input {
  flex: 1;
  min-height: 48px;
  padding: 0 14px;
}

.quick-search button {
  min-width: 120px;
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 0;
}

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

.section-heading h2,
.category-block-heading h2,
.copy-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  color: #111827;
  font-weight: 950;
}

.section-heading p,
.category-block-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  min-height: 42px;
  color: var(--brand);
  background: var(--brand-soft);
}

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

.all-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 45px rgba(120, 53, 15, 0.16);
}

.movie-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #fef3c7);
}

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

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

.movie-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-card-overlay {
  opacity: 1;
}

.play-circle {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.92);
  color: #ffffff;
  transform: scale(0.86);
  transition: transform 0.25s ease;
}

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

.rating-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(245, 158, 11, 0.92);
}

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

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

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

.movie-card-meta {
  justify-content: space-between;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 700;
}

.movie-card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  font-weight: 750;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.category-card,
.category-block,
.copy-card,
.filter-panel,
.ranking-list {
  border: 1px solid rgba(180, 83, 9, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(120, 53, 15, 0.08);
}

.category-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 150px;
  background: #fef3c7;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body,
.category-block {
  padding: 18px;
}

.category-card-body h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 950;
}

.category-card-body span {
  color: var(--muted);
}

.category-block + .category-block {
  margin-top: 28px;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 38px auto 0;
  padding: 56px;
  border-radius: 28px;
  background: radial-gradient(circle at top left, #fef3c7, transparent 42%), linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid rgba(180, 83, 9, 0.12);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 0;
  color: #111827;
}

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

.filter-search-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-search-row {
  margin-bottom: 14px;
}

.filter-input {
  flex: 1;
  min-height: 46px;
  min-width: min(320px, 100%);
  padding: 0 14px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.filter-count {
  color: var(--brand);
  font-weight: 900;
}

.filter-row {
  margin-top: 10px;
}

.filter-row > span {
  min-width: 44px;
  color: var(--muted);
  font-weight: 800;
}

.filter-chip {
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 8px 12px;
  color: #92400e;
  background: #ffffff;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

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

.ranking-list {
  overflow: hidden;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 54px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 11px 16px;
  border-bottom: 1px solid #f8e8c4;
}

.ranking-item:last-child {
  border-bottom: 0;
}

.ranking-item:hover {
  background: #fffbeb;
}

.ranking-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  font-weight: 950;
}

.ranking-item img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

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

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

.ranking-score {
  color: var(--brand);
  font-weight: 950;
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  min-height: 560px;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.82));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 560px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  color: #ffffff;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
  color: #ffffff;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta-grid span {
  color: rgba(255, 255, 255, 0.86);
}

.detail-info .tag-list {
  margin: 20px 0 26px;
}

.detail-info .tag-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.player-section {
  scroll-margin-top: 90px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #050505;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.94);
  box-shadow: 0 18px 44px rgba(180, 83, 9, 0.34);
  font-size: 30px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
}

.copy-card {
  padding: 26px;
}

.copy-card h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.copy-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.copy-card p + p {
  margin-top: 12px;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-logo {
  color: #ffffff;
}

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

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

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

  .all-grid,
  .compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .header-search {
    width: 100%;
    margin-left: 0;
  }

  .header-search input {
    flex: 1;
    min-width: 0;
  }

  .hero-section {
    min-height: 620px;
  }

  .hero-content {
    width: min(100% - 32px, 720px);
    margin-left: 16px;
  }

  .quick-search,
  .section-heading,
  .category-block-heading {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .page-hero {
    padding: 34px 22px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 0;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }

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

  .ranking-item {
    grid-template-columns: 42px 48px minmax(0, 1fr) auto;
  }

  .ranking-meta {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-section {
    height: auto;
    min-height: 580px;
  }

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 38px;
  }

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

  .movie-card-body p {
    display: none;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
