:root {
  --bg-deep: #0f172a;
  --bg-main: #111827;
  --bg-card: rgba(30, 41, 59, 0.52);
  --bg-card-strong: rgba(15, 23, 42, 0.82);
  --line: rgba(59, 130, 246, 0.20);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.46);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, 0.28), transparent 26rem),
    radial-gradient(circle at 84% 12%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  min-height: 100vh;
}

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: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.88), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  font-size: 1.48rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 560px;
}

.nav-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 100%;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search input,
.mobile-search input {
  padding: 11px 94px 11px 18px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.66);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
  background: rgba(15, 23, 42, 0.74);
}

.nav-search button,
.mobile-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), #06b6d4);
  font-weight: 700;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
}

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

.mobile-panel.open {
  display: block;
}

.mobile-links {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-links a {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.50);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
}

.hero {
  position: relative;
  height: min(600px, calc(100vh - 68px));
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.62)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.82));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 32px 0 68px;
}

.eyebrow,
.type-pill,
.poster-year,
.rank-number,
.category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 18px;
  padding: 8px 16px;
  color: #fff;
  background: rgba(37, 99, 235, 0.90);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 620px;
  margin: 20px 0 28px;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.page-btn,
.player-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.primary-btn {
  padding: 13px 28px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), #06b6d4);
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
  padding: 12px 24px;
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(15, 23, 42, 0.38);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.page-btn:hover,
.player-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.20);
}

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

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.page-main,
.content-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-block {
  margin-bottom: 62px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  background: var(--cyan-soft);
  border-radius: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.48rem, 3vw, 2.1rem);
}

.section-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.55), transparent);
}

.section-more {
  padding: 9px 16px;
  color: #bae6fd;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.38);
  white-space: nowrap;
}

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

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

.movie-card,
.movie-row,
.category-card,
.info-panel,
.filter-panel,
.player-card,
.detail-card {
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 18px 50px rgba(2, 8, 23, 0.24);
  backdrop-filter: blur(14px);
}

.movie-card,
.category-card,
.info-panel,
.filter-panel,
.detail-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.movie-card a,
.category-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.55), rgba(15, 23, 42, 0.84));
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 12;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.66));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play,
.play-dot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.30);
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.70);
  font-size: 0.78rem;
}

.movie-info {
  display: block;
  padding: 16px;
}

.movie-info strong {
  display: block;
  min-height: 2.8em;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.38;
  transition: color 0.25s ease;
}

.movie-info small,
.movie-row small,
.category-card p,
.info-panel p,
.detail-card p,
.hero-meta {
  color: var(--muted);
  line-height: 1.72;
}

.movie-info small {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 10px 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: block;
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 0.86rem;
}

.tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tagline span,
.tag-cloud span,
.type-pill,
.category-badge {
  padding: 5px 10px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-size: 0.78rem;
}

.movie-card:hover,
.category-card:hover,
.movie-row:hover {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(30, 41, 59, 0.72);
  transform: translateY(-4px);
}

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

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
}

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

.movie-card:hover .movie-info strong,
.movie-row:hover strong {
  color: var(--cyan);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 26px;
}

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

.movie-row {
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-row a {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  min-height: 112px;
}

.row-poster {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.75);
}

.play-dot {
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
}

.movie-row:hover .play-dot {
  opacity: 1;
}

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

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

.row-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row-info em {
  margin: 6px 0;
  color: #94a3b8;
  font-size: 0.82rem;
  font-style: normal;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.50);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.30);
  background: rgba(30, 41, 59, 0.58);
}

.rank-number {
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  font-size: 1.05rem;
}

.rank-poster {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
}

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

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

.rank-info strong {
  color: #fff;
}

.rank-info small {
  margin-top: 6px;
  color: var(--muted);
}

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

.category-card {
  position: relative;
  min-height: 190px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card a {
  padding: 22px;
}

.category-card h2,
.category-card h3,
.info-panel h1,
.detail-card h1,
.detail-card h2 {
  margin: 0;
}

.category-card h2,
.category-card h3 {
  font-size: 1.2rem;
}

.category-card p {
  margin: 12px 0 16px;
}

.category-badge {
  color: #dbeafe;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.20);
}

.page-hero {
  padding: 56px 0 26px;
}

.info-panel,
.filter-panel,
.detail-card,
.player-card {
  padding: 24px;
}

.info-panel h1,
.detail-card h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.info-panel p {
  max-width: 860px;
  margin: 16px 0 0;
  color: #cbd5e1;
}

.filter-panel {
  margin: 28px 0;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.filter-input,
.filter-select {
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
}

.filter-empty {
  display: none;
  padding: 32px;
  text-align: center;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
}

.filter-empty.show {
  display: block;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: #bae6fd;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.38);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(0, 0, 0, 0.70));
}

.player-start {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #06b6d4);
  border-radius: 50%;
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.42);
  font-size: 1.55rem;
}

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

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
  color: #dbeafe;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.detail-one-line {
  margin: 0 0 24px;
  color: #67e8f9;
  font-size: 1.2rem;
  line-height: 1.72;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-section h2 {
  margin-bottom: 12px;
  font-size: 1.32rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.side-panel {
  position: sticky;
  top: 92px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.28rem;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.58);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #67e8f9;
  font-size: 1.35rem;
}

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

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

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

.footer-links a {
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero {
    min-height: 540px;
    height: 540px;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .hero-copy {
    padding-top: 60px;
  }

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

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

  .movie-row a,
  .rank-item {
    grid-template-columns: 118px 1fr;
  }

  .rank-number {
    display: none;
  }

  .row-info {
    padding-right: 10px;
  }

  .player-start {
    width: 74px;
    height: 74px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid-compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}

.category-preview a {
  padding: 6px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  font-size: 0.82rem;
}
