:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-card: #1e293b;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --yellow: #eab308;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.2), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.35);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.24);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.01em;
}

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

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

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

.nav-link {
  padding: 10px 13px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.78);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  outline: none;
  border-radius: 12px;
  transition: 0.22s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(6, 182, 212, 0.85);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-bar button,
.player-action,
.menu-button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  border-radius: 12px;
  transition: 0.22s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-bar button,
.player-action {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.18);
}

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.filter-bar button:hover,
.player-action:hover {
  transform: translateY(-1px) scale(1.02);
}

.secondary-button {
  padding: 12px 20px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--border);
}

.menu-button {
  display: none;
  margin-left: auto;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.82);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
}

.mobile-search input {
  width: 100%;
  padding: 11px 12px;
}

.mobile-search button {
  padding: 11px 14px;
}

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

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 72px 0 86px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.13);
  backdrop-filter: blur(12px);
  font-weight: 700;
  font-size: 14px;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta,
.breadcrumb,
.info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span {
  color: var(--soft);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  font-weight: 800;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 4px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: 0.25s ease;
}

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

.page-main,
.home-main {
  padding: 72px 0;
}

.home-main {
  display: grid;
  gap: 72px;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  color: #ffffff;
  line-height: 1.15;
}

.section-heading h2,
.page-title h1 {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading h2 span,
.page-title h1 span,
.detail-copy h2 span {
  display: inline-block;
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-grid.six-columns {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.26);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(6, 182, 212, 0.68);
  box-shadow: 0 26px 64px rgba(6, 182, 212, 0.12);
}

.movie-card-link {
  display: grid;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.28), transparent 36%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.compact-card .poster-frame {
  aspect-ratio: 16 / 10;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08) 58%, rgba(2, 6, 23, 0.05));
}

.rating-badge,
.play-badge,
.rank-number {
  position: absolute;
  z-index: 2;
}

.rating-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.25s ease;
}

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

.card-copy {
  padding: 16px;
}

.card-copy h3 {
  margin: 0 0 9px;
  color: #ffffff;
  line-height: 1.35;
  font-size: 17px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-copy p {
  min-height: 45px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.58;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 7px;
}

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

.tag-row span {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.feature-panel,
.filter-panel,
.detail-copy,
.video-side,
.category-card,
.rank-list,
.player-shell {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
  box-shadow: var(--shadow);
}

.feature-panel {
  border-radius: 28px;
  padding: clamp(24px, 5vw, 48px);
}

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

.category-card {
  border-radius: 22px;
  overflow: hidden;
}

.category-card a {
  display: grid;
  gap: 14px;
  height: 100%;
  padding: 26px;
}

.category-card h2 {
  margin: 0;
  font-size: 23px;
}

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

.mini-links {
  display: grid;
  gap: 7px;
}

.mini-links a {
  display: block;
  color: var(--soft);
  padding: 0;
}

.category-more {
  color: #67e8f9;
  font-weight: 800;
}

.rank-list {
  display: grid;
  border-radius: 24px;
  overflow: hidden;
}

.rank-item {
  display: grid;
  grid-template-columns: 62px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  transition: 0.22s ease;
}

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

.rank-item:hover {
  background: rgba(6, 182, 212, 0.08);
}

.rank-number {
  position: static;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.rank-copy h3 {
  margin: 0 0 8px;
}

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

.page-title {
  margin-bottom: 28px;
}

.breadcrumb {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.filter-panel {
  border-radius: 22px;
  padding: 18px;
  margin: 0 0 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 160px 110px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 13px;
}

.filter-bar button {
  padding: 12px 16px;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
}

.empty-state.is-visible {
  display: block;
}

.detail-main {
  padding: 34px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
}

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

.watch-player video,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.watch-player video {
  z-index: 1;
  object-fit: contain;
  background: #000000;
}

.player-poster {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
}

.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.62));
}

.player-action {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  font-size: 30px;
}

.watch-player.is-playing .player-poster,
.watch-player.is-playing .player-action {
  display: none;
}

.detail-copy {
  margin-top: 22px;
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 18px;
}

.detail-copy h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-copy h2 span {
  width: 6px;
  height: 26px;
}

.detail-copy p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.video-side {
  position: sticky;
  top: 100px;
  align-self: start;
  border-radius: 24px;
  padding: 22px;
}

.video-side h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

.info-list {
  display: grid;
}

.info-row {
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span:first-child {
  color: var(--muted);
}

.info-row span:last-child {
  text-align: right;
  color: #ffffff;
  font-weight: 700;
}

.related-section {
  margin-top: 54px;
}

.search-page-grid {
  display: grid;
  gap: 28px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-brand {
  font-size: 24px;
}

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

.site-footer h2 {
  margin: 0 0 15px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--soft);
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 11px;
}

.footer-bottom {
  padding: 18px 0 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

  .video-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-actions,
  .section-heading,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 78px 1fr;
  }

  .rank-item .primary-button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .card-copy {
    padding: 13px;
  }

  .card-copy p {
    display: none;
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 1fr;
  }

  .rank-thumb {
    display: none;
  }
}
