
:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --panel-light: #1e293b;
  --line: #1f2a44;
  --text: #ffffff;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --green: #16a34a;
  --yellow: #facc15;
  --red: #ef4444;
  --purple: #9333ea;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #67e8f9);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
}

.brand-text strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.brand-text em {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

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

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
}

.header-search input,
.mobile-search input {
  width: 170px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: var(--text);
  background: var(--blue);
  padding: 10px 15px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 14px 16px 20px;
  background: rgba(2, 6, 23, 0.96);
}

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

.mobile-search {
  display: flex;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: var(--panel);
}

.mobile-search input {
  flex: 1;
  width: auto;
}

.mobile-link {
  display: block;
  padding: 10px 4px;
  color: var(--muted);
  font-weight: 650;
}

.mobile-link.muted {
  display: inline-flex;
  margin: 6px 6px 0 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--panel-light);
  font-size: 13px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  animation: heroFade 0.45s ease both;
}

.hero-slide.is-active {
  display: block;
}

.hero-bg,
.hero-bg img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img {
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.hero-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  max-width: 780px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--subtle);
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
  padding: 5px 11px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 24px;
  background: var(--blue);
  color: var(--text);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.26);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.primary-btn.full {
  width: 100%;
}

.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.62);
  color: var(--text);
}

.text-link {
  color: var(--blue-light);
  font-size: 15px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--blue-light);
}

@keyframes heroFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.section-block {
  padding: 72px 0;
  background: var(--bg);
}

.section-gradient {
  background: linear-gradient(180deg, var(--bg), var(--panel));
}

.section-deep {
  background: var(--panel);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-light);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-light), var(--bg));
}

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

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

.quality-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.quality-badge {
  right: 12px;
  padding: 5px 9px;
  background: var(--blue);
}

.rank-badge {
  left: 12px;
  padding: 5px 10px;
  background: rgba(239, 68, 68, 0.92);
}

.movie-body {
  padding: 16px;
}

.movie-title {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.movie-title:hover,
.ranking-info a:hover,
.category-overview-card h2 a:hover {
  color: var(--blue-light);
}

.movie-meta {
  gap: 7px;
  margin-bottom: 12px;
}

.movie-meta span {
  padding: 3px 8px;
  font-size: 12px;
}

.movie-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.24), transparent 34%),
    rgba(15, 23, 42, 0.9);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.48);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--muted);
  font-size: 14px;
}

.category-tile small {
  display: grid;
  gap: 6px;
  color: var(--blue-light);
  font-size: 13px;
}

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

.movie-card.compact .movie-body p {
  min-height: 42px;
  -webkit-line-clamp: 2;
}

.page-hero {
  padding: 76px 0 48px;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.32), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--subtle);
  font-size: 14px;
}

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

.filter-bar,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
}

.filter-input,
.filter-select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: 0;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  padding: 0 14px;
}

.filter-input {
  min-width: 260px;
  flex: 1;
}

.filter-input.wide {
  flex: 2;
}

.empty-state {
  display: none;
  margin: 40px 0 0;
  color: var(--subtle);
  text-align: center;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-poster-stack img {
  aspect-ratio: 2 / 3;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: var(--panel-light);
}

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

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.category-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.category-overview-card li a {
  color: var(--blue-light);
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 86px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.84);
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  font-size: 18px;
  font-weight: 900;
}

.ranking-cover img {
  width: 86px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel-light);
}

.ranking-info a {
  font-size: 20px;
  font-weight: 900;
}

.ranking-info p {
  margin: 6px 0 10px;
  color: var(--muted);
}

.detail-layout {
  padding: 32px 0 72px;
}

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

.player-card,
.detail-info,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  display: none;
}

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

.player-start {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.94);
  color: var(--text);
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.player-start span {
  transform: translateX(3px);
}

.detail-info {
  margin-top: 24px;
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.detail-info h2,
.side-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-info p,
.side-card p {
  color: var(--muted);
}

.detail-info .tag-row {
  margin-top: 18px;
}

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 20px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
  background: var(--panel-light);
}

.poster-side h2 {
  margin-top: 18px;
}

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

.side-list .movie-card {
  display: grid;
  grid-template-columns: 92px 1fr;
}

.side-list .poster-link {
  aspect-ratio: 2 / 3;
}

.side-list .movie-body {
  padding: 12px;
}

.side-list .movie-title {
  font-size: 15px;
}

.side-list .movie-meta,
.side-list .tag-row {
  display: none;
}

.side-list .movie-body p {
  min-height: auto;
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: #020617;
  color: var(--subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 20px;
}

.footer-grid p {
  max-width: 440px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px 16px;
  text-align: center;
  font-size: 13px;
}

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-search,
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 600px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .movie-grid,
  .category-grid,
  .rank-strip {
    grid-template-columns: 1fr;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    min-width: 100%;
  }

  .ranking-row {
    grid-template-columns: 48px 72px 1fr;
    gap: 12px;
  }

  .ranking-num {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }

  .ranking-cover img {
    width: 72px;
  }

  .side-list .movie-card {
    grid-template-columns: 86px 1fr;
  }
}
