:root {
  --cream-50: #fefdfb;
  --warm-50: #faf5f0;
  --warm-100: #f5ebe0;
  --warm-200: #ead8c8;
  --warm-300: #dfc3aa;
  --warm-500: #bf7f54;
  --warm-600: #a86d44;
  --warm-700: #82533b;
  --warm-800: #6f4736;
  --warm-900: #5d3d2d;
  --tea-50: #fdf8f3;
  --tea-100: #fbeee0;
  --tea-300: #f2c19b;
  --tea-400: #e69765;
  --tea-600: #d9703c;
  --tea-700: #bb5a2d;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
  --shadow-soft-lg: 0 12px 30px -16px rgba(93, 61, 45, .45), 0 16px 50px -24px rgba(93, 61, 45, .28);
}

* {
  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;
  color: var(--warm-900);
  background: linear-gradient(180deg, var(--cream-50), var(--white));
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .03em;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tea-600), var(--warm-600));
  box-shadow: 0 12px 28px -14px var(--tea-700);
  font-size: 14px;
  padding-left: 2px;
}

.brand-text {
  color: var(--warm-800);
}

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

.nav-link {
  color: var(--warm-700);
  font-weight: 650;
  transition: color .2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--tea-600);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--warm-800);
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--warm-100);
  padding: 12px 20px 18px;
  background: #fff;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #111;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.hero-slide.active {
  display: block;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .88), rgba(0, 0, 0, .48) 45%, rgba(0, 0, 0, .08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 84px 0 76px;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tea-300);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -.04em;
}

.hero p {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(16px, 2vw, 20px);
  margin: 0 0 20px;
  max-width: 760px;
}

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

.hero-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
}

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

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: var(--tea-600);
}

.btn-primary:hover {
  background: var(--tea-700);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
}

.btn-light {
  color: var(--warm-800);
  background: #fff;
  border-color: var(--warm-100);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 26px;
  transition: background .2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, .52);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 32px;
  background: #fff;
}

.hero-search-card {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: -38px auto 0;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-soft-lg);
  border-radius: 22px;
  padding: 18px;
}

.hero-search-card form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.hero-search-card input {
  width: 100%;
  border: 1px solid var(--warm-100);
  border-radius: 999px;
  min-height: 48px;
  padding: 0 18px;
  outline: none;
  color: var(--warm-900);
  background: var(--cream-50);
}

.main-section,
.page-hero,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.main-section.alt {
  width: 100%;
  max-width: none;
  background: var(--warm-50);
}

.main-section.alt > .section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h2,
.page-hero h1,
.detail-title,
.category-card h2 {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  color: var(--warm-900);
  letter-spacing: -.025em;
}

.section-title h2 {
  font-size: clamp(28px, 4vw, 38px);
}

.section-title span {
  color: var(--tea-600);
  font-size: 24px;
}

.section-heading p,
.page-hero p,
.category-card p {
  margin: 8px 0 0;
  color: var(--warm-600);
}

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

.movie-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft-lg);
}

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--warm-100);
}

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

.movie-card:hover .movie-thumb img {
  transform: scale(1.06);
}

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .02));
  opacity: 0;
  transition: opacity .25s ease;
}

.movie-card:hover .movie-thumb::after {
  opacity: 1;
}

.movie-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--tea-600);
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  color: var(--tea-600);
  background: rgba(255, 255, 255, .92);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  font-size: 24px;
}

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

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  color: var(--warm-900);
  font-size: 18px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-body h3 a:hover {
  color: var(--tea-600);
}

.movie-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--warm-600);
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--warm-500);
  font-size: 12px;
}

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

.category-card {
  min-height: 220px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-lg);
}

.category-card h2 {
  font-size: 30px;
}

.category-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-pill-row span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--tea-700);
  background: var(--tea-100);
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  padding: 58px 0 28px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  align-items: end;
  margin: 28px 0 30px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--warm-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--warm-100);
  border-radius: 14px;
  padding: 0 12px;
  outline: none;
  color: var(--warm-900);
  background: var(--cream-50);
}

.filter-panel input:focus,
.filter-panel select:focus,
.hero-search-card input:focus {
  border-color: var(--tea-400);
  box-shadow: 0 0 0 4px rgba(217, 112, 60, .12);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 76px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-row img {
  width: 76px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--warm-100);
}

.rank-num {
  color: var(--tea-600);
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 900;
  font-size: 24px;
  text-align: center;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-year {
  color: var(--warm-500);
  font-size: 13px;
}

.detail-wrap {
  padding: 34px 0 76px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--warm-600);
  margin-bottom: 24px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--tea-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr);
  gap: 28px;
}

.detail-main,
.detail-side {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.player-box {
  position: relative;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, .45);
}

.player-cover span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: var(--tea-600);
  background: rgba(255, 255, 255, .92);
  font-size: 38px;
  box-shadow: 0 22px 45px rgba(0, 0, 0, .28);
}

.player-message {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, .78);
  font-weight: 800;
}

.player-message.show {
  display: flex;
}

.detail-content {
  padding: 28px;
}

.detail-title {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 16px;
}

.meta-row {
  gap: 14px;
  color: var(--warm-600);
  margin-bottom: 18px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-content h2,
.detail-side h2,
.related-section h2 {
  margin: 26px 0 10px;
  color: var(--warm-900);
  font-size: 22px;
}

.detail-content p {
  color: var(--warm-700);
  margin: 0 0 14px;
}

.detail-side {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.detail-poster {
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--warm-100);
  margin-bottom: 18px;
}

.info-list {
  display: grid;
  gap: 13px;
  margin: 0;
}

.info-list div {
  display: grid;
  gap: 2px;
}

.info-list dt {
  color: var(--warm-500);
  font-size: 13px;
}

.info-list dd {
  margin: 0;
  color: var(--warm-900);
  font-weight: 800;
}

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

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

.no-result {
  display: none;
  padding: 28px;
  border-radius: 18px;
  color: var(--warm-600);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.no-result.show {
  display: block;
}

.site-footer {
  background: var(--warm-900);
  color: var(--warm-100);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
  color: var(--warm-200);
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.site-footer a:hover {
  color: var(--tea-400);
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: var(--warm-300);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero-control {
    display: none;
  }

  .hero-search-card form,
  .filter-panel,
  .rank-layout,
  .detail-layout,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 680px) {
  .header-inner,
  .main-section,
  .page-hero,
  .detail-wrap,
  .main-section.alt > .section-inner,
  .hero-content,
  .hero-search-card,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    padding-bottom: 96px;
  }

  .hero-search-card {
    margin-top: -56px;
  }

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

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

  .movie-body {
    padding: 12px;
  }

  .movie-body h3 {
    font-size: 15px;
  }

  .movie-body p {
    font-size: 13px;
  }

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

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

  .rank-year {
    display: none;
  }

  .detail-content,
  .detail-side {
    padding: 18px;
  }
}
