* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #f8fafc;
  background: linear-gradient(180deg, #111827 0%, #241234 48%, #111827 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #312e81 0%, #581c87 48%, #831843 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
}

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

.brand-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f472b6);
  box-shadow: 0 0 28px rgba(244, 114, 182, 0.42);
}

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

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fde047;
}

.search-form,
.wide-search {
  display: flex;
  align-items: center;
}

.search-form input,
.wide-search input,
.page-search input {
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.search-form input {
  padding: 10px 16px;
  border-radius: 999px 0 0 999px;
}

.search-form input:focus,
.wide-search input:focus,
.page-search input:focus {
  border-color: rgba(250, 204, 21, 0.75);
  background: rgba(255, 255, 255, 0.16);
}

.search-form button,
.wide-search button,
.page-search button {
  border: 0;
  color: #111827;
  font-weight: 700;
  background: #facc15;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.search-form button {
  padding: 10px 16px;
  border-radius: 0 999px 999px 0;
}

.search-form button:hover,
.wide-search button:hover,
.page-search button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  font-size: 26px;
  background: transparent;
}

.mobile-nav {
  display: none;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0.75) 44%, rgba(17, 24, 39, 0.18) 100%), linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(88, 28, 135, 0.32));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
}

.hero-kicker,
.page-hero span,
.section-title span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #facc15;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.22);
}

.hero-tags span,
.detail-meta span {
  padding: 7px 12px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #eab308, #ec4899);
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.28);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  right: max(26px, calc((100vw - 1180px) / 2));
  bottom: 74px;
  display: flex;
  gap: 10px;
}

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

.hero-dots button.active {
  background: #facc15;
}

.section-wrap {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
}

.quick-search-panel h2,
.section-title h2,
.page-hero h1,
.detail-info h1,
.detail-content h2,
.ranking-panel h2 {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.quick-search-panel h2,
.section-title h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.quick-search-panel p,
.category-overview-block p,
.page-hero p,
.detail-one-line,
.detail-content p,
.site-footer p {
  color: #cbd5e1;
  line-height: 1.85;
}

.wide-search input,
.page-search input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 999px 0 0 999px;
}

.wide-search button,
.page-search button {
  min-width: 120px;
  padding: 16px 20px;
  border-radius: 0 999px 999px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
}

.section-title a {
  color: #facc15;
  font-weight: 700;
}

.compact {
  align-items: center;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(250, 204, 21, 0.38);
  box-shadow: 0 20px 46px rgba(168, 85, 247, 0.22);
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #020617;
}

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

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

.poster-frame figcaption {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  background: #facc15;
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta span,
.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
}

.glow-section {
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.2), rgba(49, 46, 129, 0.24));
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 180px;
  align-content: end;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  background: #111827;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.35s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.95), rgba(88, 28, 135, 0.2));
}

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

.category-tile span {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  color: #d1d5db;
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
}

.ranking-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.rank-list,
.ranking-page-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-num {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: #facc15;
}

.rank-item img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-text strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  display: grid;
  min-height: 330px;
  place-items: center;
  padding: 70px 20px;
  text-align: center;
  background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.2), transparent 30%), linear-gradient(135deg, rgba(49, 46, 129, 0.9), rgba(88, 28, 135, 0.58), rgba(17, 24, 39, 0.9));
}

.page-hero div {
  width: min(820px, 100%);
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 60px);
}

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

.category-overview-block {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.54);
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 0;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #facc15;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 0;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(88, 28, 135, 0.28));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 56px);
}

.detail-one-line {
  margin: 0 0 20px;
  font-size: 18px;
}

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

.player-section {
  width: min(1180px, calc(100% - 40px));
  margin: 40px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
}

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

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.2));
  cursor: pointer;
}

.player-cover-button span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 38px;
  background: linear-gradient(135deg, #eab308, #ec4899);
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.32);
}

.player-cover-button.hidden {
  display: none;
}

.narrow-wrap {
  width: min(900px, calc(100% - 40px));
}

.detail-content h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

.detail-content p {
  margin: 0 0 18px;
  font-size: 17px;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.copyright {
  padding: 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

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

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

  .home-split {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .hero {
    min-height: 560px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
  }

  .quick-search-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

  .ranking-page-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    padding: 14px 18px;
  }

  .brand {
    font-size: 20px;
  }

  .hero-content {
    bottom: 52px;
  }

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

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

  .section-wrap {
    width: min(100% - 28px, 1280px);
    padding: 50px 0;
  }

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

  .detail-hero {
    width: min(100% - 28px, 1180px);
    padding: 20px;
  }

  .player-section,
  .breadcrumb,
  .narrow-wrap {
    width: min(100% - 28px, 1180px);
  }

  .player-cover-button span {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
