:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --orange-500: #f97316;
  --yellow-400: #facc15;
  --white: #ffffff;
  --shadow-soft: 0 16px 38px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 22px 55px rgba(15, 23, 42, 0.22);
}

* {
  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;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.35);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon,
.footer-logo span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red-600);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.35);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link,
.nav-sub-link {
  border-radius: 12px;
  transition: 0.22s ease;
}

.nav-link {
  padding: 9px 15px;
  color: #d1d5db;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: var(--red-600);
  color: var(--white);
}

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

.nav-search input {
  width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.nav-search input::placeholder {
  color: #cbd5e1;
}

.nav-search button,
.primary-btn,
.ghost-btn,
.section-more,
.category-link,
.search-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.22s ease;
}

.nav-search button,
.primary-btn {
  padding: 10px 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.3);
}

.nav-search button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.42);
}

.nav-subbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 16px 12px;
}

.nav-sub-link {
  padding: 6px 13px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
}

.nav-sub-link:hover {
  color: var(--white);
  background: rgba(220, 38, 38, 0.72);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-menu {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mobile-link {
  padding: 12px 14px;
  color: #d1d5db;
}

.hero-slider {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(248, 113, 113, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.86) 44%, rgba(127, 29, 29, 0.54));
  backdrop-filter: blur(1px);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 38px);
  color: #fed7aa;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffe4e6;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.ghost-btn {
  padding: 10px 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(2deg);
}

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

.hero-poster span,
.play-mark,
.player-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: var(--white);
  background: rgba(220, 38, 38, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  opacity: 0.7;
}

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

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800) 52%, #7f1d1d);
}

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

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

.section {
  padding: 58px 0;
}

.section.alt {
  background: var(--gray-100);
}

.section-heading {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 0 0 7px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--gray-500);
}

.section-more,
.category-link,
.search-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red-600);
  font-weight: 700;
}

.section-more:hover,
.category-link:hover,
.search-link:hover {
  color: var(--red-700);
}

.movie-grid,
.category-grid,
.rank-grid,
.related-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card a,
.category-card,
.rank-row,
.info-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover,
.category-card:hover,
.rank-row:hover,
.info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

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

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

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

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.92);
}

.score-badge {
  top: 9px;
  right: 9px;
}

.rank-badge {
  left: 9px;
  top: 9px;
  background: rgba(15, 23, 42, 0.86);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(220, 38, 38, 0.9);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: 0.24s ease;
}

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

.movie-card-body {
  padding: 13px 13px 15px;
}

.movie-card-body h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--gray-500);
  font-size: 12px;
}

.movie-desc {
  margin-top: 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-card {
  position: relative;
  padding: 24px;
  min-height: 200px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), #7f1d1d);
}

.category-card:nth-child(even) {
  background: linear-gradient(135deg, #111827, #9a3412);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-card p {
  margin: 0 0 22px;
  color: #e5e7eb;
}

.category-card .category-link {
  color: #fed7aa;
}

.search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.search-title {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 800;
}

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

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 700;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16);
}

.movie-card.is-hidden {
  display: none;
}

.rank-list {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 62px 92px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
}

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

.rank-row img {
  width: 92px;
  height: 126px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900) 54%, #7f1d1d);
}

.detail-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  gap: 36px;
  padding: 36px 0 64px;
}

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

.player-box video,
.player-poster,
.player-poster img {
  width: 100%;
  height: 100%;
}

.player-box video {
  position: relative;
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.player-poster img {
  object-fit: cover;
  opacity: 0.72;
}

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  padding-left: 5px;
  border-radius: 50%;
  font-size: 34px;
  background: rgba(220, 38, 38, 0.94);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.player-overlay.is-hidden,
.player-poster.is-hidden {
  display: none;
}

.detail-side {
  align-self: stretch;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 2 / 3;
}

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

.detail-title-block {
  margin-top: 26px;
}

.detail-title-block h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
}

.detail-title-block p {
  margin: 0 0 18px;
  color: #d1d5db;
  font-size: 17px;
}

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

.detail-meta span {
  border-radius: 12px;
  padding: 8px 12px;
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.09);
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 330px;
  gap: 34px;
}

.content-card,
.side-card {
  border-radius: 22px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.content-card + .content-card,
.side-card + .side-card {
  margin-top: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p,
.side-card p {
  margin: 0;
  color: var(--gray-700);
}

.content-card p + p {
  margin-top: 14px;
}

.side-related {
  display: grid;
  gap: 12px;
}

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

.side-related img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.side-related strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-related span {
  color: var(--gray-500);
  font-size: 12px;
}

.info-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  padding: 24px;
  text-align: center;
}

.info-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.info-card p {
  margin: 0;
  color: var(--gray-500);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
}

.footer-brand p,
.footer-column p {
  margin: 0;
  color: #94a3b8;
}

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

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

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

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

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

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

  .hero-content,
  .detail-inner,
  .detail-main {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-links,
  .nav-search,
  .nav-subbar {
    display: none;
  }

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

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

  .hero-content {
    padding: 48px 0 92px;
  }

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

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

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

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

@media (max-width: 560px) {
  .top-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    justify-content: center;
    text-align: center;
  }

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

  .rank-row {
    grid-template-columns: 44px 76px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    width: 76px;
    height: 104px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
  }

  .content-card,
  .side-card,
  .search-panel {
    padding: 20px;
  }
}
