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

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 250, 205, 0.12), transparent 28%),
    radial-gradient(circle at 85% 5%, rgba(173, 216, 230, 0.13), transparent 30%),
    linear-gradient(180deg, var(--blackboard-dark), var(--blackboard));
  color: var(--chalk-white);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
  box-shadow: 0 0 0 4px rgba(255, 250, 205, 0.12);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(245, 245, 220, 0.78);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 205, 0.08);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--chalk-white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(26, 46, 26, 0.94);
}

.hero {
  min-height: 70vh;
  position: relative;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay,
.detail-hero::after,
.sub-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 26, 15, 0.15), rgba(15, 26, 15, 0.98)),
    radial-gradient(circle at 80% 20%, rgba(255, 250, 205, 0.18), transparent 30%);
  z-index: -1;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.7fr);
  align-items: end;
  gap: 40px;
  padding: 78px 0 58px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(255, 250, 205, 0.38);
  border-radius: 999px;
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.08);
  font-weight: 800;
}

.hero h1,
.sub-hero h1,
.detail-copy h1,
.section-heading h2 {
  margin: 14px 0 12px;
  font-family: "Patrick Hand", cursive, system-ui;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 0.98;
}

.hero h1 {
  font-size: clamp(46px, 8vw, 86px);
}

.hero p,
.sub-hero p,
.detail-copy p {
  max-width: 760px;
  color: rgba(245, 245, 220, 0.88);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-chip,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--blackboard-dark);
  background: var(--chalk-yellow);
  font-weight: 800;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.ghost-button {
  min-height: 48px;
  padding: 0 22px;
}

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

.ghost-button {
  color: var(--chalk-white);
  border: 1px solid var(--line);
  background: rgba(245, 245, 220, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  max-width: 560px;
  padding: 8px;
  border: 1px solid rgba(255, 250, 205, 0.3);
  border-radius: 18px;
  background: rgba(15, 26, 15, 0.6);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--chalk-white);
  background: transparent;
  padding: 0 14px;
}

.hero-search input::placeholder,
.tool-panel input::placeholder {
  color: rgba(245, 245, 220, 0.54);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  color: var(--blackboard-dark);
  background: var(--chalk-green);
  font-weight: 900;
}

.hero-panel,
.board-section,
.rank-section,
.content-card,
.player-card,
.tool-panel,
.category-card {
  border: 2px solid rgba(255, 250, 205, 0.26);
  background: rgba(45, 74, 45, 0.76);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-radius: 28px;
  padding: 22px;
  backdrop-filter: blur(14px);
}

.hero-panel-title {
  color: var(--chalk-yellow);
  font-weight: 900;
  margin-bottom: 16px;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-mini-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 250, 205, 0.28);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-mini-card:hover,
.movie-card:hover,
.category-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 250, 205, 0.62);
}

.hero-mini-card span {
  font-weight: 900;
}

.hero-mini-card small {
  color: rgba(245, 245, 220, 0.8);
}

.page-stack {
  display: grid;
  gap: 58px;
  padding: 58px 0;
}

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

.section-heading h2 {
  font-size: clamp(32px, 5vw, 52px);
}

.text-button {
  color: var(--chalk-yellow);
  padding: 9px 0;
  border-bottom: 2px solid rgba(255, 250, 205, 0.5);
}

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

.featured-grid .movie-card:first-child {
  grid-column: span 2;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 250, 205, 0.2);
  background: rgba(15, 26, 15, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  min-height: 220px;
  background-size: cover;
  background-position: center;
}

.movie-body {
  padding: 16px;
}

.movie-body.compact {
  padding: 13px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-body p {
  margin: 0 0 10px;
  color: rgba(245, 245, 220, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  color: rgba(245, 245, 220, 0.64);
  font-size: 12px;
}

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: rgba(255, 250, 205, 0.4);
}

.movie-chip {
  position: absolute;
  top: 12px;
  z-index: 2;
}

.year-chip {
  left: 12px;
}

.type-chip {
  right: 12px;
  background: var(--chalk-blue);
}

.rank-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--blackboard-dark);
  background: var(--chalk-pink);
  font-weight: 900;
  z-index: 2;
}

.board-section,
.rank-section {
  padding: 30px;
  border-radius: 30px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover {
  min-height: 230px;
  background-size: cover;
  background-position: center;
}

.category-body {
  padding: 22px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

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

.category-samples {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.category-samples a {
  color: rgba(255, 250, 205, 0.9);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 250, 205, 0.18);
  border-radius: 18px;
  background: rgba(15, 26, 15, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-thumb {
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
}

.rank-content strong,
.rank-content small {
  display: block;
}

.rank-content small {
  color: rgba(245, 245, 220, 0.72);
}

.sub-page {
  min-height: 70vh;
}

.sub-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 74px 0 62px;
  background:
    linear-gradient(135deg, rgba(45, 74, 45, 0.95), rgba(15, 26, 15, 0.92)),
    radial-gradient(circle at 70% 20%, rgba(255, 250, 205, 0.18), transparent 28%);
}

.sub-hero h1,
.detail-copy h1 {
  font-size: clamp(40px, 7vw, 76px);
}

.tool-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
}

.tool-panel label {
  display: grid;
  gap: 7px;
  color: rgba(245, 245, 220, 0.76);
  font-weight: 800;
}

.tool-panel input,
.tool-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 250, 205, 0.25);
  border-radius: 14px;
  color: var(--chalk-white);
  background: rgba(15, 26, 15, 0.72);
  outline: 0;
  padding: 0 13px;
}

.searchable-card.is-hidden {
  display: none;
}

.detail-hero {
  position: relative;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  padding: 68px 0;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  min-height: 390px;
  border-radius: 28px;
  border: 2px solid rgba(255, 250, 205, 0.26);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

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

.detail-copy p {
  font-size: 18px;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag-cloud span {
  color: var(--chalk-yellow);
  background: rgba(255, 250, 205, 0.1);
  border: 1px solid rgba(255, 250, 205, 0.24);
}

.detail-layout {
  display: grid;
  gap: 28px;
  padding: 52px 0;
}

.player-card,
.content-card {
  border-radius: 28px;
  padding: 22px;
}

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

.video-shell video,
.player-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-shell video {
  object-fit: contain;
  background: #000;
}

.player-overlay {
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  cursor: pointer;
  color: var(--blackboard-dark);
  background-size: cover;
  background-position: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 3;
}

.player-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 15, 0.48);
}

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

.play-icon,
.play-text {
  position: relative;
  z-index: 1;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chalk-yellow);
  box-shadow: 0 0 0 10px rgba(255, 250, 205, 0.18);
  font-size: 30px;
}

.play-text {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--chalk-yellow);
  font-weight: 900;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--chalk-yellow);
  font-size: 26px;
}

.content-card p {
  margin: 0 0 12px;
  color: rgba(245, 245, 220, 0.9);
}

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

.next-links a {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 250, 205, 0.22);
  background: rgba(15, 26, 15, 0.55);
  color: var(--chalk-yellow);
  font-weight: 900;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  gap: 12px;
}

.footer-inner p {
  margin: 0;
  color: rgba(245, 245, 220, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--chalk-yellow);
}

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

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

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

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

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

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

  .hero-inner {
    padding: 56px 0 40px;
  }

  .hero h1,
  .sub-hero h1,
  .detail-copy h1 {
    font-size: 42px;
  }

  .hero-mini-grid,
  .rank-list,
  .next-links,
  .tool-panel,
  .detail-hero-inner,
  .category-card {
    grid-template-columns: 1fr;
  }

  .hero-search {
    display: grid;
    gap: 8px;
  }

  .hero-search input {
    min-height: 42px;
  }

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

  .featured-grid .movie-card:first-child {
    grid-column: span 2;
  }

  .movie-poster {
    min-height: 190px;
  }

  .board-section,
  .rank-section,
  .player-card,
  .content-card {
    padding: 16px;
    border-radius: 22px;
  }

  .detail-cover {
    min-height: 340px;
  }
}

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

  .site-logo {
    font-size: 21px;
  }

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

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

  .featured-grid .movie-card:first-child {
    grid-column: auto;
  }
}
