:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.42);
  --purple: #9333ea;
  --pink: #db2777;
  --blue: #2563eb;
  --yellow: #facc15;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(120deg, #ffd1dc, #ffb6c1, #e6b3ff, #c7b3ff, #b3d9ff);
  background-attachment: fixed;
}

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

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

button,
input,
select {
  font: inherit;
}

main {
  min-height: 70vh;
}

.text-gradient {
  background: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nebula-gradient,
.gradient-button {
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.marshmallow-gradient {
  background: linear-gradient(120deg, #ffd1dc, #ffb6c1, #e6b3ff, #c7b3ff, #b3d9ff);
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.card-hover:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.65);
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 40px rgba(31, 41, 55, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 10px 25px rgba(147, 51, 234, 0.35);
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.header-search {
  width: min(360px, 34vw);
  margin-left: auto;
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 14px 10px 18px;
  background: transparent;
  color: var(--ink);
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 10px 16px;
  background: linear-gradient(135deg, #9333ea, #db2777);
}

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

.nav-link,
.mobile-nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--purple);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, #9333ea, #db2777);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 15px 40px rgba(31, 41, 55, 0.14);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.mobile-search {
  width: 100%;
}

.hero {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  color: #ffffff;
}

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

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

.hero-bg {
  position: absolute;
  inset: -28px;
  background-position: center;
  background-size: cover;
  filter: blur(12px) brightness(0.68);
  transform: scale(1.08);
}

.hero-cover {
  position: absolute;
  top: 112px;
  right: max(28px, calc((100vw - 1180px) / 2));
  width: min(320px, 28vw);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.25), rgba(17, 24, 39, 0.9));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 64px;
}

.hero-text {
  width: min(720px, calc(100% - 360px));
}

.hero-kicker,
.section-kicker,
.movie-region,
.category-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
}

.hero-kicker {
  padding: 8px 14px;
  color: #fde68a;
  background: rgba(0, 0, 0, 0.32);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.7;
}

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

.hero-meta span,
.detail-meta span,
.movie-meta em {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  font-style: normal;
}

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

.primary-button,
.secondary-button,
.gradient-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.primary-button,
.gradient-button {
  color: #ffffff;
  padding: 13px 24px;
  box-shadow: 0 14px 32px rgba(147, 51, 234, 0.35);
}

.primary-button:hover,
.gradient-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.secondary-button {
  color: #ffffff;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.42);
  transition: background 0.2s ease, width 0.2s ease;
}

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

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

.page-hero {
  padding-top: 120px;
}

.page-title {
  margin-bottom: 32px;
  padding: 34px;
  border-radius: 24px;
}

.page-title h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
}

.page-title p {
  max-width: 820px;
  margin: 0;
  color: #4b5563;
  line-height: 1.8;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.section-kicker {
  width: 42px;
  height: 42px;
  justify-content: center;
}

.section-link {
  color: var(--purple);
  font-weight: 800;
}

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

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

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

.movie-card-link,
.movie-card-body {
  display: block;
}

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
}

.movie-thumb.poster {
  aspect-ratio: 3 / 4;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.image-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.25s ease;
}

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

.movie-region {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  font-size: 12px;
}

.play-float {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.22);
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(10px);
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta em {
  color: #6b21a8;
  background: rgba(243, 232, 255, 0.88);
  font-size: 12px;
}

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

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

.category-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

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

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-count {
  padding: 6px 12px;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
}

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

.small-movie {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  overflow: hidden;
  border-radius: 18px;
}

.small-movie img {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.small-movie strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.small-movie em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.rank-row {
  overflow: hidden;
  border-radius: 20px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #9333ea, #db2777);
}

.rank-row img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.35s ease;
}

.rank-text {
  min-width: 0;
}

.rank-text strong {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: #6b21a8;
  font-weight: 800;
  white-space: nowrap;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 150px 150px auto;
  gap: 12px;
}

.filter-form input,
.filter-form select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  outline: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.filter-result {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 28px;
  padding-top: 112px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-box video,
.player-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.player-box video {
  display: block;
  height: auto;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-position: center;
  background-size: cover;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.play-large {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-size: 34px;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.player-error {
  display: none;
  margin-top: 12px;
  color: #be123c;
  font-weight: 700;
}

.player-error.show {
  display: block;
}

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

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

.breadcrumb a {
  color: var(--purple);
  font-weight: 800;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
}

.detail-meta span {
  color: #6b21a8;
  background: rgba(243, 232, 255, 0.9);
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-cloud span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #6b21a8;
  background: rgba(243, 232, 255, 0.9);
  font-weight: 700;
  font-size: 13px;
}

.sidebar-card {
  padding: 22px;
  border-radius: 24px;
}

.sidebar-card h2 {
  margin: 0 0 18px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

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

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

.empty-state {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  border-radius: 22px;
}

.empty-state.show {
  display: block;
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-cover {
    top: 96px;
    right: 24px;
    width: 150px;
    border-radius: 18px;
  }

  .hero-text {
    width: 100%;
  }

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

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

  .filter-form {
    grid-template-columns: 1fr 1fr;
  }

  .filter-form input,
  .filter-form .gradient-button {
    grid-column: 1 / -1;
  }
}

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

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

  .hero-content {
    padding: 250px 0 74px;
  }

  .hero-cover {
    left: 50%;
    right: auto;
    width: 168px;
    transform: translateX(-50%);
  }

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

  .container {
    padding: 38px 0;
  }

  .page-title {
    padding: 24px;
  }

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

  .rank-row a {
    grid-template-columns: 42px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-meta {
    grid-column: 3;
    justify-self: start;
    font-size: 13px;
  }

  .rank-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .rank-row img {
    width: 72px;
    height: 52px;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .filter-form input,
  .filter-form .gradient-button {
    grid-column: auto;
  }

  .detail-layout {
    padding-top: 88px;
  }
}
