:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(96, 165, 250, 0.24);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --yellow: #facc15;
  --red: #f43f5e;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #000000 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

.brand-name,
.footer-brand span:last-child {
  font-size: 1.45rem;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #dbeafe;
  font-size: 0.95rem;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: currentColor;
  border-radius: 999px;
}

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

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 5s ease;
}

.hero-slide.is-active img {
  transform: scale(1.1);
}

.hero-shade {
  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.08)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.32) 46%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 104px;
  width: min(680px, calc(100% - 48px));
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.72));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  margin: 22px 0 0;
  max-width: 620px;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.15);
  color: #cffafe;
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
}

.tag-row span {
  padding: 4px 8px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020617;
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.28);
}

.ghost-btn,
.section-link {
  border: 1px solid rgba(125, 211, 252, 0.36);
  background: rgba(15, 23, 42, 0.58);
  color: #e0f2fe;
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.2);
}

.hero-search-card {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 110px;
  width: min(380px, calc(100% - 48px));
  padding: 20px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-card label {
  display: block;
  margin-bottom: 10px;
  color: #dbeafe;
  font-weight: 900;
}

.hero-search-row {
  display: flex;
  gap: 10px;
}

.hero-search-row input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.74);
  color: white;
}

.hero-search-row input,
.filter-controls input,
.filter-controls select {
  min-height: 48px;
  padding: 0 14px;
}

.hero-search-row button {
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020617;
  font-weight: 900;
}

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

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

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

.page-container {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
  padding: 58px 0 82px;
}

.with-top {
  padding-top: 42px;
}

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

.section-heading,
.page-hero,
.filter-panel,
.detail-hero,
.detail-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.filter-panel h2,
.related-panel h2,
.detail-article h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.filter-panel p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.compact-card .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.rank-card:hover img {
  transform: scale(1.1);
}

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

.poster-caption {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.94);
  color: #020617;
  font-size: 0.72rem;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.movie-card h3,
.rank-card h3 {
  margin: 8px 0 7px;
  color: white;
  font-size: 1.05rem;
  line-height: 1.28;
}

.movie-card p,
.rank-card p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feature-band {
  position: relative;
  padding: 30px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(88, 28, 135, 0.24));
  box-shadow: var(--shadow);
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.55s ease;
}

.category-tile::after,
.category-card-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.9));
}

.category-tile div {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
}

.category-tile span,
.category-card-body h2 {
  display: block;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
}

.category-tile p,
.category-card-body p {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
}

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

.category-card-large {
  min-height: auto;
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 170px;
}

.category-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.category-card-body {
  position: relative;
  z-index: 3;
  padding: 22px;
}

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

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

.rank-card {
  display: flex;
  min-height: 138px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.rank-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.44);
}

.rank-poster {
  position: relative;
  flex: 0 0 116px;
  overflow: hidden;
}

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

.rank-num {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-weight: 900;
}

.rank-info {
  min-width: 0;
  padding: 16px;
}

.page-hero {
  min-height: 260px;
  padding: 34px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.24), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
  box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.filter-panel {
  margin-top: 32px;
  padding: 22px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.filter-controls {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 150px 150px;
  gap: 12px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 26px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-hero {
  align-items: stretch;
  padding: 30px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.detail-cover {
  flex: 0 0 min(320px, 32vw);
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 5.1rem);
}

.lead {
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 1.1rem;
}

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

.watch-section {
  margin-top: 34px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.56));
  color: white;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: auto;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020617;
  font-size: 2.5rem;
  box-shadow: 0 22px 54px rgba(34, 211, 238, 0.36);
}

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

.detail-layout {
  align-items: flex-start;
  margin-top: 34px;
}

.detail-article,
.related-panel {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.detail-article {
  flex: 1;
  padding: 28px;
}

.detail-article p {
  margin: 12px 0 24px;
  color: #cbd5e1;
  font-size: 1rem;
}

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

.info-table div {
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.44);
}

.info-table span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.info-table strong {
  display: block;
  margin-top: 5px;
  color: white;
}

.related-panel {
  width: 390px;
  padding: 22px;
}

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

.side-list .rank-card {
  min-height: 112px;
}

.side-list .rank-poster {
  flex-basis: 92px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.64), #000000);
}

.footer-inner {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
  padding: 42px 0;
  text-align: center;
}

.footer-brand {
  justify-content: center;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 18px 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 0.88rem;
  }

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

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

  .hero-search-card {
    display: none;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 88px;
    width: auto;
  }

  .page-container {
    width: min(100% - 28px, 720px);
  }

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

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

  .section-heading,
  .page-hero,
  .filter-panel,
  .detail-hero,
  .detail-layout {
    align-items: stretch;
    flex-direction: column;
  }

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

  .detail-cover,
  .related-panel {
    width: 100%;
    flex-basis: auto;
  }

  .detail-cover {
    max-height: 520px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
    padding: 0 14px;
  }

  .brand-name {
    font-size: 1.18rem;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

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

  .primary-btn,
  .ghost-btn,
  .section-link {
    width: 100%;
  }

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

  .feature-band,
  .page-hero,
  .detail-hero,
  .filter-panel,
  .detail-article,
  .related-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .rank-card {
    min-height: 120px;
  }

  .rank-poster {
    flex-basis: 104px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }

  .player-overlay span {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}
