:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #ffffff;
  --muted: #64748b;
  --text: #0f172a;
  --light: #f8fafc;
  --line: #e2e8f0;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 48%, #eef2f7 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.97));
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(18px);
}

.top-nav {
  width: min(1240px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
  font-size: 14px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #f87171;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-bar input {
  border: 0;
  outline: none;
  border-radius: 999px;
}

.nav-search input {
  width: 250px;
  color: #fff;
  background: rgba(51, 65, 85, 0.92);
  padding: 11px 16px;
}

.nav-search input:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
}

.nav-search button,
.filter-buttons button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.filter-buttons button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.35), transparent 32%), linear-gradient(135deg, #020617, #7f1d1d 52%, #9a3412);
}

.hero-track,
.hero-slide {
  min-height: 72vh;
}

.hero-slide {
  display: none;
  position: relative;
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(127, 29, 29, 0.28) 100%), linear-gradient(0deg, #020617 0%, transparent 38%);
}

.hero-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 80px 0 110px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.25);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 0;
  line-height: 1.04;
}

.hero-copy h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
}

.hero-copy h2 {
  font-size: clamp(28px, 4.5vw, 58px);
  font-weight: 850;
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

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

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

.hero-tags span,
.detail-meta span,
.card-meta span,
.rank-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 7px 12px;
  font-size: 13px;
}

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

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

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

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 4;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  width: 32px;
  background: linear-gradient(90deg, #ef4444, #f97316);
}

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

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading > a {
  color: var(--red);
  font-weight: 800;
}

.section-kicker {
  color: #dc2626;
  background: #fee2e2;
  box-shadow: none;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #7f1d1d);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, transparent 56%);
  opacity: 0.68;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 7px;
  margin-bottom: 10px;
}

.card-meta span {
  color: #64748b;
  background: #f1f5f9;
  padding: 5px 9px;
  font-size: 12px;
}

.card-body h2 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--red);
}

.card-body p {
  display: -webkit-box;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span,
.tag-row a {
  border-radius: 999px;
  color: #b91c1c;
  background: #fff1f2;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.soft-panel {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100% - 1240px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fff1f2 46%, #eff6ff);
}

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

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

.category-tile {
  overflow: hidden;
  min-height: 255px;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #7f1d1d 58%, #9a3412);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-7px);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  height: 132px;
  padding: 8px;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  opacity: 0.82;
}

.category-tile-body {
  padding: 18px;
}

.category-tile-body span {
  color: #fed7aa;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-tile h2 {
  margin: 8px 0;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #fee2e2;
  line-height: 1.6;
  font-size: 14px;
}

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

.big-rank,
.small-rank {
  grid-template-columns: 1fr;
}

.rank-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 20px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #1e293b;
}

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

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info h2 a:hover {
  color: var(--red);
}

.rank-info p {
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.65;
}

.rank-meta span {
  color: #475569;
  background: #f1f5f9;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: radial-gradient(circle at 16% 16%, rgba(248, 113, 113, 0.28), transparent 30%), linear-gradient(135deg, #020617, #1e293b 52%, #7f1d1d);
}

.page-hero {
  padding: 84px max(16px, calc((100% - 1240px) / 2));
}

.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}

.page-hero p,
.detail-one-line {
  max-width: 820px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.compact-actions {
  margin-top: 22px;
}

.filter-panel {
  padding-bottom: 0;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  border-radius: 22px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.filter-bar label {
  flex: 1;
  display: grid;
  gap: 8px;
  color: #475569;
  font-weight: 800;
}

.filter-bar input {
  width: 100%;
  background: #f1f5f9;
  color: #0f172a;
  padding: 15px 18px;
}

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

.detail-hero {
  padding: 34px max(16px, calc((100% - 1240px) / 2)) 76px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.35);
  background: #1e293b;
}

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

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

.detail-tags {
  margin-top: 22px;
}

.player-section {
  padding-top: 64px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.25);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  border: 0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  z-index: 2;
}

.player-cover.is-hidden {
  display: none;
}

.player-icon {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 34px;
  box-shadow: 0 20px 42px rgba(220, 38, 38, 0.38);
}

.player-title {
  max-width: min(760px, 88%);
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 900;
  text-align: center;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.content-card {
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 15px;
  font-size: 26px;
}

.content-card p {
  color: #475569;
  line-height: 1.86;
  margin: 0 0 12px;
}

.content-card .strong-text {
  color: #0f172a;
  font-weight: 800;
}

.review-card {
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
}

.info-card {
  grid-column: 1 / -1;
}

.info-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-card dl div {
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
}

.info-card dt {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.info-card dd {
  margin: 8px 0 0;
  color: #0f172a;
  font-weight: 800;
}

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

.compact-card .card-body p {
  display: none;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-brand {
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 430px;
  line-height: 1.7;
}

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

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

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

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

@media (max-width: 1100px) {
  .nav-search input {
    width: 190px;
  }

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

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

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

@media (max-width: 900px) {
  .top-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-basis: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0 8px;
  }

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

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

  .nav-search,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide,
  .hero-inner {
    min-height: 680px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

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

@media (max-width: 640px) {
  .brand-text {
    font-size: 19px;
  }

  .hero-inner {
    padding: 62px 0 98px;
  }

  .section-block,
  .page-hero,
  .detail-hero {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 15px;
  }

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

  .rank-info p {
    display: none;
  }

  .filter-buttons {
    width: 100%;
  }

  .filter-buttons button {
    flex: 1;
  }

  .detail-meta span,
  .hero-tags span {
    font-size: 12px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .full-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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