:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --gold: #facc15;
  --red: #fb7185;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.13), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
  font-size: 14px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 3px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  margin-top: 8px;
  font-weight: 700;
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.55) 34%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 86px;
}

.hero-kicker,
.hero-tags,
.meta-row,
.tag-row,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.hero-tags span,
.tag-row span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.hero-kicker span {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags span,
.tag-row span {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.action-link,
.play-now-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-button,
.play-now-button {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.24);
}

.ghost-button,
.action-link {
  color: #ffffff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover,
.action-link:hover,
.play-now-button:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 30px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 48px;
  background: var(--cyan);
}

.feature-strip,
.page-main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.feature-strip {
  position: relative;
  z-index: 5;
  margin-top: -44px;
}

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

.section {
  padding: 76px 0 0;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
}

.section-heading span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.section-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card,
.compact-card,
.category-card,
.rank-item,
.detail-panel,
.player-shell,
.search-panel,
.category-hero {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.movie-card {
  overflow: hidden;
  transition: 0.28s ease;
}

.movie-card:hover,
.compact-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
}

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

.poster-link img,
.category-card img,
.compact-image img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.compact-card:hover .compact-image img,
.detail-cover:hover img {
  transform: scale(1.08);
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  transition: 0.28s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.play-circle {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

.badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.top-left {
  top: 10px;
  left: 10px;
  color: var(--cyan);
}

.bottom-right {
  right: 10px;
  bottom: 10px;
}

.card-body {
  padding: 15px;
}

.card-body h3,
.compact-card h3,
.rank-item h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.4;
}

.card-body h3 a:hover,
.compact-card h3 a:hover,
.rank-item h3 a:hover {
  color: var(--cyan);
}

.card-body p,
.compact-card p,
.rank-item p,
.category-card p,
.detail-panel p,
.article-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.meta-row {
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: #475569;
}

.tag-row {
  margin-top: 12px;
}

.compact-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 10px;
}

.compact-image {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.compact-image span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  transition: 0.25s ease;
}

.compact-card:hover .compact-image span {
  opacity: 1;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.96));
}

.category-card strong,
.category-card p,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
}

.category-card p {
  margin-top: 8px;
  font-size: 14px;
}

.category-card em {
  margin-top: 12px;
  color: var(--cyan);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: 0.25s ease;
}

.rank-number {
  color: var(--gold);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

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

.search-panel {
  padding: 22px;
  margin-bottom: 26px;
}

.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 18px;
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.page-hero,
.category-hero {
  padding: 62px 0 22px;
}

.page-hero h1,
.category-hero h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p,
.category-hero p,
.detail-title p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.category-hero {
  padding: 36px;
  margin-top: 42px;
}

.breadcrumb {
  margin-bottom: 22px;
}

.breadcrumb a,
.breadcrumb span,
.detail-meta span {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
  cursor: pointer;
}

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

.player-cover-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 42px);
}

.player-cover small {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
}

.play-icon-large {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 20px 58px rgba(34, 211, 238, 0.32);
}

.detail-panel {
  padding: 26px;
  margin-top: 22px;
}

.detail-title {
  margin: 42px 0 22px;
}

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

.article-text {
  display: grid;
  gap: 18px;
}

.article-text h2,
.side-block h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.side-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-soft);
}

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

.side-list a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-list img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.side-list strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
}

.side-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pagination-links a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
}

.pagination-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.45);
}

.site-footer {
  padding: 78px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.copyright {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 78px;
  }

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

  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 17px;
  }

  .nav-wrap,
  .feature-strip,
  .page-main,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .feature-grid,
  .movie-grid,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .compact-card,
  .rank-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .rank-number {
    display: none;
  }

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

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

  .section {
    padding-top: 54px;
  }

  .category-hero,
  .detail-panel,
  .search-panel {
    padding: 20px;
  }
}
