* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #f3f4f6;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(to bottom, #0a0d24, #1a1a3e, #0a0d24);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 12%, rgba(125, 96, 245, 0.28), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(125, 154, 255, 0.22), transparent 24%),
    radial-gradient(circle at 50% 90%, rgba(109, 62, 237, 0.18), transparent 30%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    radial-gradient(#ffffff 0.7px, transparent 0.7px),
    radial-gradient(#9d8df9 0.8px, transparent 0.8px);
  background-size: 68px 68px, 92px 92px;
  background-position: 0 0, 24px 32px;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 13, 36, 0.72);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #9d8df9, #7d9aff);
  box-shadow: 0 0 28px rgba(125, 96, 245, 0.46);
  animation: twinkle 3s ease-in-out infinite;
}

.brand-text {
  font-size: 1.25rem;
  background: linear-gradient(90deg, #9d8df9, #7d9aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(93, 119, 255, 0.18);
}

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

.nav-link {
  color: #d1d5db;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #9d8df9;
  text-shadow: 0 0 10px rgba(93, 119, 255, 0.8);
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.dropdown-panel {
  position: absolute;
  top: 34px;
  right: 0;
  width: 180px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(13, 17, 45, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: #d1d5db;
}

.dropdown-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.mobile-nav .nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.site-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.glass-effect,
.hero,
.movie-card,
.rank-card,
.category-tile,
.filter-box,
.player-shell,
.detail-panel,
.page-panel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  margin-bottom: 64px;
  border-radius: 32px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

.hero-stars {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
}

.hero-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
  animation: twinkle 3s ease-in-out infinite;
}

.hero-track {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 36px;
  align-items: center;
  padding: 56px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  transform: scale(1);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #dcd6ff;
  background: rgba(109, 62, 237, 0.3);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #9d8df9, #7d9aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.button-primary {
  border-color: rgba(157, 141, 249, 0.55);
  background: linear-gradient(135deg, #9d8df9, #6d3eed);
  box-shadow: 0 18px 46px rgba(109, 62, 237, 0.3);
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(1.4deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 62%);
}

.hero-poster-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  font-size: 1.35rem;
}

.hero-poster-info span {
  color: #d1d5db;
}

.hero-dots {
  position: absolute;
  left: 56px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 34px;
  background: #9d8df9;
}

.content-section {
  margin-bottom: 64px;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.section-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(125, 96, 245, 0.34);
}

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

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

.card-grid.six-column {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

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

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(157, 141, 249, 0.55);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.46);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.35);
}

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

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

.movie-card:hover .movie-cover img {
  transform: scale(1.1);
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 64%);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(125, 96, 245, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: all 0.25s ease;
}

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

.category-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.8rem;
  background: rgba(109, 62, 237, 0.86);
}

.movie-info {
  padding: 16px;
}

.movie-info h3,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-info h3 a:hover {
  color: #9d8df9;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #d1d5db;
  font-size: 0.92rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #cbd5e1;
  font-size: 0.86rem;
}

.movie-meta span:first-child {
  color: #facc15;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #dcd6ff;
  font-size: 0.78rem;
  background: rgba(157, 141, 249, 0.14);
}

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(157, 141, 249, 0.55);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #9d8df9, #6d3eed);
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rank-info p {
  margin: 0 0 12px;
  color: #d1d5db;
  line-height: 1.7;
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(157, 141, 249, 0.22);
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(157, 141, 249, 0.55);
}

.category-tile h3 {
  position: relative;
  margin: 0;
  font-size: 1.18rem;
}

.category-tile p {
  position: relative;
  margin: 8px 0 14px;
  color: #d1d5db;
  line-height: 1.6;
}

.category-tile span {
  position: relative;
  color: #9d8df9;
  font-weight: 700;
}

.filter-box {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
}

.filter-box input,
.filter-box select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  outline: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 0 14px;
}

.filter-box option {
  color: #111827;
}

.page-panel {
  margin-bottom: 28px;
  padding: 28px;
  border-radius: 26px;
}

.page-panel p {
  color: #d1d5db;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #9d8df9;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.7fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border-radius: 24px;
}

.video-box {
  position: relative;
  background: #000000;
}

.video-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-hint {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.86rem;
  background: rgba(0, 0, 0, 0.55);
}

.detail-panel {
  padding: 24px;
  border-radius: 24px;
}

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
}

.detail-panel h2 {
  margin: 28px 0 12px;
  color: #ffffff;
}

.detail-panel p {
  color: #d1d5db;
  line-height: 1.9;
}

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

.stat-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  color: #9d8df9;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: #d1d5db;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.no-results.show {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 13, 36, 0.62);
  backdrop-filter: blur(14px);
}

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

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #9d8df9;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.32;
  }
}

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

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

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

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

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

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

@media (max-width: 720px) {
  .site-main {
    width: min(100% - 24px, 1280px);
    padding-top: 22px;
  }

  .hero {
    min-height: auto;
    border-radius: 24px;
  }

  .hero-track {
    min-height: auto;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-dots {
    left: 28px;
    bottom: 18px;
  }

  .card-grid,
  .card-grid.two-column,
  .card-grid.six-column,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .rank-card {
    grid-template-columns: 42px 96px 1fr;
    gap: 12px;
  }

  .rank-info p {
    display: none;
  }

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

@media (max-width: 480px) {
  .card-grid,
  .card-grid.two-column,
  .card-grid.six-column,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 1fr;
  }

  .rank-number {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 3;
  }
}
