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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.bg-blackboard {
  background-color: var(--blackboard);
}

.text-chalk-white {
  color: var(--chalk-white);
}

.font-chalk {
  font-family: "Patrick Hand", cursive, system-ui;
  letter-spacing: 0.02em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 46, 26, 0.94);
  border-bottom: 2px solid rgba(255, 250, 205, 0.28);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
  box-shadow: var(--shadow-chalk);
}

.logo-text {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--chalk-white);
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--chalk-yellow);
}

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

.search-form input {
  width: 220px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 250, 205, 0.32);
  border-radius: 12px;
  color: var(--chalk-white);
  background: rgba(45, 74, 45, 0.86);
  outline: none;
}

.search-form input::placeholder {
  color: rgba(245, 245, 220, 0.58);
}

.search-form input:focus {
  border-color: var(--chalk-yellow);
  box-shadow: 0 0 0 3px rgba(255, 250, 205, 0.12);
}

.search-form button,
.primary-btn,
.ghost-btn {
  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;
}

.search-form button,
.primary-btn {
  padding: 10px 18px;
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
}

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

.ghost-btn {
  padding: 10px 18px;
  border: 1px solid rgba(255, 250, 205, 0.42);
  color: var(--chalk-white);
  background: rgba(26, 46, 26, 0.46);
}

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

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

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(255, 250, 205, 0.22);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav nav {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--blackboard-dark);
}

.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-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 26, 15, 0.94) 0%, rgba(26, 46, 26, 0.74) 42%, rgba(26, 46, 26, 0.22) 100%),
    linear-gradient(0deg, var(--blackboard) 0%, transparent 46%);
}

.hero-content {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-block: 86px 92px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--chalk-yellow);
  font-size: 1.1rem;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.95;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(245, 245, 220, 0.9);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 250, 205, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--chalk-yellow);
  background: rgba(15, 26, 15, 0.48);
  font-size: 0.85rem;
  font-style: normal;
}

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

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(245, 245, 220, 0.42);
}

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

.page-main {
  padding-block: 40px 76px;
}

.home-search-panel,
.page-section,
.content-panel,
.player-section,
.detail-hero {
  margin-block: 46px;
}

.home-search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 3;
  padding: 28px;
  border: 2px solid rgba(255, 250, 205, 0.28);
  border-radius: 22px;
  background: rgba(45, 74, 45, 0.92);
  box-shadow: var(--shadow-deep);
}

.home-search-panel h2,
.page-heading h1 {
  margin: 0 0 10px;
  color: var(--chalk-yellow);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
}

.home-search-panel p,
.page-heading p {
  color: rgba(245, 245, 220, 0.78);
}

.big-search {
  margin-top: 20px;
  max-width: 760px;
}

.big-search input {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 14px 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title span {
  color: var(--chalk-yellow);
  font-size: 1.8rem;
}

.section-title h2 {
  margin: 0;
  color: var(--chalk-white);
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  line-height: 1;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 2px solid rgba(255, 250, 205, 0.2);
  border-radius: 18px;
  background: var(--blackboard-light);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--chalk-yellow);
  box-shadow: var(--shadow-chalk), 0 22px 44px rgba(0, 0, 0, 0.28);
}

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

.movie-card-small {
  width: 244px;
  flex: 0 0 244px;
}

.movie-card-small .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(15, 26, 15, 0.86), transparent 68%);
  transition: opacity 0.24s ease;
}

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

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: var(--blackboard-dark);
  font-size: 1.2rem;
  transition: opacity 0.24s ease;
}

.poster-play::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 250, 205, 0.9);
}

.poster-play {
  isolation: isolate;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--chalk-yellow);
  background: rgba(15, 26, 15, 0.8);
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-card-body strong {
  color: var(--chalk-white);
  font-size: 1.05rem;
  line-height: 1.25;
}

.movie-card-body em {
  min-height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: rgba(245, 245, 220, 0.66);
  font-size: 0.92rem;
  font-style: normal;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-box,
.content-panel,
.player-section {
  padding: 28px;
  border: 2px solid rgba(255, 250, 205, 0.26);
  border-radius: 24px;
  background: rgba(45, 74, 45, 0.76);
}

.green-box {
  border-color: rgba(144, 238, 144, 0.28);
  background: linear-gradient(90deg, rgba(45, 74, 45, 0.82), rgba(26, 46, 26, 0.78));
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: 18px;
  background: var(--blackboard-light);
}

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

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

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 26, 15, 0.92), rgba(26, 46, 26, 0.3));
}

.category-name,
.category-link {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-name {
  bottom: 46px;
  color: var(--chalk-yellow);
  font-size: 2rem;
  line-height: 1;
}

.category-link {
  bottom: 18px;
  color: rgba(245, 245, 220, 0.82);
  font-weight: 700;
}

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

.rank-item,
.ranking-row {
  display: grid;
  grid-template-columns: 48px 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 250, 205, 0.2);
  border-radius: 16px;
  background: rgba(45, 74, 45, 0.62);
}

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

.rank-item img,
.ranking-row img {
  width: 72px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-item strong,
.ranking-row strong {
  display: block;
  color: var(--chalk-white);
}

.rank-item em,
.ranking-row em,
.ranking-info span {
  display: block;
  color: rgba(245, 245, 220, 0.66);
  font-style: normal;
}

.page-heading {
  margin-bottom: 34px;
  padding: 34px;
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(45, 74, 45, 0.88), rgba(15, 26, 15, 0.7));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(245, 245, 220, 0.7);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: end;
  padding: 28px;
  border: 2px solid rgba(255, 250, 205, 0.25);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(45, 74, 45, 0.9), rgba(15, 26, 15, 0.72));
  box-shadow: var(--shadow-deep);
}

.detail-poster {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
  margin: 0 0 16px;
  color: var(--chalk-yellow);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
}

.lead-text {
  max-width: 760px;
  color: rgba(245, 245, 220, 0.86);
  font-size: 1.12rem;
}

.detail-tags {
  margin-block: 20px 26px;
}

.player-section h2,
.content-panel h2 {
  margin: 0 0 18px;
  color: var(--chalk-yellow);
  font-size: 2.4rem;
  line-height: 1;
}

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

.movie-player,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  background: #000;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  padding: 0;
  background: #000;
}

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

.player-cover img {
  object-fit: cover;
  opacity: 0.58;
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: var(--blackboard-dark);
  background: rgba(255, 250, 205, 0.94);
  font-size: 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.content-panel p {
  margin: 0;
  color: rgba(245, 245, 220, 0.84);
  font-size: 1.05rem;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-cloud a {
  padding: 10px 15px;
  border: 1px solid rgba(255, 250, 205, 0.3);
  border-radius: 999px;
  color: var(--chalk-yellow);
  background: rgba(45, 74, 45, 0.72);
}

.link-cloud a:hover {
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
}

.site-footer {
  border-top: 2px solid rgba(255, 250, 205, 0.28);
  background: var(--blackboard-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding-block: 42px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--chalk-yellow);
  font-size: 1.4rem;
}

.site-footer p,
.site-footer a {
  display: block;
  color: rgba(245, 245, 220, 0.7);
}

.site-footer a {
  margin-bottom: 8px;
}

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

.footer-bottom {
  padding: 16px;
  text-align: center;
  color: rgba(245, 245, 220, 0.58);
  border-top: 1px solid rgba(255, 250, 205, 0.14);
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .detail-hero {
    grid-template-columns: 220px 1fr;
  }
}

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

  .hero-carousel,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding-block: 70px 82px;
  }

  .hero-layer {
    background:
      linear-gradient(0deg, rgba(15, 26, 15, 0.96) 0%, rgba(26, 46, 26, 0.74) 58%, rgba(26, 46, 26, 0.34) 100%);
  }

  .home-search-panel,
  .feature-box,
  .content-panel,
  .player-section,
  .detail-hero,
  .page-heading {
    padding: 20px;
    border-radius: 18px;
  }

  .four-cols,
  .five-cols,
  .three-cols,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 260px;
  }

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

  .rank-item,
  .ranking-row {
    grid-template-columns: 42px 64px 1fr;
  }

  .rank-item img,
  .ranking-row img {
    width: 64px;
    height: 86px;
  }
}
