* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #111827;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #581c87, #0f172a);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

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

.brand-icon,
.footer-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  box-shadow: 0 10px 24px rgba(219, 39, 119, 0.28);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #d8b4fe, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #e5e7eb;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 16px;
}

.mobile-nav a {
  color: #e5e7eb;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: linear-gradient(135deg, #312e81, #581c87, #831843);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.33;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(168, 85, 247, 0.36), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(88, 28, 135, 0.55), rgba(15, 23, 42, 0.78));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: 30px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: #7c3aed;
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.35);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn,
.page-actions a,
.side-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #db2777);
  box-shadow: 0 18px 44px rgba(219, 39, 119, 0.35);
}

.ghost-btn,
.page-actions a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.page-actions a:hover,
.side-channel:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
  width: 36px;
  background: #ffffff;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 7;
  transform: translateX(-50%);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.34);
}

.search-panel input,
.page-search input,
.toolbar input,
.toolbar select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.search-panel input,
.page-search input,
.toolbar input {
  width: 100%;
  padding: 0 18px;
}

.search-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 700;
  background: rgba(124, 58, 237, 0.85);
}

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

.white-section {
  background: #ffffff;
}

.warm-section {
  background: linear-gradient(135deg, #fffbeb, #fff7ed, #fef2f2);
}

.blue-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff, #f0fdfa);
}

.pink-section {
  background: linear-gradient(135deg, #fff1f2, #fdf2f8, #faf5ff);
}

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

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  font-weight: 900;
}

.section-head p {
  margin: 8px 0 0;
  color: #64748b;
}

.section-more {
  color: #7c3aed;
  font-weight: 800;
}

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  border-radius: 18px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.poster-frame img,
.category-card img,
.related-card img,
.rank-cover img,
.wide-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.category-card:hover img,
.related-card:hover img,
.rank-row:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(124, 58, 237, 0.88);
}

.poster-play {
  position: absolute;
  left: 50%;
  bottom: 18px;
  opacity: 0;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  background: rgba(219, 39, 119, 0.9);
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.card-body {
  display: block;
  padding: 12px 2px 0;
}

.card-body strong,
.wide-body strong,
.rank-info strong,
.related-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body span,
.wide-body span,
.rank-info span,
.related-card em {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 14px;
  font-style: normal;
}

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

.movie-card-wide {
  display: flex;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.wide-cover {
  flex: 0 0 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.wide-body {
  min-width: 0;
}

.wide-body em,
.rank-info em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: #475569;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 15%, rgba(236, 72, 153, 0.34), transparent 28%),
    linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #eef2ff;
  font-size: 18px;
}

.page-search {
  max-width: 560px;
  margin-top: 28px;
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88));
}

.category-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: #ffffff;
}

.category-copy strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
}

.category-copy em {
  display: block;
  margin-top: 8px;
  color: #e5e7eb;
  font-style: normal;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  margin-bottom: 30px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.toolbar select {
  padding: 0 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 60px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-num {
  color: #7c3aed;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  width: 120px;
  height: 76px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-label {
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  font-weight: 800;
}

.player-section {
  background: #020617;
}

.player-container {
  padding: 28px 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
}

.play-cover.hidden {
  display: none;
}

.play-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  box-shadow: 0 18px 50px rgba(219, 39, 119, 0.35);
  font-size: 36px;
}

.play-cover strong {
  max-width: min(760px, 90%);
  font-size: clamp(24px, 5vw, 42px);
  line-height: 1.15;
}

.detail-wrap {
  padding: 42px 0 76px;
  background: #f8fafc;
}

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

.detail-main,
.side-box {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-main {
  padding: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #7c3aed;
}

.detail-main h1 {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.16;
  font-weight: 900;
}

.detail-main .detail-meta span {
  color: #475569;
  background: #f1f5f9;
}

.detail-card,
.detail-tags {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.detail-card h2,
.detail-tags h2,
.side-box h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.detail-card p {
  margin: 0;
  color: #334155;
  white-space: pre-line;
}

.intro-card p {
  font-size: 18px;
  color: #1f2937;
}

.review-card {
  padding: 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
}

.detail-tags div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-channel {
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #db2777);
}

.side-box {
  position: sticky;
  top: 84px;
  padding: 22px;
}

.related-list {
  display: grid;
  gap: 16px;
}

.related-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card span:first-child {
  overflow: hidden;
  width: 112px;
  height: 72px;
  border-radius: 14px;
  background: #111827;
}

.related-card em {
  grid-column: 2;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1e293b, #111827);
}

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

.footer-grid p {
  max-width: 360px;
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: #d8b4fe;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .poster-grid,
  .feature-grid,
  .wide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .side-box {
    position: static;
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: 84vh;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    bottom: 142px;
  }

  .hero-search {
    bottom: 18px;
  }

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

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

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

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

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

  .rank-row {
    grid-template-columns: 44px 88px 1fr;
  }

  .rank-cover {
    width: 88px;
    height: 64px;
  }

  .rank-label {
    display: none;
  }

  .detail-main {
    padding: 22px;
  }

  .player-container {
    width: 100%;
    padding: 0;
  }

  .player-frame {
    border-radius: 0;
  }

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