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

:root {
  --blackboard: #1a2e1a;
  --blackboard-dark: #0f1a0f;
  --blackboard-light: #2d4a2d;
  --blackboard-soft: #385a38;
  --chalk-white: #f5f5dc;
  --chalk-yellow: #fffacd;
  --chalk-blue: #add8e6;
  --chalk-green: #90ee90;
  --chalk-pink: #ffb6c1;
  --vintage-gold: #ffd700;
  --vintage-beige: #d4c5aa;
  --line-yellow: rgba(255, 250, 205, 0.3);
  --line-blue: rgba(173, 216, 230, 0.3);
  --line-green: rgba(144, 238, 144, 0.3);
  --shadow-chalk: 0 2px 4px rgba(245, 245, 220, 0.3);
  --shadow-card: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 250, 205, 0.08), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(173, 216, 230, 0.07), transparent 30%),
    var(--blackboard);
  color: var(--chalk-white);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
}

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

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

img.is-blank {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 46, 26, 0.96);
  border-bottom: 2px solid var(--line-yellow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

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

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

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 10px;
  box-shadow: var(--shadow-chalk);
  transform: rotate(-8deg);
}

.brand-text {
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.03em;
}

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

.nav-link {
  position: relative;
  font-weight: 700;
  color: rgba(245, 245, 220, 0.86);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: var(--chalk-yellow);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select,
.inline-filter input,
.inline-filter select {
  color: var(--chalk-white);
  background: var(--blackboard-light);
  border: 1px solid var(--line-yellow);
  border-radius: 12px;
  outline: none;
  min-height: 42px;
  padding: 0 14px;
}

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

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.search-panel button,
.player-button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  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-btn,
.search-panel button,
.player-button {
  color: var(--blackboard);
  background: var(--chalk-yellow);
}

.header-search button {
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
}

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

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--chalk-white);
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  cursor: pointer;
}

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

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

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

.mobile-search input {
  flex: 1;
}

.mobile-search button {
  padding: 0 18px;
}

.main-section {
  padding: 56px 0 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(620px, 72vh, 780px);
  border-bottom: 2px solid var(--line-yellow);
  background:
    linear-gradient(130deg, rgba(15, 26, 15, 0.96), rgba(26, 46, 26, 0.86)),
    var(--blackboard-dark);
}

.hero-slider {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: clamp(620px, 72vh, 780px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.78fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 70px 0 120px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.08);
  border: 1px solid var(--line-yellow);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 18px 0 18px;
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.hero p {
  width: min(680px, 100%);
  color: rgba(245, 245, 220, 0.84);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.secondary-btn {
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.08);
  border: 1px solid var(--line-yellow);
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.08);
  border: 1px solid rgba(255, 250, 205, 0.2);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-art {
  position: relative;
  min-height: 470px;
}

.hero-poster {
  position: absolute;
  inset: 12px 0 36px 40px;
  overflow: hidden;
  border-radius: 30px;
  border: 2px solid var(--line-yellow);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 250, 205, 0.16), transparent 35%),
    var(--blackboard-light);
  box-shadow: var(--shadow-card);
  transform: rotate(2.5deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 26, 15, 0.88), transparent 58%);
}

.hero-mini {
  position: absolute;
  left: 0;
  bottom: 40px;
  z-index: 3;
  width: min(330px, 82%);
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 26, 15, 0.88);
  border: 1px solid var(--line-yellow);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.hero-mini strong {
  display: block;
  color: var(--chalk-yellow);
  margin-bottom: 6px;
}

.hero-mini span {
  color: rgba(245, 245, 220, 0.74);
  font-size: 0.92rem;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  z-index: 5;
}

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

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

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

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

.hero-arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.08);
  border: 1px solid var(--line-yellow);
  cursor: pointer;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 8px 0 0;
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
}

.section-head p,
.page-hero p,
.category-intro,
.detail-title p {
  color: rgba(245, 245, 220, 0.76);
}

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

.movie-card {
  overflow: hidden;
  border: 2px solid rgba(255, 250, 205, 0.2);
  border-radius: 18px;
  background: rgba(45, 74, 45, 0.78);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--chalk-yellow);
  box-shadow: var(--shadow-chalk), var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 250, 205, 0.13), transparent 42%),
    linear-gradient(145deg, var(--blackboard-soft), var(--blackboard-dark));
}

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 26, 15, 0.85), transparent 54%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

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

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

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--chalk-yellow);
  background: rgba(15, 26, 15, 0.84);
  border: 1px solid var(--line-yellow);
  font-weight: 900;
}

.movie-info {
  padding: 15px;
}

.movie-title {
  display: block;
  min-height: 28px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--chalk-white);
  font-size: 1.05rem;
  font-weight: 900;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--chalk-yellow);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(245, 245, 220, 0.64);
  font-size: 0.82rem;
  margin: 8px 0;
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 12px;
  color: rgba(245, 245, 220, 0.76);
  font-size: 0.92rem;
}

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

.category-card,
.rank-row,
.info-panel,
.search-panel,
.page-hero,
.detail-panel,
.player-shell {
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(45, 74, 45, 0.72);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
}

.category-card {
  min-height: 190px;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--chalk-yellow);
}

.category-card strong {
  display: block;
  color: var(--chalk-yellow);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 12px;
}

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

.page-hero {
  margin-top: 34px;
  padding: clamp(28px, 5vw, 50px);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 250, 205, 0.09), transparent 32%),
    rgba(45, 74, 45, 0.74);
}

.inline-filter,
.search-panel {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.inline-filter {
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  padding: 18px;
  border: 1px solid var(--line-yellow);
  border-radius: var(--radius-md);
  background: rgba(15, 26, 15, 0.35);
}

.search-panel {
  grid-template-columns: minmax(230px, 1fr) 170px 170px 150px;
  padding: 20px;
}

.search-panel button {
  min-height: 42px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 16px;
  font-size: 1.35rem;
  font-weight: 900;
}

.rank-cover {
  width: 96px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--blackboard-soft);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 8px;
  color: var(--chalk-white);
}

.rank-row p {
  margin: 0;
  color: rgba(245, 245, 220, 0.76);
}

.rank-score {
  color: var(--chalk-yellow);
  font-size: 1.25rem;
  font-weight: 900;
  text-align: right;
}

.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(245, 245, 220, 0.68);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.detail-title {
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 250, 205, 0.08), transparent 35%),
    rgba(45, 74, 45, 0.72);
  border: 2px solid rgba(255, 250, 205, 0.22);
}

.detail-title h1 {
  margin-top: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  display: inline-flex;
  color: var(--chalk-blue);
  background: rgba(173, 216, 230, 0.08);
  border: 1px solid var(--line-blue);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  border: 2px solid var(--line-yellow);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 250, 205, 0.13), transparent 42%),
    var(--blackboard-light);
  box-shadow: var(--shadow-card);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  margin: 30px 0;
  background: #000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.15));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-shell.playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  font-size: 1.04rem;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.detail-panel,
.info-panel {
  padding: 24px;
}

.detail-panel h2,
.info-panel h2 {
  color: var(--chalk-yellow);
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.detail-panel p,
.info-panel p,
.info-panel li {
  color: rgba(245, 245, 220, 0.82);
}

.info-panel ul {
  padding-left: 18px;
}

.related-section {
  margin-top: 42px;
}

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

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

.footer-brand {
  color: var(--chalk-white);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: 2rem;
  font-weight: 900;
}

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

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

.empty-results {
  display: none;
  padding: 28px;
  border: 1px solid var(--line-yellow);
  border-radius: var(--radius-md);
  color: rgba(245, 245, 220, 0.78);
  background: rgba(15, 26, 15, 0.34);
}

.empty-results.show {
  display: block;
}

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

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

  .hero-copy {
    padding-bottom: 20px;
  }

  .hero-art {
    min-height: 420px;
    margin-bottom: 90px;
  }

  .detail-cover {
    width: min(330px, 100%);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .hero-slide {
    display: block;
  }

  .hero-copy {
    padding: 42px 0 12px;
  }

  .hero-poster {
    inset: 20px 0 40px;
  }

  .hero-mini {
    left: 14px;
  }

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

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

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

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .rank-cover {
    width: 78px;
  }

  .rank-score {
    grid-column: 2 / 4;
    text-align: left;
  }
}

@media (max-width: 540px) {
  .header-inner,
  .footer-inner,
  .container,
  .detail-wrap,
  .hero-slider,
  .mobile-nav {
    width: min(100% - 22px, 1200px);
  }

  .brand-text {
    font-size: 1.5rem;
  }

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

  .hero h1,
  .hero h2 {
    font-size: clamp(2.7rem, 18vw, 4.4rem);
  }

  .hero-art {
    min-height: 360px;
  }

  .movie-info p {
    min-height: auto;
  }
}
