@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;
  --line: rgba(255, 250, 205, 0.28);
  --soft-line: rgba(255, 250, 205, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--chalk-white);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 250, 205, 0.08), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(173, 216, 230, 0.09), transparent 24rem),
    linear-gradient(135deg, var(--blackboard-dark), var(--blackboard));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 46, 26, 0.96);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 250, 205, 0.1);
  font-size: 14px;
}

.brand-text {
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.nav-link {
  padding: 9px 14px;
  color: rgba(245, 245, 220, 0.84);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--chalk-yellow);
  border-color: var(--line);
  background: rgba(255, 250, 205, 0.08);
}

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

.header-search input,
.wide-search input,
.page-filter {
  min-width: 0;
  color: var(--chalk-white);
  background: rgba(45, 74, 45, 0.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 190px;
  padding: 10px 12px;
}

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

.header-search input::placeholder,
.wide-search input::placeholder,
.page-filter::placeholder {
  color: rgba(245, 245, 220, 0.54);
}

.header-search button,
.wide-search button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.wide-search button:hover,
.primary-btn:hover {
  background: var(--chalk-white);
  transform: translateY(-1px);
}

.ghost-btn {
  color: var(--chalk-white);
  border: 1px solid var(--line);
  background: rgba(26, 46, 26, 0.48);
}

.ghost-btn:hover {
  color: var(--chalk-yellow);
  border-color: var(--chalk-yellow);
  transform: translateY(-1px);
}

.mobile-trigger {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 205, 0.06);
  cursor: pointer;
}

.mobile-trigger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--chalk-white);
  border-radius: 999px;
}

.hero {
  position: relative;
  height: min(72vh, 760px);
  min-height: 560px;
  overflow: hidden;
  border-bottom: 2px solid var(--soft-line);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 26, 15, 0.95) 0%, rgba(26, 46, 26, 0.78) 40%, rgba(26, 46, 26, 0.2) 100%),
    linear-gradient(0deg, rgba(15, 26, 15, 0.96) 0%, rgba(15, 26, 15, 0.2) 48%, rgba(15, 26, 15, 0.65) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 150px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--chalk-yellow);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-weight: 900;
  line-height: 1.02;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.7rem);
}

.hero-desc {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(245, 245, 220, 0.92);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.75;
}

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

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

.hero-meta a,
.hero-meta span,
.detail-meta a,
.detail-meta span,
.movie-tags a,
.movie-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 205, 0.08);
  color: var(--chalk-white);
  font-size: 0.9rem;
}

.hero-meta a,
.detail-meta a,
.movie-tags a {
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-color: var(--chalk-yellow);
  font-weight: 800;
}

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

.hero-actions a {
  min-width: 132px;
  min-height: 46px;
  padding: 12px 22px;
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid var(--chalk-yellow);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

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

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

.small-movie-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  color: var(--chalk-white);
  background: rgba(26, 46, 26, 0.76);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.small-movie-link:hover {
  border-color: var(--chalk-yellow);
  background: rgba(45, 74, 45, 0.9);
  transform: translateY(-2px);
}

.small-movie-link img {
  width: 48px;
  height: 64px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  background: var(--blackboard-dark);
}

.small-movie-link span {
  min-width: 0;
}

.small-movie-link strong,
.small-movie-link em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-movie-link strong {
  color: var(--chalk-white);
  font-size: 0.92rem;
}

.small-movie-link em {
  margin-top: 3px;
  color: rgba(245, 245, 220, 0.62);
  font-style: normal;
  font-size: 0.8rem;
}

.page-stack {
  display: grid;
  gap: 64px;
  padding: 56px 0;
}

.intro-panel,
.section-panel,
.filter-panel,
.detail-card,
.side-card,
.category-overview-card {
  border: 2px solid var(--line);
  border-radius: 24px;
  background: rgba(45, 74, 45, 0.72);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 28px;
  align-items: center;
  padding: 30px;
}

.intro-panel h2,
.section-heading h2,
.text-section h2,
.side-card h2,
.related-section h2 {
  margin: 0;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900;
}

.intro-panel p,
.section-heading p,
.page-hero p,
.text-section p,
.side-card p,
.category-overview-card p {
  color: rgba(245, 245, 220, 0.78);
  line-height: 1.8;
}

.wide-search {
  display: flex;
  gap: 10px;
}

.wide-search input {
  width: 100%;
  padding: 14px 16px;
}

.wide-search button {
  padding: 14px 22px;
}

.section-panel {
  padding: 30px;
}

.green-panel {
  border-color: rgba(144, 238, 144, 0.28);
  background: linear-gradient(135deg, rgba(45, 74, 45, 0.88), rgba(26, 46, 26, 0.76));
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-heading p {
  margin: 8px 0 0;
}

.section-more {
  flex-shrink: 0;
  color: var(--chalk-yellow);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 2px solid var(--soft-line);
  border-radius: 20px;
  background: rgba(45, 74, 45, 0.7);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: var(--chalk-yellow);
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(255, 250, 205, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--blackboard-dark);
}

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

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

.type-badge,
.play-badge {
  position: absolute;
  z-index: 2;
}

.type-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--blackboard);
  background: rgba(255, 250, 205, 0.92);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: rgba(255, 250, 205, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

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

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

.card-summary {
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: rgba(245, 245, 220, 0.72);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin-bottom: 10px;
  color: rgba(245, 245, 220, 0.66);
  font-size: 0.88rem;
}

.movie-tags a,
.movie-tags span {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 0.78rem;
}

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

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 2px solid var(--soft-line);
  border-radius: 20px;
  background: rgba(45, 74, 45, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: var(--chalk-yellow);
  background: rgba(45, 74, 45, 0.92);
  transform: translateY(-3px);
}

.category-card strong,
.category-title {
  color: var(--chalk-yellow);
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card span,
.category-overview-card p {
  color: rgba(245, 245, 220, 0.72);
  line-height: 1.7;
}

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

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.category-samples a {
  overflow: hidden;
  color: rgba(245, 245, 220, 0.78);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  color: var(--chalk-white);
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: rgba(26, 46, 26, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
  border-color: var(--chalk-yellow);
  background: rgba(26, 46, 26, 0.86);
  transform: translateX(4px);
}

.compact-ranking .ranking-row {
  grid-template-columns: 44px minmax(0, 1fr) minmax(120px, auto);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 12px;
  font-weight: 900;
}

.ranking-row strong {
  overflow: hidden;
  color: var(--chalk-white);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row em,
.ranking-meta {
  overflow: hidden;
  color: rgba(245, 245, 220, 0.62);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.large-ranking-row {
  grid-template-columns: 50px 70px minmax(0, 1fr) minmax(150px, auto);
}

.large-ranking-row img {
  width: 70px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--blackboard-dark);
}

.ranking-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

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

.small-page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.small-page-hero p:not(.eyebrow) {
  width: min(760px, 100%);
  margin: 16px 0 0;
}

.filter-panel {
  padding: 18px;
}

.page-filter {
  width: 100%;
  padding: 16px 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0 12px;
  color: rgba(245, 245, 220, 0.7);
}

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

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

.detail-main {
  display: grid;
  gap: 32px;
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin-bottom: 24px;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--blackboard);
  background: linear-gradient(180deg, rgba(15, 26, 15, 0.1), rgba(15, 26, 15, 0.58));
  border: 0;
  cursor: pointer;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  font-size: 1.8rem;
}

.player-overlay strong {
  padding: 8px 14px;
  color: var(--chalk-white);
  background: rgba(15, 26, 15, 0.68);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.player-overlay.is-hidden {
  display: none;
}

.detail-meta {
  margin: 22px 0 28px;
}

.text-section {
  display: grid;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-line);
}

.text-section + .text-section {
  margin-top: 24px;
}

.text-section h2,
.side-card h2,
.related-section h2 {
  font-size: 2rem;
}

.tag-cloud span {
  color: var(--chalk-yellow);
}

.detail-side {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 20px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: var(--blackboard-dark);
  border: 1px solid var(--line);
}

.poster-side h2 {
  margin-top: 18px;
}

.side-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.related-section {
  display: grid;
  gap: 10px;
}

.site-footer {
  border-top: 2px solid var(--line);
  background: rgba(15, 26, 15, 0.92);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0;
  color: rgba(245, 245, 220, 0.68);
  font-size: 0.94rem;
}

.footer-inner p {
  margin: 0;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

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

  .detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
    flex-wrap: wrap;
  }

  .mobile-trigger {
    display: block;
  }

  .site-nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0 0 16px;
  }

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

  .header-search {
    order: 3;
    width: 100%;
    display: none;
    padding-bottom: 16px;
  }

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

  .header-search input {
    width: 100%;
  }

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

  .hero-content {
    align-items: center;
    padding-top: 80px;
    padding-bottom: 220px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-quick-list {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .wide-search {
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .latest-list,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .large-ranking-row,
  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .large-ranking-row img,
  .ranking-meta,
  .ranking-row em {
    display: none;
  }

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

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

  .hero h1 {
    font-size: 3rem;
  }

  .hero-meta,
  .hero-actions,
  .detail-meta {
    gap: 8px;
  }

  .section-panel,
  .intro-panel,
  .detail-card {
    padding: 18px;
    border-radius: 18px;
  }

  .movie-grid {
    gap: 16px;
  }
}
