:root {
  --primary-50: #fef6ee;
  --primary-100: #fdecd8;
  --primary-300: #f6b87d;
  --primary-400: #f29148;
  --primary-600: #e0561b;
  --primary-700: #ba4118;
  --accent-50: #fff7e6;
  --accent-600: #d99010;
  --success-600: #37865a;
  --error-600: #c44242;
  --secondary-50: #f7f7f5;
  --secondary-100: #e8e6df;
  --secondary-200: #d1cec0;
  --secondary-300: #b4af9b;
  --secondary-400: #9a937c;
  --secondary-500: #887f64;
  --secondary-600: #6f6753;
  --secondary-700: #5a5345;
  --secondary-800: #4c463c;
  --secondary-900: #413d35;
  --white: #ffffff;
  --black: #000000;
  --radius-xl: 1rem;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 12px 28px rgb(65 61 53 / 0.18);
  --shadow-soft: 0 18px 50px rgb(65 61 53 / 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--secondary-900);
  background: linear-gradient(180deg, var(--secondary-50) 0%, #ffffff 48%, #ffffff 100%);
}

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: 100;
  background: rgb(255 255 255 / 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary-900);
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  font-size: 13px;
  box-shadow: 0 8px 18px rgb(224 86 27 / 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-700);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-600);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--secondary-700);
  background: var(--secondary-100);
  cursor: pointer;
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.header-search input {
  width: 150px;
  border: 0;
  outline: none;
  padding: 9px 12px;
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 9px 14px;
  color: var(--white);
  background: var(--primary-600);
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.82) 0%, rgb(0 0 0 / 0.42) 48%, rgb(0 0 0 / 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 64px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
}

.hero-content h1,
.hero-content h2 {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--secondary-200);
  font-size: 18px;
  line-height: 1.8;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  font-size: 14px;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  color: var(--white);
  background: rgb(255 255 255 / 0.1);
  backdrop-filter: blur(8px);
}

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

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

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

.btn.primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 12px 28px rgb(224 86 27 / 0.28);
}

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

.btn.ghost {
  color: var(--white);
  border: 1px solid rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(8px);
}

.btn.light {
  color: var(--secondary-900);
  background: var(--white);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgb(255 255 255 / 0.18);
  backdrop-filter: blur(8px);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgb(255 255 255 / 0.3);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgb(255 255 255 / 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: var(--white);
}

.search-hero {
  max-width: 1180px;
  margin: -38px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr minmax(340px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--secondary-100);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-hero h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.search-hero p {
  margin: 0;
  color: var(--secondary-600);
}

.wide-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  border-radius: 16px;
  background: var(--secondary-50);
}

.wide-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 15px 18px;
  background: transparent;
}

.wide-search button {
  border: 0;
  padding: 0 22px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
  cursor: pointer;
}

.main-wrap,
.detail-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  font-size: 26px;
}

.section-title.light h2 {
  color: var(--white);
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--secondary-100);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card figure {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--secondary-100);
}

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

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

.movie-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0);
  transition: background 0.3s ease;
}

.movie-card:hover figure::after {
  background: rgb(0 0 0 / 0.24);
}

.region-pill,
.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.region-pill {
  left: 10px;
  color: var(--white);
  background: var(--primary-600);
}

.year-pill {
  right: 10px;
  color: var(--secondary-900);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(6px);
}

.rank-badge {
  left: 10px;
  top: 42px;
  color: var(--white);
  background: var(--secondary-900);
}

.hover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary-600);
  background: rgb(255 255 255 / 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.card-body h3 {
  min-height: 44px;
  margin: 0 0 8px;
  color: var(--secondary-900);
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3 {
  color: var(--primary-600);
}

.meta-line {
  margin: 0 0 8px;
  color: var(--secondary-600);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  min-height: 42px;
  margin: 0;
  color: var(--secondary-500);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.warm-panel {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.dark-panel,
.rank-panel {
  padding: 32px;
  border-radius: 28px;
  color: var(--white);
  background: var(--secondary-900);
}

.dark-panel .card-body,
.rank-panel .card-body {
  color: var(--secondary-900);
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--secondary-900);
  box-shadow: var(--shadow-sm);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  opacity: 0.58;
  transform: scale(1.06);
}

.category-card div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  color: var(--white);
  background: linear-gradient(0deg, rgb(0 0 0 / 0.72), transparent);
}

.category-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-600);
  font-size: 12px;
  font-weight: 800;
}

.category-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--secondary-200);
  line-height: 1.6;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
  transform: translateX(4px);
  background: rgb(255 255 255 / 0.12);
}

.rank-list span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--secondary-300);
  font-style: normal;
  font-size: 13px;
}

.sub-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 80px max(24px, calc((100% - 1180px) / 2)) 56px;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgb(224 86 27 / 0.55), transparent 34%), linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

.sub-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-600);
  font-weight: 800;
}

.sub-hero h1 {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.sub-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--secondary-200);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--secondary-100);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--secondary-200);
  border-radius: 14px;
  outline: none;
  padding: 13px 14px;
  color: var(--secondary-900);
  background: var(--secondary-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgb(224 86 27 / 0.08);
}

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

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

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.46));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 86px 24px 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--secondary-200);
  font-size: 14px;
}

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

.detail-hero h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.detail-hero p {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--secondary-200);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  backdrop-filter: blur(8px);
}

.player-section {
  margin-top: -88px;
  position: relative;
  z-index: 5;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--black);
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

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

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary-600);
  background: rgb(255 255 255 / 0.92);
  font-size: 28px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 36px rgb(0 0 0 / 0.28);
}

.detail-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  margin: 42px 0 64px;
}

.poster-column img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.info-column {
  padding: 30px;
  border: 1px solid var(--secondary-100);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.info-column h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.info-column p {
  margin: 0 0 26px;
  color: var(--secondary-700);
  line-height: 2;
}

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

.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 700;
}

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

.site-footer {
  color: var(--secondary-300);
  background: var(--secondary-900);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

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

.copyright {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--secondary-400);
}

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

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

  .search-hero {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--secondary-100);
  }

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

  .nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .nav-links a.active,
  .nav-links a:hover {
    background: var(--primary-50);
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .header-search input {
    flex: 1;
    width: auto;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-control {
    display: none;
  }

  .main-wrap,
  .detail-wrap {
    padding: 36px 18px 56px;
  }

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

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

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

  .poster-column img {
    max-width: 260px;
  }

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

@media (max-width: 560px) {
  .brand {
    font-size: 17px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 36px;
  }

  .hero-content p,
  .sub-hero p,
  .detail-hero p {
    font-size: 16px;
  }

  .search-hero {
    margin: 0;
    border-radius: 0;
    padding: 22px 18px;
  }

  .wide-search {
    flex-direction: column;
  }

  .wide-search button {
    min-height: 44px;
  }

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

  .warm-panel,
  .dark-panel,
  .rank-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .sub-hero {
    min-height: 280px;
    padding: 58px 18px 42px;
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-hero-content {
    padding: 58px 18px 88px;
  }

  .player-section {
    margin-top: -58px;
  }

  .player-box {
    border-radius: 18px;
  }

  .info-column {
    padding: 22px;
  }

  .footer-brand {
    flex-direction: column;
  }
}
