:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --red-50: #fef2f2;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: min(1240px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 48%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--red-900), var(--red-700));
  box-shadow: var(--shadow-md);
}

.header-inner {
  width: var(--container);
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--red-800);
  background: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

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

.brand-text strong {
  font-size: 20px;
}

.brand-text small {
  color: #fecaca;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #fee2e2;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--white);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  width: 188px;
  padding: 8px;
  display: grid;
  gap: 2px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--gray-700);
  font-size: 14px;
}

.nav-dropdown-panel a:hover {
  color: var(--red-800);
  background: var(--red-50);
}

.menu-button {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: var(--container);
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(239, 68, 68, 0.35), transparent 34%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(17, 24, 39, 0.75) 46%, rgba(17, 24, 39, 0.35) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 45%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
  max-width: 1240px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white);
  background: var(--red-600);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.28);
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.hero-tags,
.hero-actions,
.detail-meta,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.65);
  backdrop-filter: blur(8px);
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--red-800);
  background: var(--red-100);
  font-size: 12px;
  font-weight: 700;
}

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

.hero-actions {
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-more,
.ranking-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 28px;
  color: var(--white);
  background: var(--red-600);
  box-shadow: 0 16px 28px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.ranking-play:hover {
  background: var(--red-700);
  transform: translateY(-2px);
}

.ghost-button {
  padding: 12px 24px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  bottom: 38px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hero-prev {
  right: 94px;
}

.hero-next {
  right: 38px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--red-500);
}

.content-section {
  width: var(--container);
  margin: 0 auto;
  padding: 56px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-more {
  padding: 9px 14px;
  color: var(--red-700);
  background: var(--red-50);
}

.section-more:hover {
  color: var(--white);
  background: var(--red-600);
}

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

.category-strip a,
.category-hero-card,
.detail-card,
.side-card,
.filter-panel,
.ranking-row,
.movie-card {
  border: 1px solid rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.category-strip a {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-strip a:hover,
.movie-card:hover,
.category-hero-card:hover,
.ranking-row:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.category-strip strong {
  color: var(--gray-900);
  font-size: 18px;
}

.category-strip span {
  color: var(--gray-600);
  font-size: 14px;
}

.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--gray-900);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.play-dot {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.88);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: var(--red-600);
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.card-body strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.35;
}

.card-body em,
.card-summary {
  color: var(--gray-600);
  font-size: 13px;
  font-style: normal;
}

.card-summary {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .card-summary {
  display: none;
}

.tag-row {
  gap: 6px;
  min-height: 24px;
}

.filter-panel {
  margin: 0 0 24px;
  padding: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius-lg);
}

.search-box {
  flex: 1;
  display: grid;
  gap: 6px;
  color: var(--gray-700);
  font-weight: 750;
}

.search-box input,
.filter-selects select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
}

.search-box input:focus,
.filter-selects select:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

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

.empty-result {
  padding: 24px;
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  background: var(--white);
  text-align: center;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px max(16px, calc((100% - 1240px) / 2));
  color: var(--white);
}

.red-hero {
  background:
    radial-gradient(circle at 78% 22%, rgba(252, 165, 165, 0.35), transparent 28%),
    linear-gradient(120deg, var(--red-900), var(--red-600));
}

.dark-hero {
  background:
    radial-gradient(circle at 76% 20%, rgba(239, 68, 68, 0.35), transparent 28%),
    linear-gradient(120deg, var(--gray-950), var(--gray-800));
}

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

.category-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: stretch;
}

.category-hero-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.10));
}

.category-hero-card span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 8px;
  color: var(--white);
}

.category-hero-card strong {
  font-size: 26px;
}

.category-hero-card em {
  color: #e5e7eb;
  font-style: normal;
}

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

.ranking-row {
  min-height: 106px;
  display: grid;
  grid-template-columns: 58px 74px 1fr auto;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ranking-number {
  color: var(--red-600);
  font-size: 26px;
  font-weight: 950;
  text-align: center;
}

.ranking-row img {
  width: 74px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gray-900);
}

.ranking-info {
  display: grid;
  gap: 4px;
}

.ranking-info strong {
  font-size: 18px;
}

.ranking-info em,
.ranking-info small {
  color: var(--gray-600);
  font-style: normal;
}

.ranking-play {
  padding: 9px 16px;
  color: var(--white);
  background: var(--red-600);
}

.player-shell {
  background: var(--gray-950);
}

.player-wrap {
  position: relative;
  width: min(1240px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18), rgba(0, 0, 0, 0.54));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--red-600);
  font-size: 32px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

.detail-layout {
  width: var(--container);
  margin: 0 auto;
  padding: 38px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
}

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

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

.detail-main h1 {
  margin: 0 0 14px;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-meta {
  margin-bottom: 22px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--gray-700);
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-weight: 700;
}

.detail-card {
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.detail-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
}

.intro-card p {
  color: var(--gray-800);
  font-size: 19px;
  font-style: italic;
}

.detail-tags {
  gap: 8px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: var(--gray-900);
  box-shadow: var(--shadow-md);
}

.side-card {
  display: grid;
  gap: 8px;
  border-radius: var(--radius-lg);
  padding: 18px;
}

.side-card strong {
  color: var(--red-700);
  font-size: 20px;
}

.side-card span {
  color: var(--gray-600);
}

.related-section {
  padding-bottom: 54px;
}

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: linear-gradient(180deg, var(--gray-900), var(--gray-950));
}

.footer-inner {
  width: var(--container);
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 680px;
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--white);
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .all-grid,
  .featured-grid,
  .mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .category-hero-card {
    min-height: 260px;
  }

  .detail-side {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --container: min(100% - 24px, 1240px);
  }

  .desktop-nav {
    display: none;
  }

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

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-right: 0;
  }

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

  .hero-arrow {
    bottom: 24px;
  }

  .hero-prev {
    right: 76px;
  }

  .hero-next {
    right: 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 40px;
    transform: none;
  }

  .content-section {
    padding-top: 40px;
  }

  .section-heading,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px 62px 1fr;
  }

  .ranking-play {
    display: none;
  }

  .ranking-info small {
    display: none;
  }

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

  .detail-poster {
    max-width: 260px;
  }

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

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 460px) {
  .brand-text small {
    display: none;
  }

  .category-strip,
  .all-grid,
  .featured-grid,
  .mini-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-summary,
  .tag-row {
    display: none;
  }
}
