
:root {
  --stone-50: #faf9f7;
  --stone-100: #f5f3f0;
  --stone-200: #e5e1da;
  --stone-300: #d1cac0;
  --stone-500: #9c8d7b;
  --stone-600: #87786a;
  --stone-700: #6f6259;
  --stone-800: #5c534c;
  --stone-900: #4c4740;
  --earth-50: #faf8f5;
  --earth-100: #f2ede4;
  --earth-300: #dbc5a3;
  --earth-500: #b88d55;
  --earth-600: #a47549;
  --earth-700: #8a5f3e;
  --earth-900: #5a4029;
  --moss-50: #f6f7f4;
  --moss-600: #61704a;
  --moss-900: #363e2d;
  --canyon-600: #c44e2c;
  --canyon-900: #6e3021;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 16px 34px rgba(56, 45, 34, 0.14);
  --shadow-xl: 0 24px 60px rgba(38, 31, 24, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--stone-900);
  background: var(--stone-50);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--stone-50), var(--earth-50));
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.94);
  border-bottom: 1px solid var(--stone-200);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo, .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--earth-900);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-600));
  box-shadow: var(--shadow-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--stone-700);
  font-weight: 600;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--earth-600);
  transition: width 0.2s ease;
}

.main-nav a:hover {
  color: var(--earth-700);
}

.main-nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--stone-900);
  background: var(--earth-100);
  font-size: 20px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--earth-900), var(--stone-800) 52%, var(--canyon-900));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  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: 64px 64px;
  opacity: 0.35;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(31, 27, 24, 0.9), rgba(31, 27, 24, 0.1) 55%, rgba(31, 27, 24, 0.2));
}

.hero-slider {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 54px;
  padding: 56px 24px 72px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--earth-300);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  color: var(--white);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  color: var(--earth-300);
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--stone-200);
  font-size: 19px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--earth-600);
  box-shadow: 0 12px 24px rgba(164, 117, 73, 0.24);
}

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

.btn-glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster .poster-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.poster-info strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.poster-info em {
  display: block;
  margin-top: 8px;
  color: var(--stone-200);
  font-style: normal;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 24px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.26);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--earth-300);
}

.section {
  padding: 64px 24px;
}

.section.white {
  background: var(--white);
}

.section.soft {
  background: linear-gradient(135deg, var(--stone-100), var(--earth-50));
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

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

.section-head h2, .page-title h1, .detail-title h1 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-head p, .page-title p {
  margin: 8px 0 0;
  color: var(--stone-600);
  line-height: 1.8;
}

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

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--stone-200);
}

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

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

.year-badge, .rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--stone-900);
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--stone-500);
  font-size: 12px;
}

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

.tag-row span, .pill {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--earth-700);
  background: var(--earth-100);
  font-size: 12px;
  font-weight: 700;
}

.category-tile {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  background: var(--stone-800);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.82), rgba(0,0,0,0.12));
}

.tile-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: var(--white);
}

.tile-content strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.tile-content em {
  display: block;
  margin-top: 8px;
  color: var(--stone-200);
  font-style: normal;
  line-height: 1.5;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: var(--stone-200);
}

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

.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.rank-copy p {
  margin: 0;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.6;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
}

.search-label {
  color: var(--earth-900);
  font-weight: 800;
  white-space: nowrap;
}

.search-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--stone-300);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--stone-900);
  background: var(--white);
  outline: none;
}

.search-input:focus {
  border-color: var(--earth-500);
  box-shadow: 0 0 0 4px rgba(184, 141, 85, 0.16);
}

.page-hero {
  padding: 58px 24px 34px;
  background: linear-gradient(135deg, var(--earth-50), var(--moss-50));
}

.page-title {
  max-width: 1280px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--earth-700);
  font-weight: 700;
}

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

.detail-title {
  margin-bottom: 22px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0,0,0,0.72), rgba(0,0,0,0.24));
  cursor: pointer;
}

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

.play-triangle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.play-triangle::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 23px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid var(--white);
}

.detail-article {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-article h2 {
  margin: 0 0 12px;
  color: var(--stone-900);
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 20px;
  color: var(--stone-700);
  line-height: 1.9;
}

.side-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: var(--stone-50);
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: var(--earth-100);
}

.compact-card img {
  width: 68px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card span {
  color: var(--stone-900);
  font-weight: 800;
  line-height: 1.4;
}

.site-footer {
  padding: 48px 24px;
  background: var(--stone-900);
  color: var(--stone-200);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: var(--earth-300);
  font-size: 20px;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 18px;
  font-weight: 700;
}

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

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

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

  .featured-grid, .rank-list, .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

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

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

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

  .hero, .hero-slider {
    min-height: 620px;
  }

  .hero-slide {
    padding: 46px 18px 80px;
  }

  .section {
    padding: 44px 16px;
  }

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

  .card-body {
    padding: 14px;
  }

  .section-head, .footer-inner, .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .movie-grid, .featured-grid, .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 16px;
  }

  .detail-article {
    padding: 20px;
  }
}
