:root {
  --sand-50: #fff7ed;
  --sand-100: #ffedd5;
  --sand-200: #fed7aa;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --pink-500: #ec4899;
  --desert-500: #d97706;
  --desert-600: #b45309;
  --shadow-sand: 0 12px 36px rgba(120, 83, 45, 0.10);
  --shadow-desert: 0 24px 60px rgba(225, 29, 72, 0.22);
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: var(--sand-50);
  line-height: 1.65;
}

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

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

main {
  min-height: 72vh;
  padding-top: 72px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(254, 215, 170, 0.75);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 247, 237, 0.96);
  box-shadow: var(--shadow-sand);
}

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

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, var(--rose-500), var(--purple-600));
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--rose-600), var(--purple-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--stone-600);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--stone-700);
  font-weight: 650;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a.active,
.mobile-nav a:hover {
  color: var(--desert-600);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--sand-100);
  color: var(--stone-700);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sand);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sand-50);
  font-weight: 650;
}

.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-600), var(--purple-600) 55%, var(--pink-500));
  padding: 96px 0 118px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(18px);
}

.hero::before {
  width: 280px;
  height: 280px;
  left: 7%;
  top: 12%;
}

.hero::after {
  width: 420px;
  height: 420px;
  right: -5%;
  bottom: -22%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero h1 {
  margin: 0 auto 20px;
  max-width: 980px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.hero-search {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-search {
  width: min(680px, 100%);
  margin: 30px auto 0;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-search input {
  flex: 1;
  min-width: 220px;
  border: 0;
  outline: none;
  border-radius: 999px;
  padding: 14px 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-desert);
}

.btn-light {
  color: var(--rose-600);
  background: #fff;
}

.featured-wrap {
  position: relative;
  margin-top: -72px;
  margin-bottom: 72px;
}

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

.featured-main {
  grid-column: span 2;
}

.featured-card {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-desert);
  background: var(--stone-900);
}

.featured-card img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.05));
}

.featured-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 28px;
  color: #fff;
}

.featured-content h2,
.featured-content h3 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.1;
}

.featured-content p {
  max-width: 820px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.86);
}

.tag-row,
.featured-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.featured-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  color: #fff;
  background: rgba(244, 63, 94, 0.90);
}

.section {
  padding: 68px 0;
}

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

.section-rose {
  background: linear-gradient(135deg, var(--rose-50), #faf5ff);
}

.section-dark {
  color: #fff;
  background: var(--stone-900);
}

.section-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--rose-600);
  font-weight: 850;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.section-title h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--stone-800);
  line-height: 1.12;
}

.section-dark .section-title h2,
.section-dark .section-title p,
.section-dark .section-kicker {
  color: #fff;
}

.section-title h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-title p {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.section-more {
  color: var(--rose-600);
  font-weight: 800;
}

.movie-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sand);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--stone-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: var(--rose-600);
  background: rgba(255, 255, 255, 0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-type {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-info h3 a:hover {
  color: var(--rose-600);
}

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

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

.movie-meta span:first-child {
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--stone-100);
}

.scroll-row {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

.filter-tabs,
.category-cloud {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-tabs button,
.category-cloud a {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  color: var(--stone-700);
  background: #fff;
  box-shadow: var(--shadow-sand);
  cursor: pointer;
}

.filter-tabs button.active,
.category-cloud a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
}

.ranking-list {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 72px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sand);
}

.rank-row b {
  color: var(--rose-600);
  font-size: 24px;
}

.rank-row img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--stone-600);
}

.page-hero {
  padding: 76px 0 48px;
  background: linear-gradient(135deg, var(--rose-50), #fff, #faf5ff);
}

.page-hero .container {
  display: grid;
  gap: 14px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

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

.category-panels {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.category-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-sand);
}

.category-panel h2 {
  margin: 0 0 18px;
}

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

.category-list a {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--sand-50);
  color: var(--stone-700);
  font-weight: 750;
}

.category-list a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
}

.detail-hero {
  padding: 58px 0;
  background: linear-gradient(135deg, var(--stone-900), #3b0764 52%, #881337);
  color: #fff;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-desert);
  background: rgba(255, 255, 255, 0.08);
}

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

.detail-title h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
  margin-bottom: 14px;
}

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

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.content-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
}

.article-box,
.side-box,
.player-box {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow-sand);
}

.article-box h2,
.side-box h2,
.player-box h2 {
  margin: 0 0 16px;
  color: var(--stone-800);
}

.article-box p {
  margin: 0 0 18px;
  color: var(--stone-700);
  font-size: 17px;
}

.player-box {
  margin-bottom: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow-desert);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay strong {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: var(--rose-600);
  font-size: 32px;
  background: #fff;
}

.play-overlay span {
  font-size: 16px;
  font-weight: 850;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--rose-600);
  font-weight: 750;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--sand-50);
}

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

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card em {
  margin-top: 4px;
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
}

.search-panel {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto 34px;
  padding: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sand);
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 14px 18px;
  font-size: 16px;
}

.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
  cursor: pointer;
}

.pagination {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  box-shadow: var(--shadow-sand);
  font-weight: 800;
}

.pagination a.current,
.pagination a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--rose-500), var(--purple-600));
}

.site-footer {
  margin-top: 82px;
  padding: 54px 0;
  color: var(--stone-300);
  background: var(--stone-900);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
}

.footer-brand p {
  max-width: 620px;
  color: var(--stone-400);
}

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

.footer-links a:hover {
  color: var(--rose-500);
}

.brand.compact .brand-text strong {
  color: #fff;
  background: none;
}

.brand.compact .brand-text small {
  color: var(--stone-400);
}

@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .featured-grid,
  .detail-layout,
  .content-layout,
  .category-panels,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .featured-main {
    grid-column: span 1;
  }

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

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

  .rank-row .btn {
    display: none;
  }
}

@media (max-width: 640px) {
  main {
    padding-top: 66px;
  }

  .header-inner {
    height: 66px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    padding: 72px 0 96px;
  }

  .hero-search,
  .search-panel {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search button,
  .search-panel button {
    min-height: 46px;
  }

  .movie-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

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

  .detail-hero {
    padding: 42px 0;
  }

  .article-box,
  .side-box,
  .player-box {
    padding: 20px;
  }

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

  .rank-row img {
    display: none;
  }
}
