:root {
  --bg: #070a13;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --text: #f8fafc;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #f97316;
  --brand-2: #f43f5e;
  --accent: #38bdf8;
  --card: rgba(17, 24, 39, 0.78);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(244, 63, 94, 0.28), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.2), transparent 28%),
    linear-gradient(180deg, #060713 0%, #0f172a 52%, #050814 100%);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.image-missing {
  visibility: hidden;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.34);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.nav-link {
  color: #d1d5db;
  padding: 10px 13px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.22s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.hero-shell {
  width: min(1280px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-rows: minmax(560px, auto) auto;
  gap: 24px;
  padding: 52px 0 38px;
}

.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(10px);
}

.hero-glow-a {
  width: 360px;
  height: 360px;
  left: -120px;
  top: 100px;
  background: rgba(249, 115, 22, 0.16);
}

.hero-glow-b {
  width: 320px;
  height: 320px;
  right: 160px;
  top: 20px;
  background: rgba(56, 189, 248, 0.14);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(3, 7, 18, 0.7)),
    radial-gradient(circle at 80% 25%, rgba(244, 63, 94, 0.3), transparent 32%);
  border-radius: 34px;
  box-shadow: var(--shadow);
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42%;
  gap: 34px;
  padding: 54px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(40px, 7vw, 82px);
}

.hero-copy p {
  margin: 22px 0 0;
  color: #d1d5db;
  line-height: 1.85;
  font-size: 17px;
}

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 36px rgba(244, 63, 94, 0.32);
}

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

.hero-poster {
  align-self: center;
  position: relative;
  aspect-ratio: 3 / 4.25;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(56, 189, 248, 0.18));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55);
}

.hero-poster img {
  height: 100%;
}

.hero-controls {
  position: absolute;
  left: 48px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 3;
}

.hero-controls button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

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

.hero-dot.active {
  width: 28px !important;
  border-radius: 999px;
  background: #fff !important;
}

.hero-rank,
.hero-search-panel,
.page-hero,
.text-panel,
.category-overview-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-rank {
  border-radius: 28px;
  padding: 22px;
  min-height: 560px;
}

.rank-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.rank-heading span {
  font-weight: 900;
  font-size: 18px;
}

.rank-heading a,
.section-head a {
  color: #fed7aa;
  font-size: 14px;
  font-weight: 700;
}

.hero-rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-rank-item span {
  color: #fb923c;
  font-weight: 900;
  font-size: 18px;
}

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

.hero-rank-item em {
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

.hero-search-panel {
  grid-column: 1 / -1;
  border-radius: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

input[type="search"] {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input[type="search"]::placeholder {
  color: #9ca3af;
}

.hero-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-category-pills a {
  padding: 10px 13px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
}

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

.content-section {
  padding: 42px 0;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.46);
}

.poster-link {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(56, 189, 248, 0.14));
}

.poster-link img {
  height: 100%;
  transition: transform 0.28s ease;
}

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

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 6px 9px;
  color: #111827;
  background: #fde68a;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

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

.meta-line,
.card-summary {
  color: var(--muted);
  line-height: 1.6;
}

.meta-line {
  margin: 8px 0 0;
  font-size: 13px;
}

.card-summary {
  margin: 10px 0 12px;
  font-size: 14px;
  min-height: 44px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-covers img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

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

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.rank-card img {
  height: 86px;
  border-radius: 12px;
}

.rank-num {
  color: #fb923c;
  font-weight: 900;
}

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

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

.rank-card em {
  color: #fde68a;
  font-style: normal;
  font-weight: 900;
}

.page-main {
  padding: 36px 0 64px;
}

.page-hero {
  border-radius: 30px;
  padding: 42px;
  margin-bottom: 10px;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.compact-hero p {
  max-width: 820px;
  color: #d1d5db;
  line-height: 1.8;
  margin: 16px 0 0;
}

.page-search {
  margin-top: 24px;
  max-width: 520px;
}

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

.category-title-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.category-title-link span {
  color: #fed7aa;
  font-weight: 800;
}

.mini-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-link-list a {
  color: #e5e7eb;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 80px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-row-cover img {
  height: 112px;
  border-radius: 15px;
}

.rank-row-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
}

.rank-row-title span {
  color: #fb923c;
}

.rank-row-main p {
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 12px;
}

.rank-score {
  color: #fde68a;
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.detail-main {
  padding: 28px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #cbd5e1;
  font-size: 14px;
  margin: 10px 0 22px;
}

.breadcrumb a {
  color: #fed7aa;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  border-radius: 32px;
  padding: 26px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(3, 7, 18, 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster-wrap {
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(56, 189, 248, 0.14));
}

.detail-poster-wrap img {
  height: 100%;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  color: #e5e7eb;
  line-height: 1.8;
  font-size: 18px;
  margin: 18px 0 0;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-meta-grid span {
  color: #d1d5db;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section {
  margin-top: 28px;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.player-start span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(244, 63, 94, 0.36);
}

.player-start strong {
  font-size: 20px;
}

.player-box.is-playing .player-start {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.text-panel {
  border-radius: 24px;
  padding: 26px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
}

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

.movie-card.compact h3 {
  font-size: 15px;
}

.movie-card.compact .card-summary {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.74);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: #cbd5e1;
}

.footer-brand {
  font-weight: 900;
  color: #fff;
  font-size: 20px;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

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

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.hidden-by-search {
  display: none !important;
}

@media (max-width: 1180px) {
  .hero-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-rank {
    min-height: auto;
  }

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

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

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

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    flex-basis: 100%;
    padding-bottom: 8px;
  }

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

  .hero-shell {
    min-height: auto;
    padding-top: 24px;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 28px;
  }

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

  .hero-controls {
    left: 26px;
    bottom: 24px;
  }

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

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

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

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

  .rank-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 1 / -1;
    text-align: left;
  }

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

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

  .hero-carousel {
    min-height: 780px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 22px;
  }

  .page-hero,
  .detail-hero,
  .text-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .rank-card {
    grid-template-columns: 38px 56px minmax(0, 1fr);
  }

  .rank-card em {
    grid-column: 1 / -1;
  }
}
