:root {
  --cream-50: #fefefe;
  --cream-100: #fdfcfb;
  --cream-200: #fbf9f7;
  --frosting-50: #fef8f3;
  --frosting-100: #fdf0e6;
  --frosting-300: #f9c29a;
  --frosting-500: #f06c25;
  --frosting-600: #d95a1b;
  --frosting-700: #b54916;
  --dawn-50: #fff7ed;
  --dawn-100: #ffedd5;
  --dawn-200: #fed7aa;
  --dawn-500: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --line: #f0e5dc;
  --shadow: 0 20px 45px rgba(181, 73, 22, .12);
  --soft-shadow: 0 12px 28px rgba(17, 24, 39, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--cream-50), var(--frosting-50), var(--dawn-50));
  min-height: 100vh;
}

body.detail-page {
  background: linear-gradient(180deg, #fff7ed, #ffffff 36%, #fef8f3);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(253, 240, 230, .8);
  transition: box-shadow .25s ease, background .25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(17, 24, 39, .08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--frosting-500), var(--dawn-500));
  box-shadow: 0 12px 20px rgba(240, 108, 37, .25);
}

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

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  background: linear-gradient(90deg, var(--frosting-600), var(--dawn-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.desktop-nav a,
.mobile-nav a {
  color: #374151;
  font-size: 15px;
  font-weight: 650;
  transition: color .2s ease, background .2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--frosting-50);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #374151;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  background: #ffffff;
  border-top: 1px solid var(--frosting-100);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: var(--frosting-50);
}

.hero {
  position: relative;
  min-height: 690px;
  margin-bottom: 32px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity .7s ease;
}

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

.hero-slide::after,
.category-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(240, 108, 37, .28), transparent 34%),
    radial-gradient(circle at 80% 30%, rgba(249, 115, 22, .20), transparent 34%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 690px;
  padding: 132px 20px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  align-items: center;
  gap: 52px;
}

.hero-copy {
  color: #ffffff;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--frosting-600);
  background: rgba(254, 248, 243, .92);
  border: 1px solid rgba(253, 240, 230, .96);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.category-hero .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .24);
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -.05em;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, .88);
  font-size: 20px;
  line-height: 1.75;
  margin: 0;
}

.hero-tags,
.tag-row,
.tag-cloud,
.detail-facts,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.tag-cloud a,
.detail-facts span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.text-link,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--frosting-500), var(--dawn-500));
  box-shadow: 0 16px 30px rgba(240, 108, 37, .32);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.secondary-button:hover,
.text-link:hover,
.pill-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(17, 24, 39, .12);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .38);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
}

.hero-dots button.active {
  width: 32px;
  background: #ffffff;
}

.section-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px;
}

.page-main {
  padding-top: 72px;
}

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

.section-heading h2,
.page-hero h1,
.category-hero h1,
.detail-panel h1,
.story-card h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.section-heading a,
.text-link {
  color: var(--frosting-600);
  font-weight: 800;
}

.compact-heading {
  align-items: center;
  margin-bottom: 16px;
}

.search-panel {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.search-panel,
.gradient-panel,
.story-card,
.detail-panel,
.player-card,
.category-card-large,
.filter-bar,
.rank-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(253, 240, 230, .96);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.filter-bar {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  min-height: 48px;
  padding: 0 15px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--frosting-500);
  box-shadow: 0 0 0 4px rgba(240, 108, 37, .10);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(253, 240, 230, .92);
  box-shadow: 0 14px 28px rgba(17, 24, 39, .06);
  transition: transform .22s ease, box-shadow .22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--frosting-100);
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .5s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.rank-card:hover img {
  transform: scale(1.06);
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #ffffff;
  background: rgba(240, 108, 37, .92);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title,
.rank-title {
  display: -webkit-box;
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p,
.rank-info p,
.category-card-large p,
.footer-brand p,
.story-card p,
.page-hero p,
.category-hero p,
.lead-text {
  color: #5f6878;
  line-height: 1.75;
}

.movie-card-body p {
  min-height: 50px;
  margin: 8px 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #6b7280;
  font-size: 12px;
  gap: 10px;
}

.card-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: #d1d5db;
}

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

.tag-row span,
.tag-cloud a,
.detail-facts span {
  color: var(--frosting-700);
  background: var(--frosting-50);
  border: 1px solid var(--frosting-100);
}

.movie-card.compact .movie-card-body p {
  min-height: 0;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--soft-shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, .88));
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #ffffff;
}

.category-tile span {
  bottom: 58px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, .78);
  line-height: 1.45;
}

.page-hero,
.category-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

.page-hero {
  max-width: 1180px;
  margin: 32px auto 0;
  border-radius: 34px;
  padding: 64px 34px;
}

.simple-hero,
.rank-hero {
  background: linear-gradient(135deg, #111827, #9a3412 52%, #f97316);
}

.category-hero {
  min-height: 430px;
  background-size: cover;
  background-position: center;
}

.category-hero > div {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 20px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-card-large {
  padding: 18px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.category-cover-set {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 20px;
}

.category-cover-set img {
  aspect-ratio: 1;
  object-fit: cover;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-filter {
  margin-bottom: 20px;
  grid-template-columns: 1fr;
}

.rank-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 70px 116px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--frosting-500), var(--dawn-500));
}

.rank-poster {
  overflow: hidden;
  border-radius: 18px;
}

.rank-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .5s ease;
}

.detail-main {
  padding-top: 72px;
}

.detail-hero {
  padding: 32px 20px 56px;
  background: linear-gradient(135deg, #111827, #7c2d12 68%, #f97316);
}

.detail-hero > .breadcrumb,
.detail-grid {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 24px;
  align-items: stretch;
}

.player-card,
.detail-panel {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .42));
  cursor: pointer;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--frosting-500), var(--dawn-500));
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

.player-card.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-panel {
  padding: 28px;
}

.pill-link {
  color: var(--frosting-700);
  background: var(--frosting-50);
  border: 1px solid var(--frosting-100);
  min-height: 36px;
  padding: 0 14px;
}

.lead-text {
  font-size: 16px;
  margin: 14px 0 18px;
}

.detail-facts {
  margin-bottom: 18px;
}

.tag-cloud a {
  display: inline-flex;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 28px;
}

.soft-card {
  background: linear-gradient(135deg, #ffffff, var(--frosting-50));
}

.adjacent-links {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.adjacent-links a {
  flex: 1;
  padding: 18px;
  border-radius: 18px;
  color: var(--frosting-700);
  background: #ffffff;
  border: 1px solid var(--frosting-100);
  font-weight: 800;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, var(--cream-50), var(--frosting-50));
  border-top: 1px solid var(--frosting-100);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand {
  max-width: 560px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: #4b5563;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--frosting-600);
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .detail-grid,
  .detail-content,
  .category-list-large {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .nav-shell {
    height: 64px;
  }

  .page-main,
  .detail-main {
    padding-top: 64px;
  }

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

  .hero-content {
    padding-top: 112px;
  }

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

  .section-heading,
  .footer-inner,
  .adjacent-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar,
  .rank-card,
  .category-card-large {
    grid-template-columns: 1fr;
  }

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

  .section-shell {
    padding: 34px 14px;
  }

  .page-hero {
    margin: 18px 14px 0;
    padding: 42px 22px;
  }

  .rank-number {
    width: 48px;
    height: 48px;
  }
}

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

  .brand-text small {
    display: none;
  }

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

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

  .movie-card-body p {
    min-height: 0;
  }

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