:root {
  --color-primary: 31 111 235;
  --color-primary-dark: 24 90 188;
  --color-secondary: 52 211 153;
  --color-accent: 251 146 60;
  --color-text-primary: 15 23 42;
  --color-text-secondary: 71 85 105;
  --color-text-muted: 148 163 184;
  --color-bg-primary: 255 255 255;
  --color-bg-secondary: 248 250 252;
  --color-bg-tertiary: 241 245 249;
  --color-border: 226 232 240;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: rgb(var(--color-bg-secondary));
  color: rgb(var(--color-text-primary));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.container-custom {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgb(var(--color-border));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.75rem;
  background: rgb(var(--color-primary));
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.26);
}

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

.brand-text strong {
  font-size: 1.18rem;
}

.brand-text em {
  margin-top: 0.25rem;
  color: rgb(var(--color-text-muted));
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.08em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.6rem;
  color: rgb(var(--color-text-secondary));
  font-size: 0.95rem;
  font-weight: 600;
}

.desktop-nav a,
.nav-dropdown button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown button:hover {
  color: rgb(var(--color-primary));
}

.nav-dropdown {
  position: relative;
  padding: 1.4rem 0;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 15.5rem;
  padding: 0.75rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: all 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  color: rgb(var(--color-text-secondary));
}

.dropdown-panel a:hover {
  background: #eff6ff;
  color: rgb(var(--color-primary));
}

.top-search {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.top-search input {
  width: 15rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.7rem;
  background: rgb(var(--color-bg-tertiary));
  outline: none;
}

.top-search input:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.top-search button,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.7rem;
  background: rgb(var(--color-primary));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.72rem 1.3rem;
  transition: all 0.2s ease;
}

.top-search button:hover,
.btn-primary:hover {
  background: rgb(var(--color-primary-dark));
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  padding: 0.72rem 1.15rem;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.mobile-menu-btn {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.7rem;
  background: rgb(var(--color-bg-tertiary));
  color: rgb(var(--color-text-primary));
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgb(var(--color-border));
  background: #fff;
  padding: 0.85rem 1rem 1rem;
}

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

.mobile-nav a {
  display: block;
  padding: 0.68rem 0;
  color: rgb(var(--color-text-secondary));
  font-weight: 600;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgb(var(--color-border));
}

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.08) 100%);
}

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

.hero-copy {
  max-width: 45rem;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #60a5fa;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  color: rgb(var(--color-primary));
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 40rem;
  margin: 1.2rem 0 0;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0 1rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.92rem;
  backdrop-filter: blur(8px);
}

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

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

.hero-dot.is-active {
  width: 2rem;
  background: #fff;
}

.content-section {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.white-section {
  max-width: none;
  background: #fff;
}

.white-section > .section-head,
.white-section > .movie-grid,
.white-section > .ranking-list,
.white-section > .ranking-card-list {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0;
  color: rgb(var(--color-text-primary));
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
}

.section-link {
  color: rgb(var(--color-primary));
  font-size: 0.95rem;
  font-weight: 800;
}

.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
}

.scrollbar-hide {
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.movie-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: all 0.25s ease;
}

.movie-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(-3px);
}

.movie-card-wide {
  flex: 0 0 20rem;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

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

.poster-type {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.32rem 0.65rem;
}

.movie-card-body {
  padding: 1rem;
}

.movie-title {
  display: inline-block;
  color: rgb(var(--color-text-primary));
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
}

.movie-title:hover {
  color: rgb(var(--color-primary));
}

.movie-card-body p,
.horizontal-card p,
.ranking-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.55rem 0 0.75rem;
  color: rgb(var(--color-text-secondary));
  font-size: 0.9rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  color: rgb(var(--color-text-muted));
  font-size: 0.78rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.tag-row span {
  border-radius: 0.45rem;
  background: rgb(var(--color-bg-tertiary));
  color: rgb(var(--color-text-secondary));
  font-size: 0.75rem;
  padding: 0.22rem 0.5rem;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-main,
.side-card,
.article-card,
.filter-panel,
.category-tile {
  border: 1px solid rgb(var(--color-border));
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.feature-main {
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.feature-main h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.feature-main p {
  color: rgb(var(--color-text-secondary));
  line-height: 1.85;
}

.feature-side {
  display: grid;
  gap: 1rem;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.95rem;
  background: #fff;
}

.horizontal-cover {
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.85rem;
  background: #fff;
}

.rank-no {
  color: rgb(var(--color-primary));
  font-weight: 900;
}

.rank-no.large {
  font-size: 1.2rem;
}

.ranking-list a {
  font-weight: 800;
}

.ranking-list em {
  color: rgb(var(--color-text-muted));
  font-style: normal;
}

.dark-cta {
  padding: 4.5rem 1rem;
  background: #0f172a;
  color: #fff;
  text-align: center;
}

.dark-cta h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.dark-cta p {
  max-width: 44rem;
  margin: 1rem auto 1.5rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.page-shell {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.small-hero {
  padding: 4rem 0;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.5), transparent 30%), #0f172a;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.page-hero p {
  max-width: 46rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 0.88rem;
}

.breadcrumb a:hover {
  color: #fff;
}

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

.category-tile {
  overflow: hidden;
}

.category-tile-main {
  display: block;
  padding: 1.4rem;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.category-tile span {
  display: block;
  color: rgb(var(--color-primary));
  font-weight: 900;
  margin-bottom: 0.45rem;
}

.category-tile strong {
  display: block;
  color: rgb(var(--color-text-primary));
  line-height: 1.65;
}

.category-preview-links {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.4rem 1.25rem;
}

.category-preview-links a {
  color: rgb(var(--color-text-secondary));
  font-size: 0.92rem;
}

.category-preview-links a:hover {
  color: rgb(var(--color-primary));
}

.ranking-card-list {
  display: grid;
  gap: 1rem;
}

.ranking-card {
  display: grid;
  grid-template-columns: auto 5.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 1rem;
  background: #fff;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.75rem;
  background: rgb(var(--color-bg-secondary));
  outline: none;
  padding: 0.78rem 0.9rem;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.empty-state {
  padding: 2rem;
  border: 1px dashed rgb(var(--color-border));
  border-radius: 1rem;
  color: rgb(var(--color-text-secondary));
  text-align: center;
}

.detail-hero {
  padding: 3.5rem 0;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.45), transparent 28%), #0f172a;
  color: #fff;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  width: min(18rem, 72vw);
  border-radius: 1rem;
  background: #1e293b;
  aspect-ratio: 2 / 3;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.32);
}

.detail-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.15;
}

.detail-one-line {
  max-width: 48rem;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.1rem 0;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.38rem 0.75rem;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.detail-main {
  display: grid;
  gap: 1.3rem;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-button {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  padding-left: 0.2rem;
  box-shadow: 0 20px 35px rgba(37, 99, 235, 0.3);
}

.article-card {
  padding: clamp(1.2rem, 4vw, 2rem);
}

.article-card h2,
.side-card h2 {
  margin-top: 0;
}

.article-card p {
  color: rgb(var(--color-text-secondary));
  line-height: 1.95;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.side-card {
  padding: 1.2rem;
}

.side-card dl {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.7rem 1rem;
  margin: 0;
}

.side-card dt {
  color: rgb(var(--color-text-muted));
}

.side-card dd {
  margin: 0;
  color: rgb(var(--color-text-secondary));
}

.side-card a {
  color: rgb(var(--color-primary));
  font-weight: 700;
}

.site-footer {
  background: #fff;
  border-top: 1px solid rgb(var(--color-border));
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  color: rgb(var(--color-text-secondary));
}

.footer-inner strong {
  color: rgb(var(--color-text-primary));
}

.footer-inner p {
  margin: 0.35rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a:hover {
  color: rgb(var(--color-primary));
}

.animate-slide-in {
  animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

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

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

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

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

  .filter-panel {
    grid-template-columns: 1fr 12rem 12rem;
  }
}

@media (min-width: 900px) {
  .desktop-nav,
  .top-search {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero {
    height: 600px;
  }

  .feature-layout {
    grid-template-columns: 1.08fr 1fr;
  }

  .detail-hero-grid {
    grid-template-columns: 18rem 1fr;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }

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

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

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

@media (max-width: 639px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-card {
    grid-template-columns: auto 4rem 1fr;
    gap: 0.75rem;
  }

  .horizontal-card {
    grid-template-columns: 5.5rem 1fr;
  }
}
