:root {
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --slate: #0f172a;
  --slate-soft: #334155;
  --mist: #f8fafc;
  --mist-deep: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--mist);
  line-height: 1.65;
}

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

img {
  display: block;
  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.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--red-dark), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-soft);
  transition: color 0.2s ease;
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--red-dark);
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 560px;
  margin: 32px auto 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--slate);
  box-shadow: var(--shadow);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(249, 115, 22, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: clamp(24px, 6vw, 80px);
  width: min(620px, calc(100% - 48px));
  transform: translateY(-50%);
  color: var(--white);
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

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

.hero-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

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

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

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.outline-button {
  color: var(--red-dark);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: #fff1f2;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--white);
}

.home-search-wrap {
  margin-top: 28px;
}

.home-search-card,
.filter-panel,
.overview-card,
.movie-card,
.latest-row,
.rank-row,
.detail-text article {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--soft-shadow);
}

.home-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius);
}

.home-search-card h2,
.section-heading h2,
.overview-card h2,
.rank-main h2,
.detail-text h2 {
  margin: 0;
  color: var(--slate);
  line-height: 1.25;
}

.home-search-card p,
.section-heading p,
.overview-card p,
.rank-main p,
.detail-text p,
.filter-panel label {
  color: var(--muted);
}

.home-search {
  display: flex;
  gap: 10px;
}

.home-search input,
.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--mist-deep);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: var(--white);
  outline: none;
}

.home-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.home-search button {
  min-width: 96px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 800;
  cursor: pointer;
}

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

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading p {
  margin: 6px 0 0;
}

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll > * {
  scroll-snap-align: start;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
  transition: opacity 0.25s ease;
}

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

.card-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.play-chip {
  left: 50%;
  bottom: 18px;
  opacity: 0;
  padding: 8px 14px;
  color: var(--slate);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 17px;
  line-height: 1.4;
}

.card-body h3 a:hover,
.rank-main h2 a:hover,
.latest-row h3:hover {
  color: var(--red-dark);
}

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

.card-meta {
  justify-content: space-between;
  color: #94a3b8;
  font-size: 13px;
}

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

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

.category-card {
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate), #7f1d1d 58%, var(--orange));
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-stack img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.category-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  font-weight: 800;
}

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

.latest-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.latest-row img {
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
}

.latest-row h3 {
  margin: 0 0 8px;
  color: var(--slate);
}

.latest-row p {
  margin: 0 0 8px;
  color: var(--muted);
}

.latest-row span {
  color: #94a3b8;
  font-size: 13px;
}

.page-hero {
  padding: 72px 0 58px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.28), transparent 32%),
    linear-gradient(135deg, #111827, #7f1d1d 64%, #ea580c);
}

.compact-hero {
  padding: 58px 0 48px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 16px 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.page-hero-actions a {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 18px;
}

.filter-panel label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
}

.filter-empty {
  margin: 12px 0 0;
  color: var(--red-dark);
  font-weight: 800;
}

.overview-card {
  padding: 22px;
  border-radius: 20px;
}

.overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.overview-head span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fff1f2;
  font-weight: 800;
}

.overview-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.overview-mini a {
  min-width: 0;
}

.overview-mini img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.overview-mini span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--slate-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 92px 1fr 112px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
}

.rank-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-main h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.rank-main p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta span {
  color: #94a3b8;
  font-size: 13px;
}

.rank-score {
  text-align: center;
}

.rank-score strong {
  display: block;
  color: var(--red-dark);
  font-size: 28px;
  line-height: 1;
}

.rank-score span {
  color: #94a3b8;
  font-size: 12px;
}

.detail-hero {
  padding: 48px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 75% 20%, rgba(249, 115, 22, 0.24), transparent 32%),
    linear-gradient(135deg, #020617, #7f1d1d 60%, #c2410c);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr;
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-line {
  max-width: 800px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-info .primary-button {
  margin-top: 26px;
}

.detail-meta span,
.detail-info .tag-list span {
  background: rgba(255, 255, 255, 0.14);
}

.tag-list {
  margin-top: 16px;
}

.player-section {
  margin-top: 46px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.94);
  font-size: 32px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.play-overlay strong {
  font-size: 18px;
}

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

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

.detail-text article {
  padding: 24px;
  border-radius: 20px;
}

.detail-text h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.detail-text p {
  margin: 0;
}

.site-footer {
  margin-top: 72px;
  padding: 42px 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  color: var(--white);
}

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #fb7185;
}

[hidden] {
  display: none !important;
}

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

  .category-grid,
  .overview-grid,
  .detail-text {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    background: #fff1f2;
  }

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    height: 520px;
    border-radius: 22px;
  }

  .hero-control {
    display: none;
  }

  .home-search-card,
  .latest-row,
  .rank-row,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .rank-cover img {
    width: 120px;
  }

  .rank-score {
    text-align: left;
  }

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

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

@media (max-width: 640px) {
  .container,
  .hero-carousel {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    height: 500px;
    margin-top: 18px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-tags span:nth-child(n + 4) {
    display: none;
  }

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

  .category-card {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    min-height: auto;
    font-size: 15px;
  }

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

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

  .home-search {
    flex-direction: column;
  }

  .detail-hero {
    padding: 32px 0;
  }
}
