:root {
  --bg-start: #fffbeb;
  --bg-end: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f5d99a;
  --brand: #b45309;
  --brand-dark: #78350f;
  --brand-soft: #fef3c7;
  --accent: #ea580c;
  --shadow: 0 20px 45px rgba(120, 53, 15, 0.16);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-start), var(--bg-end));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

img {
  width: 100%;
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 251, 235, 0.94);
  border-bottom: 1px solid #f1d48b;
  box-shadow: 0 10px 26px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-dark);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff7ed;
  background: linear-gradient(135deg, #b45309, #ea580c);
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #92400e;
  font-weight: 700;
}

.nav-links a,
.mobile-panel a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: #d97706;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-input {
  width: 238px;
  height: 42px;
  border: 1px solid #f1c765;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  padding: 0 14px;
  color: #78350f;
  background: #fff;
  outline: none;
}

.search-input:focus {
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.search-button,
.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.search-button {
  height: 42px;
  padding: 0 16px;
  color: white;
  background: #b45309;
  border-radius: 0 12px 12px 0;
}

.primary-button {
  min-height: 52px;
  padding: 0 26px;
  color: white;
  background: linear-gradient(135deg, #b45309, #ea580c);
  box-shadow: 0 16px 32px rgba(180, 83, 9, 0.28);
}

.secondary-button {
  min-height: 52px;
  padding: 0 22px;
  color: #78350f;
  background: rgba(255, 251, 235, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.38);
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #f1c765;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(120, 53, 15, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #f1c765;
}

.mobile-panel {
  display: none;
  padding: 16px 0 20px;
  border-top: 1px solid #f5d99a;
}

.mobile-panel-inner {
  display: grid;
  gap: 12px;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  color: #92400e;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 520px;
  height: 72vh;
  max-height: 760px;
  overflow: hidden;
  background: #111827;
}

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

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

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

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

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.68) 44%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: inherit;
  height: 100%;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 74px 0 96px;
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hero-text {
  max-width: 660px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 26px;
}

.meta-row,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero .meta-row {
  margin-bottom: 30px;
}

.badge,
.score-badge,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.badge {
  padding: 6px 12px;
  color: #78350f;
  background: #fef3c7;
}

.score-badge {
  padding: 6px 12px;
  color: white;
  background: #b45309;
}

.tag {
  padding: 5px 10px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #f3d58b;
}

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

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.section {
  margin-bottom: 58px;
}

.section-panel {
  border-radius: 26px;
  padding: 30px;
  background: linear-gradient(135deg, #fef3c7, #ffedd5);
  box-shadow: var(--shadow);
}

.section-dark {
  color: #fff7ed;
  background: linear-gradient(135deg, #78350f, #9a3412);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-dark .section-title {
  color: #fff7ed;
}

.section-desc {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 10px;
}

.section-dark .section-desc {
  color: #fde68a;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.11);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(120, 53, 15, 0.18);
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.58));
  transition: opacity 0.3s ease;
}

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

.poster-score {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: white;
  background: #b45309;
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: #d97706;
}

.card-meta {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 10px;
}

.card-summary {
  display: -webkit-box;
  min-height: 48px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.horizontal-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  flex: 0 0 270px;
  scroll-snap-align: start;
}

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

.category-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  padding: 22px;
  color: #78350f;
  background: white;
  border: 2px solid #f5d99a;
  box-shadow: 0 10px 24px rgba(120, 53, 15, 0.09);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: #f59e0b;
}

.category-card h2,
.category-card h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-card p {
  color: #7c2d12;
  line-height: 1.65;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 116px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(120, 53, 15, 0.1);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: white;
  background: #b45309;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-title {
  color: #111827;
  font-weight: 900;
  font-size: 18px;
}

.rank-title:hover {
  color: #d97706;
}

.page-hero {
  padding: 58px 0 28px;
}

.page-hero-card {
  overflow: hidden;
  position: relative;
  border-radius: 28px;
  padding: 40px;
  color: #fff7ed;
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.36), transparent 34%), linear-gradient(135deg, #78350f, #111827);
  box-shadow: var(--shadow);
}

.page-hero-card h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

.page-hero-card p {
  max-width: 780px;
  color: #fde68a;
  font-size: 17px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
  padding: 18px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 26px rgba(120, 53, 15, 0.1);
}

.filter-input,
.filter-select {
  min-height: 44px;
  border: 1px solid #f1c765;
  border-radius: 12px;
  padding: 0 14px;
  color: #78350f;
  background: #fff;
  outline: none;
}

.filter-input {
  flex: 1 1 260px;
}

.filter-select {
  flex: 0 1 180px;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

.detail-hero {
  padding: 38px 0 56px;
  background: linear-gradient(180deg, #111827, #78350f 56%, #fffbeb 56%, #fffbeb);
}

.breadcrumbs {
  color: #fde68a;
  font-size: 14px;
  margin-bottom: 22px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-side,
.content-card {
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: black;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(0, 0, 0, 0.36);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #b45309, #ea580c);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.player-message {
  display: none;
  padding: 16px;
  color: #fff7ed;
  background: #7f1d1d;
}

.player-message.is-visible {
  display: block;
}

.detail-content {
  padding: 24px;
}

.detail-content h1 {
  color: #111827;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.detail-meta {
  color: #6b7280;
  margin-bottom: 18px;
}

.detail-intro {
  color: #374151;
  font-size: 17px;
  line-height: 1.8;
}

.detail-side {
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 16 / 10;
  background: #111827;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-side-body {
  padding: 20px;
}

.detail-side h2 {
  font-size: 20px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 14px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-card {
  padding: 28px;
  margin-bottom: 28px;
}

.content-card h2 {
  color: #111827;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.content-card p {
  color: #374151;
  line-height: 1.9;
  margin-bottom: 14px;
}

.site-footer {
  padding: 44px 0;
  color: #fde68a;
  background: #78350f;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  color: #fff7ed;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-grid p,
.footer-grid a {
  color: #fde68a;
  line-height: 1.75;
}

.footer-grid a:hover {
  color: white;
}

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

.footer-bottom {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(253, 230, 138, 0.28);
  text-align: center;
  color: #fed7aa;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: white;
  background: #b45309;
  box-shadow: 0 12px 24px rgba(120, 53, 15, 0.22);
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.large,
  .movie-grid.compact,
  .category-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .nav-links,
  .header-actions {
    display: none;
  }

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

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

  .mobile-panel .search-form {
    display: flex;
    width: 100%;
  }

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

  .hero {
    height: auto;
    min-height: 560px;
  }

  .hero-copy {
    padding: 80px 0 110px;
  }

  .hero-control {
    display: none;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 86px 1fr;
  }

  .rank-item .primary-button {
    grid-column: 2 / -1;
    min-height: 44px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .page-hero-card {
    padding: 28px;
  }

  .section-panel,
  .content-card {
    padding: 20px;
  }

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

  .horizontal-row .movie-card {
    flex-basis: 238px;
  }

  .detail-content {
    padding: 20px;
  }

  .play-button {
    width: 74px;
    height: 74px;
  }
}
