@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap");

:root {
  --blackboard: #1a2e1a;
  --blackboard-dark: #0f1a0f;
  --blackboard-light: #2d4a2d;
  --chalk-white: #f5f5dc;
  --chalk-yellow: #fffacd;
  --chalk-blue: #add8e6;
  --chalk-green: #90ee90;
  --chalk-pink: #ffb6c1;
  --vintage-gold: #ffd700;
  --vintage-beige: #d4c5aa;
  --card-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --chalk-shadow: 0 2px 4px rgba(245, 245, 220, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--chalk-white);
  background:
    radial-gradient(circle at top left, rgba(255, 250, 205, 0.06), transparent 32rem),
    linear-gradient(135deg, var(--blackboard-dark), var(--blackboard) 45%, #132413);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(15, 26, 15, 0.45);
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 26, 15, 0.94);
  border-bottom: 2px solid rgba(255, 250, 205, 0.28);
  backdrop-filter: blur(14px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 999px;
  box-shadow: var(--chalk-shadow);
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: rgba(245, 245, 220, 0.82);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--chalk-yellow);
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input,
.page-filter input {
  min-width: 210px;
  color: var(--chalk-white);
  background: rgba(45, 74, 45, 0.82);
  border: 1px solid rgba(255, 250, 205, 0.32);
  border-radius: 14px;
  padding: 10px 14px;
  outline: none;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter input:focus {
  border-color: var(--chalk-yellow);
  box-shadow: 0 0 0 3px rgba(255, 250, 205, 0.12);
}

.header-search button,
.mobile-search button,
.page-filter button,
.primary-button,
.secondary-button {
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button {
  color: var(--blackboard);
  background: var(--chalk-yellow);
}

.secondary-button {
  color: var(--chalk-yellow);
  background: transparent;
  border: 1px solid rgba(255, 250, 205, 0.38);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
  background: var(--chalk-white);
  color: var(--blackboard);
}

.menu-toggle {
  display: none;
  color: var(--chalk-white);
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 250, 205, 0.25);
  padding: 16px;
}

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

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

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 2px solid rgba(255, 250, 205, 0.2);
}

.hero-slider {
  position: relative;
  min-height: 720px;
}

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

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 26, 15, 0.98), rgba(26, 46, 26, 0.72) 48%, rgba(15, 26, 15, 0.88)),
    linear-gradient(0deg, rgba(15, 26, 15, 1), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  align-items: center;
  gap: 56px;
  padding: 92px 0 72px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--blackboard);
  background: rgba(255, 250, 205, 0.92);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 900;
  margin-bottom: 18px;
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(245, 245, 220, 0.9);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.meta-pills span {
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.1);
  border: 1px solid rgba(255, 250, 205, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

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

.hero-poster {
  position: relative;
  height: 560px;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid rgba(255, 250, 205, 0.42);
  box-shadow: var(--card-shadow);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  border: 1px solid rgba(245, 245, 220, 0.2);
  border-radius: 22px;
  pointer-events: none;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 250, 205, 0.9);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--chalk-yellow);
}

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0;
  color: var(--chalk-yellow);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.section-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(245, 245, 220, 0.78);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(45, 74, 45, 0.82);
  border: 2px solid rgba(255, 250, 205, 0.2);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 250, 205, 0.68);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), var(--chalk-shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 26, 15, 0.6);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 900;
  box-shadow: var(--chalk-shadow);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(245, 245, 220, 0.66);
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--chalk-white);
  font-size: 20px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--chalk-yellow);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: rgba(245, 245, 220, 0.78);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-tile,
.region-tile,
.year-tile {
  display: block;
  min-height: 162px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(45, 74, 45, 0.92), rgba(26, 46, 26, 0.96));
  border: 2px solid rgba(173, 216, 230, 0.28);
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.region-tile:hover,
.year-tile:hover {
  transform: translateY(-4px);
  border-color: var(--chalk-yellow);
}

.category-tile h3,
.region-tile h3,
.year-tile h3 {
  margin: 0 0 10px;
  color: var(--chalk-blue);
  font-size: 24px;
}

.category-tile p,
.region-tile p,
.year-tile p {
  margin: 0;
  color: rgba(245, 245, 220, 0.78);
}

.page-hero {
  padding: 72px 0 36px;
  background: radial-gradient(circle at 15% 20%, rgba(255, 250, 205, 0.12), transparent 28rem);
}

.page-hero h1 {
  max-width: 880px;
  margin: 0;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1;
}

.page-hero p {
  max-width: 780px;
  color: rgba(245, 245, 220, 0.82);
  font-size: 18px;
}

.page-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

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

.filter-chip {
  cursor: pointer;
  color: var(--chalk-white);
  background: rgba(255, 250, 205, 0.08);
  border: 1px solid rgba(255, 250, 205, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--blackboard);
  background: var(--chalk-yellow);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(45, 74, 45, 0.78);
  border: 1px solid rgba(255, 250, 205, 0.22);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: var(--chalk-yellow);
}

.rank-number {
  color: var(--chalk-pink);
  font-family: "Patrick Hand", cursive;
  font-size: 34px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 78px;
  height: 106px;
  border-radius: 12px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  color: var(--chalk-white);
  font-size: 18px;
}

.rank-copy em {
  color: rgba(245, 245, 220, 0.68);
  font-style: normal;
}

.detail-wrap {
  padding: 44px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(245, 245, 220, 0.72);
}

.breadcrumb a:hover {
  color: var(--chalk-yellow);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
}

.detail-main,
.detail-side,
.content-card {
  background: rgba(45, 74, 45, 0.78);
  border: 2px solid rgba(255, 250, 205, 0.24);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
}

.detail-main {
  padding: 24px;
}

.detail-side,
.content-card {
  padding: 22px;
}

.detail-main h1 {
  margin: 0 0 18px;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050905;
  border: 2px solid rgba(255, 250, 205, 0.26);
  border-radius: 22px;
}

.player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #050905;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #050905;
  border: 0;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.16));
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-symbol {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 250, 205, 0.24);
}

.detail-meta span {
  color: var(--chalk-blue);
  background: rgba(173, 216, 230, 0.08);
  border: 1px solid rgba(173, 216, 230, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
}

.detail-copy h2,
.detail-side h2,
.content-card h2 {
  margin: 24px 0 12px;
  color: var(--chalk-yellow);
  font-size: 26px;
}

.detail-copy p,
.detail-side p,
.content-card p {
  color: rgba(245, 245, 220, 0.86);
}

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

.search-empty {
  padding: 42px;
  text-align: center;
  color: rgba(245, 245, 220, 0.78);
  background: rgba(45, 74, 45, 0.78);
  border: 1px solid rgba(255, 250, 205, 0.24);
  border-radius: 22px;
}

.site-footer {
  margin-top: 56px;
  background: rgba(15, 26, 15, 0.95);
  border-top: 2px solid rgba(255, 250, 205, 0.25);
}

.footer-inner {
  display: grid;
  gap: 14px;
  padding: 34px 0;
  color: rgba(245, 245, 220, 0.68);
  text-align: center;
}

.footer-logo {
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: 28px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--chalk-yellow);
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    height: 460px;
    max-width: 360px;
  }

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

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

  .header-inner {
    min-height: 68px;
  }

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 650px;
  }

  .hero-content {
    gap: 28px;
    padding: 58px 0 88px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .detail-main,
  .detail-side,
  .content-card {
    padding: 16px;
    border-radius: 20px;
  }

  .rank-item {
    grid-template-columns: 44px 68px minmax(0, 1fr);
  }

  .rank-item img {
    width: 68px;
    height: 92px;
  }
}

@media (max-width: 520px) {
  .site-logo {
    font-size: 25px;
  }

  .movie-grid,
  .category-grid,
  .region-grid,
  .year-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    text-align: center;
  }
}
