:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --secondary-500: #f59e0b;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.08);
  --shadow-md: 0 12px 30px rgba(28, 25, 23, 0.12);
  --shadow-lg: 0 28px 80px rgba(28, 25, 23, 0.22);
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand-text em {
  color: var(--neutral-500);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: var(--neutral-600);
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-button:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.menu-button {
  display: none;
}

.search-bar,
.mobile-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--neutral-200);
}

.search-form {
  position: relative;
  display: flex;
  gap: 10px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  outline: 0;
  background: var(--white);
}

.search-form input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.search-form button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
}

.search-form button,
.primary-button {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 16px 32px rgba(2, 132, 199, 0.22);
}

.search-form button:hover,
.primary-button:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.search-item,
.empty-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
}

.search-item strong {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-item span,
.empty-result {
  color: var(--neutral-500);
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: 540px;
  height: 62vh;
  max-height: 680px;
  overflow: hidden;
  background: var(--neutral-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide img {
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
  color: var(--white);
}

.hero-content > * {
  max-width: 720px;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neutral-700);
  background: var(--neutral-100);
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 30px;
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.54);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 30px;
  background: var(--white);
}

.quick-panel,
.content-section,
.footer-inner,
.detail-hero-inner {
  width: min(1280px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  transform: translateY(-34px);
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.quick-copy h2,
.section-heading h2,
.side-rank h2,
.article-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.quick-copy p,
.section-heading p,
.category-overview-card p,
.page-hero p,
.article-panel p,
.site-footer p {
  color: var(--neutral-600);
}

.quick-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 800;
}

.content-section {
  padding: 28px 0 56px;
}

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

.section-heading a {
  color: var(--primary-700);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neutral-200), var(--primary-100));
}

.poster-wrap img {
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

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

.score-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--primary-700);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--neutral-500);
  font-size: 12px;
}

.movie-card p {
  margin: 10px 0 0;
  color: var(--neutral-600);
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.carousel-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}

.carousel-row::-webkit-scrollbar {
  display: none;
}

.panel-section {
  padding: 34px 0 60px;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.6), transparent);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
}

.side-rank,
.article-panel,
.related-panel,
.player-panel,
.category-overview-card {
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.side-rank {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 92px;
}

.rank-list,
.full-rank-list,
.mini-link-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--neutral-50);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-50);
  transform: translateX(2px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--white);
  background: var(--neutral-900);
  font-weight: 900;
}

.rank-item img {
  width: 52px;
  height: 72px;
  border-radius: 10px;
  background: var(--neutral-200);
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rank-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  overflow: hidden;
  color: var(--neutral-500);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item b {
  color: var(--primary-700);
}

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

.category-card,
.category-overview-card {
  display: block;
  padding: 22px;
  transition: 0.2s ease;
}

.category-card {
  border-radius: 22px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  border: 1px solid var(--neutral-200);
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-card strong,
.category-title-link h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card span {
  color: var(--neutral-600);
  font-size: 14px;
}

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

.mini-link-list a {
  padding: 10px 0;
  border-top: 1px solid var(--neutral-200);
  color: var(--neutral-700);
  font-weight: 700;
}

.mini-link-list a:hover {
  color: var(--primary-700);
}

.page-hero {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 64px 24px;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.58), transparent 30%), linear-gradient(135deg, #0f172a, #075985 58%, #0c4a6e);
}

.page-hero > div {
  width: min(980px, 100%);
  text-align: center;
}

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

.page-hero p {
  margin: 0 auto;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.slim-hero {
  min-height: 300px;
}

.small-actions {
  justify-content: center;
}

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

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--neutral-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(3px) saturate(1.2);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 36px 0 56px;
}

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

.breadcrumb a:hover {
  color: var(--white);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 24px;
  background: var(--neutral-200);
  box-shadow: var(--shadow-lg);
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.one-line {
  max-width: 880px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.detail-meta span,
.detail-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.detail-main {
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.player-panel {
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 28px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(2, 132, 199, 0.16), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--white);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
}

.play-cover strong {
  font-size: 20px;
}

.article-panel,
.related-panel {
  padding: 28px;
  margin-bottom: 28px;
}

.article-panel p {
  font-size: 17px;
}

.site-footer {
  margin-top: 34px;
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--neutral-900);
}

.footer-inner {
  display: grid;
  gap: 22px;
}

.site-footer strong {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.64);
}

.site-footer small {
  color: rgba(255, 255, 255, 0.52);
}

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

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

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

  .side-rank {
    position: static;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav {
    display: grid;
    align-items: stretch;
  }

  .hero {
    min-height: 580px;
    height: auto;
  }

  .hero-content {
    padding: 82px 0 94px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.34));
  }

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

  .movie-grid,
  .listing-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-section .full-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster {
    width: min(270px, 100%);
  }

  .hero-arrow {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .quick-panel,
  .content-section,
  .footer-inner,
  .detail-hero-inner {
    width: calc(100% - 28px);
    padding-left: 0;
    padding-right: 0;
  }

  .brand-text em {
    display: none;
  }

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

  .movie-grid,
  .listing-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-section .full-rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 30px 46px minmax(0, 1fr);
  }

  .rank-item b {
    display: none;
  }

  .hero-content {
    width: calc(100% - 28px);
  }
}
