:root {
  --bg: #070812;
  --bg-soft: #10121e;
  --panel: rgba(18, 20, 34, 0.86);
  --panel-strong: #151827;
  --text: #f8fafc;
  --muted: #a7b0c5;
  --line: rgba(255, 255, 255, 0.09);
  --primary: #ef4444;
  --secondary: #f97316;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.20), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 30rem),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 18, 0.78);
  backdrop-filter: blur(20px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 34px rgba(239, 68, 68, 0.28);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
}

.hero-shell {
  position: relative;
  width: min(1480px, calc(100% - 32px));
  min-height: 720px;
  margin: 22px auto 72px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: #0c0e18;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  align-items: center;
  gap: 54px;
  padding: 92px 7% 130px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 26%, rgba(249, 115, 22, 0.30), transparent 24rem),
    linear-gradient(180deg, rgba(7, 8, 18, 0.10), #070812 92%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-head span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-content h1 {
  max-width: 860px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: #d7dce8;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.hero-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button,
.hero-search button {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.28);
}

.primary-button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(239, 68, 68, 0.38);
}

.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  justify-self: end;
  width: min(100%, 390px);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45);
}

.hero-poster img,
.poster-link img,
.category-tile img,
.category-cover img,
.detail-poster img {
  width: 100%;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.18), rgba(249, 115, 22, 0.12));
  object-fit: cover;
}

.hero-poster img {
  aspect-ratio: 2 / 2.75;
  border-radius: 22px;
}

.hero-control {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 88px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-control button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  background: rgba(255, 255, 255, 0.35) !important;
}

.hero-dot.active {
  width: 34px !important;
  border-radius: 99px !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.hero-search {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 22px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(9, 10, 20, 0.72);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 16px;
}

.hero-search a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.10);
}

.section-wrap,
.page-main {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.section-wrap {
  margin-bottom: 76px;
}

.page-main {
  padding-top: 28px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.section-head a,
.text-link {
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
}

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

.category-tile,
.category-card-large,
.story-card,
.rank-panel,
.filter-panel,
.movie-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-tile::after,
.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(7, 8, 18, 0.84));
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  transition: 0.4s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

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

.movie-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  aspect-ratio: 2 / 2.82;
  transition: 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.86);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: rgba(239, 68, 68, 0.92);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--secondary));
  color: #111827;
}

.card-body {
  padding: 14px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #fed7aa;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(249, 115, 22, 0.10);
}

.movie-card h3 {
  margin: 10px 0 7px;
  font-size: 17px;
  line-height: 1.3;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  border-radius: var(--radius);
  padding: 20px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--secondary));
  font-size: 12px;
  font-weight: 900;
}

.rank-row strong,
.rank-row em {
  grid-column: 2;
}

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

.rank-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 58px;
  margin-bottom: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.28), transparent 25rem),
    linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(255, 255, 255, 0.04));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  color: #d7dce8;
  font-size: 17px;
}

.slim-hero {
  min-height: 240px;
}

.category-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.page-section {
  margin-top: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 14px;
  margin-bottom: 24px;
  border-radius: 24px;
  padding: 16px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  margin: 26px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.category-large-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 76px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  border-radius: 26px;
  padding: 16px;
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.category-cover img {
  height: 100%;
  aspect-ratio: 2 / 2.6;
}

.category-card-large h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-card-large p {
  color: var(--muted);
}

.category-mini-list {
  display: grid;
  gap: 6px;
  margin: 16px 0;
}

.category-mini-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.category-mini-list em {
  color: #fed7aa;
  font-style: normal;
}

.detail-main {
  padding-bottom: 60px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 18, 0.0), var(--bg));
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 80px 0;
}

.detail-poster {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 2.82;
  border-radius: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: #fed7aa;
}

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(40px, 7vw, 76px);
}

.detail-line {
  max-width: 820px;
  color: #d7dce8;
  font-size: 19px;
}

.detail-tags {
  margin: 20px 0 30px;
}

.player-section,
.detail-content {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto 36px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(7, 8, 18, 0.14), rgba(7, 8, 18, 0.78));
  text-align: center;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.25s ease;
}

.play-button-shape {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 45px rgba(239, 68, 68, 0.36);
  font-size: 28px;
}

.player-overlay strong {
  font-size: clamp(24px, 4vw, 42px);
}

.player-overlay em {
  color: #fed7aa;
  font-style: normal;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.story-card {
  border-radius: 24px;
  padding: 26px;
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #d7dce8;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 18, 0.72);
  padding: 52px 0 24px;
}

.footer-grid {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-grid a,
.copyright {
  color: var(--muted);
}

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
}

.copyright {
  width: min(1380px, calc(100% - 32px));
  margin: 34px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 13px;
}

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

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(7, 8, 18, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-shell {
    min-height: 760px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 52px 24px 188px;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
  }

  .hero-control {
    left: 24px;
    right: 24px;
    bottom: 124px;
  }

  .hero-search {
    left: 18px;
    right: 18px;
    bottom: 18px;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-poster {
    width: 250px;
  }

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

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

@media (max-width: 560px) {
  .header-inner,
  .section-wrap,
  .page-main,
  .footer-grid,
  .copyright {
    width: min(100% - 24px, 1380px);
  }

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

  .hero-shell {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 36px 24px;
    border-radius: 24px;
  }

  .detail-info h1 {
    font-size: 38px;
  }
}
