:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #020617;
  --dark-2: #0f172a;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

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

img {
  max-width: 100%;
}

.site-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.22);
}

.nav-bar {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #22d3ee);
  color: white;
  box-shadow: 0 12px 22px rgba(6, 182, 212, 0.35);
  font-size: 14px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #22d3ee;
}

.header-search {
  position: relative;
  width: 270px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.header-search input,
.mobile-search input,
.page-filter input,
.page-filter select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  outline: none;
  padding: 11px 14px;
}

.header-search input {
  padding-left: 36px;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter input:focus,
.page-filter select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: 430px;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  padding: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  color: #e2e8f0;
}

.search-result:hover {
  background: rgba(6, 182, 212, 0.16);
}

.search-result img {
  width: 52px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  background: #0f172a;
}

.search-result strong {
  display: block;
  color: #ffffff;
  line-height: 1.35;
}

.search-result span {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 13px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-menu {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-menu-inner {
  display: grid;
  gap: 16px;
  padding: 18px 0 22px;
}

.mobile-link {
  display: block;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 72% 24%,
      rgba(6, 182, 212, 0.25),
      transparent 28%
    ),
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.92) 0%,
      rgba(2, 6, 23, 0.62) 48%,
      rgba(2, 6, 23, 0.12) 100%
    ),
    linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-text {
  width: min(680px, 100%);
  color: #ffffff;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--cyan);
  color: #ffffff;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.28);
}

.hero h1 {
  margin: 24px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.38);
}

.hero p {
  width: min(640px, 100%);
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

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

.btn-primary {
  background: var(--cyan);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(6, 182, 212, 0.28);
}

.btn-primary:hover {
  background: var(--cyan-dark);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.35);
  color: #ffffff;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  background: #22d3ee;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.62);
  color: #ffffff;
  font-size: 22px;
}

.main-flow {
  display: grid;
  gap: 54px;
  padding: 54px 0 0;
}

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

.section-title h2,
.page-title h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-6px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 300px;
  overflow: hidden;
  background: #0f172a;
}

.movie-card-large .poster-wrap {
  height: 380px;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 48%,
    rgba(2, 6, 23, 0.76) 100%
  );
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.92);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: all 0.25s ease;
  box-shadow: 0 18px 35px rgba(2, 6, 23, 0.32);
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.movie-card-body strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card:hover .movie-card-body strong {
  color: var(--cyan-dark);
}

.movie-card-body em {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta-line {
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.feature-block {
  border-radius: 28px;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
  padding: 28px;
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.18);
}

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

.category-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(6, 182, 212, 0.48);
  transform: translateY(-5px);
}

.category-card strong {
  font-size: 22px;
  font-weight: 900;
}

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

.category-card span {
  color: var(--cyan-dark);
  font-weight: 800;
}

.ranking-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 52px 76px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.ranking-item:hover {
  border-color: rgba(6, 182, 212, 0.42);
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #0f172a;
  color: #22d3ee;
  font-weight: 900;
}

.ranking-item img {
  width: 76px;
  height: 98px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info em,
.ranking-info small {
  display: block;
}

.ranking-info strong {
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-info em {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-info small {
  color: #94a3b8;
}

.score {
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan-dark);
  padding: 8px 12px;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 34px;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(6, 182, 212, 0.18),
      transparent 28%
    ),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.page-title {
  width: min(760px, 100%);
}

.page-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.page-filter input,
.page-filter select {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.detail-hero {
  padding: 42px 0 0;
  background:
    radial-gradient(
      circle at 86% 12%,
      rgba(6, 182, 212, 0.18),
      transparent 26%
    ),
    linear-gradient(180deg, #020617 0%, #0f172a 64%, #f8fafc 64%, #f8fafc 100%);
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
}

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

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.72)),
    rgba(2, 6, 23, 0.15);
  color: #ffffff;
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay-inner {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.play-overlay-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.92);
  color: #ffffff;
  font-size: 32px;
  box-shadow: 0 24px 48px rgba(6, 182, 212, 0.28);
}

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

.detail-intro {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 28px;
  padding: 30px 0 0;
  color: #ffffff;
}

.detail-intro h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-intro p {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.34);
}

.detail-poster img {
  width: 100%;
  height: 390px;
  object-fit: cover;
  background: #0f172a;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 8px 12px;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 46px 0 0;
}

.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  padding: 26px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.content-card + .content-card {
  margin-top: 20px;
}

.content-card h2,
.side-card h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  color: #334155;
  font-size: 16px;
  line-height: 2;
}

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

.detail-tags span {
  background: #ecfeff;
  color: #0e7490;
}

.related-list,
.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 13px;
  align-items: center;
}

.compact-card img {
  width: 86px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.compact-card strong,
.compact-card em {
  display: block;
}

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

.compact-card em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  margin-top: 70px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1.1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

.site-footer p {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #22d3ee;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 22px 16px;
  color: #94a3b8;
  text-align: center;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

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

  .ranking-panel,
  .detail-layout,
  .detail-intro {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(320px, 100%);
  }

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

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

  .nav-bar {
    gap: 14px;
  }

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 620px;
  }

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

  .hero-controls {
    bottom: 20px;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

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

  .poster-wrap,
  .movie-card-large .poster-wrap {
    height: 260px;
  }

  .page-filter {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 42px 64px 1fr;
  }

  .ranking-item .score {
    grid-column: 3;
    width: max-content;
  }
}

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    min-height: 600px;
  }

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

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

  .btn {
    width: 100%;
  }

  .main-flow {
    gap: 38px;
    padding-top: 36px;
  }

  .feature-block {
    padding: 18px;
  }

  .movie-grid,
  .movie-grid-wide,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card-large .poster-wrap {
    height: 340px;
  }

  .ranking-info em {
    display: none;
  }

  .detail-hero {
    padding-top: 18px;
  }

  .detail-intro {
    padding-top: 22px;
  }

  .detail-poster {
    display: none;
  }

  .content-card,
  .side-card {
    padding: 20px;
  }

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