:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-soft: #fef2f2;
  --orange: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --night: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 42%, #fff7f7 100%);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, .8);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

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

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

.brand-mark,
.footer-logo span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(220, 38, 38, .28);
}

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

.brand-text strong {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.04em;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
  background: var(--red-soft);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
  border-radius: 3px;
}

.mobile-menu {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #7f1d1d;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: grid;
  align-items: center;
  background-size: cover;
  background-position: center;
  transition: opacity .8s ease, transform .8s ease;
  transform: scale(1.015);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  filter: blur(1px);
}

.hero-slide::before {
  width: 180px;
  height: 180px;
  right: 12%;
  top: 18%;
  animation: floatDot 6s ease-in-out infinite;
}

.hero::after {
  width: 260px;
  height: 260px;
  left: 8%;
  bottom: 8%;
  animation: floatDot 8s ease-in-out infinite reverse;
}

@keyframes floatDot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 820px;
  color: #fff;
  padding: 80px 0 116px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  font-weight: 800;
  color: #fee2e2;
}

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -.06em;
  font-weight: 950;
}

.hero p {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(18px, 2.2vw, 25px);
  color: #fee2e2;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, .92);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: var(--red);
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

.ghost-btn {
  color: #fff;
  background: rgba(153, 27, 27, .72);
  border: 1px solid rgba(255, 255, 255, .24);
}

.soft-btn {
  color: var(--red);
  background: var(--red-soft);
}

.primary-btn:hover,
.ghost-btn:hover,
.soft-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

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

.section {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section.narrow {
  max-width: 980px;
}

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

.section-kicker {
  display: inline-flex;
  color: var(--red);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section h1,
.section h2,
.category-hero h1,
.detail-title {
  margin: 0;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -.04em;
  font-weight: 950;
}

.section h1,
.category-hero h1,
.detail-title {
  font-size: clamp(34px, 5vw, 58px);
}

.section h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-desc,
.category-hero p,
.detail-lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 760px;
}

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

.stat-card {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #fff1f2);
  border: 1px solid #ffe4e6;
  box-shadow: 0 18px 40px rgba(220, 38, 38, .08);
}

.stat-card strong {
  display: block;
  font-size: 32px;
  color: var(--red);
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.search-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #ffe4e6;
  border-radius: 28px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

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

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

.filter-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #7f1d1d;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.filter-btn.active,
.filter-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-color: transparent;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, .9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, .16);
  border-color: #fecaca;
}

.poster-link {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #111827);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .48s ease, opacity .2s ease;
}

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

.image-missing {
  opacity: 0;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .62));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) scale(.88);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .25);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.movie-card:hover .play-badge,
.feature-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-content {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f9fafb;
}

.movie-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.32;
}

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

.movie-card p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card .poster-link {
  aspect-ratio: 4 / 3;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  border-radius: 30px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #dc2626 52%, #f97316);
  box-shadow: var(--shadow);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.category-card strong {
  position: relative;
  font-size: 30px;
  line-height: 1.1;
}

.category-card p {
  position: relative;
  margin: 10px 0 18px;
  color: #fee2e2;
}

.category-card span {
  position: relative;
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
  transition: transform .2s ease, border-color .2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: #fecaca;
}

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

.rank-item img {
  width: 92px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  background: #7f1d1d;
}

.rank-info {
  display: grid;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-heat {
  color: var(--red);
  font-weight: 900;
}

.category-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #dc2626 54%, #f97316);
}

.category-hero .inner,
.detail-hero .inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
  position: relative;
  z-index: 1;
}

.category-hero h1,
.detail-hero h1,
.detail-hero .detail-title {
  color: #fff;
}

.category-hero p,
.detail-hero p {
  color: #fee2e2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #fee2e2;
  font-weight: 800;
}

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

.detail-hero {
  background-size: cover;
  background-position: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 32px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border-radius: 30px;
  background: #030712;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #030712;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #030712;
  cursor: pointer;
}

.start-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(220, 38, 38, .16), rgba(0, 0, 0, .28));
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.start-layer.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  font-size: 32px;
}

.detail-panel {
  display: grid;
  gap: 20px;
  padding: 28px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-panel h2 {
  margin: 0;
  font-size: 28px;
}

.detail-panel p {
  margin: 0;
  color: #374151;
}

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

.info-grid div {
  padding: 14px;
  border-radius: 18px;
  background: #f9fafb;
}

.info-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-grid strong {
  display: block;
  margin-top: 4px;
}

.no-results {
  display: none;
  padding: 34px;
  text-align: center;
  border-radius: 26px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.no-results.show {
  display: block;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #fff;
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

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

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

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

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

  .mobile-toggle {
    display: inline-block;
  }

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

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

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

@media (max-width: 760px) {
  .top-nav {
    min-height: 66px;
  }

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

  .hero,
  .hero-track {
    min-height: 560px;
  }

  .hero-content {
    padding: 64px 0 108px;
  }

  .section {
    padding: 48px 0;
  }

  .section-head,
  .search-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .feature-grid,
  .category-grid,
  .footer-inner,
  .detail-layout,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 74px 1fr;
  }

  .rank-heat {
    display: none;
  }

  .rank-item img {
    width: 74px;
    height: 52px;
  }

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