:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --night: #111827;
  --panel: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
  font-size: 14px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  color: #374151;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
  background: #fef2f2;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #374151;
  font-weight: 700;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide.active .hero-img {
  animation: heroZoom 7s ease both;
}

@keyframes heroZoom {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1.0);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.hero-copy {
  width: min(680px, 90vw);
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.hero-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 20px);
}

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

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

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

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.tag-row span {
  color: #991b1b;
  background: #fef2f2;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.btn.primary {
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.28);
}

.btn.primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.btn.ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

.btn.light {
  color: #111827;
  background: rgba(255, 255, 255, 0.90);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.30);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.home-search {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.home-search-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
}

.home-search h2,
.section h2,
.preview-head h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.home-search p,
.section-head p,
.preview-head p,
.page-hero p {
  color: var(--muted);
  margin: 8px 0 0;
}

.search-box-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.filter-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  font-size: 15px;
  outline: none;
  background: #ffffff;
  transition: 0.25s ease;
}

.filter-input.big {
  height: 48px;
}

.filter-input:focus {
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.section,
.category-grid,
.category-preview {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

.soft-bg {
  max-width: none;
  background: #ffffff;
}

.soft-bg > .section-head,
.soft-bg > .movie-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.movie-card {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: 0.28s ease;
}

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

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, #fee2e2, #f3f4f6 55%, #e5e7eb);
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 12px;
  background: var(--red);
}

.rank-badge {
  left: 12px;
  background: rgba(17, 24, 39, 0.86);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--red);
}

.card-body p {
  color: #4b5563;
  margin: 0 0 14px;
  font-size: 14px;
  min-height: 44px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  background: #f3f4f6;
  padding: 4px 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  padding-top: 44px;
  padding-bottom: 24px;
}

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  color: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #991b1b, #1f2937);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #7f1d1d, #111827 68%);
}

.tile-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -50px;
  top: -50px;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.34);
  filter: blur(4px);
}

.category-tile h3,
.category-tile p,
.tile-names {
  position: relative;
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  min-height: 66px;
}

.tile-names {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.text-link {
  color: var(--red);
  font-weight: 800;
}

.center-more {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.page-hero {
  background: radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.20), transparent 30%), linear-gradient(135deg, #111827, #1f2937);
  color: #ffffff;
}

.compact-page {
  max-width: none;
  padding: 78px 20px;
}

.compact-page > div {
  max-width: 1180px;
  margin: 0 auto;
}

.compact-page h1 {
  margin: 8px 0 0;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.compact-page p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

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

.filter-pill {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #374151;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.filter-pill:hover,
.filter-pill.active {
  color: #ffffff;
  border-color: var(--red);
  background: var(--red);
}

.detail-top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumb a:hover {
  color: var(--red);
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 8px 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.detail-info .lead {
  color: #4b5563;
  font-size: 18px;
  max-width: 820px;
}

.detail-tags span {
  color: #991b1b;
  background: #fee2e2;
}

.player-section {
  padding-top: 32px;
}

.player-shell {
  position: relative;
  width: min(100%, 1020px);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 65px rgba(0, 0, 0, 0.28);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.22), rgba(17, 24, 39, 0.70));
  cursor: pointer;
  transition: 0.25s ease;
}

.player-cover.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-circle {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.36);
  font-size: 34px;
  padding-left: 6px;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  pointer-events: none;
}

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

.content-card {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.content-card p {
  color: #374151;
  margin-bottom: 0;
  white-space: pre-line;
}

.site-footer {
  margin-top: 44px;
  background: #111827;
  color: #ffffff;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 36px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.70);
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fca5a5;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
  transition: 0.25s ease;
}

.footer-grid a:hover {
  color: #fca5a5;
}

.footer-cats {
  columns: 2;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.js-card.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.small,
  .rank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .home-search-inner,
  .detail-grid,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(320px, 80vw);
  }
}

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

  .menu-button {
    display: flex;
  }

  .hero {
    min-height: 620px;
  }

  .hero-inner {
    align-items: end;
    padding-bottom: 90px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .hero-arrow.prev {
    left: 12px;
  }

  .hero-arrow.next {
    right: 12px;
  }

  .search-box-wrap,
  .section-head,
  .preview-head {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

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

  .section,
  .category-grid,
  .category-preview {
    padding: 44px 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p {
    min-height: auto;
  }

  .detail-top {
    padding-left: 14px;
    padding-right: 14px;
  }

  .player-shell {
    border-radius: 16px;
  }

  .player-circle {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.small,
  .rank-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .logo {
    font-size: 19px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }
}
