:root {
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-soft: #fff7ed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f9fafb;
  --footer: #111827;
  --shadow: 0 14px 35px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 2px 15px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: var(--amber);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input {
  width: 230px;
  height: 40px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
  background: #ffffff;
}

.nav-search input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.primary-button,
.ghost-button,
.filter-button,
.player-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav-search button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--amber);
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover {
  background: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.24);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: var(--ink);
  font-size: 24px;
}

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 0 24px 20px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  font-weight: 700;
}

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

.hero {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.image-missing {
  opacity: 0;
}

.hero-slide:has(.image-missing),
.poster:has(.image-missing),
.list-cover:has(.image-missing),
.detail-poster:has(.image-missing),
.player-shell:has(.image-missing) {
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.38), transparent 34%),
    linear-gradient(135deg, #111827, #78350f 52%, #0f172a);
}

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

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

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

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

.hero-tags span,
.detail-meta span {
  padding: 6px 12px;
  background: rgba(217, 119, 6, 0.95);
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 38px;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: #ffffff;
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: linear-gradient(180deg, var(--amber-soft), #ffffff);
}

.section.gray {
  background: #f3f4f6;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-title p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card,
.movie-list-card,
.info-panel,
.category-card,
.detail-card {
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.movie-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
  position: relative;
  display: block;
  height: 270px;
  overflow: hidden;
  background: #111827;
}

.movie-card.large .poster {
  height: 380px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
}

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  padding: 5px 10px;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 12px;
  background: var(--amber);
}

.poster-year {
  right: 12px;
  background: rgba(0, 0, 0, 0.62);
}

.card-body {
  padding: 18px;
}

.card-body h2,
.list-body h2,
.rank-title,
.detail-card h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 20px;
  line-height: 1.3;
}

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

.card-body p,
.list-body p,
.category-card p,
.detail-card p,
.prose-text {
  color: var(--muted);
}

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

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

.category-card {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.list-stack {
  display: grid;
  gap: 18px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 146px;
}

.list-cover {
  overflow: hidden;
  background: #111827;
}

.list-cover img {
  width: 100%;
  height: 100%;
  min-height: 146px;
  object-fit: cover;
}

.list-body {
  padding: 20px;
}

.meta-row {
  margin-bottom: 8px;
  color: var(--amber-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 110px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 14px;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  height: 76px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.rank-score {
  color: var(--amber-dark);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  padding: 42px 0;
  background: radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 50%, #78350f);
  color: #ffffff;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.player-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.player-button {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.94);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 20px 36px rgba(217, 119, 6, 0.36);
  pointer-events: auto;
}

.player-shell.playing .player-button {
  opacity: 0;
  transform: scale(0.92);
}

.player-shell:hover .player-button {
  opacity: 1;
  transform: scale(1);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.78);
  border-radius: 14px;
  font-size: 14px;
}

.player-message.show {
  display: block;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.2);
}

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

.detail-title {
  margin: 24px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

.detail-lead {
  max-width: 820px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

.detail-card {
  padding: 26px;
  margin-bottom: 20px;
}

.detail-card h2 {
  font-size: 26px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  padding: 8px 14px;
  color: #374151;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

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

.search-panel {
  padding: 22px;
  margin-bottom: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
}

.search-panel button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  font-weight: 800;
}

.year-group {
  margin-bottom: 36px;
}

.year-group h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 32px;
}

.site-footer {
  color: #d1d5db;
  background: var(--footer);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.footer-about p {
  max-width: 540px;
  color: #9ca3af;
}

.footer-bottom {
  padding: 18px;
  color: #9ca3af;
  border-top: 1px solid #374151;
  text-align: center;
}

@media (max-width: 1024px) {
  .grid-cards,
  .grid-cards.featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .detail-poster {
    max-width: 360px;
  }
}

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

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

  .hero {
    min-height: 560px;
    height: 78vh;
  }

  .hero-arrow {
    display: none;
  }

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

  .poster,
  .movie-card.large .poster {
    height: 240px;
  }

  .movie-list-card {
    grid-template-columns: 128px 1fr;
  }

  .list-body {
    padding: 14px;
  }

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

  .rank-cover,
  .rank-score {
    display: none;
  }

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

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

  .brand {
    font-size: 18px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .section {
    padding: 42px 0;
  }

  .grid-cards,
  .grid-cards.featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .list-cover img {
    height: 230px;
  }

  .search-panel form {
    flex-direction: column;
  }
}
