:root {
  --purple: #9333ea;
  --pink: #db2777;
  --blue: #2563eb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.45);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(147, 51, 234, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(219, 39, 119, 0.16), transparent 30rem),
    linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

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

img {
  display: block;
  width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 800;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  box-shadow: 0 15px 30px rgba(147, 51, 234, 0.28);
}

.brand-text,
.text-gradient {
  color: transparent;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
}

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

.main-nav a {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--purple);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.large-search input,
.inline-filter input,
.search-panel input {
  border: 1px solid rgba(147, 51, 234, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 16px;
}

.header-search input:focus,
.large-search input:focus,
.inline-filter input:focus,
.search-panel input:focus {
  border-color: rgba(147, 51, 234, 0.55);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

.header-search button,
.large-search button,
.inline-filter button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.header-search button {
  padding: 10px 16px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
}

.main-content,
.detail-page {
  min-height: 70vh;
}

.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.home-page {
  max-width: none;
  padding: 0 0 72px;
}

.hero-section {
  position: relative;
  height: min(740px, 72vh);
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-backdrop {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.08)),
    var(--hero-cover) center / cover no-repeat;
  filter: saturate(1.04);
}

.hero-backdrop::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: var(--hero-cover) center / cover no-repeat;
  filter: blur(18px) brightness(0.64);
  transform: scale(1.08);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 120px 24px 88px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  color: #fff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #facc15;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  max-width: 820px;
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.05;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.movie-meta,
.footer-links,
.hero-actions,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-list span,
.movie-meta span {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

.movie-meta span {
  color: #6b7280;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(147, 51, 234, 0.12);
}

.hero-actions {
  margin-top: 24px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.32);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.ghost-button.light {
  color: #4b5563;
  border-color: rgba(147, 51, 234, 0.2);
  background: rgba(255, 255, 255, 0.72);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
  opacity: 0.94;
}

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

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.glass-effect {
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 45px rgba(148, 163, 184, 0.22);
}

.card-hover {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow);
  border-color: rgba(147, 51, 234, 0.24);
}

.section-block {
  max-width: 1280px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.top-search {
  margin-top: -42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  padding: 30px;
}

.top-search h2,
.section-title h2,
.page-hero h1,
.content-card h2 {
  margin: 8px 0;
  color: #111827;
}

.top-search p,
.page-hero p,
.content-card p,
.movie-card-body p,
.horizontal-card p,
.ranking-main p {
  color: var(--muted);
  line-height: 1.75;
}

.large-search,
.search-panel {
  display: flex;
  gap: 12px;
}

.large-search input,
.search-panel input {
  flex: 1;
  min-height: 54px;
  padding: 0 20px;
}

.large-search button,
.search-panel button {
  padding: 0 24px;
}

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

.section-title a {
  color: var(--purple);
  font-weight: 900;
}

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

.category-tile {
  min-height: 152px;
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.category-tile strong,
.category-overview-title {
  font-size: 20px;
  font-weight: 900;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.24), rgba(240, 147, 251, 0.22));
}

.featured-grid .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img,
.horizontal-card img,
.ranking-cover img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.horizontal-card:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 38px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.38);
  transition: opacity 0.24s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.68);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.4;
}

.movie-card-body h3 a:hover,
.horizontal-card h3 a:hover,
.ranking-main h2 a:hover {
  color: var(--purple);
}

.movie-card-body p {
  margin: 0 0 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  border-radius: 22px;
  padding: 12px;
}

.horizontal-card a:first-child {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
}

.horizontal-card h3 {
  margin: 8px 0;
}

.horizontal-card span {
  color: var(--purple);
  font-size: 14px;
  font-weight: 800;
}

.page-shell {
  padding-top: 42px;
}

.page-hero {
  border-radius: 30px;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at top right, rgba(147, 51, 234, 0.22), transparent 28rem);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 58px);
}

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

.category-overview-card {
  border-radius: 26px;
  padding: 28px;
}

.category-sample {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-sample a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--purple);
  background: rgba(147, 51, 234, 0.08);
  font-weight: 700;
}

.inline-filter {
  display: flex;
  gap: 10px;
}

.inline-filter input {
  min-height: 42px;
  padding: 0 15px;
}

.inline-filter button {
  padding: 0 18px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 62px 108px minmax(0, 1fr) 74px;
  gap: 18px;
  align-items: center;
  border-radius: 24px;
  padding: 14px 18px;
}

.ranking-number {
  color: transparent;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 26px;
  font-weight: 900;
}

.ranking-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-main h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-main p {
  margin: 0 0 10px;
}

.score-pill {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: -28px;
  background: var(--detail-cover) center / cover no-repeat;
  filter: blur(18px) brightness(0.45);
  transform: scale(1.08);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.36));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 24px 72px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.detail-intro h1 {
  margin: 18px 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.1;
}

.detail-intro p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.9;
}

.player-section,
.detail-content,
.detail-related {
  max-width: 1180px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.narrow-title {
  padding: 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  box-shadow: 0 18px 42px rgba(79, 70, 229, 0.38);
  font-size: 32px;
}

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

.content-card {
  border-radius: 28px;
  padding: 28px;
}

.content-card:nth-child(3) {
  grid-column: 1 / -1;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.info-list div {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.62);
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.tag-list span {
  color: var(--purple);
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.14);
}

.movie-card.compact .movie-card-body p {
  display: none;
}

.site-footer {
  margin-top: 72px;
  padding: 44px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.62);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 900;
  color: var(--purple);
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-links a {
  color: #4b5563;
  font-weight: 700;
}

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

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

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

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

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    padding: 10px 0 4px;
  }

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

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

  .hero-content {
    padding-top: 140px;
  }

  .top-search,
  .detail-inner,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }

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

  .ranking-row {
    grid-template-columns: 42px 82px minmax(0, 1fr);
  }

  .score-pill {
    display: none;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 20px;
  }

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-block,
  .main-content,
  .player-section,
  .detail-content,
  .detail-related {
    padding-left: 16px;
    padding-right: 16px;
  }

  .category-grid,
  .featured-grid,
  .category-movie-grid,
  .related-grid,
  .horizontal-grid,
  .category-overview-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .large-search,
  .search-panel,
  .inline-filter,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

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

  .page-hero,
  .content-card {
    padding: 24px;
  }

  .ranking-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .ranking-cover {
    display: none;
  }
}
