:root {
  --twilight-950: #2e064f;
  --twilight-900: #3b0764;
  --twilight-800: #581c87;
  --twilight-700: #6b21a8;
  --twilight-600: #9333ea;
  --twilight-500: #a855f7;
  --twilight-400: #c084fc;
  --twilight-300: #d8b4fe;
  --dusk-700: #86198f;
  --dusk-600: #c026d3;
  --sunset-500: #f97316;
  --sunset-400: #fb923c;
  --surface: rgba(255, 255, 255, 0.10);
  --surface-strong: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --shadow: 0 24px 70px rgba(13, 3, 32, 0.45);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.24), transparent 36rem),
    radial-gradient(circle at 82% 8%, rgba(249, 115, 22, 0.18), transparent 34rem),
    linear-gradient(135deg, var(--twilight-950) 0%, var(--twilight-900) 44%, #4a044e 100%);
  background-attachment: fixed;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 14px 36px rgba(147, 51, 234, 0.32);
  transition: transform 0.22s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.gradient-text {
  background: linear-gradient(90deg, #d8b4fe, #f0abfc, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-text {
  text-shadow: 0 0 24px rgba(216, 180, 254, 0.46);
}

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

.nav-links a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.80);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--twilight-300);
}

.header-search {
  position: relative;
  flex: 0 0 250px;
}

.header-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search input {
  height: 42px;
  padding: 0 15px 0 42px;
}

.header-search input::placeholder,
.filter-bar input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.header-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--twilight-400);
  background: rgba(255, 255, 255, 0.14);
}

.search-symbol {
  position: absolute;
  top: 50%;
  left: 14px;
  color: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(46, 6, 79, 0.96);
}

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

.mobile-panel .header-search {
  width: 100%;
  margin-bottom: 14px;
  flex: none;
}

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

.main-page {
  padding-top: 76px;
}

.hero {
  position: relative;
  min-height: 78vh;
  margin-top: -76px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

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

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(46, 6, 79, 0.92), rgba(46, 6, 79, 0.62), rgba(46, 6, 79, 0.30)),
    linear-gradient(0deg, var(--twilight-950) 0%, rgba(46, 6, 79, 0.55) 38%, transparent 100%);
}

.veil-effect::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12) 0%, rgba(139, 92, 246, 0.10) 48%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 78vh;
  padding: 150px 0 72px;
}

.hero-copy {
  width: min(700px, 100%);
}

.kicker-row,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #fff;
  background: rgba(147, 51, 234, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}

.rating-pill {
  color: #fed7aa;
  background: rgba(0, 0, 0, 0.38);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-primary,
.btn-ghost,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.56);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.48);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.hero-quick {
  position: relative;
  z-index: 3;
  margin-top: -64px;
  padding-bottom: 46px;
}

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

.quick-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 13px;
  align-items: center;
  min-height: 112px;
  border-radius: 20px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 180, 254, 0.44);
  background: rgba(255, 255, 255, 0.15);
}

.quick-card img {
  width: 74px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
}

.quick-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quick-card span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.60);
  font-size: 12px;
}

.section {
  padding: 34px 0;
}

.section-large {
  padding: 56px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.more-link {
  color: var(--twilight-300);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 48%, rgba(0, 0, 0, 0.16));
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.07);
  filter: saturate(1.14);
}

.card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(147, 51, 234, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-tag,
.card-rating,
.card-bottom {
  position: absolute;
  z-index: 3;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-tag {
  top: 10px;
  left: 10px;
  max-width: calc(100% - 86px);
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(147, 51, 234, 0.82);
}

.card-rating {
  top: 10px;
  right: 10px;
  padding: 6px 8px;
  color: #fed7aa;
}

.card-bottom {
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
}

.movie-card h3 {
  margin: 12px 0 5px;
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
}

.movie-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover h3 a {
  color: var(--twilight-300);
}

.movie-card p {
  display: -webkit-box;
  min-height: 36px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile,
.dusk-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(112, 26, 117, 0.42), rgba(107, 33, 168, 0.36));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.category-tile {
  min-height: 164px;
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile::before,
.dusk-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 22% 10%, rgba(255, 255, 255, 0.18), transparent 26rem);
  pointer-events: none;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(253, 186, 116, 0.45);
}

.category-tile h3,
.category-tile p,
.category-tile span {
  position: relative;
  z-index: 1;
}

.category-tile h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.category-tile span {
  color: var(--twilight-300);
  font-size: 14px;
  font-weight: 800;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.13);
}

.rank-number {
  color: #fdba74;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 82px;
  height: 108px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  white-space: nowrap;
}

.page-hero {
  padding: 64px 0 34px;
}

.page-hero-card {
  border-radius: 28px;
  padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(circle at 90% 20%, rgba(249, 115, 22, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.60);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--twilight-300);
}

.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 800px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 26px;
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 14px;
}

.filter-bar select option {
  color: #111827;
}

.is-hidden {
  display: none !important;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
}

.player-button {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.42);
  cursor: pointer;
}

.player-button span {
  margin-left: 4px;
  font-size: 30px;
}

.detail-sidebar {
  display: grid;
  gap: 16px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.info-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.info-row strong {
  color: #fff;
  font-weight: 800;
}

.content-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list a,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.10);
  font-size: 13px;
}

.site-footer {
  position: relative;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(46, 6, 79, 0.50);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 34px;
  padding: 42px 0;
}

.footer-inner h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-inner p,
.footer-inner a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.8;
}

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

.copyright {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.44);
  font-size: 13px;
  text-align: center;
}

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

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

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

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

@media (max-width: 860px) {
  .nav-links,
  .header-inner > .header-search {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-inner {
    height: 66px;
  }

  .main-page {
    padding-top: 66px;
  }

  .hero {
    min-height: 72vh;
    margin-top: -66px;
  }

  .hero-content {
    min-height: 72vh;
    padding-top: 118px;
    padding-bottom: 54px;
  }

  .hero-quick {
    margin-top: 0;
  }

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

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

  .ranking-item {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-meta {
    grid-column: 2 / 4;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

@media (max-width: 620px) {
  .header-inner,
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    display: none;
  }

  .hero h1 {
    letter-spacing: -0.03em;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

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

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

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

  .card-bottom {
    display: none;
  }

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

  .content-card {
    padding: 22px;
  }

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