:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.55);
  --panel-strong: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --accent: #38bdf8;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #172554 42%, #0f172a 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.97));
  border-bottom: 1px solid rgba(59, 130, 246, 0.24);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(18px);
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
}

.logo span:last-child,
.footer-logo span:last-child {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.38);
}

.nav-search {
  position: relative;
  max-width: 680px;
  justify-self: center;
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
}

.nav-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 12px 18px;
}

.nav-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.hero-button,
.filter-button {
  border: 0;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button:hover,
.hero-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.28);
}

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

.nav-links {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-width: thin;
}

.nav-links a {
  white-space: nowrap;
  color: #cbd5e1;
  font-size: 0.95rem;
  padding: 7px 15px;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover {
  color: #67e8f9;
  background: rgba(37, 99, 235, 0.18);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.78);
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.07em;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: #dbeafe;
}

.hero-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.hero-dots button {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #22d3ee;
}

.content-section,
.page-hero,
.detail-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.content-section {
  padding: 48px 0;
}

.section-heading,
.page-title-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--soft);
}

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

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

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

.movie-card {
  background: rgba(30, 41, 59, 0.44);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.2);
  transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  background: rgba(30, 41, 59, 0.66);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.cover-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
}

.play-badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.88);
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.card-info {
  padding: 16px;
}

.card-info h3,
.large-card-content h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.06rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.24s ease;
}

.movie-card:hover h3 {
  color: #67e8f9;
}

.card-info p,
.large-card-content p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.meta-row span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

.large-card {
  position: relative;
}

.large-cover {
  min-height: 320px;
  aspect-ratio: auto;
}

.large-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
}

.large-card-content h3 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.small-cover {
  aspect-ratio: auto;
  min-height: 118px;
}

.rank-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-weight: 900;
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.25), transparent 32%), linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.page-hero-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -100px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  filter: blur(4px);
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

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

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.7s ease, opacity 0.28s ease;
}

.category-card:hover img {
  opacity: 0.75;
  transform: scale(1.08);
}

.category-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.88));
}

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

.category-card p {
  margin: 0;
  color: #cbd5e1;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin: 10px 0 28px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #fff;
  background: rgba(30, 41, 59, 0.7);
  padding: 11px 13px;
  outline: none;
}

.filter-empty {
  display: none;
  padding: 44px 0;
  text-align: center;
  color: #94a3b8;
}

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

.detail-shell {
  padding: 36px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 0.92rem;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-info,
.side-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.36);
  font-size: 2rem;
}

.detail-info {
  margin-top: 22px;
  padding: clamp(22px, 3vw, 34px);
}

.detail-info h1 {
  margin-top: 0;
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 22px;
}

.detail-meta span,
.tag-list span {
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.16);
  padding: 6px 11px;
  font-size: 0.88rem;
}

.highlight-line {
  color: #67e8f9;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 1.35rem;
}

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

.side-card {
  padding: 20px;
  margin-bottom: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

.footer-grid p,
.footer-grid li,
.footer-grid a {
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tags a {
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(37, 99, 235, 0.14);
}

.footer-bottom {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.search-lead {
  margin-top: 20px;
  color: #cbd5e1;
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .navbar {
    grid-template-columns: 1fr auto;
    padding: 10px 16px;
  }

  .nav-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    display: none;
    grid-column: 1 / -1;
    padding: 8px 0 4px;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
  }

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

  .nav-links a {
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.44);
  }

  .hero {
    height: 520px;
  }

  .hero-layer {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.9));
  }

  .section-heading,
  .page-title-row {
    display: block;
  }

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

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

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

@media (max-width: 560px) {
  .content-section,
  .page-hero,
  .detail-shell {
    width: min(100% - 28px, 1280px);
  }

  .hero {
    height: 500px;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .horizontal-list {
    grid-template-columns: 1fr;
  }

  .horizontal-card a {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .small-cover {
    min-height: 104px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
