* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0f172a;
  color: #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #0f172a;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 20px;
  background: linear-gradient(90deg, #fde047, #fff7ad);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-subtitle {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
}

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

.nav-link {
  color: #e5e7eb;
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link.active {
  color: #fde047;
}

.header-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-controls input,
.filter-controls select {
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 11px 15px;
  transition: border 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: #fde047;
  box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.16);
  background: rgba(255, 255, 255, 0.12);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  background: #fde047;
  color: #111827;
  font-weight: 800;
  padding: 11px 18px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

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

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-nav-link {
  color: #e5e7eb;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-gradient,
.hero-side-gradient {
  position: absolute;
  inset: 0;
}

.hero-gradient {
  background: linear-gradient(0deg, #0f172a 2%, rgba(15, 23, 42, 0.76) 35%, rgba(15, 23, 42, 0.08) 100%);
}

.hero-side-gradient {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.72));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #fde047;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 660px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(18px, 2.2vw, 24px);
}

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

.hero-tags {
  margin: 26px 0 32px;
}

.hero-tags span,
.detail-chips span,
.tag-list span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.hero-tags span:first-child,
.detail-chips span:first-child {
  background: #fde047;
  color: #111827;
  border-color: #fde047;
  font-weight: 800;
}

.hero-actions,
.detail-info .primary-button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.primary-button {
  color: #111827;
  background: linear-gradient(90deg, #facc15, #f59e0b);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fde047;
}

.home-stack,
.page-shell {
  padding: 64px 0;
}

.section-block {
  margin-bottom: 76px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading.between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.filter-heading h2,
.detail-content h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading a,
.breadcrumb a {
  color: #fde047;
  font-weight: 800;
}

.movie-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-width: thin;
}

.rail-item {
  flex: 0 0 310px;
}

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

.listing-grid {
  align-items: start;
}

.movie-card,
.rank-card,
.category-card,
.filter-panel,
.cta-panel,
.detail-content,
.player-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

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

.movie-card:hover {
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(253, 224, 71, 0.35);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.8), rgba(15, 23, 42, 0.8));
}

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

.movie-card:hover .poster-link img,
.rank-card:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(250, 204, 21, 0.92);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #111827;
  background: #fde047;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.movie-card h3,
.rank-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
  color: #fde047;
}

.movie-card p,
.rank-card p,
.page-hero p,
.detail-content p,
.site-footer p,
.cta-panel p,
.filter-heading p {
  color: #cbd5e1;
}

.movie-card p {
  min-height: 54px;
  margin: 0 0 14px;
  font-size: 14px;
}

.tag-list span {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 12px;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.82), rgba(219, 39, 119, 0.78));
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px) scale(1.02);
  filter: brightness(1.06);
}

.category-tile span,
.category-card h2 {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small,
.category-card p,
.category-card strong {
  position: relative;
  z-index: 2;
}

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

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

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

.rank-number {
  width: 48px;
  text-align: center;
  color: #fde047;
  font-size: 32px;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

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

.rank-body h3 {
  margin-top: 0;
}

.rank-body p {
  margin: 0 0 10px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-cloud a {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.tag-cloud a:hover {
  background: #fde047;
  color: #111827;
  transform: translateY(-2px);
}

.cta-panel,
.page-hero,
.filter-panel,
.player-section,
.detail-content {
  border-radius: 28px;
}

.cta-panel,
.page-hero {
  padding: clamp(32px, 5vw, 56px);
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.18), transparent 34%), linear-gradient(135deg, rgba(88, 28, 135, 0.62), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(253, 224, 71, 0.16);
}

.cta-panel {
  text-align: center;
}

.cta-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
}

.cta-panel p {
  max-width: 760px;
  margin: 0 auto 28px;
  font-size: 18px;
}

.page-shell {
  background: linear-gradient(180deg, #0f172a, #140b28 55%, #020617);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 9px;
  color: #64748b;
}

.page-hero.small h1 {
  max-width: 850px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero.small p {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-panel {
  margin: 30px 0;
  padding: 24px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: #e5e7eb;
  font-weight: 700;
}

.filter-controls select {
  appearance: none;
}

.empty-state {
  margin: 18px 0 0;
  color: #fde047;
  font-weight: 800;
}

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

.category-card {
  display: grid;
  min-height: 220px;
  align-content: end;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card-glow {
  position: absolute;
  right: -80px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(253, 224, 71, 0.2);
}

.category-card strong {
  color: #fde047;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  margin-bottom: 42px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.8), rgba(15, 23, 42, 0.8));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

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

.detail-info .lead {
  max-width: 760px;
  margin: 22px 0;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-chips,
.detail-tags {
  margin-bottom: 18px;
}

.player-section {
  margin: 28px 0 36px;
  padding: clamp(18px, 3vw, 28px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  font-weight: 900;
  font-size: clamp(18px, 2.6vw, 30px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: clamp(70px, 8vw, 96px);
  height: clamp(70px, 8vw, 96px);
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 24px 50px rgba(245, 158, 11, 0.35);
}

.detail-content {
  display: grid;
  gap: 28px;
  margin-bottom: 70px;
  padding: clamp(24px, 4vw, 38px);
}

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

.related-grid .movie-card.compact p {
  min-height: auto;
}

.search-page-form {
  max-width: 680px;
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  min-height: 52px;
}

.site-footer {
  background: linear-gradient(180deg, #020617, #0f172a);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 20px;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fde047;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fde047;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
  z-index: 30;
}

.back-to-top.is-visible {
  display: block;
}

[hidden],
.movie-card.is-hidden,
.rank-card.is-hidden {
  display: none !important;
}

@media (max-width: 1000px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

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

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

  .detail-hero {
    grid-template-columns: 250px 1fr;
  }
}

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

  .hero-carousel {
    min-height: 650px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 80px;
  }

  .section-heading.between,
  .footer-grid,
  .detail-hero,
  .filter-controls {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

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

  .rank-number {
    width: 38px;
    font-size: 24px;
  }

  .rank-body p,
  .rank-meta span:nth-child(3) {
    display: none;
  }

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

  .player-shell {
    border-radius: 18px;
  }

  .search-page-form {
    display: grid;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 17px;
  }

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

  .rail-item {
    flex-basis: 270px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

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