:root {
  --mist-950: #020617;
  --mist-900: #0f172a;
  --mist-850: #142033;
  --mist-800: #1e293b;
  --mist-700: #334155;
  --mist-600: #475569;
  --mist-500: #64748b;
  --mist-400: #94a3b8;
  --mist-300: #cbd5e1;
  --mist-200: #e2e8f0;
  --mist-100: #f1f5f9;
  --mist-50: #f8fafc;
  --lake-700: #0369a1;
  --lake-600: #0284c7;
  --lake-500: #0ea5e9;
  --lake-400: #38bdf8;
  --lake-200: #bae6fd;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --white: #ffffff;
  --shadow-soft: 0 22px 60px rgba(2, 6, 23, 0.18);
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--mist-50), #ffffff 42%, #f3f7fb);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  color: var(--white);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--mist-950);
  background: linear-gradient(135deg, var(--lake-400), var(--amber-300));
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.28);
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: var(--mist-400);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: var(--mist-200);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: var(--white);
  background: rgba(56, 189, 248, 0.16);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.96);
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--mist-950);
  color: var(--white);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.15);
  transform: scale(1.12);
  opacity: 0.52;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 28%, rgba(56, 189, 248, 0.24), transparent 30%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.34)), linear-gradient(0deg, var(--mist-950), transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 54px;
  padding: 88px 0 96px;
}

.hero-copy {
  max-width: 780px;
  animation: slideUp 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  color: var(--lake-500);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1,
.page-title h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 84px);
}

.hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--mist-200);
  font-size: clamp(17px, 2vw, 23px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--mist-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--lake-700);
  background: var(--lake-200);
  font-size: 13px;
  font-weight: 700;
}

.tag-row.large span {
  padding: 8px 12px;
  font-size: 14px;
}

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

.primary-button,
.ghost-button,
.quick-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search button {
  color: var(--mist-950);
  background: linear-gradient(135deg, var(--lake-400), var(--amber-300));
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.24);
  border: 0;
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  aspect-ratio: 2 / 2.8;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 30px;
  width: min(100% - 32px, var(--max-width));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-dots .hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots .hero-dot.active {
  background: var(--lake-400);
}

.search-band {
  margin-top: -1px;
  background: var(--mist-950);
  color: var(--white);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px 0;
}

.search-band h2,
.section-heading h2,
.panel-heading h2,
.content-card h2,
.footer-links h2 {
  margin: 0;
}

.quick-search,
.search-tools,
.local-filter {
  display: flex;
  gap: 12px;
}

.quick-search input,
.search-tools input,
.search-tools select,
.local-filter input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  color: var(--mist-900);
  background: rgba(255, 255, 255, 0.95);
}

.search-tools select {
  width: 190px;
}

.local-filter {
  max-width: 520px;
  margin-top: 26px;
}

.page-section {
  padding: 72px 0;
}

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

.section-heading h2,
.panel-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-more,
.text-link {
  color: var(--lake-700);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.content-card,
.ranking-panel,
.player-card,
.detail-info {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
}

.category-card {
  padding: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.compact-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 11px;
  background: var(--mist-800);
}

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

.category-card p,
.category-overview-card p,
.content-card p,
.footer-brand p,
.compact-body p,
.card-desc {
  color: var(--mist-600);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--mist-800);
}

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

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

.cover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.82));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--mist-950);
  background: var(--lake-400);
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  top: 12px;
  bottom: auto;
  background: var(--amber-300);
}

.movie-info {
  padding: 14px;
}

.movie-info h2,
.compact-body h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-info h2 a:hover,
.compact-body h2 a:hover {
  color: var(--lake-700);
}

.meta-line {
  margin: 0 0 8px;
  color: var(--mist-500);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 30px;
  align-items: start;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-cover {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  aspect-ratio: 2 / 3;
  background: var(--mist-800);
}

.compact-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-body p {
  margin: 0;
  font-size: 14px;
}

.subpage {
  min-height: 70vh;
}

.page-title {
  padding: 72px 0 24px;
}

.page-title h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.page-title p {
  max-width: 760px;
  color: var(--mist-600);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: var(--mist-800);
}

.category-overview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.detail-page {
  background: linear-gradient(180deg, var(--mist-950), var(--mist-900) 560px, var(--mist-50) 561px);
}

.detail-top {
  padding: 40px 0 54px;
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--mist-300);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  padding: 14px;
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.72));
  border: 0;
  font-size: 18px;
  font-weight: 900;
}

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

.play-icon {
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  color: var(--mist-950);
  background: linear-gradient(135deg, var(--lake-400), var(--amber-300));
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.32);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 5;
  margin: 0;
  color: var(--white);
  text-align: center;
  pointer-events: none;
}

.detail-info {
  padding: 28px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  border-color: rgba(255, 255, 255, 0.12);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.detail-one-line {
  color: var(--mist-200);
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: -26px;
}

.detail-content .content-card:first-child {
  grid-column: 1 / -1;
}

.content-card {
  padding: 28px;
}

.content-card p {
  font-size: 17px;
}

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

.search-results:empty::before {
  content: "输入关键词后显示相关影片";
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--mist-500);
  border: 1px dashed rgba(100, 116, 139, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

.site-footer {
  color: var(--mist-300);
  background: var(--mist-900);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-inner {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 38px;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 440px;
}

.footer-logo strong,
.footer-links h2 {
  color: var(--white);
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: var(--mist-400);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

[data-search-item].is-hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 54px 0 112px;
  }

  .hero-poster {
    max-width: 360px;
  }

  .search-band-inner,
  .overview-grid,
  .category-overview-card,
  .footer-inner,
  .detail-content,
  .ranking-page .ranking-list.large {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .search-tools,
  .local-filter {
    flex-direction: column;
  }

  .search-tools select {
    width: 100%;
  }

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

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

@media (max-width: 520px) {
  .container,
  .site-header-inner,
  .mobile-nav,
  .footer-inner,
  .hero-content,
  .hero-controls {
    width: min(100% - 22px, var(--max-width));
  }

  .brand-text em {
    display: none;
  }

  .hero h1 {
    font-size: 38px;
  }

  .movie-grid,
  .compact-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}
