:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --ocean: #0ea5e9;
  --ocean-2: #0284c7;
  --violet: #8b5cf6;
  --rose: #f43f5e;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.26), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(139, 92, 246, 0.18), transparent 32%),
    linear-gradient(180deg, #020617 0%, #08111f 42%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean), var(--violet));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  overflow-x: auto;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(30, 41, 59, 0.95);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(30, 41, 59, 0.95);
  cursor: pointer;
}

.home-hero {
  position: relative;
  min-height: 560px;
  height: 68vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.1) 50%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-copy {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2));
  top: 50%;
  transform: translateY(-48%);
  width: min(680px, calc(100% - 72px));
  display: grid;
  gap: 18px;
  animation: fadeUp 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.82);
  box-shadow: 0 12px 34px rgba(14, 165, 233, 0.28);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-side h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-side p {
  margin: 0;
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
}

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

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

.primary-button {
  padding: 15px 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-2));
  box-shadow: 0 16px 42px rgba(14, 165, 233, 0.36);
}

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

.secondary-button,
.ghost-button {
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: #fff;
}

.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 70px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  margin-bottom: 36px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.9));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  margin-top: 14px;
}

.search-panel {
  margin-bottom: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
}

.search-panel label {
  display: grid;
  gap: 10px;
}

.search-panel span {
  color: #e2e8f0;
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  outline: none;
  padding: 0 18px;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
}

.search-panel input:focus {
  border-color: rgba(14, 165, 233, 0.72);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-row button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px 13px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.68);
  cursor: pointer;
}

.filter-row button:hover,
.filter-row button.active {
  color: #fff;
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.35);
}

.empty-tip {
  margin: 18px 0 0;
  color: var(--muted);
}

.content-section {
  margin: 0 0 54px;
}

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

.section-title h2,
.article-section h2,
.site-footer h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-link {
  padding: 9px 13px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.22);
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 14px 42px rgba(2, 6, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.48);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.8) 100%);
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 165, 233, 0.9);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), #fb923c);
  box-shadow: 0 12px 26px rgba(244, 63, 94, 0.32);
}

.movie-info {
  padding: 15px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.movie-info h3 {
  margin: 0;
  min-height: 48px;
  color: #fff;
  font-size: 17px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info p {
  margin: 10px 0 0;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scrollbar-width: thin;
}

.rail-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.rail-item {
  width: 268px;
  flex: 0 0 268px;
}

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

.category-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.18), transparent 36%),
    rgba(15, 23, 42, 0.74);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.4);
}

.category-card > a {
  display: grid;
  gap: 10px;
}

.category-card span {
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 800;
}

.category-card strong {
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.7;
}

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-card div a,
.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.82);
  font-size: 13px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: rgba(14, 165, 233, 0.38);
}

.compact-rank {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: rgba(14, 165, 233, 0.32);
  font-weight: 900;
}

.compact-card img {
  width: 58px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card span {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.compact-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb strong {
  color: #e2e8f0;
  font-weight: 600;
}

.detail-wrap {
  padding-top: 26px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: stretch;
  margin-bottom: 50px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  min-height: 430px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean), var(--violet));
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.42);
  font-size: 28px;
}

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

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-side {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
}

.detail-side > img {
  width: 150px;
  height: 220px;
  border-radius: 18px;
  object-fit: cover;
}

.detail-side h1 {
  margin-top: 16px;
  font-size: clamp(28px, 4vw, 46px);
}

.detail-side p {
  margin-top: 14px;
  font-size: 16px;
}

.detail-meta {
  margin-top: 16px;
}

.detail-tags {
  margin-top: 16px;
}

.article-section {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
}

.article-section h2 {
  margin: 0 0 14px;
}

.article-section h2:not(:first-child) {
  margin-top: 28px;
}

.article-section p {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 2;
}

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

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.74);
}

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

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

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

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

.site-footer li a:hover {
  color: #fff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted-2);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(-42%);
  }
  to {
    opacity: 1;
    transform: translateY(-48%);
  }
}

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

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

@media (max-width: 820px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 6px;
  }

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

  .main-nav a {
    width: 100%;
  }

  .home-hero {
    height: 74vh;
    min-height: 560px;
  }

  .hero-copy {
    left: 20px;
    width: calc(100% - 40px);
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 26px;
  }

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

  .category-grid,
  .compact-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .detail-side > img {
    width: 104px;
    height: 156px;
  }

  .player-shell video {
    min-height: 240px;
  }
}

@media (max-width: 520px) {
  .page-wrap {
    width: min(100% - 22px, 1180px);
    padding-top: 28px;
  }

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .movie-grid,
  .all-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.large .poster-link,
  .poster-link {
    aspect-ratio: 16 / 10;
  }

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

  .rail-section {
    padding: 18px;
  }

  .rail-item {
    width: 240px;
    flex-basis: 240px;
  }

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

  .detail-side > img {
    width: 100%;
    height: auto;
    max-height: 420px;
  }
}
