:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.62);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-deep: #0891b2;
  --yellow: #facc15;
  --red: #f87171;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.12), transparent 36rem),
    radial-gradient(circle at 86% 18%, rgba(8, 145, 178, 0.14), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: #001018;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.28);
}

.logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-copy strong {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.logo-copy em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.header-search {
  width: 280px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 9px 12px 9px 16px;
  color: var(--text);
  background: transparent;
}

.header-search input::placeholder {
  color: #64748b;
}

.header-search button,
.search-hero button,
.btn-primary,
.btn-secondary,
.player-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
}

.header-search button {
  margin-right: 3px;
  padding: 7px 14px;
  background: var(--cyan-strong);
  color: white;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.55rem;
  line-height: 1;
}

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

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

.page-main {
  padding-top: 66px;
}

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

.hero-track {
  position: relative;
  min-height: 70vh;
}

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

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

.hero-backdrop,
.hero-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-backdrop {
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.42), transparent 45%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.92));
}

.hero-backdrop img {
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.05);
}

.hero-backdrop img.is-empty {
  visibility: hidden;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 28%, transparent 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 72px 0 76px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.22);
  font-size: 0.9rem;
  font-weight: 750;
}

.hero h1,
.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 6vw, 5.25rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
  text-shadow: 0 16px 34px rgba(2, 6, 23, 0.56);
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 4.8rem);
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 0 16px;
  color: #e2e8f0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  text-shadow: 0 10px 24px rgba(2, 6, 23, 0.68);
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 28px;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta,
.detail-meta,
.movie-meta-line,
.rank-meta,
.latest-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #dbeafe;
  font-size: 0.88rem;
  font-weight: 700;
}

.badge-accent {
  background: rgba(6, 182, 212, 0.88);
  border-color: rgba(34, 211, 238, 0.24);
  color: white;
}

.badge-score {
  color: #fef08a;
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: #001018;
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.24);
}

.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.76);
  color: #e2e8f0;
}

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

.hero-dots {
  position: absolute;
  z-index: 6;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: 56px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.32);
}

.section-head,
.category-section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.section-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.22), transparent 48%),
    linear-gradient(180deg, #1e293b, #020617);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.38);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cover-img.is-empty {
  visibility: hidden;
}

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

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-score,
.movie-year {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-score {
  left: 10px;
  bottom: 10px;
  color: #fef08a;
  background: rgba(2, 6, 23, 0.74);
}

.movie-year {
  top: 10px;
  right: 10px;
  color: white;
  background: rgba(6, 182, 212, 0.88);
}

.movie-card-body {
  padding-top: 10px;
}

.movie-card h3 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 0.98rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  margin: 0 0 8px;
  min-height: 42px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  gap: 8px;
  color: var(--subtle);
  font-size: 0.8rem;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.movie-tags span {
  padding: 2px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 145, 178, 0.18);
  font-size: 0.74rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent 42%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.category-card li {
  margin: 7px 0;
  color: #cbd5e1;
  font-size: 0.92rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.72);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
  font-weight: 900;
}

.rank-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.24), transparent),
    #0f172a;
}

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

.rank-info h3 {
  margin: 0 0 5px;
  font-size: 1.03rem;
}

.rank-info h3 a:hover {
  color: var(--cyan);
}

.rank-info p {
  margin: 0 0 7px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta,
.latest-meta {
  color: var(--subtle);
  font-size: 0.85rem;
}

.rank-score-large {
  color: var(--yellow);
  font-size: 1.2rem;
  font-weight: 900;
}

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

.latest-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: background 0.2s ease;
}

.latest-card:hover {
  background: rgba(30, 41, 59, 0.7);
}

.latest-cover {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.24), transparent),
    #0f172a;
}

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

.latest-body {
  padding: 16px 18px 16px 0;
}

.latest-body h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.latest-body h3 a:hover {
  color: var(--cyan);
}

.latest-body p {
  margin: 0 0 12px;
  color: var(--muted);
}

.page-hero {
  padding: 62px 0 36px;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 36rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0));
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 790px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.05rem;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.search-hero {
  display: flex;
  gap: 10px;
  width: min(680px, 100%);
  margin-top: 26px;
}

.search-hero input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: 0;
  border-radius: 999px;
  padding: 13px 18px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
}

.search-hero button {
  padding: 0 22px;
  background: var(--cyan-strong);
  color: white;
}

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

.player-panel,
.detail-side,
.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: black;
}

.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.54));
  transition: opacity 0.2s ease;
}

.video-overlay.is-hidden {
  opacity: 0;
}

.player-button {
  pointer-events: auto;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: rgba(6, 182, 212, 0.88);
  color: white;
  font-size: 2rem;
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.36);
}

.player-status {
  padding: 13px 18px;
  min-height: 48px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.62);
}

.detail-side {
  padding: 22px;
}

.detail-side h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

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

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

.detail-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.18);
  color: #bae6fd;
  font-size: 0.86rem;
}

.content-grid {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.content-panel {
  padding: 24px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  white-space: pre-line;
}

.search-result-grid {
  display: grid;
  gap: 14px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.62);
}

.search-result-card h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.search-result-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.site-footer {
  margin-top: 42px;
  padding: 36px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.74);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

  .mobile-toggle {
    display: block;
  }

  .header-search {
    width: 320px;
    margin-left: auto;
  }

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

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

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

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

  .page-main {
    padding-top: 62px;
  }

  .header-search {
    display: none;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 54px 0 68px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

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

  .btn-primary,
  .btn-secondary,
  .search-hero button {
    width: 100%;
  }

  .section {
    padding: 40px 0;
  }

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

  .category-cards {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 74px 1fr;
    gap: 10px;
  }

  .rank-score-large {
    grid-column: 3;
    justify-self: start;
  }

  .latest-card {
    grid-template-columns: 118px 1fr;
    gap: 12px;
  }

  .latest-body {
    padding: 12px 12px 12px 0;
  }

  .latest-body p,
  .rank-info p {
    -webkit-line-clamp: 2;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .movie-card p,
  .movie-tags {
    display: none;
  }

  .rank-thumb {
    display: none;
  }

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

  .rank-score-large {
    grid-column: 2;
  }
}
