:root {
  --page-bg: #050712;
  --panel-bg: rgba(255, 255, 255, 0.10);
  --panel-border: rgba(255, 255, 255, 0.18);
  --text-main: #f8fbff;
  --text-muted: #aeb8cf;
  --blueberry-300: #beb6fd;
  --blueberry-400: #9d8df9;
  --blueberry-500: #7d60f5;
  --blueberry-600: #6d3eed;
  --night-400: #7d9aff;
  --shadow-soft: 0 25px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 10%, rgba(109, 62, 237, 0.36), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(125, 154, 255, 0.28), transparent 30rem),
    linear-gradient(135deg, #050712 0%, #11172d 45%, #241447 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

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

img {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, rgba(157, 141, 249, 0.18), rgba(125, 154, 255, 0.16));
  object-fit: cover;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.glass-effect {
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 18, 0.72);
  backdrop-filter: blur(18px);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 68px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark,
.footer-brand span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blueberry-400), var(--night-400));
  box-shadow: 0 0 22px rgba(157, 141, 249, 0.58);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--blueberry-400), var(--night-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blueberry-400);
  text-shadow: 0 0 12px rgba(157, 141, 249, 0.7);
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 30vw);
}

.quick-search input,
.wide-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  outline: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.09);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quick-search input {
  padding: 9px 14px;
}

.quick-search input:focus,
.wide-search input:focus {
  border-color: var(--blueberry-400);
  background: rgba(255, 255, 255, 0.13);
}

.quick-search button,
.wide-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.quick-search button,
.wide-search button,
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--blueberry-500), var(--night-400));
  box-shadow: 0 14px 34px rgba(109, 62, 237, 0.34);
}

.quick-search button {
  padding: 9px 14px;
}

.wide-search button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 700;
}

.ghost-btn {
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.10);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 12px 16px 18px;
  background: rgba(5, 7, 18, 0.88);
}

.mobile-links,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-categories {
  margin-top: 12px;
}

.mobile-links a,
.mobile-categories a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  padding-top: 68px;
}

.hero-stage {
  position: relative;
  min-height: 692px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-bg {
  background-position: center;
  background-size: cover;
  filter: blur(4px) saturate(1.18) brightness(0.62);
  transform: scale(1.04);
}

.hero-mask {
  background:
    linear-gradient(90deg, rgba(5, 7, 18, 0.96) 0%, rgba(5, 7, 18, 0.72) 42%, rgba(5, 7, 18, 0.44) 100%),
    linear-gradient(0deg, var(--page-bg) 0%, transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 420px);
  gap: 54px;
  align-items: center;
  min-height: 692px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: var(--blueberry-300);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  line-height: 1.08;
  font-size: clamp(36px, 6vw, 74px);
  background: linear-gradient(90deg, var(--blueberry-400), var(--night-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #d7dded;
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #dbe3ff;
  background: rgba(255, 255, 255, 0.09);
}

.hero-tags span,
.detail-meta span {
  padding: 7px 12px;
}

.tag-row span,
.movie-meta span {
  padding: 4px 9px;
  font-size: 12px;
}

.movie-meta {
  margin-bottom: 10px;
  color: var(--text-muted);
}

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

.hero-poster {
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 32px;
  transform: rotate(2deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
  height: 560px;
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 48px;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.52;
}

.hero-dot.active {
  width: 32px;
  opacity: 1;
  background: var(--blueberry-400);
}

.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: white;
  opacity: 0.72;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.18;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.8);
  }
}

.main-content {
  position: relative;
  z-index: 2;
}

.page-top {
  padding-top: 110px;
}

.search-panel,
.page-hero,
.detail-hero,
.detail-text {
  border-radius: var(--radius-lg);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -42px;
  padding: 28px;
}

.search-panel h2,
.section-heading h2,
.site-footer h2,
.detail-text h2 {
  margin: 0;
  line-height: 1.25;
}

.search-panel h2 {
  font-size: 30px;
}

.search-panel p,
.detail-text p,
.category-card p,
.site-footer p,
.movie-card p,
.rank-item p {
  color: var(--text-muted);
}

.wide-search {
  display: flex;
  gap: 10px;
}

.wide-search input {
  min-height: 50px;
  padding: 0 18px;
}

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

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--blueberry-300);
  background: rgba(157, 141, 249, 0.12);
}

.section-more {
  color: var(--blueberry-300);
  font-weight: 700;
}

.featured-grid,
.movie-grid,
.category-grid,
.rank-grid,
.footer-grid {
  display: grid;
  gap: 22px;
}

.featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover,
.compact-card:hover {
  transform: translateY(-6px);
  border-color: rgba(157, 141, 249, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

.poster-link img {
  height: 100%;
  transition: transform 0.42s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(109, 62, 237, 0.88);
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover,
.breadcrumb a:hover {
  color: var(--blueberry-300);
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 14px;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card.large {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 330px;
}

.movie-card.large .poster-link,
.movie-card.horizontal .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card.large .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
}

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

.movie-card.small p {
  display: none;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.category-card span {
  position: relative;
  z-index: 2;
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 800;
}

.category-card p {
  position: relative;
  z-index: 2;
  max-width: 82%;
  margin: 0;
}

.category-card > img {
  position: absolute;
  right: -20px;
  bottom: -32px;
  width: 148px;
  height: 212px;
  border-radius: 18px;
  opacity: 0.52;
  transform: rotate(8deg);
}

.category-card.overview {
  min-height: 250px;
}

.thumb-stack {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}

.thumb-stack img {
  height: 92px;
  border-radius: 12px;
}

.page-hero {
  padding: clamp(28px, 5vw, 52px);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  height: 128px;
}

.rank-poster span {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blueberry-500), var(--night-400));
}

.rank-item h3,
.rank-item p {
  margin: 0 0 8px;
}

.rank-item h3 {
  font-size: 18px;
}

.rank-item p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.36);
}

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

.detail-meta,
.detail-tags {
  margin-bottom: 20px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  font-size: 38px;
  background: linear-gradient(135deg, var(--blueberry-500), var(--night-400));
  box-shadow: 0 0 38px rgba(157, 141, 249, 0.5);
}

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

.detail-text {
  padding: 30px;
}

.detail-text h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-text h2:first-child {
  margin-top: 0;
}

.compact-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.compact-card img {
  height: 94px;
  border-radius: 12px;
}

.compact-card span,
.compact-card em {
  display: block;
}

.compact-card span {
  font-weight: 800;
}

.compact-card em {
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 18, 0.62);
  backdrop-filter: blur(16px);
}

.footer-grid {
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  padding: 48px 0;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a,
.site-footer p,
.footer-bottom {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--blueberry-300);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 18px 0;
  text-align: center;
  font-size: 14px;
}

[data-search-results].is-empty::before {
  content: "没有找到匹配影片";
  display: block;
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 34px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
  .quick-search {
    display: none;
  }

  .movie-grid.six-columns,
  .movie-grid.four-columns,
  .wide-rank,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: 1fr 320px;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    min-height: 692px;
    padding-top: 30px;
    padding-bottom: 110px;
  }

  .hero-poster {
    min-height: 340px;
    max-width: 280px;
    transform: none;
  }

  .hero-poster img {
    height: 340px;
  }

  .search-panel,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .movie-grid.two-columns,
  .rank-grid,
  .wide-rank,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .navbar {
    min-height: 62px;
  }

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

  .hero {
    padding-top: 62px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

  .hero-actions,
  .wide-search {
    flex-direction: column;
  }

  .hero-controls {
    bottom: 26px;
  }

  .search-panel,
  .page-hero,
  .detail-hero,
  .detail-text {
    padding: 20px;
  }

  .movie-grid.six-columns,
  .movie-grid.four-columns,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.large,
  .movie-card.horizontal {
    grid-template-columns: 118px 1fr;
  }

  .movie-card.large {
    min-height: auto;
  }

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

  .movie-card p {
    -webkit-line-clamp: 2;
    min-height: 3.2em;
  }

  .rank-item {
    grid-template-columns: 82px 1fr;
  }

  .rank-poster img {
    height: 108px;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}
