:root {
  --bg: #fff7ed;
  --bg-soft: #fff1f2;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(248, 113, 113, 0.18);
  --brand: #ef4444;
  --brand-2: #f97316;
  --brand-3: #ec4899;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 22px 55px rgba(127, 29, 29, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, .22), transparent 34rem),
    linear-gradient(135deg, #fff7ed 0%, #fff1f2 46%, #ffe4e6 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(248, 113, 113, .16);
  box-shadow: 0 10px 35px rgba(127, 29, 29, .08);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 900;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 12px 28px rgba(239, 68, 68, .24);
}

.brand-text {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
  background: rgba(239, 68, 68, .08);
  transform: translateY(-1px);
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 320px;
  padding: 4px;
  border: 1px solid rgba(248, 113, 113, .18);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.site-search input,
.hero-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
  color: var(--text);
}

.site-search button,
.hero-search button {
  border: 0;
  cursor: pointer;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(430px, 92vw);
  display: none;
  padding: 10px;
  border: 1px solid rgba(248, 113, 113, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-panel a,
.search-results-page a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background .2s ease, transform .2s ease;
}

.search-panel a:hover,
.search-results-page a:hover {
  background: #fff1f2;
  transform: translateY(-1px);
}

.search-panel img,
.search-results-page img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.search-panel strong,
.search-results-page strong {
  display: block;
  color: var(--text);
}

.search-panel em,
.search-results-page em {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  font-style: normal;
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--brand);
  background: rgba(239, 68, 68, .08);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mobile-nav a {
  text-align: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff7ed;
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background: #1f1014;
}

.hero-track {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 88px max(32px, calc((100vw - 1180px) / 2)) 130px;
  background-position: center;
  background-size: cover;
  transition: opacity .7s ease, transform .7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-content {
  max-width: 720px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: #fb923c;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: .98;
  letter-spacing: -0.08em;
}

.hero h2 {
  margin: 22px 0 12px;
  font-size: clamp(1.6rem, 3vw, 3.4rem);
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 680px;
  color: rgba(255, 255, 255, .86);
  font-size: 1.12rem;
  line-height: 1.85;
}

.hero-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
  font-size: .85rem;
  font-weight: 700;
}

.chip-row span {
  color: var(--brand);
  background: #fff1f2;
  border-color: rgba(248, 113, 113, .18);
}

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

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

.primary-button,
.play-pill {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 18px 38px rgba(239, 68, 68, .28);
}

.ghost-button,
.section-link {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .30);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
}

.section-link {
  color: var(--brand);
  border-color: rgba(248, 113, 113, .2);
  background: #fff;
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.play-pill:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  display: block;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .38);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  padding: 0;
}

.hero-dots button.is-active {
  width: 28px;
  border-radius: 999px;
  background: #fff;
}

.hero-category-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-category-strip a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  font-weight: 800;
}

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

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.06em;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 82px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rank-item:hover,
.movie-card:hover,
.category-card:hover,
.ranking-row:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 65px rgba(127, 29, 29, .18);
}

.rank-number {
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 950;
}

.rank-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.rank-copy strong,
.small-card strong {
  display: block;
  font-size: 1.02rem;
}

.rank-copy em,
.small-card em {
  display: block;
  color: var(--muted);
  font-size: .88rem;
  font-style: normal;
  margin-top: 5px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-buttons button {
  border: 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  background: #fff;
  font-weight: 800;
}

.filter-buttons button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, .13);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 36px rgba(127, 29, 29, .10);
  transition: transform .22s ease, box-shadow .22s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .72));
  opacity: .78;
}

.poster-play {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, .92);
  font-weight: 900;
  transition: opacity .22s ease, transform .22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .84rem;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 1.05rem;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.ranking-copy h2 a:hover,
.category-card h2 a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 0;
  min-height: 4.3em;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.55;
}

.category-panel {
  width: 100%;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 228, 230, .66));
}

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

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

.category-tile,
.category-cover {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-tile:hover,
.category-cover:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 65px rgba(127, 29, 29, .22);
}

.category-tile span,
.category-cover span {
  font-size: 1.45rem;
  font-weight: 950;
}

.category-tile strong {
  color: rgba(255, 255, 255, .86);
  font-size: .96rem;
  line-height: 1.5;
}

.category-card {
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-card-body {
  padding: 22px;
}

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

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.category-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-card li a {
  color: var(--brand);
  font-weight: 800;
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  padding: 76px max(32px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #f97316, #ec4899);
  background-size: cover;
  background-position: center;
}

.compact-hero {
  min-height: 360px;
}

.search-hero {
  background:
    radial-gradient(circle at right, rgba(255, 255, 255, .24), transparent 28rem),
    linear-gradient(135deg, #7f1d1d, #ef4444, #f97316);
}

.hero-search {
  position: relative;
  width: min(640px, 100%);
  display: flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .2);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: #fff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.12);
}

.detail-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 46px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 35px 80px rgba(0, 0, 0, .45);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 18px;
}

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

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

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 35px 80px rgba(0, 0, 0, .25);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, .04), rgba(0, 0, 0, .40));
  transition: opacity .22s ease, visibility .22s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 40px rgba(239, 68, 68, .35);
  font-size: 2rem;
  padding-left: 4px;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 330px;
  gap: 22px;
  margin-top: 28px;
}

.detail-article,
.detail-info-card {
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-article h2,
.detail-info-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.detail-article p {
  color: #4b5563;
  line-height: 1.9;
}

.detail-info-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.detail-info-card dt {
  color: var(--muted);
}

.detail-info-card dd {
  margin: 0;
  font-weight: 800;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(127, 29, 29, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}

.ranking-number {
  color: var(--brand);
  font-size: 1.5rem;
  font-weight: 950;
  text-align: center;
}

.ranking-thumb img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-copy h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.ranking-copy p {
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.55;
}

.search-results-page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 38px rgba(239, 68, 68, .28);
}

.back-top.is-visible {
  display: block;
}

.site-footer {
  margin-top: 60px;
  padding: 46px 0;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #ef4444, #f97316);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 950;
}

.footer-inner p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
}

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

.footer-links a {
  color: rgba(255, 255, 255, .9);
  font-weight: 800;
}

@media (max-width: 1080px) {
  .site-search {
    width: 250px;
  }

  .hero-slide {
    grid-template-columns: 1fr 280px;
  }

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

  .rank-grid,
  .category-grid.large,
  .search-results-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-text-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .hero,
  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 54px 18px 150px;
  }

  .hero-poster {
    width: min(260px, 75vw);
  }

  .hero-controls {
    bottom: 90px;
  }

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

  .rank-grid,
  .category-grid,
  .category-grid.large,
  .search-results-page {
    grid-template-columns: 1fr;
  }

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

  .filter-buttons {
    justify-content: start;
  }

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

  .detail-poster {
    width: min(270px, 70vw);
  }

  .ranking-row {
    grid-template-columns: 52px 74px 1fr;
  }

  .ranking-row .play-pill {
    grid-column: 2 / 4;
  }
}

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

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

  .hero-category-strip {
    border-radius: 24px;
  }

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

  .rank-item {
    grid-template-columns: 42px 74px 1fr;
  }

  .page-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .detail-copy h1,
  .page-hero h1,
  .hero h1 {
    font-size: 2.45rem;
  }
}
