:root {
  --primary-50: #fdf8f3;
  --primary-100: #faeee0;
  --primary-400: #e1a06a;
  --primary-600: #cb6f3f;
  --primary-700: #a95636;
  --primary-900: #6e3b2c;
  --secondary-50: #f5f5f4;
  --secondary-100: #e7e5e4;
  --secondary-200: #d1ccc9;
  --secondary-300: #b1aaa6;
  --secondary-500: #7c746e;
  --secondary-700: #59534f;
  --secondary-800: #4d4845;
  --secondary-900: #433f3d;
  --secondary-950: #2a2725;
  --white: #ffffff;
  --black: #0f0d0c;
  --shadow-soft: 0 16px 45px rgba(42, 39, 37, 0.12);
  --shadow-card: 0 10px 30px rgba(42, 39, 37, 0.14);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--secondary-900);
  background: linear-gradient(180deg, var(--primary-50), #ffffff 360px, var(--secondary-50));
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(42, 39, 37, 0.96);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 8px 22px rgba(203, 111, 63, 0.36);
  font-size: 14px;
}

.brand-text {
  white-space: nowrap;
  font-size: 18px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--secondary-200);
  font-size: 15px;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary-400);
}

.nav-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: min(320px, 32vw);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 16px;
  color: var(--white);
  background: transparent;
}

.nav-search input::placeholder {
  color: var(--secondary-300);
}

.nav-search button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  cursor: pointer;
  background: var(--primary-600);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--white);
}

.hero {
  position: relative;
  min-height: 68vh;
  color: var(--white);
  background: var(--secondary-900);
  overflow: hidden;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.05) contrast(1.03);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(203, 111, 63, 0.40), transparent 35%),
    linear-gradient(90deg, rgba(42, 39, 37, 0.95), rgba(67, 63, 61, 0.72) 48%, rgba(42, 39, 37, 0.35)),
    linear-gradient(0deg, rgba(42, 39, 37, 0.85), transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  min-height: 68vh;
  padding: 72px 0 64px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 18px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(203, 111, 63, 0.30);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 20px;
  color: var(--secondary-200);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  color: var(--secondary-100);
}

.hero-meta span,
.meta-chip,
.category-pill,
.tag-row span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions,
.section-heading,
.filter-bar,
.card-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 12px 28px rgba(203, 111, 63, 0.34);
}

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

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.page-hero,
.section-block {
  padding: 44px 0;
}

.page-title-box {
  border-radius: var(--radius-lg);
  padding: 34px;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(225, 160, 106, 0.42), transparent 32%),
    linear-gradient(135deg, var(--secondary-950), var(--secondary-800));
  box-shadow: var(--shadow-soft);
}

.page-title-box h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.page-title-box p,
.section-heading p {
  margin: 8px 0 0;
  color: var(--secondary-200);
}

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

.section-heading p {
  color: var(--secondary-600);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(42, 39, 37, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: var(--secondary-200);
  overflow: hidden;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.05);
}

.play-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.68);
  font-size: 13px;
  font-weight: 700;
}

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

.card-meta-row {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--secondary-500);
  font-size: 13px;
}

.category-pill {
  color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--secondary-900);
  font-size: 18px;
  line-height: 1.28;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover,
.related-card h3 a:hover {
  color: var(--primary-600);
}

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

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

.tag-row span {
  color: var(--secondary-700);
  background: var(--secondary-100);
  font-size: 12px;
}

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

.category-card {
  display: block;
  min-height: 150px;
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--white);
  background:
    radial-gradient(circle at top right, rgba(225, 160, 106, 0.38), transparent 38%),
    linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(42, 39, 37, 0.20);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--secondary-200);
}

.category-card strong {
  color: var(--primary-400);
}

.filter-panel {
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-bar {
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  background: var(--white);
}

.filter-bar input {
  min-width: min(100%, 320px);
  flex: 1;
}

.filter-count {
  color: var(--secondary-600);
  font-weight: 700;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 48px 96px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--secondary-200);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-item h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0;
  color: var(--secondary-600);
}

.rank-desc {
  margin-top: 4px !important;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--secondary-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-700);
}

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

.detail-main,
.detail-side,
.search-panel {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: var(--black);
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
  cursor: pointer;
  z-index: 2;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  padding-left: 5px;
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 14px 36px rgba(203, 111, 63, 0.38);
  font-size: 34px;
}

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

.detail-content {
  padding: 28px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--secondary-200);
  box-shadow: var(--shadow-card);
}

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

.detail-content h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--secondary-700);
  background: var(--secondary-100);
  font-weight: 700;
  font-size: 13px;
}

.lead-text {
  color: var(--primary-900);
  font-weight: 700;
  font-size: 18px;
}

.content-section {
  margin-top: 28px;
}

.content-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-section p {
  margin: 0;
  color: var(--secondary-700);
}

.detail-side {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card img {
  width: 90px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  background: var(--secondary-200);
}

.related-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.25;
}

.related-card p {
  margin: 0;
  color: var(--secondary-500);
  font-size: 13px;
}

.search-panel {
  padding: 24px;
}

.search-form-large {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-form-large input {
  flex: 1;
  min-height: 52px;
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
}

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

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

.archive-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.archive-item img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--secondary-200);
}

.archive-item h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.archive-item p {
  margin: 0;
  color: var(--secondary-600);
  font-size: 13px;
}

.site-footer {
  margin-top: 56px;
  padding: 44px 0 0;
  color: var(--secondary-200);
  background: var(--secondary-950);
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid p {
  margin: 12px 0 0;
  color: var(--secondary-300);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: var(--secondary-300);
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  margin-top: 34px;
  padding: 18px 0;
  text-align: center;
  color: var(--secondary-400);
  background: rgba(0, 0, 0, 0.18);
}

.empty-message {
  border-radius: var(--radius-md);
  padding: 22px;
  color: var(--secondary-600);
  background: var(--secondary-50);
}

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
    justify-content: center;
  }

  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 11px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-search {
    order: 5;
    width: 100%;
  }

  .hero,
  .hero-inner {
    min-height: 64vh;
  }

  .movie-grid,
  .category-grid,
  .search-results,
  .archive-list,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-title-row {
    grid-template-columns: 110px 1fr;
  }

  .ranking-item {
    grid-template-columns: 40px 76px 1fr;
    gap: 12px;
  }
}

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

  .hero-actions,
  .section-heading,
  .search-form-large {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .search-results,
  .archive-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-title-box,
  .detail-content {
    padding: 22px;
  }

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

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

  .related-card {
    grid-template-columns: 82px 1fr;
  }

  .related-card img {
    width: 82px;
  }
}
