* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #070816;
  --bg-soft: #111428;
  --panel: rgba(18, 21, 42, .78);
  --panel-strong: rgba(24, 28, 52, .96);
  --text: #f8fafc;
  --muted: #aeb7cc;
  --line: rgba(255, 255, 255, .1);
  --gold: #f5c84b;
  --pink: #ec4899;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(139, 92, 246, .24), transparent 28rem),
    radial-gradient(circle at 85% 8%, rgba(236, 72, 153, .18), transparent 26rem),
    linear-gradient(180deg, #060713 0%, #0a0d1d 42%, #070816 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(7, 8, 22, .76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: .03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 15px;
  color: #101322;
  background: linear-gradient(135deg, var(--gold), #fff1a8);
  box-shadow: 0 16px 34px rgba(245, 200, 75, .26);
}

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

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

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, .09);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.header-search input,
.hero-search-box input {
  width: 210px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input::placeholder,
.hero-search-box input::placeholder {
  color: rgba(248, 250, 252, .54);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mobile-nav {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 74px;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: rgba(12, 14, 30, .96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

main {
  overflow: hidden;
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  padding: 26px clamp(18px, 4vw, 56px) 34px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: #111428;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: clamp(28px, 5vw, 74px);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .7s ease, transform .9s ease;
}

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

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  color: #fff3ba;
  background: rgba(245, 200, 75, .13);
  border: 1px solid rgba(245, 200, 75, .26);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: .96;
  letter-spacing: -.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(248, 250, 252, .78);
  font-size: 17px;
  line-height: 1.85;
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  padding: 8px 11px;
  color: rgba(248, 250, 252, .9);
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #111428;
  background: linear-gradient(135deg, var(--gold), #fff1a8);
  box-shadow: 0 14px 32px rgba(245, 200, 75, .24);
}

.ghost-btn,
.section-link {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  color: var(--text);
  background: rgba(7, 8, 22, .6);
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 28px;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 8px;
  padding: 0;
  background: rgba(255, 255, 255, .3);
  border: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 46px;
  background: var(--gold);
}

.hero-panel {
  min-height: 620px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0;
  font-size: 30px;
}

.hero-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-search-box {
  margin: 22px 0;
  padding: 15px 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.hero-search-box input {
  width: 100%;
  font-size: 15px;
}

.hero-search-box.wide {
  max-width: 620px;
}

.hero-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chip-list a,
.card-tags a,
.card-tags span,
.mini-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  color: rgba(248, 250, 252, .9);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.content-section {
  padding: 34px clamp(18px, 4vw, 56px);
}

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

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

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

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

.category-card,
.category-overview {
  min-height: 210px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(59, 130, 246, .18), rgba(236, 72, 153, .12));
  border: 1px solid var(--line);
  border-radius: 28px;
}

.category-overview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.category-title {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 23px;
  font-weight: 900;
}

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

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.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 {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
  border: 1px solid var(--line);
  border-radius: 26px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 200, 75, .32);
  background: rgba(255, 255, 255, .1);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(139, 92, 246, .32), rgba(236, 72, 153, .2));
}

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

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

.card-heat {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 9px;
  color: #151728;
  background: var(--gold);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: rgba(248, 250, 252, .58);
  font-size: 12px;
}

.card-body p {
  display: -webkit-box;
  min-height: 64px;
  margin: 12px 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 68px 90px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.rank-row span,
.rank-no {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #151728;
  background: var(--gold);
  border-radius: 12px;
  font-weight: 900;
}

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

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

.rank-row b,
.rank-card b {
  color: #fff3ba;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  margin: 26px clamp(18px, 4vw, 56px);
  padding: clamp(34px, 6vw, 76px);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 320px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 200, 75, .24), transparent 22rem),
    linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(236, 72, 153, .15));
}

.detail-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.player-section {
  padding: 0 clamp(18px, 4vw, 56px) 34px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.player-wrap video {
  display: block;
  width: 100%;
  max-height: 76vh;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .72));
  border: 0;
  cursor: pointer;
}

.player-play span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  padding-left: 5px;
  color: #151728;
  background: var(--gold);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(245, 200, 75, .28);
}

.player-play strong {
  font-size: 18px;
}

.player-play.playing {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  padding: 0 clamp(18px, 4vw, 56px) 34px;
}

.detail-content article,
.info-panel {
  padding: 24px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.detail-content article h2,
.info-panel h2 {
  margin: 0 0 12px;
}

.detail-content article p {
  margin: 0;
  color: rgba(248, 250, 252, .78);
  line-height: 1.9;
}

.info-panel {
  grid-row: span 2;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin: 0;
}

.info-panel dt {
  color: var(--muted);
}

.info-panel dd {
  margin: 0;
}

.info-panel a {
  color: var(--gold);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 46px 76px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.rank-card img {
  width: 76px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-card strong {
  display: block;
  font-size: 18px;
}

.rank-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.rank-card small {
  color: rgba(248, 250, 252, .56);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 34px clamp(18px, 4vw, 56px) 0;
  padding: 28px 0 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--gold);
}

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

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

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

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

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

@media (max-width: 920px) {
  .desktop-nav,
  .header-search span {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-header {
    gap: 12px;
  }

  .header-search input {
    width: 150px;
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .detail-content,
  .detail-hero {
    grid-template-columns: 1fr 1fr;
  }

  .detail-hero {
    align-items: start;
  }

  .info-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 14px;
  }

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

  .header-search {
    display: none;
  }

  .hero-shell,
  .content-section,
  .player-section,
  .detail-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 26px;
  }

  .hero-slide {
    align-items: end;
    padding: 28px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 40px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .detail-content,
  .detail-hero,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 250px;
  }

  .page-hero,
  .detail-hero {
    margin: 16px 14px;
    padding: 28px;
    border-radius: 26px;
  }

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

  .rank-row em,
  .rank-row b {
    display: none;
  }

  .rank-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 14px;
    margin-right: 14px;
  }
}
