* {
  box-sizing: border-box;
}

:root {
  --canyon-50: #faf8f5;
  --canyon-100: #f5f0e8;
  --canyon-200: #e8dbc8;
  --canyon-500: #b8895a;
  --canyon-700: #8a5c3f;
  --canyon-800: #704c37;
  --canyon-900: #5c3f2f;
  --forest-50: #f4f6f4;
  --forest-100: #e5eae5;
  --forest-600: #4a5e4d;
  --forest-700: #3b4c3e;
  --earth-500: #8f7a63;
  --earth-600: #7b6854;
  --earth-700: #655545;
  --sand-50: #fdfcfa;
  --sand-100: #faf7f0;
  --gold-100: #fff7e6;
  --gold-400: #ffc94a;
  --gold-500: #ffb41e;
  --gold-600: #e69a00;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 18px 45px rgba(92, 63, 47, 0.13);
  --shadow-soft: 0 12px 26px rgba(92, 63, 47, 0.09);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--canyon-900);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--canyon-50), var(--white) 46%, var(--sand-50));
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(232, 219, 200, 0.9);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: var(--white);
  background: linear-gradient(135deg, var(--gold-500), var(--canyon-700));
  box-shadow: 0 12px 24px rgba(255, 180, 30, 0.28);
}

.brand-name {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--earth-600);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--canyon-900);
  background: var(--gold-100);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--canyon-200);
  border-radius: 999px;
  background: rgba(250, 247, 240, 0.8);
}

.top-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 10px 8px 14px;
  color: var(--canyon-900);
  background: transparent;
}

.top-search button,
.primary-button,
.ghost-button,
.section-more,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-button,
.filter-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--gold-500), var(--canyon-700));
  box-shadow: 0 12px 24px rgba(255, 180, 30, 0.22);
}

.ghost-button,
.section-more {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.section-more {
  color: var(--canyon-800);
  border-color: var(--canyon-200);
  background: var(--white);
}

.top-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--canyon-200);
  border-radius: 14px;
  color: var(--canyon-900);
  background: var(--white);
}

.hero-carousel {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: var(--black);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 180, 30, 0.28), transparent 30%),
    linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 76px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

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

.hero-content p {
  max-width: 820px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 23px);
}

.hero-actions,
.hero-tags,
.tag-row,
.meta-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row em,
.detail-tags span,
.meta-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-style: normal;
  font-weight: 700;
}

.hero-tags span {
  margin-top: 18px;
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.45);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--gold-500);
}

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

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--canyon-900);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--earth-600);
}

.scroll-row {
  display: grid;
  grid-auto-columns: 280px;
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 219, 200, 0.9);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-link,
.card-body,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--canyon-100), var(--sand-100));
}

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

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

.card-type,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.card-type {
  right: 12px;
  padding: 0 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  min-width: 34px;
  justify-content: center;
  color: var(--canyon-900);
  background: var(--gold-500);
}

.card-body {
  padding: 17px;
}

.card-title {
  display: block;
  margin-bottom: 8px;
  color: var(--canyon-900);
  font-size: 18px;
  line-height: 1.25;
}

.card-meta,
.card-desc {
  display: block;
  color: var(--earth-600);
  font-size: 14px;
}

.card-meta {
  margin-bottom: 8px;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 14px;
}

.tag-row em {
  padding: 5px 9px;
  color: var(--canyon-700);
  background: var(--canyon-100);
  font-size: 12px;
}

.movie-card.compact .card-body {
  padding: 12px;
}

.movie-card.compact .card-title {
  font-size: 16px;
}

.movie-card.compact .card-desc {
  display: none;
}

.category-panel {
  padding: 32px;
  border: 1px solid rgba(232, 219, 200, 0.9);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--forest-50), var(--canyon-50));
  box-shadow: var(--shadow-soft);
}

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

.category-card {
  display: block;
  min-height: 156px;
  padding: 22px;
  border: 1px solid rgba(232, 219, 200, 0.9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-card span {
  color: var(--earth-600);
  font-size: 14px;
}

.list-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(232, 219, 200, 0.9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.list-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  object-fit: cover;
  background: var(--canyon-100);
}

.list-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.list-card p {
  margin: 0 0 12px;
  color: var(--earth-600);
}

.filter-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 10px;
  border: 1px solid var(--canyon-200);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 18px;
  color: var(--canyon-900);
  background: transparent;
}

.detail-hero {
  padding: 42px 0 58px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 180, 30, 0.2), transparent 26%),
    linear-gradient(135deg, var(--canyon-900), var(--earth-700));
  color: var(--white);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: var(--black);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

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

.play-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--canyon-900);
  cursor: pointer;
  background: var(--gold-500);
  box-shadow: 0 18px 36px rgba(255, 180, 30, 0.4);
  font-size: 38px;
  transform: translateZ(0);
}

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.detail-tags span,
.meta-list span {
  padding: 7px 11px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding: 48px 0 0;
}

.article-card,
.side-card {
  border: 1px solid rgba(232, 219, 200, 0.9);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.article-card {
  padding: 34px;
}

.article-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.article-card p {
  margin: 0 0 24px;
  color: var(--earth-700);
  font-size: 17px;
  line-height: 1.9;
}

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

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

.mini-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
}

.mini-item img {
  width: 68px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--canyon-100);
}

.mini-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.mini-item span {
  color: var(--earth-600);
  font-size: 13px;
}

.search-title {
  padding-top: 52px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid var(--canyon-200);
  border-radius: 22px;
  background: var(--white);
  color: var(--earth-600);
}

.empty-state.visible {
  display: block;
}

.site-footer {
  margin-top: 72px;
  padding: 42px 0 0;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(135deg, var(--canyon-900), var(--earth-700));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  padding-bottom: 32px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--white);
  font-size: 22px;
}

.footer-grid p {
  max-width: 520px;
  margin: 0;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

@media (max-width: 1080px) {
  .nav-bar {
    grid-template-columns: auto auto;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
    justify-self: end;
  }

  .nav-links,
  .top-search {
    grid-column: 1 / -1;
  }

  .nav-links {
    display: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 12px;
  }

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

  .top-search input {
    width: 100%;
  }

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

  .detail-grid,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }
}

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

  .hero-carousel {
    height: 540px;
  }

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

  .hero-nav {
    width: 40px;
    height: 40px;
  }

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

  .scroll-row {
    grid-auto-columns: 240px;
  }

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

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

  .detail-hero {
    padding-top: 24px;
  }

  .article-card {
    padding: 24px;
  }
}

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

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
    border-radius: 22px;
  }
}
