:root {
  --warm-50: #fdf8f6;
  --warm-100: #f2e8e5;
  --warm-200: #eaddd7;
  --warm-300: #e0cec7;
  --warm-400: #d2bab0;
  --warm-600: #a18072;
  --warm-700: #977669;
  --warm-800: #846358;
  --warm-900: #43302b;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-900: #0c4a6e;
  --amber-50: #fffbeb;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --black: #000000;
  --shadow-md: 0 14px 35px rgba(67, 48, 43, 0.12);
  --shadow-lg: 0 28px 70px rgba(67, 48, 43, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--warm-900);
  background: var(--warm-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--warm-200);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-600), var(--amber-500));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--warm-800);
  font-size: 15px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--sky-700);
  background: var(--sky-50);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--white);
  background: var(--warm-900);
  cursor: pointer;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  background: var(--warm-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(67, 48, 43, 0.96), rgba(67, 48, 43, 0.68), rgba(67, 48, 43, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero-copy {
  max-width: 720px;
  padding: 90px 0;
}

.hero-badge,
.section-kicker,
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--warm-100);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  color: var(--warm-100);
}

.hero-meta span,
.detail-meta span,
.card-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button-primary,
.button-secondary,
.button-light,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button-primary {
  color: var(--white);
  background: var(--sky-600);
  box-shadow: 0 18px 32px rgba(2, 132, 199, 0.22);
}

.button-primary:hover {
  background: var(--sky-700);
  transform: translateY(-2px);
}

.button-secondary {
  color: var(--sky-900);
  background: var(--sky-100);
}

.button-light {
  color: var(--warm-900);
  background: rgba(255, 255, 255, 0.9);
}

.button-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dot.active {
  width: 30px;
  background: var(--white);
}

.hero-quick {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 84px;
  z-index: 3;
  width: min(380px, calc(100% - 48px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero-quick h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.hero-quick a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--warm-100);
  font-size: 14px;
}

.section,
.page-hero,
.detail-page,
.category-page {
  padding: 56px 0;
}

.page-hero {
  background: linear-gradient(135deg, var(--warm-900), var(--warm-800));
  color: var(--white);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--warm-100);
  font-size: 18px;
}

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

.section-head h2,
.content-block h2,
.recommend-section h2,
.player-section h2 {
  margin: 0;
  color: var(--warm-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--warm-700);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--warm-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(67, 48, 43, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--sky-100);
  box-shadow: var(--shadow-md);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--warm-100), var(--warm-300));
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
}

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

.movie-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.movie-badges span,
.tag-list span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--sky-900);
  background: var(--sky-50);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card h3 a:hover {
  color: var(--sky-700);
}

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

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

.feature-strip {
  padding: 28px;
  border: 1px solid var(--warm-200);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--sky-50), var(--amber-50));
}

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

.rank-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--warm-200);
  border-radius: 16px;
  background: var(--white);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-link:hover {
  transform: translateY(-2px);
  border-color: var(--sky-100);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: var(--warm-900);
  font-weight: 800;
}

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

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

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

.category-card {
  padding: 24px;
  border: 1px solid var(--warm-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(67, 48, 43, 0.07);
}

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

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

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-links a {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--warm-800);
  background: var(--warm-100);
  font-size: 13px;
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--warm-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(67, 48, 43, 0.06);
}

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

.search-row input,
.search-row select {
  width: 100%;
  border: 1px solid var(--warm-200);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--warm-900);
  background: var(--warm-50);
  outline: none;
}

.search-row input:focus,
.search-row select:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  cursor: pointer;
}

.filter-chip.active {
  color: var(--white);
  background: var(--sky-600);
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed var(--warm-300);
  border-radius: 22px;
  color: var(--warm-700);
  text-align: center;
}

.detail-hero {
  padding: 54px 0;
  background: linear-gradient(135deg, var(--warm-900), #1c1715);
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--warm-100);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
}

.detail-copy p {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--warm-100);
  font-size: 18px;
}

.player-section {
  padding: 46px 0 24px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--black);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
}

.player-cover span {
  position: relative;
  z-index: 1;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--sky-600);
  box-shadow: 0 22px 44px rgba(2, 132, 199, 0.35);
  font-size: 30px;
}

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

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.content-block,
.side-panel {
  padding: 26px;
  border: 1px solid var(--warm-200);
  border-radius: 24px;
  background: var(--white);
}

.content-block p {
  margin: 12px 0 24px;
  color: var(--warm-800);
  font-size: 17px;
}

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

.side-panel .rank-link {
  grid-template-columns: 1fr;
  gap: 2px;
  margin-bottom: 10px;
}

.recommend-section {
  padding: 28px 0 58px;
}

.pagination-note {
  margin-top: 22px;
  color: var(--warm-700);
  font-size: 14px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  align-items: start;
}

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

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--warm-300);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--warm-100);
  background: rgba(255, 255, 255, 0.08);
}

.hidden-by-filter {
  display: none !important;
}

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

  .hero-quick {
    display: none;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--warm-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
  }

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

  .site-nav a {
    border-radius: 12px;
  }

  .movie-grid,
  .category-grid,
  .rank-grid,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 260px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .hero-copy {
    padding: 70px 0 96px;
  }

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

  .button-primary,
  .button-secondary,
  .button-light,
  .button-ghost {
    width: 100%;
  }

  .movie-grid {
    gap: 16px;
  }
}
