* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #1f2937;
  background:
    radial-gradient(circle at 15% 10%, rgba(236, 72, 153, 0.20), transparent 26rem),
    radial-gradient(circle at 85% 0%, rgba(79, 70, 229, 0.20), transparent 30rem),
    linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 45%, #eff6ff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header.scrolled,
.site-header.menu-open {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 60px rgba(67, 56, 202, 0.14);
  backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 14px 36px rgba(147, 51, 234, 0.35);
}

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

.top-search {
  flex: 1;
  max-width: 410px;
  display: flex;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(12px);
}

.top-search input,
.mobile-search input,
.large-search input,
.filter-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #374151;
  background: transparent;
}

.top-search input {
  padding: 9px 12px 9px 16px;
}

.top-search button,
.mobile-search button,
.large-search button {
  border: 0;
  padding: 9px 18px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 12px 24px rgba(147, 51, 234, 0.22);
  cursor: pointer;
}

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

.nav-link {
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #9333ea;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #4b5563;
  background: rgba(255, 255, 255, 0.62);
}

.mobile-panel {
  display: none;
  padding: 0 20px 20px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

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

.mobile-link {
  padding: 11px 14px;
  color: #4b5563;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.84) 0%, rgba(17, 24, 39, 0.56) 45%, rgba(17, 24, 39, 0.26) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.92) 0%, transparent 55%);
}

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

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: #facc15;
  font-weight: 900;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
}

.hero h1 {
  max-width: 850px;
  margin: 18px 0 14px;
  color: #fff;
  font-size: clamp(2.55rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

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

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

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 20px 40px rgba(147, 51, 234, 0.32);
}

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

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

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

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

.hero-dot.active {
  width: 32px;
  background: linear-gradient(90deg, #9333ea, #db2777);
}

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

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

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

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

.section-heading span {
  font-size: 1.8rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  color: #1f2937;
}

.section-heading a {
  color: #9333ea;
  font-weight: 900;
}

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

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

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

.movie-card,
.glass-box,
.category-card,
.category-overview-card,
.ranking-panel,
.rank-table-wrap,
.compact-card {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.12);
  backdrop-filter: blur(16px);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.compact-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(147, 51, 234, 0.22);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #9333ea, #2563eb);
}

.wide-card .card-cover {
  aspect-ratio: 16 / 9;
}

.poster-card .card-cover {
  aspect-ratio: 3 / 4;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img,
.compact-card:hover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}

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

.corner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: 72%;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #9333ea;
}

.card-body p {
  min-height: 3.1em;
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 0.82rem;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.08);
}

.horizontal-row {
  display: flex;
  gap: 18px;
  padding: 4px 2px 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.compact-card {
  flex: 0 0 210px;
  overflow: hidden;
  border-radius: 20px;
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.compact-card span,
.compact-card em {
  display: block;
  padding: 0 14px;
}

.compact-card span {
  margin-top: 12px;
  font-weight: 900;
}

.compact-card em {
  margin: 5px 0 14px;
  color: #6b7280;
  font-style: normal;
  font-size: 0.85rem;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-card {
  min-height: 156px;
  padding: 26px;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 900;
  color: #1f2937;
}

.category-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 98px;
  padding: 22px;
  border-radius: 24px;
}

.panel-title {
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 900;
  color: #1f2937;
}

.ranking-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(107, 114, 128, 0.14);
}

.ranking-panel strong {
  color: #db2777;
}

.ranking-panel span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-panel em {
  color: #6b7280;
  font-style: normal;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto 4px;
  padding: 46px 24px 8px;
}

.page-hero > div {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 64px);
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(147, 51, 234, 0.90), rgba(219, 39, 119, 0.78), rgba(37, 99, 235, 0.88)),
    url('../1.jpg') center / cover;
  box-shadow: 0 28px 90px rgba(79, 70, 229, 0.22);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.05;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card img {
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.category-overview-card div {
  padding: 20px;
}

.category-overview-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 900;
}

.category-overview-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

.filter-section {
  padding-top: 28px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.60);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
}

.filter-bar input {
  flex: 1 1 260px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.filter-bar button {
  min-height: 42px;
  border: 0;
  padding: 0 14px;
  color: #4b5563;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.filter-bar button.active,
.filter-bar button:hover {
  color: #fff;
  background: linear-gradient(135deg, #9333ea, #db2777);
}

.rank-table-wrap {
  margin-top: 28px;
  overflow: auto;
  border-radius: 22px;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.rank-table th,
.rank-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(107, 114, 128, 0.14);
}

.rank-table th {
  color: #4b5563;
  background: rgba(255, 255, 255, 0.70);
}

.rank-table td:first-child {
  color: #db2777;
  font-weight: 900;
}

.rank-table a {
  font-weight: 900;
}

.search-section {
  padding-top: 28px;
}

.large-search {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(16px);
}

.large-search input {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
}

.large-search button {
  min-width: 120px;
}

.search-status {
  margin: 14px 0 22px;
  color: #6b7280;
  font-weight: 800;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto 18px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 0.94rem;
}

.breadcrumb a {
  color: #9333ea;
  font-weight: 800;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #030712;
  box-shadow: 0 30px 90px rgba(3, 7, 18, 0.35);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #030712;
  object-fit: cover;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(147, 51, 234, 0.25), rgba(3, 7, 18, 0.20));
  cursor: pointer;
}

.player-overlay span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 20px 44px rgba(147, 51, 234, 0.38);
}

.player-overlay strong {
  margin-top: 90px;
  position: absolute;
  font-size: 1.1rem;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.glass-box {
  border-radius: 26px;
  padding: 26px;
}

.detail-info {
  margin-top: 22px;
}

.detail-kicker {
  color: #9333ea;
  font-weight: 900;
}

.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.1;
}

.detail-info .one-line {
  color: #4b5563;
  font-size: 1.1rem;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 28px;
}

.detail-tags span {
  color: #5b21b6;
  border-color: rgba(147, 51, 234, 0.18);
  background: rgba(147, 51, 234, 0.09);
}

.detail-info h2,
.detail-sidebar h2 {
  margin: 26px 0 12px;
  color: #1f2937;
  font-size: 1.35rem;
}

.detail-info p {
  color: #374151;
  line-height: 1.9;
}

.detail-sidebar {
  position: sticky;
  top: 98px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.side-list span {
  color: #db2777;
  font-weight: 900;
}

.side-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  margin-top: 30px;
  padding: 42px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-inner p {
  max-width: 560px;
  color: #6b7280;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-content: center;
}

.footer-links a {
  padding: 8px 12px;
  color: #4b5563;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .ranking-panel,
  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: 68px;
    padding: 0 16px;
  }

  .top-search,
  .desktop-nav {
    display: none;
  }

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

  .site-header.menu-open .mobile-panel {
    display: block;
  }

  .hero {
    min-height: 620px;
    height: 76vh;
  }

  .hero-content {
    padding: 110px 18px 74px;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    flex: 1 1 160px;
  }

  .main-section,
  .page-hero,
  .detail-layout,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .logo-text {
    font-size: 1.08rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

  .large-search {
    flex-direction: column;
  }

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

  .player-overlay span {
    width: 58px;
    height: 58px;
  }
}
