:root {
  --blackboard: #1a2e1a;
  --blackboard-dark: #0f1a0f;
  --blackboard-light: #2d4a2d;
  --chalk-white: #f5f5dc;
  --chalk-yellow: #fffacd;
  --chalk-green: #90ee90;
  --chalk-blue: #add8e6;
  --chalk-pink: #ffb6c1;
  --vintage-gold: #ffd700;
  --line: rgba(255, 250, 205, 0.28);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  color: var(--chalk-white);
  background:
    radial-gradient(circle at top left, rgba(255, 250, 205, 0.12), transparent 34rem),
    linear-gradient(180deg, var(--blackboard-dark), var(--blackboard));
  font-family: "Patrick Hand", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 46, 26, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 800;
  color: var(--chalk-white);
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--chalk-yellow);
  color: var(--blackboard-dark);
  box-shadow: 0 0 0 6px rgba(255, 250, 205, 0.08);
  font-size: 18px;
}

.logo-text {
  letter-spacing: 0.04em;
}

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

.nav-link {
  font-size: 18px;
  color: rgba(245, 245, 220, 0.86);
  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,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.local-search,
.type-filter {
  border: 1px solid var(--line);
  color: var(--chalk-white);
  background: rgba(15, 26, 15, 0.78);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.search-page-form button,
.primary-button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--chalk-yellow);
  background: transparent;
  font-size: 30px;
  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.open {
  display: grid;
  gap: 14px;
}

.mobile-nav-link {
  padding: 8px 0;
  color: var(--chalk-white);
  font-size: 20px;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.04);
}

.hero-gradient {
  background:
    linear-gradient(90deg, rgba(15, 26, 15, 0.96) 0%, rgba(26, 46, 26, 0.68) 42%, rgba(26, 46, 26, 0.22) 100%),
    linear-gradient(0deg, var(--blackboard) 0%, rgba(26, 46, 26, 0.12) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 72px;
  max-width: 1180px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--chalk-yellow);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  width: min(620px, 100%);
  margin: 0 0 24px;
  font-size: 22px;
  color: rgba(245, 245, 220, 0.9);
  line-height: 1.65;
}

.hero-meta,
.card-meta,
.detail-meta-grid,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.tag,
.card-meta span,
.detail-meta-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 26, 15, 0.72);
  border: 1px solid var(--line);
  color: var(--chalk-yellow);
  font-size: 14px;
}

.primary-button {
  display: inline-flex;
  margin-top: 24px;
  padding: 14px 28px;
  font-size: 20px;
}

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

.home-stack {
  display: grid;
  gap: 64px;
}

.content-section,
.page-title-panel,
.filter-panel,
.search-box-panel,
.text-panel,
.watch-section {
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 24px;
  background: rgba(45, 74, 45, 0.58);
  box-shadow: var(--shadow);
}

.content-section {
  padding: 28px;
}

.highlight-panel {
  border-color: rgba(255, 250, 205, 0.32);
  background: linear-gradient(135deg, rgba(45, 74, 45, 0.76), rgba(15, 26, 15, 0.7));
}

.green-panel {
  border-color: rgba(144, 238, 144, 0.32);
  background: linear-gradient(135deg, rgba(45, 74, 45, 0.72), rgba(15, 26, 15, 0.82));
}

.ranking-panel {
  border-color: rgba(255, 182, 193, 0.32);
}

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

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading h2,
.page-title-panel h1,
.detail-info h1,
.text-panel h2 {
  margin: 0;
  color: var(--chalk-white);
  letter-spacing: 0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--chalk-yellow);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(255, 250, 205, 0.06);
}

.card-link {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--blackboard-dark);
}

.movie-card.large .card-cover {
  aspect-ratio: 16 / 10;
}

.movie-card.small .card-cover {
  aspect-ratio: 3 / 4;
}

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 26, 15, 0.86);
  color: var(--chalk-yellow);
  border: 1px solid rgba(255, 250, 205, 0.36);
  font-weight: 800;
  font-size: 13px;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--chalk-yellow);
  color: var(--blackboard-dark);
}

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

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

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0 0 8px;
  color: var(--chalk-white);
  font-size: 21px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-content p {
  height: 44px;
  margin: 0 0 14px;
  color: rgba(245, 245, 220, 0.68);
  line-height: 1.55;
  overflow: hidden;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  background: var(--blackboard-dark);
  border: 2px solid rgba(255, 250, 205, 0.2);
}

.category-tile.large {
  min-height: 240px;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 26, 15, 0.94), rgba(15, 26, 15, 0.2));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  color: var(--chalk-yellow);
  font-size: 28px;
  font-weight: 800;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(245, 245, 220, 0.82);
  line-height: 1.6;
}

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

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

.latest-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 26, 15, 0.64);
  border: 1px solid rgba(255, 250, 205, 0.14);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.latest-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--chalk-yellow);
  color: var(--blackboard-dark);
  font-weight: 800;
}

.latest-title {
  font-size: 20px;
  font-weight: 800;
}

.latest-meta {
  color: rgba(245, 245, 220, 0.68);
}

.page-title-panel,
.filter-panel,
.search-box-panel,
.watch-section {
  padding: 28px;
  margin-bottom: 28px;
}

.page-title-panel h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.page-title-panel p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(245, 245, 220, 0.78);
  font-size: 19px;
  line-height: 1.7;
}

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

.filter-panel .local-search {
  flex: 1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(245, 245, 220, 0.68);
}

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

.detail-hero-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: stretch;
  margin-bottom: 30px;
}

.detail-poster,
.detail-info {
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(45, 74, 45, 0.58);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
}

.detail-info {
  padding: 34px;
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
}

.detail-one-line {
  margin: 18px 0 22px;
  color: rgba(245, 245, 220, 0.86);
  font-size: 22px;
  line-height: 1.7;
}

.detail-meta-grid {
  margin-bottom: 22px;
}

.tag-row {
  margin-top: 8px;
}

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

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

.site-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  border: 0;
  color: var(--chalk-white);
  background: radial-gradient(circle, rgba(15, 26, 15, 0.4), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
  font-size: 34px;
  box-shadow: 0 0 0 12px rgba(255, 250, 205, 0.08);
}

.play-overlay strong {
  font-size: 24px;
}

.watch-player.is-playing .play-overlay {
  display: none;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  color: var(--chalk-yellow);
  font-size: 30px;
  margin-bottom: 14px;
}

.text-panel p {
  margin: 0;
  color: rgba(245, 245, 220, 0.84);
  line-height: 1.86;
  font-size: 18px;
}

.search-box-panel {
  display: grid;
  gap: 12px;
}

.search-page-form input {
  flex: 1;
  min-height: 50px;
  font-size: 18px;
}

.hidden-by-filter {
  display: none !important;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 620px;
  color: rgba(245, 245, 220, 0.7);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  color: var(--chalk-yellow);
}

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

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

@media (max-width: 820px) {
  .header-inner {
    height: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

  .hero-section {
    min-height: 78vh;
  }

  .hero-content {
    padding-bottom: 44px;
  }

  .hero-content p {
    font-size: 19px;
  }

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

  .content-section,
  .page-title-panel,
  .filter-panel,
  .search-box-panel,
  .text-panel,
  .watch-section {
    border-radius: 18px;
    padding: 18px;
  }

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

  .detail-poster img {
    max-height: 560px;
    min-height: auto;
  }

  .filter-panel,
  .footer-inner,
  .latest-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .latest-meta {
    font-size: 14px;
  }
}

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

  .movie-grid,
  .full-grid,
  .related-grid,
  .category-grid,
  .category-grid.overview {
    grid-template-columns: 1fr;
  }

  .movie-card.large .card-cover,
  .card-cover {
    aspect-ratio: 16 / 11;
  }

  .detail-info h1,
  .hero-content h1 {
    font-size: 42px;
  }

  .search-page-form {
    display: grid;
  }
}
