:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --orange: #f59e0b;
  --red: #fb7185;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link,
.nav-search {
  color: var(--muted-2);
  border: 0;
  background: transparent;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

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

.nav-categories {
  display: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: min(82vh, 780px);
  min-height: 560px;
  overflow: hidden;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.58) 50%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 45%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 100px;
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.movie-meta,
.detail-meta,
.rank-meta {
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 10px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hero-summary {
  max-width: 660px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.14);
}

.hero-tags {
  margin: 22px 0 26px;
}

.hero-actions,
.detail-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
}

.btn.secondary {
  color: #e0f2fe;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #64748b;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-strip {
  max-width: 1280px;
  margin: -62px auto 0;
  position: relative;
  z-index: 10;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.hero-strip-title,
.hero-thumb,
.movie-card,
.category-panel,
.info-card,
.rank-line,
.video-shell,
.detail-panel,
.filter-bar,
.search-box {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-strip-title {
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  align-content: center;
}

.hero-strip-title strong {
  font-size: 22px;
}

.hero-strip-title span {
  color: var(--muted);
  font-size: 13px;
}

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

.hero-thumb {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-thumb.active {
  border-color: rgba(34, 211, 238, 0.72);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transition: transform 0.25s ease;
}

.hero-thumb:hover img {
  transform: scale(1.05);
}

.hero-thumb span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: white;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.content-section,
.page-hero,
.detail-layout,
.category-overview,
.rank-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.page-hero {
  padding-top: 72px;
  padding-bottom: 30px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

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

.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.03em;
}

.section-kicker {
  margin: 0;
  font-weight: 700;
}

.section-more {
  color: #a5f3fc;
  border-bottom: 1px solid rgba(34, 211, 238, 0.38);
}

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

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.05);
  opacity: 0.82;
}

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

.play-float {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.36);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
  font-size: 14px;
}

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

.movie-meta {
  margin: 0 0 7px;
  font-size: 12px;
}

.movie-card h3 {
  min-height: 46px;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p:not(.movie-meta) {
  color: var(--muted);
  min-height: 44px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
}

.movie-card .tag-row span {
  font-size: 11px;
  padding: 3px 8px;
}

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

.category-panel {
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 18px;
}

.category-panel-head p,
.category-panel-head h2,
.category-panel-head span {
  margin: 0;
}

.category-panel-head p {
  color: var(--cyan);
  font-weight: 700;
}

.category-panel-head h2 {
  margin: 7px 0;
  font-size: 28px;
}

.category-panel-head span {
  color: var(--muted-2);
}

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

.category-mini-grid a {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
}

.category-mini-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.category-mini-grid span {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 2px 12px black;
}

.filter-bar {
  border-radius: var(--radius);
  margin: 10px 24px 0;
  padding: 14px;
  max-width: 1232px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 180px 96px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button,
.global-search input {
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.65);
  padding: 11px 13px;
}

.filter-bar button {
  cursor: pointer;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 20px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.55);
}

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

.detail-info h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-intro {
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

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

.video-shell {
  border-radius: 26px;
  overflow: hidden;
}

.video-player {
  position: relative;
  min-height: 420px;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 211, 238, 0.22), transparent 32%),
    #020617;
}

.video-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.78));
  transition: opacity 0.25s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: 34px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.38);
}

.player-status {
  color: var(--muted-2);
  padding: 12px 16px 16px;
  font-size: 14px;
}

.detail-panel {
  border-radius: 24px;
  padding: 24px;
  margin-top: 24px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-panel p {
  color: var(--muted-2);
  line-height: 1.9;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.info-card {
  border-radius: 22px;
  padding: 20px;
}

.info-list {
  display: grid;
  gap: 10px;
  color: var(--muted-2);
}

.info-list span {
  color: var(--text);
}

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

.rank-line {
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.rank-line b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-line span {
  font-weight: 700;
}

.rank-line em {
  color: var(--muted);
  font-style: normal;
}

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

.index-list {
  column-count: 2;
  column-gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-list li {
  break-inside: avoid;
  margin-bottom: 10px;
}

.index-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 8px;
  color: var(--muted-2);
}

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

.global-search {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: start center;
  padding: 100px 20px 20px;
  background: rgba(2, 6, 23, 0.78);
}

.global-search.open {
  display: grid;
}

.search-box {
  width: min(760px, 100%);
  max-height: 78vh;
  overflow: auto;
  border-radius: 24px;
  padding: 22px;
}

.search-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.search-box label {
  display: block;
  margin: 6px 0 10px;
  color: var(--cyan);
  font-weight: 700;
}

.global-search input {
  width: 100%;
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.48);
}

.search-result-item img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-categories {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    color: var(--muted-2);
  }

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

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 118px;
  }

  .hero-control {
    display: none;
  }

  .hero-strip {
    margin-top: -34px;
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .nav-shell {
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .content-section,
  .page-hero,
  .detail-layout,
  .category-overview,
  .rank-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card h3 {
    font-size: 14px;
  }

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

  .index-list {
    column-count: 1;
  }

  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .video-player {
    min-height: 260px;
  }

  .video-player video {
    min-height: 240px;
  }
}
