:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.14);
  --amber: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #02111a;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 48%, #38bdf8);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.35);
  font-size: 15px;
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 13px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: rgba(15, 23, 42, 0.8);
  transform: translateY(-1px);
}

.nav-search {
  width: min(320px, 32vw);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-bar input,
.filter-bar select,
.search-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  outline: none;
  padding: 12px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-input:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

.nav-search button,
.primary-btn,
.ghost-btn,
.filter-reset,
.search-button {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-search button,
.primary-btn,
.search-button {
  color: #03141f;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 52%, #38bdf8);
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.25);
}

.primary-btn:hover,
.nav-search button:hover,
.search-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 56px rgba(34, 211, 238, 0.35);
}

.ghost-btn {
  color: var(--muted-strong);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

.ghost-btn:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-2px);
}

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

.mobile-only {
  display: none;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.9)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.38) 48%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 110px;
  width: min(660px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.09);
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero p {
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

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

.hero-tags {
  margin-bottom: 28px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.18);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.hero-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 11px !important;
  height: 11px !important;
  border-radius: 50%;
  padding: 0 !important;
}

.hero-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.12);
}

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 104px;
  width: 310px;
  display: grid;
  gap: 12px;
  z-index: 4;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

.hero-thumb img {
  width: 72px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.section-shell {
  padding: 72px 0 0;
}

.page-shell {
  padding: 42px 0 0;
}

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

.section-head h2,
.page-headline h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.page-headline p,
.detail-title p,
.category-card p,
.index-intro p {
  color: var(--muted);
  line-height: 1.8;
}

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

.category-chip,
.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(34, 211, 238, 0.16), transparent 45%),
    rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.category-chip {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-chip:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-chip span {
  font-size: 18px;
  font-weight: 900;
}

.category-chip small {
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.65);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.rank-badge,
.mini-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.24);
}

.movie-card-body {
  padding: 18px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  padding-left: 8px;
  color: rgba(148, 163, 184, 0.55);
}

.movie-card h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 46px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.horizontal-card {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  padding: 10px;
  transition: transform 0.2s ease, border 0.2s ease;
}

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

.horizontal-card img {
  width: 110px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

.horizontal-card strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 6px;
}

.horizontal-card small {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.mini-rank {
  position: static;
  min-width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 12px;
}

.index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.side-panel,
.index-intro,
.category-card,
.detail-panel,
.player-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.side-panel,
.index-intro,
.detail-panel,
.player-panel {
  padding: 24px;
}

.side-panel h2,
.index-intro h2,
.detail-panel h2,
.player-panel h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 22px;
}

.category-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 18px;
}

.category-card img {
  width: 180px;
  height: 124px;
  border-radius: 18px;
  object-fit: cover;
}

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

.category-card strong {
  color: var(--accent);
}

.category-list {
  display: grid;
  gap: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
  margin-bottom: 24px;
}

.no-results {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: var(--radius);
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.no-results.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.16) 28%, rgba(2, 6, 23, 0.54));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #03141f;
  background: linear-gradient(135deg, #67e8f9, #22d3ee);
  box-shadow: 0 22px 80px rgba(34, 211, 238, 0.45);
  font-size: 30px;
  transform: translateX(3px);
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 26px;
}

.detail-title {
  margin-bottom: 22px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 18px;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 2;
}

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

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

.catalog-list {
  columns: 4 220px;
  column-gap: 28px;
}

.catalog-list a {
  display: block;
  break-inside: avoid;
  margin: 0 0 10px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.catalog-list a:hover {
  color: var(--accent);
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.search-results {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
  padding: 12px;
}

.search-result-card img {
  width: 140px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
}

.search-result-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 20px;
}

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

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

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(160px, 0.7fr));
  gap: 36px;
  padding: 44px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-col h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

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

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-only {
    display: block;
  }

  .nav-shell {
    min-height: 66px;
    flex-wrap: wrap;
  }

  .nav-panel {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 16px;
  }

  .nav-panel.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-search {
    width: 100%;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    bottom: 92px;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .section-head,
  .page-headline {
    display: block;
  }

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

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

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

  .category-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 560px) {
  .category-grid,
  .movie-grid,
  .movie-grid.dense,
  .related-grid,
  .horizontal-list {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .search-row {
    flex-direction: column;
  }

  .horizontal-card,
  .search-result-card {
    grid-template-columns: 96px 1fr;
  }

  .horizontal-card img,
  .search-result-card img {
    width: 96px;
    height: 66px;
  }
}
