:root {
  --bg: #070b16;
  --bg-soft: #101727;
  --card: rgba(18, 26, 44, 0.78);
  --card-solid: #121a2c;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --brand: #8b5cf6;
  --brand-2: #06b6d4;
  --brand-3: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(139, 92, 246, 0.35), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(6, 182, 212, 0.25), transparent 28%),
    linear-gradient(180deg, #070b16 0%, #0b1020 45%, #050815 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

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

button,
input {
  font: inherit;
}

main {
  position: relative;
  z-index: 1;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px min(5vw, 72px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.34);
}

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

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

.nav-links a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #dbeafe;
  transition: 0.25s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

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

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

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  min-height: 680px;
  padding: 34px min(5vw, 72px) 28px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 36%);
  align-items: center;
  gap: 30px;
  padding: clamp(28px, 5vw, 70px);
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  filter: blur(14px) saturate(1.18);
  transform: scale(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 22, 0.94), rgba(7, 11, 22, 0.64) 48%, rgba(7, 11, 22, 0.26)),
    linear-gradient(180deg, transparent, rgba(7, 11, 22, 0.86));
}

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

.hero-kicker,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

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

.hero-content p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 36px rgba(139, 92, 246, 0.32);
}

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

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

.hero-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 5vw, 70px);
  bottom: 32px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
}

.hero-dot.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-search,
.panel-rank,
.content-section,
.page-hero,
.detail-content,
.player-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px);
}

.hero-search,
.panel-rank {
  padding: 22px;
}

.hero-search label {
  display: block;
  margin-bottom: 12px;
  color: #dbeafe;
  font-weight: 800;
}

.hero-search div,
.inline-filter {
  display: flex;
  gap: 10px;
}

input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(255, 255, 255, 0.07);
}

.hero-search button {
  border: 0;
  border-radius: 16px;
  color: white;
  cursor: pointer;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.panel-rank h2 {
  margin: 0 0 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

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

.rank-item span {
  color: var(--brand-2);
  font-weight: 900;
}

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

.rank-item em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 900;
}

.content-section,
.page-hero,
.rank-list,
.detail-content,
.player-section {
  width: min(1180px, 90vw);
  margin: 28px auto;
  padding: clamp(20px, 4vw, 36px);
}

.section-head,
.page-hero,
.detail-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-tile {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(6, 182, 212, 0.1)),
    rgba(255, 255, 255, 0.05);
  transition: 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover,
.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.24);
}

.category-tile strong {
  display: block;
  font-size: 19px;
}

.category-tile span,
.category-tile p {
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  transition: 0.25s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.35), transparent 40%),
    linear-gradient(135deg, #111827, #1e293b);
}

.poster img,
.detail-cover img,
.rank-cover img,
.category-preview img,
.hero-poster img,
.hero-bg img,
.detail-backdrop img {
  transition: 0.35s ease;
}

.movie-card:hover .poster img,
.hero-poster:hover img,
.rank-cover:hover img {
  transform: scale(1.055);
}

.image-missing {
  opacity: 0;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 58px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 18px;
}

.category-overview-grid {
  display: grid;
  gap: 18px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.04);
  transition: 0.25s ease;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  min-height: 150px;
  border-radius: 20px;
}

.category-card-large h2 {
  margin: 6px 0 10px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 88px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  transition: 0.25s ease;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: var(--bg-soft);
}

.rank-content h2 {
  margin: 0 0 8px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.rank-score {
  color: #fbbf24;
  font-size: 28px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 54px min(5vw, 72px);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(18px) saturate(1.12);
  transform: scale(1.06);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 11, 22, 0.96), rgba(7, 11, 22, 0.72), rgba(7, 11, 22, 0.36));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, 90vw);
  margin: auto;
  align-items: center;
  justify-content: flex-start;
}

.detail-cover {
  flex: 0 0 min(310px, 36vw);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.detail-info {
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-info h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.detail-one {
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.large-tags {
  margin: 20px 0 26px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background:
    radial-gradient(circle at center, rgba(139, 92, 246, 0.16), transparent 32%),
    #030712;
}

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

.video-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.15), rgba(3, 7, 18, 0.7));
}

.video-start.hidden {
  display: none;
}

.play-icon {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.36);
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 23px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid white;
}

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

.story-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

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

.story-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, 90vw);
  margin: 48px auto 34px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  color: var(--text);
  font-weight: 900;
}

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

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

@media (max-width: 1100px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 780px) {
  .site-nav {
    padding: 14px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7, 11, 22, 0.96);
  }

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

  .hero-section {
    min-height: 0;
    padding: 20px;
  }

  .hero-carousel {
    min-height: 720px;
    border-radius: 28px;
  }

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

  .hero-poster {
    width: min(260px, 76vw);
    margin: 0 auto;
  }

  .hero-dots {
    left: 28px;
  }

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

  .section-head,
  .page-hero,
  .detail-wrap,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-score {
    font-size: 22px;
  }

  .detail-cover {
    width: min(280px, 76vw);
    flex-basis: auto;
  }
}

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

  .hero-search div,
  .inline-filter {
    flex-direction: column;
  }

  .content-section,
  .page-hero,
  .rank-list,
  .detail-content,
  .player-section {
    width: calc(100vw - 28px);
    padding: 18px;
  }
}
