:root {
  --bg: #fff7f7;
  --card: rgba(255, 255, 255, 0.92);
  --text: #171717;
  --muted: #6b7280;
  --line: rgba(239, 68, 68, 0.14);
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --brand-soft: #fee2e2;
  --orange: #f97316;
  --shadow: 0 24px 60px rgba(127, 29, 29, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(248, 113, 113, 0.18), transparent 30rem),
    radial-gradient(circle at 92% 4%, rgba(251, 146, 60, 0.14), transparent 34rem),
    linear-gradient(135deg, #fff7f7 0%, #fff1f2 42%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 247, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

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

.nav-link {
  padding: 9px 14px;
  color: #4b5563;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
}

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

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 660px;
  max-width: 1240px;
  margin: 24px auto 0;
  border-radius: 34px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(127, 29, 29, 0.72) 45%, rgba(248, 113, 113, 0.18) 100%),
    radial-gradient(circle at 75% 20%, rgba(251, 146, 60, 0.35), transparent 26rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 78px 70px 120px;
  color: #fff;
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p,
.detail-line,
.page-hero p {
  max-width: 710px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--brand-dark);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow {
  color: #fecaca;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 6px 10px;
  color: var(--brand-dark);
  background: #fff1f2;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span,
.detail-meta span,
.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.ghost-button,
.section-link,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-button,
.search-box button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.26);
}

.primary-button:hover,
.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(220, 38, 38, 0.34);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

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

.hero-poster img {
  height: 470px;
  object-fit: cover;
}

.hero-bottom {
  position: absolute;
  left: 70px;
  right: 70px;
  bottom: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-search,
.search-box {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.18);
}

.hero-search input,
.search-box input {
  width: min(520px, 62vw);
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: #111827;
}

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

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

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

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

.hero-category-strip {
  position: absolute;
  left: 70px;
  right: 70px;
  top: 24px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-category-strip a {
  padding: 9px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.content-section,
.filter-panel {
  max-width: 1240px;
  margin: 58px auto 0;
  padding: 0 22px;
}

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

.section-heading h2,
.rank-panel-head h2,
.detail-article h2,
.player-info h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-kicker {
  margin-bottom: 8px;
}

.section-link {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 14px 34px rgba(127, 29, 29, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(127, 29, 29, 0.16);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(153, 27, 27, 0.88);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.78rem;
}

.movie-card h3 {
  margin: 9px 0 7px;
  color: #111827;
  font-size: 1.02rem;
  line-height: 1.32;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.small-card .movie-card-body {
  padding: 14px;
}

.small-card h3 {
  font-size: 0.96rem;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.rank-panel-head span {
  color: var(--brand);
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 18px;
  background: #fff7f7;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fff;
}

.rank-no {
  color: var(--brand);
  font-weight: 900;
  font-size: 1.1rem;
  text-align: center;
}

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

.rank-title {
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  grid-column: 3;
  color: var(--muted);
  font-size: 0.82rem;
}

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

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 241, 242, 0.86)),
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.28), transparent 12rem);
  box-shadow: 0 16px 40px rgba(127, 29, 29, 0.08);
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(127, 29, 29, 0.14);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 1.25rem;
}

.category-card p,
.category-overview-head p {
  color: var(--muted);
}

.category-mini-list {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.carousel-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

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

.page-hero,
.detail-hero {
  position: relative;
  max-width: 1240px;
  margin: 24px auto 0;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #f97316);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 80px 70px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.08);
}

.search-box.wide {
  flex: 1;
  box-shadow: none;
  background: #fff7f7;
}

.filter-controls {
  display: flex;
  gap: 10px;
}

.filter-controls select {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #111827;
  background: #fff;
  outline: 0;
}

.category-overview-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.08);
}

.overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0;
  color: #111827;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.detail-hero {
  min-height: 560px;
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  padding: 80px 70px;
}

.detail-poster-wrap {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

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

.detail-meta {
  margin: 22px 0 14px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  background: #111827;
}

.main-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
  cursor: pointer;
}

.video-overlay-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.35), rgba(127, 29, 29, 0.28));
  cursor: pointer;
}

.video-overlay-button.hidden {
  display: none;
}

.play-icon {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.play-icon::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid var(--brand);
}

.player-info,
.detail-article {
  padding: 24px;
}

.player-info p,
.detail-article p {
  color: var(--muted);
}

.detail-article h2 + p {
  margin-top: 10px;
}

.site-footer {
  max-width: 1240px;
  margin: 80px auto 0;
  padding: 42px 22px 34px;
  color: #6b7280;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 220px 220px;
  gap: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.08);
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer h3 {
  margin: 0 0 10px;
  color: #111827;
}

.site-footer a:not(.logo) {
  display: block;
  margin: 7px 0;
  color: #6b7280;
}

.site-footer a:hover {
  color: var(--brand);
}

.copyright {
  margin: 18px 0 0;
  text-align: center;
}

.no-results {
  grid-column: 1 / -1;
  padding: 40px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1100px) {
  .featured-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content,
  .detail-inner,
  .detail-main,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero,
  .page-hero,
  .detail-hero {
    margin: 12px 12px 0;
    border-radius: 26px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content,
  .detail-inner,
  .page-hero {
    padding: 72px 24px 140px;
  }

  .detail-inner {
    gap: 26px;
  }

  .detail-poster-wrap {
    max-width: 220px;
  }

  .hero-bottom {
    left: 20px;
    right: 20px;
    bottom: 22px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search,
  .search-box {
    width: 100%;
  }

  .hero-search input,
  .search-box input {
    width: 100%;
  }

  .hero-category-strip {
    left: 20px;
    right: 20px;
    top: 18px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .featured-grid,
  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .mini-grid,
  .long-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .filter-panel,
  .category-overview-head,
  .section-heading,
  .footer-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    flex-direction: column;
  }

  .footer-grid {
    display: grid;
  }
}

@media (max-width: 460px) {
  .featured-grid,
  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .mini-grid,
  .long-rank-list {
    grid-template-columns: 1fr;
  }

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