:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #ea580c;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 42%, #fff 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #475569;
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #475569;
  font-weight: 700;
}

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

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(248, 113, 113, 0.25), transparent 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.48) 42%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 88px 0 88px;
  color: #fff;
}

.hero-label {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-title {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.7;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions,
.section-head,
.card-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.secondary-button {
  color: var(--red);
  background: #fff;
}

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

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.hero-search {
  position: relative;
  z-index: 4;
  margin: -34px auto 0;
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.hero-search input,
.catalog-search,
.catalog-year {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 13px 18px;
  outline: none;
  color: #334155;
  background: #fff;
}

.hero-search input:focus,
.catalog-search:focus,
.catalog-year:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

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

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

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

.section {
  padding: 58px 0;
}

.section.tight {
  padding-top: 36px;
}

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1f2937;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-lead,
.page-lead {
  max-width: 760px;
  color: #64748b;
  line-height: 1.8;
}

.link-more {
  color: var(--red);
  font-weight: 900;
}

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

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

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

.movie-card {
  min-width: 0;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f172a, #7f1d1d);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover .poster {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.2);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 62%);
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  font-weight: 900;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.movie-title {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: var(--red);
}

.movie-sub {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.category-band {
  border-radius: 34px;
  padding: 42px;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
}

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

.category-card {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.13);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 950;
  color: #1f2937;
}

.category-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.latest-list {
  display: grid;
  gap: 18px;
}

.list-card {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.list-cover {
  position: relative;
  min-height: 190px;
  overflow: hidden;
}

.list-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-rank {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-weight: 950;
}

.list-body {
  padding: 24px;
}

.list-body h3 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 22px;
  font-weight: 950;
}

.list-body p {
  margin: 0 0 18px;
  color: #64748b;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dark-section {
  border-radius: 34px;
  padding: 42px;
  color: #fff;
  background: radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.22), transparent 26%), linear-gradient(135deg, #1e293b, #7f1d1d 55%, #1e293b);
}

.dark-section .section-title,
.dark-section .link-more {
  color: #fff;
}

.dark-section .movie-title {
  color: #fff;
}

.dark-section .movie-sub {
  color: #cbd5e1;
}

.page-hero {
  padding: 62px 0 36px;
}

.page-hero h1 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.catalog-panel {
  margin: 28px 0 34px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.catalog-tools {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 950;
}

.rank-thumb {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-title {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 950;
}

.rank-desc {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.05);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.74), rgba(127, 29, 29, 0.44));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  padding: 58px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-info .one-line {
  max-width: 780px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.player-section,
.article-card,
.related-section {
  margin-top: 38px;
}

.player-card,
.article-card {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.player-card h2,
.article-card h2,
.related-section h2 {
  margin: 0 0 18px;
  color: #1f2937;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.26));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover strong {
  display: block;
  margin-top: 12px;
  font-size: 18px;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: #fff;
  font-size: 36px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

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

.article-card p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.9;
  text-align: justify;
}

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

.site-footer {
  margin-top: 72px;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a, #7f1d1d, #1e293b);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 46px 0;
}

.footer-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 950;
  color: #fff;
}

.footer-grid p,
.footer-grid a {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .nav-links {
    display: none;
  }

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

  .mobile-nav.open {
    display: block;
  }

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

  .brand-subtitle {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

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

  .hero-search,
  .catalog-tools,
  .detail-layout,
  .list-card,
  .footer-grid,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .hero-search {
    flex-direction: column;
    margin-top: 18px;
    border-radius: 20px;
  }

  .section {
    padding: 42px 0;
  }

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

  .category-band,
  .dark-section {
    padding: 24px;
    border-radius: 24px;
  }

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

  .detail-layout {
    padding: 34px 0;
  }

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

  .rank-thumb {
    width: 100%;
    height: 160px;
  }

  .rank-item {
    align-items: start;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .movie-grid.five,
  .movie-grid.four,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .poster {
    border-radius: 14px;
  }

  .movie-title {
    font-size: 14px;
  }
}
