:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --amber-500: #f59e0b;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.13);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--slate-50), #ffffff 42%, var(--slate-100));
  color: var(--slate-900);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--red-900), var(--red-700));
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.24);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark,
.footer-logo span {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--white);
  color: var(--red-800);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

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

.nav-toggle {
  display: none;
  color: var(--white);
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 600;
}

.site-nav a,
.nav-group > button {
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.site-nav a:hover,
.nav-group > button:hover {
  color: var(--white);
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 34px;
  right: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
}

.nav-group:hover .nav-menu {
  display: grid;
}

.nav-menu a {
  padding: 9px 10px;
  border-radius: 10px;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.73) 46%, rgba(127, 29, 29, 0.42) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.22);
  color: #fecaca;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(8px);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--red-600), #f97316);
  color: var(--white);
  box-shadow: 0 16px 35px rgba(220, 38, 38, 0.34);
}

.btn-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster span,
.play-dot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber-500);
  color: var(--white);
}

.hero-poster span {
  left: 24px;
  bottom: 24px;
  width: 66px;
  height: 66px;
  font-size: 28px;
}

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 260ms ease, background 260ms ease;
}

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

.main-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 10px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  padding: 16px;
  margin: -26px auto 34px;
  position: relative;
  z-index: 10;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--slate-800);
  outline: 0;
}

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

.content-section {
  margin: 0 0 54px;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.section-more {
  color: var(--red-700);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-800);
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
  opacity: 0;
  transition: opacity 240ms ease;
}

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

.play-dot {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 20px;
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-600), var(--amber-500));
  color: #fff;
  font-size: 14px;
}

.card-body {
  padding: 13px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--slate-900);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--slate-600);
  font-size: 12px;
}

.meta-line span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--slate-100);
}

.tag-line span {
  padding: 5px 7px;
  background: #fee2e2;
  color: var(--red-800);
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-800), #f97316);
  box-shadow: var(--soft-shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -38px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(110deg, var(--red-900), var(--red-700) 58%, #f97316);
  padding: 58px 0;
}

.page-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.breadcrumb em {
  font-style: normal;
  color: #cbd5e1;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.ranking-item strong {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--red-600), var(--amber-500));
  color: #fff;
}

.ranking-item img {
  width: 86px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.ranking-item .btn {
  min-height: 40px;
  color: #fff;
  background: var(--red-700);
}

.detail-hero {
  background: #020617;
  color: var(--white);
}

.player-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.player-cover span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), var(--amber-500));
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.detail-panel,
.related-panel {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 24px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 700;
}

.detail-panel h2,
.related-panel h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-panel p {
  margin: 0 0 14px;
  color: var(--slate-700);
  line-height: 1.95;
  font-size: 16px;
}

.detail-tags span {
  padding: 7px 10px;
  color: var(--red-800);
  background: #fee2e2;
}

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

.related-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 82px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
}

.related-item h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.related-item p {
  margin: 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.55;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 20px;
  background: #fff;
  color: var(--slate-600);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

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

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

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

  .hero-content {
    grid-template-columns: 1fr 260px;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 4px;
  }

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

  .site-nav a,
  .nav-group > button {
    padding: 12px 0;
    text-align: left;
  }

  .nav-menu {
    position: static;
    display: grid;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-slide {
    position: relative;
    display: none;
    min-height: 640px;
  }

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

  .hero-content {
    min-height: 640px;
    padding: 56px 0 86px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    width: min(260px, 72vw);
    justify-self: center;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .ranking-item .btn {
    grid-column: 2 / -1;
  }

  .ranking-item img {
    width: 72px;
    height: 100px;
  }

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