@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-pink: #ffb6c1;
  --chalk-blue: #add8e6;
  --chalk-green: #90ee90;
  --vintage-beige: #d4c5aa;
  --vintage-gold: #ffd700;
  --ink: #071207;
  --shadow-chalk: 0 2px 4px rgba(245, 245, 220, 0.3);
  --soft-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--chalk-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 250, 205, 0.12), transparent 28rem),
    radial-gradient(circle at 80% 20%, rgba(255, 182, 193, 0.08), transparent 24rem),
    linear-gradient(135deg, var(--blackboard-dark), var(--blackboard));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(245, 245, 220, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 245, 220, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Patrick Hand", cursive, system-ui;
  color: var(--chalk-yellow);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(255, 250, 205, 0.85);
  border-radius: 14px;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  box-shadow: var(--shadow-chalk);
}

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

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

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

.header-search {
  width: min(330px, 34vw);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.search-panel input,
.filter-select {
  width: 100%;
  border: 2px solid rgba(255, 250, 205, 0.3);
  border-radius: 999px;
  color: var(--chalk-white);
  background: rgba(45, 74, 45, 0.7);
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.btn,
.player-overlay,
.filter-chip,
.nav-toggle {
  cursor: pointer;
}

.header-search button,
.btn,
.filter-chip {
  border: 2px solid rgba(255, 250, 205, 0.55);
  border-radius: 999px;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  font-weight: 800;
  padding: 10px 17px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.btn:hover,
.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-chalk);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--chalk-yellow);
}

.main-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  border: 2px solid rgba(255, 250, 205, 0.28);
  border-radius: 32px;
  background:
    linear-gradient(120deg, rgba(15, 26, 15, 0.9), rgba(45, 74, 45, 0.78)),
    radial-gradient(circle at 76% 30%, rgba(255, 182, 193, 0.18), transparent 22rem);
  box-shadow: var(--soft-shadow);
}

.hero-bg-lines {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: repeating-linear-gradient(-10deg, transparent 0 26px, rgba(245, 245, 220, 0.23) 27px 28px);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 42px;
  align-items: center;
  padding: 54px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-art {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 3px solid rgba(255, 250, 205, 0.5);
  border-radius: 28px;
  background: rgba(15, 26, 15, 0.7);
  transform: rotate(-2deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.56));
}

.hero-art img,
.poster-link img,
.detail-cover img,
.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  color: var(--chalk-pink);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-title,
.section-head h2 {
  margin: 0;
  font-family: "Patrick Hand", cursive, system-ui;
  color: var(--chalk-yellow);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.hero-copy h1 {
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.95;
  max-width: 680px;
}

.hero-line {
  max-width: 720px;
  color: rgba(245, 245, 220, 0.88);
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.mini-tags,
.detail-tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.mini-tags span,
.detail-tags span,
.meta-pills span {
  border: 1px solid rgba(255, 250, 205, 0.35);
  border-radius: 999px;
  color: var(--chalk-white);
  background: rgba(245, 245, 220, 0.08);
  padding: 5px 11px;
  font-size: 14px;
}

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

.btn-primary {
  background: var(--chalk-yellow);
  color: var(--blackboard);
}

.btn-ghost {
  color: var(--chalk-yellow);
  background: rgba(45, 74, 45, 0.38);
}

.hero-control-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 54px 24px;
}

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

.hero-dot {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 245, 220, 0.28);
}

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

.hero-quick-links {
  display: flex;
  gap: 16px;
  color: var(--chalk-blue);
  font-weight: 800;
}

.hero-thumbs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 0 54px 44px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 18px;
  background: rgba(15, 26, 15, 0.48);
  padding: 9px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  border-color: rgba(255, 250, 205, 0.68);
  transform: translateY(-2px);
}

.hero-thumb img {
  width: 46px;
  height: 62px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.hero-thumb span {
  overflow: hidden;
  color: var(--chalk-white);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  border: 2px solid rgba(255, 250, 205, 0.25);
  border-radius: 28px;
  background: rgba(45, 74, 45, 0.58);
  padding: 42px;
  box-shadow: var(--soft-shadow);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 66px);
}

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

.section-block {
  margin-top: 56px;
}

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

.section-head h2 {
  font-size: clamp(32px, 4vw, 44px);
}

.section-head p {
  max-width: 620px;
  margin: 8px 0 0;
  color: rgba(245, 245, 220, 0.72);
  line-height: 1.7;
}

.section-more {
  color: var(--chalk-blue);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 22px;
  background: rgba(15, 26, 15, 0.56);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(255, 250, 205, 0.62);
  transform: translateY(-6px);
  box-shadow: var(--soft-shadow);
}

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

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  font-weight: 900;
  box-shadow: var(--shadow-chalk);
}

.card-content {
  padding: 15px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--chalk-blue);
  font-size: 13px;
  font-weight: 800;
}

.card-content h3 {
  margin: 10px 0 8px;
  color: var(--chalk-white);
  font-size: 18px;
  line-height: 1.35;
}

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

.card-content p {
  min-height: 48px;
  margin: 0 0 12px;
  color: rgba(245, 245, 220, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 182, 193, 0.16), transparent 12rem),
    rgba(45, 74, 45, 0.58);
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  border-color: rgba(255, 250, 205, 0.7);
  transform: translateY(-5px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: var(--chalk-yellow);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: 34px;
}

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

.search-panel {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-chip {
  color: var(--chalk-white);
  background: rgba(45, 74, 45, 0.78);
}

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

.no-results {
  display: none;
  border: 2px dashed rgba(255, 250, 205, 0.35);
  border-radius: 22px;
  color: rgba(245, 245, 220, 0.74);
  padding: 28px;
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

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

.detail-cover {
  overflow: hidden;
  border: 3px solid rgba(255, 250, 205, 0.38);
  border-radius: 26px;
  background: rgba(45, 74, 45, 0.68);
  box-shadow: var(--soft-shadow);
}

.detail-cover img {
  aspect-ratio: 2 / 3;
}

.detail-info {
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: 28px;
  background: rgba(15, 26, 15, 0.48);
  padding: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--chalk-blue);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.detail-title {
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1;
}

.detail-line {
  color: rgba(245, 245, 220, 0.86);
  font-size: 20px;
  line-height: 1.8;
}

.content-card {
  border: 2px solid rgba(255, 250, 205, 0.2);
  border-radius: 26px;
  background: rgba(15, 26, 15, 0.45);
  padding: 30px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--chalk-yellow);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: 36px;
}

.content-card p {
  color: rgba(245, 245, 220, 0.78);
  line-height: 1.9;
}

.player-panel {
  margin-top: 42px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 250, 205, 0.35);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--soft-shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--blackboard);
  background: radial-gradient(circle, rgba(255, 250, 205, 0.24), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease;
}

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

.play-button-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 2px solid rgba(255, 250, 205, 0.82);
  border-radius: 999px;
  background: var(--chalk-yellow);
  padding: 16px 24px;
  font-weight: 900;
  box-shadow: var(--shadow-chalk);
}

.play-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--chalk-yellow);
  background: var(--blackboard);
}

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

.related-card {
  overflow: hidden;
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 18px;
  background: rgba(15, 26, 15, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 250, 205, 0.58);
}

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

.related-card strong {
  display: block;
  padding: 12px;
  color: var(--chalk-white);
  font-size: 14px;
  line-height: 1.45;
}

.site-footer {
  border-top: 2px solid rgba(255, 250, 205, 0.18);
  background: rgba(15, 26, 15, 0.82);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  color: rgba(245, 245, 220, 0.76);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0;
  color: var(--chalk-blue);
  font-weight: 800;
}

.copyright {
  color: rgba(245, 245, 220, 0.55);
}

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

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

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

  .hero-slide {
    grid-template-columns: 280px 1fr;
    padding: 38px;
  }

  .hero-control-bar,
  .hero-thumbs {
    padding-left: 38px;
    padding-right: 38px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
    gap: 14px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 22px;
    background: rgba(15, 26, 15, 0.96);
    padding: 12px;
  }

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

  .site-nav a {
    padding: 12px 14px;
  }

  .header-search {
    display: none;
  }

  .hero-shell {
    min-height: auto;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .hero-art {
    width: min(260px, 74vw);
    justify-self: center;
  }

  .hero-control-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 24px 22px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    padding: 0 24px 28px;
  }

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

  .detail-info {
    padding: 24px;
  }

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

@media (max-width: 560px) {
  .main-wrap {
    width: min(100% - 22px, 1180px);
    padding-top: 24px;
  }

  .logo,
  .footer-logo {
    font-size: 24px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .page-hero,
  .content-card,
  .detail-info {
    border-radius: 22px;
    padding: 22px;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .detail-layout,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .card-content p {
    min-height: auto;
  }
}
