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

:root {
  --blackboard: #1a2e1a;
  --blackboard-light: #253b25;
  --blackboard-dark: #102010;
  --chalk-white: #f5f5dc;
  --chalk-yellow: #fffacd;
  --chalk-green: #90ee90;
  --chalk-blue: #add8e6;
  --chalk-pink: #ffb6c1;
  --vintage-gold: #ffd700;
  --vintage-beige: #d4c5aa;
  --card-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
  --soft-border: rgba(255, 250, 205, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 250, 205, 0.08), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(144, 238, 144, 0.07), transparent 32rem),
    var(--blackboard);
  color: var(--chalk-white);
  min-height: 100vh;
}

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

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

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(26, 46, 26, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(255, 250, 205, 0.28);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-radius: 12px;
  font-size: 16px;
  box-shadow: 0 0 0 3px rgba(255, 250, 205, 0.15);
}

.logo-text,
.font-chalk {
  font-family: "Patrick Hand", "Noto Sans SC", cursive;
}

.logo-text {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 1px;
}

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

.nav-link {
  color: rgba(245, 245, 220, 0.82);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  color: var(--chalk-white);
  background: var(--blackboard-light);
  border: 1px solid rgba(255, 250, 205, 0.3);
  border-radius: 10px;
  outline: none;
}

.header-search input {
  width: 210px;
  padding: 10px 12px;
}

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

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

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover {
  background: var(--chalk-white);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 250, 205, 0.18);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--soft-border);
  background: var(--blackboard-light);
  border-radius: 12px;
  padding: 9px;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--soft-border);
  padding: 14px 16px 18px;
  background: rgba(16, 32, 16, 0.98);
}

.mobile-nav-link {
  display: block;
  padding: 10px 0;
  color: var(--chalk-white);
  font-weight: 700;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
}

.mobile-search button {
  padding: 11px 14px;
}

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

.hero-media,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

.hero-shade {
  background:
    linear-gradient(0deg, var(--blackboard) 0%, rgba(26, 46, 26, 0.78) 42%, rgba(26, 46, 26, 0.32) 100%),
    linear-gradient(90deg, rgba(16, 32, 16, 0.88), rgba(16, 32, 16, 0.12));
}

.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(44px, 7vw, 86px);
}

.hero-content {
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--chalk-yellow);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-kicker::before,
.section-kicker::before {
  content: "★";
  color: var(--vintage-gold);
}

.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 0.96;
  color: var(--chalk-white);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

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

.hero-meta,
.movie-meta,
.detail-meta,
.breadcrumbs,
.hero-actions,
.section-head,
.rank-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.hero-meta span,
.detail-meta span {
  padding: 7px 11px;
  color: var(--chalk-white);
  background: rgba(16, 32, 16, 0.62);
  border: 1px solid var(--soft-border);
  border-radius: 10px;
}

.hero-meta .rating,
.detail-meta .rating {
  color: var(--blackboard);
  background: var(--chalk-yellow);
  border-color: var(--chalk-yellow);
  font-weight: 900;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
}

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

.main-stack {
  padding: 54px 0 20px;
}

.section {
  margin: 0 0 62px;
}

.section-surface {
  padding: clamp(22px, 3vw, 34px);
  background: rgba(37, 59, 37, 0.78);
  border: 2px solid rgba(255, 250, 205, 0.18);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}

.section-surface.green {
  background: linear-gradient(90deg, rgba(37, 59, 37, 0.92), rgba(26, 46, 26, 0.82));
  border-color: rgba(144, 238, 144, 0.26);
}

.section-surface.blue {
  border-color: rgba(173, 216, 230, 0.28);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title h1,
.section-title h2,
.page-title h1 {
  margin: 0;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Noto Sans SC", cursive;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
}

.section-title p,
.page-title p,
.category-content p,
.empty-state {
  color: rgba(245, 245, 220, 0.76);
  line-height: 1.8;
}

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

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

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(37, 59, 37, 0.9);
  border: 2px solid rgba(255, 250, 205, 0.15);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 250, 205, 0.72);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 250, 205, 0.1);
}

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

.movie-card--wide .movie-cover {
  aspect-ratio: 16 / 9;
}

.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);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 32, 16, 0.82), transparent 56%);
  opacity: 0.72;
}

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  padding: 5px 8px;
  color: var(--chalk-yellow);
  background: rgba(16, 32, 16, 0.78);
  border: 1px solid rgba(255, 250, 205, 0.22);
}

.rank-badge {
  left: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--vintage-gold);
}

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

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

.movie-info {
  padding: 16px;
}

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

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

.movie-line {
  min-height: 44px;
  margin: 0 0 12px;
  color: rgba(245, 245, 220, 0.72);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 9px;
  margin-bottom: 12px;
  color: rgba(245, 245, 220, 0.68);
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 9px;
  color: rgba(245, 245, 220, 0.38);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 4px 8px;
  color: var(--chalk-yellow);
  background: rgba(16, 32, 16, 0.75);
  border: 1px solid rgba(255, 250, 205, 0.2);
  border-radius: 8px;
  font-size: 12px;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll > * {
  scroll-snap-align: start;
}

.page-hero {
  padding: 56px 0 22px;
}

.page-title {
  max-width: 820px;
}

.breadcrumbs {
  margin-bottom: 16px;
  color: rgba(245, 245, 220, 0.68);
  font-size: 14px;
}

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

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

.category-card {
  display: block;
  overflow: hidden;
  min-height: 310px;
  background: rgba(37, 59, 37, 0.88);
  border: 2px solid rgba(255, 250, 205, 0.16);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 250, 205, 0.58);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 130px;
  overflow: hidden;
}

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

.category-content {
  padding: 22px;
}

.category-content h2 {
  margin: 0 0 10px;
  color: var(--chalk-white);
  font-size: 26px;
}

.category-content span {
  display: inline-flex;
  margin-top: 14px;
  color: var(--chalk-yellow);
  font-weight: 800;
}

.filter-panel {
  margin: 0 0 28px;
  padding: 20px;
  background: rgba(16, 32, 16, 0.55);
  border: 1px solid rgba(255, 250, 205, 0.2);
  border-radius: 18px;
}

.filter-title {
  margin-bottom: 14px;
  color: var(--chalk-yellow);
  font-weight: 900;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 6px;
  color: rgba(245, 245, 220, 0.74);
  font-size: 14px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 11px 12px;
}

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  background: rgba(37, 59, 37, 0.86);
  border: 2px solid rgba(255, 250, 205, 0.17);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}

.player-box {
  position: relative;
  background: #050705;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #050705;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 32, 16, 0.28);
  border: 0;
  cursor: pointer;
  z-index: 3;
}

.player-overlay[hidden] {
  display: none;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: rgba(255, 250, 205, 0.95);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

.player-message {
  min-height: 22px;
  padding: 14px 18px 18px;
  color: rgba(245, 245, 220, 0.78);
}

.detail-card {
  padding: 24px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--chalk-white);
  font-family: "Patrick Hand", "Noto Sans SC", cursive;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--chalk-yellow);
  font-size: 24px;
}

.detail-card p {
  color: rgba(245, 245, 220, 0.86);
  line-height: 1.9;
}

.detail-cover {
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 205, 0.18);
}

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

.side-card {
  padding: 20px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

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

.side-item strong {
  display: block;
  color: var(--chalk-white);
  margin-bottom: 4px;
}

.side-item span {
  color: rgba(245, 245, 220, 0.65);
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(16, 32, 16, 0.55);
  border: 1px solid rgba(255, 250, 205, 0.14);
  border-radius: 16px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--blackboard);
  background: var(--vintage-gold);
  border-radius: 12px;
  font-weight: 900;
}

.rank-row img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h2 {
  margin: 0 0 8px;
  color: var(--chalk-white);
  font-size: 22px;
}

.rank-row p {
  margin: 0;
  color: rgba(245, 245, 220, 0.72);
  line-height: 1.6;
}

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

.site-footer {
  margin-top: 70px;
  border-top: 2px solid rgba(255, 250, 205, 0.22);
  background: rgba(16, 32, 16, 0.92);
}

.footer-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(245, 245, 220, 0.72);
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

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

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

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

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

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

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

  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 44px 78px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

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

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

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

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

  .hero {
    min-height: 620px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions a {
    width: 100%;
  }

  .main-stack {
    padding-top: 34px;
  }

  .section {
    margin-bottom: 42px;
  }

  .section-surface {
    padding: 18px;
    border-radius: 18px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    border-radius: 14px;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-score {
    grid-column: auto;
  }
}
