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

:root {
  --blackboard: #121815;
  --blackboard-light: #1f2a24;
  --blackboard-soft: #26372f;
  --chalk-white: #f7f3df;
  --chalk-muted: rgba(247, 243, 223, 0.68);
  --chalk-yellow: #f7d65b;
  --chalk-pink: #ff8fb1;
  --chalk-green: #8ee3b3;
  --line: rgba(247, 214, 91, 0.24);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(247, 214, 91, 0.12), transparent 28%),
    radial-gradient(circle at 90% 5%, rgba(255, 143, 177, 0.10), transparent 24%),
    linear-gradient(180deg, #101612 0%, #17211c 48%, #0f1512 100%);
  color: var(--chalk-white);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

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

img {
  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: 40;
  background: rgba(18, 24, 21, 0.92);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

.nav-shell {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Patrick Hand", cursive;
  font-size: 32px;
  font-weight: 700;
  color: var(--chalk-white);
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chalk-yellow);
  color: var(--blackboard);
  box-shadow: 0 0 0 4px rgba(247, 214, 91, 0.16);
  font-size: 16px;
}

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

.nav-link {
  color: var(--chalk-muted);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.mobile-nav input,
.big-search input,
.search-page-form input,
.page-filter input {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(31, 42, 36, 0.86);
  color: var(--chalk-white);
  outline: none;
}

.nav-search input {
  width: 180px;
  padding: 10px 12px;
}

.nav-search button,
.mobile-nav button,
.big-search button,
.search-page-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--chalk-yellow);
  color: var(--blackboard);
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: var(--blackboard-light);
  color: var(--chalk-yellow);
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.mobile-nav a {
  padding: 10px 0;
  color: var(--chalk-muted);
}

.mobile-nav form {
  display: flex;
  gap: 10px;
}

.mobile-nav input {
  flex: 1;
  padding: 11px 12px;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.06);
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 24, 21, 0.96) 0%, rgba(18, 24, 21, 0.72) 48%, rgba(18, 24, 21, 0.40) 100%),
    radial-gradient(circle at 68% 32%, rgba(247, 214, 91, 0.20), transparent 22%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

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

.hero-copy h1,
.hero-copy h2,
.page-title h1,
.section-head h2,
.category-block h2,
.detail-info h1,
.text-card h2 {
  font-family: "Patrick Hand", "Microsoft YaHei", cursive;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.92;
  color: var(--chalk-white);
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-copy h2.hero-movie-title {
  margin: 18px 0 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  color: var(--chalk-yellow);
}

.hero-line {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--chalk-muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-row,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.score-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(247, 243, 223, 0.06);
  color: var(--chalk-white);
  font-size: 13px;
}

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

.btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--chalk-yellow);
  color: var(--blackboard);
  box-shadow: 0 14px 35px rgba(247, 214, 91, 0.22);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(31, 42, 36, 0.72);
  color: var(--chalk-white);
}

.btn.full {
  width: 100%;
  margin-top: 18px;
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid rgba(247, 214, 91, 0.38);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span,
.poster-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(247, 214, 91, 0.92);
  color: var(--blackboard);
  font-weight: 900;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(247, 243, 223, 0.36);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--chalk-yellow);
}

.quick-search-panel {
  position: relative;
  z-index: 8;
  margin-top: -46px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(31, 42, 36, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.big-search,
.search-page-form {
  display: flex;
  gap: 12px;
}

.big-search input,
.search-page-form input {
  flex: 1;
  min-height: 54px;
  padding: 0 18px;
  font-size: 16px;
}

.big-search button,
.search-page-form button {
  min-width: 112px;
}

.category-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.category-chips a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--chalk-muted);
  background: rgba(18, 24, 21, 0.36);
}

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

.content-section,
.page-main,
.split-section {
  padding: 64px 0;
}

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

.section-head h2,
.category-block h2,
.page-title h1,
.text-card h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.more-link {
  color: var(--chalk-yellow);
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(247, 214, 91, 0.18);
  border-radius: 18px;
  background: rgba(31, 42, 36, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(247, 214, 91, 0.78);
  box-shadow: 0 18px 55px rgba(247, 214, 91, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(18, 24, 21, 0.82) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-play {
  z-index: 3;
  width: 52px;
  height: 52px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 4;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 10px;
  background: rgba(18, 24, 21, 0.82);
  color: var(--chalk-yellow);
}

.rank-badge {
  left: 10px;
  background: var(--chalk-pink);
  color: var(--blackboard);
}

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

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.3;
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--chalk-muted);
  line-height: 1.65;
  font-size: 14px;
}

.movie-meta {
  color: rgba(247, 243, 223, 0.62);
  font-size: 13px;
  margin-bottom: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "";
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  color: var(--chalk-muted);
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.rank-panel,
.category-block,
.text-card,
.detail-info,
.player-card {
  border: 2px solid rgba(247, 214, 91, 0.22);
  border-radius: 24px;
  background: rgba(31, 42, 36, 0.74);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 22px;
  height: max-content;
  position: sticky;
  top: 94px;
}

.compact-head {
  margin-bottom: 18px;
}

.hot-row {
  display: grid;
  grid-template-columns: 38px 1fr 52px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.hot-row span {
  color: var(--chalk-pink);
  font-weight: 900;
}

.hot-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-row em {
  color: var(--chalk-yellow);
  font-style: normal;
  text-align: right;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 2px solid rgba(247, 214, 91, 0.2);
  border-radius: 22px;
  background: var(--blackboard-light);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile div {
  position: absolute;
  inset: auto 0 0;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(18, 24, 21, 0.94));
}

.category-tile strong {
  display: block;
  color: var(--chalk-yellow);
  font-size: 21px;
}

.category-tile span,
.category-tile p {
  color: var(--chalk-muted);
}

.category-tile p {
  margin: 8px 0 0;
  line-height: 1.6;
  font-size: 14px;
}

.page-title {
  max-width: 840px;
  margin-bottom: 34px;
}

.page-title p:not(.eyebrow) {
  color: var(--chalk-muted);
  font-size: 17px;
  line-height: 1.8;
}

.category-block {
  padding: 24px;
  margin-bottom: 26px;
}

.category-block-head p {
  max-width: 720px;
  color: var(--chalk-muted);
  line-height: 1.75;
}

.page-filter {
  margin-bottom: 24px;
}

.page-filter input {
  width: min(100%, 520px);
  min-height: 50px;
  padding: 0 16px;
}

.crumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: var(--chalk-muted);
}

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

.detail-hero {
  padding: 38px 0 64px;
  background:
    radial-gradient(circle at 70% 20%, rgba(247, 214, 91, 0.12), transparent 28%),
    rgba(18, 24, 21, 0.44);
  border-bottom: 2px solid var(--line);
}

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

.player-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #030504;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #030504;
  cursor: pointer;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(18, 24, 21, 0.10), rgba(18, 24, 21, 0.58));
  cursor: pointer;
}

.play-mask span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chalk-yellow);
  color: var(--blackboard);
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.play-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-info {
  padding: 18px;
}

.detail-info img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 18px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: 38px;
  line-height: 1.08;
}

.detail-info p:not(.eyebrow) {
  color: var(--chalk-muted);
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 54px 0 0;
}

.text-card {
  padding: 26px;
}

.text-card p {
  color: var(--chalk-muted);
  line-height: 2;
  font-size: 16px;
}

.search-main {
  min-height: 620px;
}

.search-page-form {
  margin-bottom: 20px;
}

.search-count {
  margin: 14px 0 20px;
  color: var(--chalk-yellow);
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  padding: 38px 0;
  border-top: 2px solid var(--line);
  background: rgba(18, 24, 21, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  align-items: center;
}

.footer-brand {
  font-size: 28px;
}

.site-footer p {
  max-width: 560px;
  color: var(--chalk-muted);
  line-height: 1.8;
}

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

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

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

.footer-note {
  color: var(--chalk-muted);
}

.is-hidden-by-filter {
  display: none;
}

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

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

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

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

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 56px 0 86px;
  }

  .hero-poster {
    width: min(260px, 78vw);
    margin: 0 auto;
  }

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

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

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

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

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

  .brand {
    font-size: 26px;
  }

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

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

  .big-search,
  .search-page-form,
  .mobile-nav form {
    flex-direction: column;
  }

  .quick-search-panel {
    margin-top: -30px;
  }

  .category-block,
  .text-card {
    padding: 18px;
  }
}
