:root {
  --color-red: #dc2626;
  --color-red-dark: #b91c1c;
  --color-red-soft: #fee2e2;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-bg: #faf7f2;
  --color-card: #ffffff;
  --color-dark: #111827;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), #ef4444);
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
}

.brand-name {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
  white-space: nowrap;
}

.nav-link {
  font-size: 15px;
  font-weight: 650;
  color: #374151;
  transition: color 0.2s ease;
}

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

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

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #374151;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

.mobile-link:hover {
  background: #f3f4f6;
  color: var(--color-red);
}

.page-main {
  min-height: 70vh;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow-shell {
  max-width: 880px;
}

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

.hero-slides {
  position: absolute;
  inset: 0;
}

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

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

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

.cover-img.is-hidden,
.hero-bg.is-hidden {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(220, 38, 38, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 36px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.12);
  color: var(--color-red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-carousel .hero-label {
  color: #fecaca;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.84);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.tag-row span {
  color: #7f1d1d;
  background: var(--color-red-soft);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), #ef4444);
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn-full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-thumbs {
  position: absolute;
  right: max(32px, calc((100vw - 1240px) / 2));
  bottom: 70px;
  z-index: 4;
  width: 320px;
  display: grid;
  gap: 10px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(14px);
  text-align: left;
  opacity: 0.78;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(220, 38, 38, 0.38);
}

.hero-thumb img {
  width: 60px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  font-weight: 800;
  line-height: 1.35;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: 36px 0 10px;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.filter-search {
  display: grid;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}

.filter-search input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-filters button {
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.quick-filters button:hover {
  color: #ffffff;
  background: var(--color-red);
}

.content-section {
  margin-top: 56px;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--color-red);
  font-weight: 850;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #991b1b);
}

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

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

.poster-badge,
.card-rank {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 10px;
  bottom: 10px;
  padding: 0 10px;
  background: rgba(17, 24, 39, 0.62);
}

.card-rank {
  top: 10px;
  left: 10px;
  width: 34px;
  background: linear-gradient(135deg, var(--color-red), #f97316);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  flex: 1;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
}

.movie-card-small .card-body h3 {
  font-size: 16px;
}

.movie-card-small .card-body p {
  -webkit-line-clamp: 2;
}

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

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

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

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.72;
}

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

.category-tile div {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
}

.category-tile span {
  color: #fecaca;
  font-size: 12px;
  font-weight: 850;
}

.category-tile h3 {
  margin: 6px 0 6px;
  font-size: 24px;
  line-height: 1.1;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, var(--color-red), var(--color-red-dark));
}

.compact-hero {
  padding: 76px 0;
}

.compact-hero h1 {
  max-width: 820px;
  margin: 16px 0 10px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.compact-hero .hero-label {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.ranking-grid .movie-card:nth-child(-n + 3) .card-rank {
  background: linear-gradient(135deg, #f97316, #facc15);
}

.detail-shell {
  padding-top: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 750;
}

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

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

.detail-main,
.detail-aside {
  min-width: 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.18), rgba(0, 0, 0, 0.42));
  font-size: 18px;
  font-weight: 850;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), #ef4444);
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.4);
  font-size: 28px;
}

.article-card,
.poster-panel {
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.article-card {
  margin-top: 24px;
  padding: 28px;
}

.article-card h1,
.article-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.article-card h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.article-card h2 {
  margin-top: 28px;
  font-size: 24px;
}

.article-card p {
  margin: 14px 0 0;
  color: #374151;
  font-size: 16px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 4px;
}

.poster-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f2937, #991b1b);
}

.poster-panel h2 {
  margin: 18px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.poster-panel p {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 14px;
}

.related-section {
  margin-bottom: 34px;
}

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

.site-footer {
  margin-top: 72px;
  color: #e5e7eb;
  background: #111827;
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0 32px;
}

.brand-footer {
  color: #ffffff;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.footer-column h3 {
  margin: 0 0 12px;
  color: #fca5a5;
  font-size: 16px;
}

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

.footer-column a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

.no-results {
  grid-column: 1 / -1;
  padding: 44px;
  border-radius: var(--radius-lg);
  color: #6b7280;
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
  }

  .nav-link {
    font-size: 14px;
  }

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

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

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

  .hero-thumbs {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-carousel {
    min-height: 74vh;
  }

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

  .hero-arrow {
    display: none;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .quick-filters {
    justify-content: flex-start;
  }

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

  .poster-panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .nav-shell,
  .page-shell,
  .footer-shell {
    width: min(100% - 24px, 1240px);
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-content {
    width: min(100% - 24px, 1240px);
  }

  .hero-copy {
    padding-top: 12px;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-body p {
    font-size: 13px;
  }

  .compact-hero {
    padding: 54px 0;
  }

  .article-card {
    padding: 20px;
  }

  .play-icon {
    width: 60px;
    height: 60px;
  }
}
