:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.2);
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --purple: #a855f7;
  --green: #22c55e;
  --orange: #f97316;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.22), transparent 34rem),
    radial-gradient(circle at 100% 12%, rgba(14, 165, 233, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.18);
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.logo-text {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: white;
  background: rgba(59, 130, 246, 0.16);
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-search {
  width: min(320px, 30vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

.top-search input,
.archive-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}

.top-search input::placeholder,
.archive-search input::placeholder {
  color: #64748b;
}

.search-button,
.menu-toggle,
.hero-button,
.detail-button,
.filter-button {
  border: 0;
  color: white;
}

.search-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
}

main {
  flex: 1;
}

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

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

.hero-slider {
  position: relative;
  min-height: 640px;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 108px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 48px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.hero-title {
  margin: 22px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-title span {
  display: block;
  color: transparent;
  background: linear-gradient(135deg, #93c5fd, #67e8f9, #e9d5ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-summary {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 30px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 13px;
}

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

.hero-button,
.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.hero-button:hover,
.detail-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.hero-button.secondary,
.detail-button.secondary {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.hero-panel {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
}

.hero-panel-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.hero-panel-info h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.hero-panel-info p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

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

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.section {
  padding: 56px 0;
}

.section.compact {
  padding: 34px 0;
}

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

.section-title {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section-lead {
  max-width: 760px;
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.8;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #93c5fd;
  font-weight: 800;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(15, 23, 42, 0.92);
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 2.9;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.card-badge,
.card-type,
.rank-number {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.card-badge {
  top: 10px;
  left: 10px;
  padding: 7px 9px;
  background: rgba(37, 99, 235, 0.82);
}

.card-type {
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.rank-number {
  top: 10px;
  right: 10px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.movie-card h3 {
  margin: 0;
  min-height: 2.8em;
  color: white;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.card-meta span {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 5px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.12);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.2), transparent 42%),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  color: #93c5fd;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.rank-thumb img {
  width: 86px;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-link {
  color: #93c5fd;
  font-weight: 800;
  white-space: nowrap;
}

.page-hero {
  padding: 58px 0 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #93c5fd;
}

.archive-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 26px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.archive-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.filter-button.is-active,
.filter-button:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(96, 165, 250, 0.45);
}

.no-results {
  display: none;
  padding: 34px;
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
}

.no-results.is-visible {
  display: block;
}

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

.player-card,
.detail-card,
.side-card {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: black;
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.42);
  cursor: pointer;
}

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

.play-orb {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.35);
}

.play-orb svg {
  width: 42px;
  height: 42px;
  transform: translateX(3px);
}

.detail-card {
  padding: 26px;
  margin-top: 22px;
}

.detail-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.05em;
  font-weight: 950;
}

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

.detail-copy {
  color: var(--text-soft);
  line-height: 1.9;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  color: white;
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 16px;
}

.side-card {
  padding: 18px;
}

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

.side-movie {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.side-movie:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.side-movie img {
  width: 76px;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
  border-radius: 12px;
}

.side-movie h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-movie p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  color: var(--muted);
}

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

.footer-links a {
  color: var(--text-soft);
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 920px) {
  .nav-links,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-panel {
    position: fixed;
    inset: 72px 16px auto;
    z-index: 45;
    display: none;
    padding: 18px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
  }

  body.menu-open .mobile-panel {
    display: block;
  }

  .mobile-panel a {
    display: block;
    padding: 12px 10px;
    border-radius: 12px;
    color: var(--text-soft);
  }

  .mobile-panel a:hover {
    color: white;
    background: rgba(37, 99, 235, 0.14);
  }

  .mobile-search {
    display: flex;
    margin-top: 12px;
    width: 100%;
  }

  .hero,
  .hero-slider {
    min-height: 760px;
  }

  .hero-content {
    padding: 92px 0 86px;
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 320px;
  }

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

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

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

  .archive-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    min-height: 64px;
  }

  .logo-text {
    font-size: 18px;
  }

  .mobile-panel {
    top: 64px;
  }

  .hero,
  .hero-slider {
    min-height: 720px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-panel {
    max-width: 250px;
  }

  .section {
    padding: 42px 0;
  }

  .section-header {
    display: block;
  }

  .more-link {
    margin-top: 12px;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 70px minmax(0, 1fr);
  }

  .rank-link {
    grid-column: 3;
  }

  .rank-thumb img {
    width: 70px;
  }

  .detail-card {
    padding: 20px;
  }

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

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

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

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

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