:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --radius: 24px;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
}

* {
  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 36rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 80%);
}

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

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

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

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

.site-logo,
.footer-logo {
  flex: 0 0 auto;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #67e8f9, #38bdf8, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 15px;
  font-weight: 650;
}

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

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

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

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

.nav-search input {
  width: 250px;
  padding: 11px 14px;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.nav-search button,
.primary-button,
.secondary-button,
.section-link,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.nav-search button,
.primary-button {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
  color: white;
  box-shadow: 0 16px 48px rgba(6, 182, 212, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
  padding: 11px 16px;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
}

.nav-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 18px 56px rgba(6, 182, 212, 0.38);
}

.secondary-button,
.section-link,
.small-button {
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #bae6fd;
}

.secondary-button,
.section-link {
  min-height: 48px;
  padding: 0 22px;
}

.small-button {
  min-height: 40px;
  padding: 0 18px;
}

.secondary-button:hover,
.section-link:hover,
.small-button:hover {
  border-color: rgba(103, 232, 249, 0.72);
  color: white;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  font-size: 24px;
  width: 44px;
  height: 44px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 8px;
  color: var(--soft);
}

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

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

.hero-bg,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 120px 24px 42px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, #020617 5%, rgba(2, 6, 23, 0.68) 36%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-slide-copy {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  text-align: right;
  color: rgba(226, 232, 240, 0.3);
}

.hero-slide-copy p,
.hero-slide-copy span {
  margin: 0;
  font-size: 15px;
}

.hero-slide-copy h2 {
  margin: 6px 0;
  font-size: clamp(28px, 7vw, 84px);
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.hero-overlay-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  min-height: 76vh;
  margin: 0 auto;
  padding: 118px 0 56px;
}

.hero-kicker,
.section-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.07em;
  background: linear-gradient(90deg, #ecfeff, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.hero-category-links,
.hero-picks,
.hero-dots,
.detail-tags,
.detail-facts,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-category-links a,
.detail-tags a,
.detail-facts span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: #cbd5e1;
}

.hero-category-links a,
.detail-tags a {
  padding: 8px 13px;
  font-size: 14px;
}

.detail-facts span,
.tag-row span {
  padding: 6px 10px;
  font-size: 12px;
}

.hero-category-links a:hover,
.detail-tags a:hover {
  border-color: rgba(34, 211, 238, 0.65);
  color: white;
}

.hero-picks {
  max-width: 980px;
  margin-top: 10px;
}

.hero-pick {
  min-width: 150px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-pick strong,
.hero-pick span {
  display: block;
}

.hero-pick strong {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.hero-pick span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.hero-pick:hover,
.hero-pick.is-active {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.66);
  background: rgba(8, 47, 73, 0.72);
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  cursor: pointer;
}

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

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

.inner-page {
  padding-top: 48px;
}

.content-section {
  margin: 74px 0;
}

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

.section-title-row h2,
.player-section h2,
.detail-text h2 {
  margin: 6px 0 0;
  color: #f8fafc;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 26px 68px rgba(8, 145, 178, 0.22);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.82), rgba(30, 41, 59, 0.9));
}

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

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

.poster-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.88), transparent 50%);
}

.play-mark,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.play-mark {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  background: rgba(34, 211, 238, 0.92);
  color: #00111a;
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 12px;
}

.compact-card .card-desc {
  display: none;
}

.category-grid,
.category-overview-list {
  display: grid;
  gap: 22px;
}

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

.category-card,
.category-overview-card,
.page-hero,
.filter-panel,
.detail-hero,
.player-section,
.detail-text {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-thumbs,
.category-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-thumbs img,
.category-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.9);
}

.category-card h3,
.category-overview-card h2 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.category-card span {
  display: block;
  margin-top: 10px;
  color: var(--cyan);
  font-size: 13px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 22px;
}

.category-overview-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.mini-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-link-list a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--soft);
  font-size: 13px;
}

.mini-link-list a:hover {
  color: var(--cyan);
}

.page-hero {
  padding: clamp(32px, 5vw, 60px);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.84), rgba(15, 23, 42, 0.9)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28rem);
}

.compact-hero h1 {
  margin-top: 8px;
  font-size: clamp(36px, 6vw, 70px);
}

.compact-hero p:last-child {
  margin-top: 18px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 160px;
  gap: 16px;
  align-items: end;
  margin: 28px 0;
  padding: 18px;
}

.filter-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

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

.filter-count {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(8, 47, 73, 0.52);
  color: var(--cyan);
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 34px;
  padding: clamp(22px, 4vw, 42px);
}

.detail-poster img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.detail-copy h1 {
  font-size: clamp(34px, 6vw, 72px);
}

.detail-one-line {
  font-size: clamp(17px, 2vw, 22px);
}

.player-section,
.detail-text {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 34px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

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

.player-button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.45));
  color: white;
}

.player-button span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(74px, 9vw, 110px);
  height: clamp(74px, 9vw, 110px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  font-size: clamp(26px, 4vw, 42px);
  box-shadow: 0 18px 52px rgba(34, 211, 238, 0.35);
  transform: translateX(3px);
}

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

.detail-text p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.9;
}

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

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

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

.footer-inner p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--soft);
}

.is-hidden {
  display: none !important;
}

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

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

  .nav-search {
    margin-left: auto;
  }

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

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

@media (max-width: 860px) {
  .header-inner {
    gap: 12px;
  }

  .nav-search {
    display: none;
  }

  .hero-overlay-content {
    min-height: 78vh;
    padding-top: 96px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.05em;
  }

  .hero-picks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .hero-pick {
    min-width: 0;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .category-grid,
  .category-overview-card,
  .detail-hero,
  .footer-inner,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .hero-overlay-content {
    width: min(100% - 24px, 1280px);
  }

  .site-logo,
  .footer-logo {
    font-size: 21px;
  }

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

  .primary-button,
  .secondary-button,
  .section-link {
    width: 100%;
  }

  .hero-picks,
  .movie-grid,
  .large-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .card-body h3 {
    white-space: normal;
  }
}
