@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-blue: #add8e6;
  --chalk-green: #90ee90;
  --chalk-pink: #ffb6c1;
  --vintage-gold: #ffd700;
  --vintage-beige: #d4c5aa;
  --soft-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --chalk-shadow: 0 2px 12px rgba(245, 245, 220, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--blackboard);
  color: var(--chalk-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

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

.logo-text,
.font-chalk {
  font-family: "Patrick Hand", cursive, system-ui;
}

.logo-text {
  color: var(--chalk-white);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: 0.03em;
}

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

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

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

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

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(255, 250, 205, 0.32);
  background: rgba(45, 74, 45, 0.92);
  color: var(--chalk-white);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input::placeholder,
.mobile-search input::placeholder,
.filter-input::placeholder {
  color: rgba(245, 245, 220, 0.55);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.player-button {
  border: 0;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.player-button:hover {
  background: var(--chalk-white);
  transform: translateY(-1px);
  box-shadow: var(--chalk-shadow);
}

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

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

.menu-toggle {
  display: none;
  color: var(--chalk-white);
  background: transparent;
  border: 0;
  font-size: 26px;
}

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

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

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 46, 26, 0.98), rgba(26, 46, 26, 0.74), rgba(26, 46, 26, 0.25));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(44px, 8vw, 88px);
}

.hero-copy {
  width: min(700px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--chalk-yellow);
  font-size: 18px;
  font-weight: 900;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 0 0 18px;
  color: var(--chalk-white);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.48);
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(245, 245, 220, 0.92);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.meta-line,
.detail-meta,
.breadcrumb,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 26px;
}

.hero-meta span,
.tag-list span,
.detail-meta span,
.meta-line span {
  color: rgba(245, 245, 220, 0.8);
}

.hero-score,
.score-badge {
  color: var(--blackboard) !important;
  background: var(--chalk-yellow);
  font-weight: 900;
}

.hero-score {
  padding: 5px 12px;
  border-radius: 8px;
}

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

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

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 245, 220, 0.35);
  padding: 0;
}

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

.main-space {
  padding: 52px 0 70px;
}

.section-block {
  margin-bottom: 64px;
}

.panel-block {
  padding: clamp(22px, 4vw, 34px);
  background: rgba(45, 74, 45, 0.82);
  border: 2px solid rgba(255, 250, 205, 0.24);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--chalk-white);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.section-title .icon {
  color: var(--chalk-yellow);
}

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

.section-link:hover {
  color: var(--chalk-white);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(45, 74, 45, 0.94);
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  height: 285px;
  overflow: hidden;
  background: var(--blackboard-dark);
}

.movie-card.large .movie-cover {
  height: 360px;
}

.movie-card.small .movie-cover {
  height: 190px;
}

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

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

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 26, 15, 0.94), rgba(15, 26, 15, 0.05));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
  opacity: 1;
}

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

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

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--chalk-white);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: rgba(245, 245, 220, 0.72);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  gap: 8px;
  font-size: 13px;
}

.meta-line span:first-child {
  color: var(--chalk-yellow);
  border: 1px solid rgba(255, 250, 205, 0.3);
  background: rgba(15, 26, 15, 0.62);
  border-radius: 8px;
  padding: 3px 7px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip {
  display: inline-flex;
  padding: 10px 16px;
  color: var(--chalk-white);
  background: rgba(15, 26, 15, 0.48);
  border: 1px solid rgba(173, 216, 230, 0.3);
  border-radius: 999px;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover,
.category-chip.is-active {
  color: var(--blackboard);
  background: var(--chalk-blue);
  border-color: var(--chalk-blue);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  color: rgba(245, 245, 220, 0.88);
  background: rgba(15, 26, 15, 0.42);
  border: 1px solid rgba(255, 250, 205, 0.18);
  border-radius: 14px;
}

.rank-row:hover {
  color: var(--chalk-yellow);
  border-color: rgba(255, 250, 205, 0.42);
}

.rank-no,
.rank-dot {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-green);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--chalk-yellow);
  font-weight: 900;
}

.page-hero {
  padding: 56px 0 22px;
  background: radial-gradient(circle at top left, rgba(255, 250, 205, 0.14), transparent 34%), var(--blackboard);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 58px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(245, 245, 220, 0.78);
  font-size: 18px;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(45, 74, 45, 0.96), rgba(15, 26, 15, 0.74));
  border: 2px solid rgba(173, 216, 230, 0.22);
  border-radius: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card h2 {
  margin: 0 0 12px;
  color: var(--chalk-yellow);
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: 34px;
}

.category-card p {
  flex: 1;
  margin: 0 0 18px;
  color: rgba(245, 245, 220, 0.75);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 26px;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: rgba(245, 245, 220, 0.72);
  border: 1px dashed rgba(255, 250, 205, 0.32);
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  margin-bottom: 20px;
  color: rgba(245, 245, 220, 0.62);
  font-size: 14px;
}

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

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

.player-box {
  overflow: hidden;
  background: #000;
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 0;
  overflow: hidden;
  color: var(--blackboard);
  background: #000;
  border: 0;
  z-index: 3;
}

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

.player-cover-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover-button::after {
  content: "▶";
  position: relative;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: var(--blackboard);
  background: rgba(255, 250, 205, 0.94);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.detail-main-card {
  margin-top: 22px;
  padding: clamp(20px, 3vw, 30px);
  background: rgba(45, 74, 45, 0.84);
  border: 2px solid rgba(255, 250, 205, 0.22);
  border-radius: 24px;
}

.detail-title {
  font-size: clamp(38px, 6vw, 60px);
}

.detail-meta {
  margin-bottom: 20px;
}

.detail-meta span,
.tag-list span {
  padding: 5px 10px;
  background: rgba(15, 26, 15, 0.5);
  border: 1px solid rgba(255, 250, 205, 0.22);
  border-radius: 999px;
}

.detail-content h2,
.sidebar-card h2 {
  margin: 28px 0 10px;
  color: var(--chalk-yellow);
  font-size: 24px;
}

.detail-content p {
  margin: 0 0 16px;
  color: rgba(245, 245, 220, 0.86);
  white-space: pre-line;
}

.sidebar-card {
  padding: 18px;
  background: rgba(45, 74, 45, 0.84);
  border: 1px solid rgba(255, 250, 205, 0.22);
  border-radius: 22px;
}

.sidebar-card h2 {
  margin-top: 0;
  font-family: "Patrick Hand", cursive, system-ui;
  font-size: 30px;
}

.side-movie {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 250, 205, 0.12);
}

.side-movie:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.side-movie img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
}

.side-movie h3 {
  margin: 0 0 6px;
  color: var(--chalk-white);
  font-size: 15px;
  line-height: 1.35;
}

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

.side-movie p {
  margin: 0;
  color: rgba(245, 245, 220, 0.64);
  font-size: 13px;
}

.search-results {
  min-height: 280px;
}

.site-footer {
  margin-top: 40px;
  padding: 28px 0;
  color: rgba(245, 245, 220, 0.72);
  background: var(--blackboard-dark);
  border-top: 2px solid rgba(255, 250, 205, 0.24);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 640px;
    min-height: 560px;
  }

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

  .rank-layout,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 24px, 1200px);
  }

  .logo-text {
    font-size: 24px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    text-align: center;
  }

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

  .movie-cover,
  .movie-card.large .movie-cover {
    height: 320px;
  }

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