:root {
  --bg: #fff7ed;
  --paper: #ffffff;
  --paper-soft: rgba(255, 255, 255, 0.78);
  --ink: #31221b;
  --muted: #7c6a5b;
  --line: rgba(251, 146, 60, 0.24);
  --orange: #f97316;
  --pink: #ec4899;
  --yellow: #facc15;
  --red: #fb3f5c;
  --shadow: 0 24px 70px rgba(194, 65, 12, 0.15);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.25), transparent 34rem),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fff1f2 45%, #fffdf7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.46) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.46) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.25), transparent 72%);
  z-index: -1;
}

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

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

.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 247, 237, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(251, 146, 60, 0.25);
  box-shadow: 0 12px 36px rgba(194, 65, 12, 0.08);
}

.header-inner {
  width: min(1220px, calc(100% - 32px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, #ea580c, #db2777, #ca8a04);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #62483a;
  font-weight: 700;
  transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.23);
}

.top-search {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(194, 65, 12, 0.08);
}

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

.top-search button,
.primary-button,
.ghost-button,
.play-overlay,
.player-actions a {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.top-search button,
.primary-button,
.play-overlay,
.player-actions a:first-child {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 16px 36px rgba(236, 72, 153, 0.26);
}

.top-search button {
  padding: 9px 16px;
}

.primary-button,
.ghost-button,
.player-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.ghost-button,
.player-actions a:last-child {
  color: #9a3412;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(251, 146, 60, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.top-search button:hover,
.play-overlay:hover,
.player-actions a:hover {
  transform: translateY(-2px);
}

.menu-button {
  display: none;
  border: 0;
  color: #9a3412;
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.10);
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

main {
  min-height: 72vh;
}

.hero {
  position: relative;
  overflow: hidden;
  width: min(1220px, calc(100% - 32px));
  margin: 36px auto 0;
  min-height: 620px;
  border-radius: 42px;
  background: #1f140d;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 42px;
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(30, 10, 5, 0.88), rgba(30, 10, 5, 0.55), rgba(30, 10, 5, 0.16)),
    linear-gradient(180deg, rgba(249, 115, 22, 0.24), rgba(236, 72, 153, 0.20));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-eyebrow,
.section-eyebrow,
.breadcrumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero-eyebrow span,
.breadcrumbs a,
.breadcrumbs span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero h1 {
  color: #fff;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  margin: 26px 0 20px;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 710px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.85;
}

.hero-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-poster {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-poster a {
  display: block;
  width: min(330px, 100%);
  transform: rotate(3deg);
  transition: 0.28s ease;
}

.hero-poster a:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 30px;
  border: 8px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: clamp(28px, 6vw, 72px);
  bottom: 32px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.section,
.page-head,
.detail-layout,
.category-layout {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 68px 0 0;
}

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

.section-head h1,
.section-head h2,
.page-head h1 {
  margin: 0;
  color: #352016;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-head p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
  margin: 10px 0 0;
}

.section-eyebrow {
  color: #ea580c;
  margin-bottom: 12px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 28px;
  box-shadow: 0 18px 46px rgba(194, 65, 12, 0.10);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(194, 65, 12, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(236, 72, 153, 0.16));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.play-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: #db2777;
}

.movie-card p {
  color: var(--muted);
  line-height: 1.7;
  min-height: 76px;
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.meta-pill {
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-chip {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,237,213,0.78)),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.22), transparent 60%);
  border: 1px solid rgba(251, 146, 60, 0.25);
  box-shadow: 0 16px 42px rgba(194, 65, 12, 0.10);
  transition: 0.24s ease;
}

.category-chip:hover {
  transform: translateY(-5px);
  color: #db2777;
}

.category-chip strong {
  font-size: 24px;
}

.category-chip span {
  color: var(--muted);
  line-height: 1.65;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(251,146,60,0.22);
  box-shadow: 0 12px 34px rgba(194, 65, 12, 0.08);
  transition: 0.22s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: rgba(236, 72, 153, 0.38);
}

.compact-card img {
  width: 76px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-number {
  min-width: 44px;
  font-size: 20px;
  font-weight: 1000;
  color: #db2777;
}

.compact-card strong {
  display: block;
  margin-bottom: 8px;
}

.compact-card small {
  color: var(--muted);
  line-height: 1.5;
}

.page-head {
  padding: 54px 0 12px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(194, 65, 12, 0.08);
}

.filter-bar input {
  flex: 1 1 260px;
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 999px;
  padding: 14px 18px;
  outline: 0;
}

.filter-bar button,
.filter-link {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  min-height: 46px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 900;
  cursor: pointer;
}

.detail-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border-radius: 34px;
  background: #130d0a;
  box-shadow: 0 30px 90px rgba(20, 10, 5, 0.28);
}

.player-shell video {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  display: block;
  background: #100b08;
}

.play-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  min-width: 132px;
  height: 58px;
  font-size: 18px;
  z-index: 2;
}

.play-overlay:hover {
  transform: translate(-50%, -52%);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-copy {
  border-radius: 34px;
  padding: clamp(26px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.90), rgba(255,237,213,0.76)),
    radial-gradient(circle at top right, rgba(236,72,153,0.18), transparent 55%);
  border: 1px solid rgba(251,146,60,0.22);
  box-shadow: 0 24px 62px rgba(194, 65, 12, 0.12);
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 17px;
}

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

.content-panel {
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 34px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(251,146,60,0.22);
  box-shadow: 0 20px 55px rgba(194, 65, 12, 0.10);
}

.content-panel h2 {
  margin: 0 0 16px;
  font-size: 30px;
}

.content-panel p {
  color: #5f4a3d;
  line-height: 2;
  font-size: 17px;
}

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

.site-footer {
  margin-top: 72px;
  padding: 46px 0 28px;
  background: rgba(255,255,255,0.64);
  border-top: 1px solid rgba(251,146,60,0.22);
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 36px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 20px;
  color: var(--muted);
  border-top: 1px solid rgba(251,146,60,0.20);
}

.no-results {
  display: none;
  padding: 32px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  color: var(--muted);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

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

  .menu-button {
    display: block;
  }

  .top-search input {
    width: 140px;
  }

  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 760px;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .brand-text small {
    display: none;
  }

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

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

  .hero {
    min-height: 670px;
    border-radius: 30px;
  }

  .hero-slide {
    padding: 30px 22px 70px;
  }

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

  .section-head,
  .page-head {
    display: block;
  }

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

  .compact-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .compact-card img {
    display: none;
  }

  .player-shell,
  .player-shell video {
    min-height: 260px;
  }
}

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