* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --line: rgba(255, 255, 255, 0.12);
  --orange: #fb923c;
  --red: #ef4444;
  --yellow: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.13), transparent 30rem),
    linear-gradient(135deg, #0f172a 0%, #111827 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

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

.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-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.32);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel .nav-link,
.mobile-category-links a {
  display: block;
  padding: 12px;
  border-radius: 12px;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
}

main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  height: 75vh;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #111827, #020617);
}

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

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

.hero-bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.08);
  opacity: 0.55;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.4)),
    linear-gradient(to right, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.25));
}

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

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

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-summary {
  max-width: 780px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.hero-tags,
.detail-tags,
.tag-row,
.category-pills,
.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.category-pills a,
.filter-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.hero-tags span,
.detail-tags span {
  padding: 9px 13px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

.hero-actions {
  margin-top: 30px;
}

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

.primary-button,
.quick-search button {
  border: 0;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.28);
}

.ghost-button {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.quick-panel,
.content-section,
.rank-strip,
.page-hero,
.filter-panel,
.detail-layout,
.category-overview-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
}

.quick-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.quick-search input,
.filter-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
}

.category-pills a {
  padding: 10px 14px;
  transition: 0.2s ease;
}

.category-pills a:hover,
.filter-row button:hover,
.filter-row button.active {
  color: #fff;
  border-color: rgba(251, 146, 60, 0.55);
  background: rgba(251, 146, 60, 0.18);
}

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

.section-heading h2,
.rank-strip h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.section-heading p,
.rank-strip p,
.page-hero p,
.detail-copy p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  color: var(--orange);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 146, 60, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

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

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

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
}

.movie-card-body {
  padding: 14px;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--subtle);
  font-size: 12px;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 58px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.rank-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  padding: 30px;
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.28), transparent 24rem),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

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

.rank-mini-list a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
}

.rank-mini-list span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 800;
}

.rank-mini-list em {
  color: var(--subtle);
  font-style: normal;
}

.page-hero {
  min-height: 280px;
  display: grid;
  align-items: center;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(239, 68, 68, 0.1)),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

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

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
}

.filter-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 0 14px;
  cursor: pointer;
}

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

.category-card-large {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.category-card-large a {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  min-height: 260px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 12px;
}

.category-thumbs img {
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  border-radius: 16px;
}

.category-info {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-info h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-info p {
  color: var(--muted);
  line-height: 1.7;
}

.category-info span {
  color: var(--orange);
  font-weight: 800;
}

.detail-layout {
  margin-top: 28px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--subtle);
}

.breadcrumbs a {
  color: var(--orange);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.player-card,
.detail-copy {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

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

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
}

.video-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 52px rgba(239, 68, 68, 0.42);
  font-size: 30px;
  line-height: 1;
}

.video-shell.playing .video-overlay {
  display: none;
}

.detail-copy {
  padding: 28px;
}

.detail-one-line {
  font-size: 18px;
}

.detail-meta {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: var(--muted);
}

.detail-copy h2 {
  margin: 26px 0 8px;
  font-size: 24px;
}

.site-footer {
  margin-top: 64px;
  padding: 44px 0 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.92));
}

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

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--orange);
}

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

.site-footer li,
.site-footer a {
  color: var(--muted);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  text-align: center;
}

.is-hidden {
  display: none !important;
}

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

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

  .hero-poster {
    display: none;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-carousel {
    min-height: 680px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 80px;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

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

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

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

  .page-hero,
  .detail-copy {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .wide-grid,
  .category-overview-grid,
  .mobile-category-links {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .rank-mini-list a {
    grid-template-columns: 32px 1fr;
  }

  .rank-mini-list em {
    display: none;
  }
}
